@atlaskit/editor-core 209.0.1 → 209.0.3

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 (56) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +12 -1
  3. package/dist/cjs/ui/Appearance/Chromeless.js +12 -2
  4. package/dist/cjs/ui/EditorContentContainer/styles/extensionStyles.js +10 -0
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/es2019/create-editor/ReactEditorView.js +12 -1
  7. package/dist/es2019/ui/Appearance/Chromeless.js +12 -2
  8. package/dist/es2019/ui/EditorContentContainer/styles/extensionStyles.js +10 -0
  9. package/dist/es2019/version-wrapper.js +1 -1
  10. package/dist/esm/create-editor/ReactEditorView.js +12 -1
  11. package/dist/esm/ui/Appearance/Chromeless.js +12 -2
  12. package/dist/esm/ui/EditorContentContainer/styles/extensionStyles.js +10 -0
  13. package/dist/esm/version-wrapper.js +1 -1
  14. package/dist/types/composable-editor/editor-internal.d.ts +1 -0
  15. package/dist/types/create-editor/ReactEditorView/useDispatchTransaction.d.ts +1 -1
  16. package/dist/types/create-editor/create-universal-preset.d.ts +919 -75
  17. package/dist/types/create-editor/editorStateNotificationPlugin.d.ts +2 -2
  18. package/dist/types/create-editor/get-ui-component.d.ts +1 -0
  19. package/dist/types/presets/universal.d.ts +924 -75
  20. package/dist/types/presets/useUniversalPreset.d.ts +919 -75
  21. package/dist/types/test-utils.d.ts +1 -1
  22. package/dist/types/types/with-appearance-component.d.ts +1 -0
  23. package/dist/types/ui/Addon/types.d.ts +1 -0
  24. package/dist/types/ui/Appearance/Chromeless.d.ts +7 -7
  25. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +7 -7
  26. package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
  27. package/dist/types/ui/CollapsedEditor/index.d.ts +1 -1
  28. package/dist/types/ui/ContentStyles/ai-panels.d.ts +1 -1
  29. package/dist/types/ui/ContentStyles/layout.d.ts +1 -1
  30. package/dist/types/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.d.ts +1 -0
  31. package/dist/types/ui/Toolbar/Toolbar.d.ts +1 -0
  32. package/dist/types/utils/is-full-page.d.ts +1 -1
  33. package/dist/types/utils/prepare-extension-provider.d.ts +1 -1
  34. package/dist/types/utils/prepare-quick-insert-provider.d.ts +1 -0
  35. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -0
  36. package/dist/types-ts4.5/create-editor/ReactEditorView/useDispatchTransaction.d.ts +1 -1
  37. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1072 -100
  38. package/dist/types-ts4.5/create-editor/editorStateNotificationPlugin.d.ts +2 -2
  39. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -0
  40. package/dist/types-ts4.5/presets/universal.d.ts +1077 -100
  41. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +1072 -100
  42. package/dist/types-ts4.5/test-utils.d.ts +1 -1
  43. package/dist/types-ts4.5/types/with-appearance-component.d.ts +1 -0
  44. package/dist/types-ts4.5/ui/Addon/types.d.ts +1 -0
  45. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +7 -7
  46. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +7 -7
  47. package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
  48. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -1
  49. package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +1 -1
  50. package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +1 -1
  51. package/dist/types-ts4.5/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.d.ts +1 -0
  52. package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +1 -0
  53. package/dist/types-ts4.5/utils/is-full-page.d.ts +1 -1
  54. package/dist/types-ts4.5/utils/prepare-extension-provider.d.ts +1 -1
  55. package/dist/types-ts4.5/utils/prepare-quick-insert-provider.d.ts +1 -0
  56. package/package.json +10 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 209.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#181948](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181948)
8
+ [`e7e5b1bee5fb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7e5b1bee5fb2) -
9
+ [ux] [EDF-2688] Fix extra space for last line in comment editor
10
+ - Updated dependencies
11
+
12
+ ## 209.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#181802](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181802)
17
+ [`4f35336716da7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4f35336716da7) -
18
+ EDITOR-921 Prevent calls to scrollTop calculation for editors nested in LCE
19
+ - Updated dependencies
20
+
3
21
  ## 209.0.1
4
22
 
5
23
  ### Patch Changes
@@ -479,7 +479,18 @@ function ReactEditorView(props) {
479
479
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
480
480
  editorView = _useState4[0],
481
481
  setEditorView = _useState4[1];
482
- var originalScrollToRestore = _react.default.useRef((0, _isFullPage.isFullPage)(props.editorProps.appearance) && (0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
482
+
483
+ // Detects if the editor is nested inside an extension - ie. it is a Legacy Content Extension (LCE)
484
+ var isNestedEditor = (0, _react.useRef)(null);
485
+ var isNestedEditorCalculated = (0, _react.useRef)(false);
486
+ if ((0, _platformFeatureFlags.fg)('platform_editor_lce_scrolltop_mitigation')) {
487
+ if (editorRef.current !== null && !isNestedEditorCalculated.current) {
488
+ var _editorRef$current;
489
+ isNestedEditor.current = !!((_editorRef$current = editorRef.current) !== null && _editorRef$current !== void 0 && _editorRef$current.closest('.extension-editable-area'));
490
+ isNestedEditorCalculated.current = true;
491
+ }
492
+ }
493
+ var originalScrollToRestore = _react.default.useRef(!isNestedEditor.current && (0, _isFullPage.isFullPage)(props.editorProps.appearance) && (0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
483
494
  var mitigateScrollJump =
484
495
  // The feature gate here is being used to avoid potential bugs with the scroll restoration code
485
496
  // moving it to the end of the expression negates the point of the feature gate
@@ -17,6 +17,7 @@ var _react2 = require("@emotion/react");
17
17
  var _hooks = require("@atlaskit/editor-common/hooks");
18
18
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
19
19
  var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
20
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
21
  var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
21
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
23
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -95,6 +96,15 @@ var chromelessEditorStylesNew = (0, _react2.css)({
95
96
  }
96
97
  }
97
98
  });
99
+ var extraSpaceLastLineFix = (0, _react2.css)({
100
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
101
+ '.ProseMirror': {
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
103
+ '& > p:last-of-type': {
104
+ marginBottom: "var(--ds-space-0, 0px)"
105
+ }
106
+ }
107
+ });
98
108
  var ContentArea = exports.ContentArea = (0, _ContentStyles.createEditorContentStyle)();
99
109
  ContentArea.displayName = 'ContentArea';
100
110
  var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
@@ -223,7 +233,7 @@ function ChromelessEditorContainerNext(_ref3) {
223
233
  children = _ref3.children,
224
234
  containerRef = _ref3.containerRef;
225
235
  return (0, _react2.jsx)("div", {
226
- css: [chromelessEditorStylesNew, scrollbarStylesNew],
236
+ css: [chromelessEditorStylesNew, scrollbarStylesNew, (0, _platformFeatureFlags.fg)('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
227
237
  style: {
228
238
  maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
229
239
  minHeight: "".concat(minHeight, "px")
@@ -249,7 +259,7 @@ function ChromelessEditorContainerOld(_ref4) {
249
259
  (0, _react2.css)({
250
260
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
251
261
  minHeight: "".concat(minHeight, "px")
252
- })],
262
+ }), (0, _platformFeatureFlags.fg)('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
253
263
  "data-testid": "chromeless-editor",
254
264
  id: "chromeless-editor",
255
265
  ref: containerRef
@@ -240,6 +240,16 @@ var extensionStyles = exports.extensionStyles = (0, _react.css)({
240
240
  '&.danger > span > div > .extension-label > span': {
241
241
  display: 'inline'
242
242
  },
243
+ /** Targets legacy content header in LCM extension */
244
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
245
+ '&.danger > span > .legacy-content-header': {
246
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)"),
247
+ backgroundColor: "var(--ds-background-danger, #FFECEB)",
248
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
249
+ '& .status-lozenge-span > span': {
250
+ backgroundColor: "var(--ds-background-accent-red-subtle-hovered, #FD9891)"
251
+ }
252
+ },
243
253
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
244
254
  '&:not(.danger).ak-editor-selected-node > span > div .extension-label > span': {
245
255
  display: 'inline'
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "209.0.0";
8
+ var version = exports.version = "209.0.2";
@@ -446,7 +446,18 @@ export function ReactEditorView(props) {
446
446
  return view;
447
447
  }, [getDirectEditorProps, dispatchAnalyticsEvent]);
448
448
  const [editorView, setEditorView] = useState(undefined);
449
- const originalScrollToRestore = React.useRef(isFullPage(props.editorProps.appearance) && fg('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
449
+
450
+ // Detects if the editor is nested inside an extension - ie. it is a Legacy Content Extension (LCE)
451
+ const isNestedEditor = useRef(null);
452
+ const isNestedEditorCalculated = useRef(false);
453
+ if (fg('platform_editor_lce_scrolltop_mitigation')) {
454
+ if (editorRef.current !== null && !isNestedEditorCalculated.current) {
455
+ var _editorRef$current;
456
+ isNestedEditor.current = !!((_editorRef$current = editorRef.current) !== null && _editorRef$current !== void 0 && _editorRef$current.closest('.extension-editable-area'));
457
+ isNestedEditorCalculated.current = true;
458
+ }
459
+ }
460
+ const originalScrollToRestore = React.useRef(!isNestedEditor.current && isFullPage(props.editorProps.appearance) && fg('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
450
461
  const mitigateScrollJump =
451
462
  // The feature gate here is being used to avoid potential bugs with the scroll restoration code
452
463
  // moving it to the end of the expression negates the point of the feature gate
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
10
10
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
11
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
12
12
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
14
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -82,6 +83,15 @@ const chromelessEditorStylesNew = css({
82
83
  }
83
84
  }
84
85
  });
86
+ const extraSpaceLastLineFix = css({
87
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
88
+ '.ProseMirror': {
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
90
+ '& > p:last-of-type': {
91
+ marginBottom: "var(--ds-space-0, 0px)"
92
+ }
93
+ }
94
+ });
85
95
  export const ContentArea = createEditorContentStyle();
86
96
  ContentArea.displayName = 'ContentArea';
87
97
  const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
@@ -202,7 +212,7 @@ function ChromelessEditorContainerNext({
202
212
  containerRef
203
213
  }) {
204
214
  return jsx("div", {
205
- css: [chromelessEditorStylesNew, scrollbarStylesNew],
215
+ css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
206
216
  style: {
207
217
  maxHeight: maxHeight ? `${maxHeight}px` : undefined,
208
218
  minHeight: `${minHeight}px`
@@ -229,7 +239,7 @@ function ChromelessEditorContainerOld({
229
239
  css({
230
240
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
231
241
  minHeight: `${minHeight}px`
232
- })],
242
+ }), fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
233
243
  "data-testid": "chromeless-editor",
234
244
  id: "chromeless-editor",
235
245
  ref: containerRef
@@ -234,6 +234,16 @@ export const extensionStyles = css({
234
234
  '&.danger > span > div > .extension-label > span': {
235
235
  display: 'inline'
236
236
  },
237
+ /** Targets legacy content header in LCM extension */
238
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
239
+ '&.danger > span > .legacy-content-header': {
240
+ boxShadow: `0 0 0 1px ${"var(--ds-border-danger, #E2483D)"}`,
241
+ backgroundColor: `${"var(--ds-background-danger, #FFECEB)"}`,
242
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
243
+ '& .status-lozenge-span > span': {
244
+ backgroundColor: `${"var(--ds-background-accent-red-subtle-hovered, #FD9891)"}`
245
+ }
246
+ },
237
247
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
238
248
  '&:not(.danger).ak-editor-selected-node > span > div .extension-label > span': {
239
249
  display: 'inline'
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "209.0.0";
2
+ export const version = "209.0.2";
@@ -469,7 +469,18 @@ export function ReactEditorView(props) {
469
469
  _useState4 = _slicedToArray(_useState3, 2),
470
470
  editorView = _useState4[0],
471
471
  setEditorView = _useState4[1];
472
- var originalScrollToRestore = React.useRef(isFullPage(props.editorProps.appearance) && fg('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
472
+
473
+ // Detects if the editor is nested inside an extension - ie. it is a Legacy Content Extension (LCE)
474
+ var isNestedEditor = useRef(null);
475
+ var isNestedEditorCalculated = useRef(false);
476
+ if (fg('platform_editor_lce_scrolltop_mitigation')) {
477
+ if (editorRef.current !== null && !isNestedEditorCalculated.current) {
478
+ var _editorRef$current;
479
+ isNestedEditor.current = !!((_editorRef$current = editorRef.current) !== null && _editorRef$current !== void 0 && _editorRef$current.closest('.extension-editable-area'));
480
+ isNestedEditorCalculated.current = true;
481
+ }
482
+ }
483
+ var originalScrollToRestore = React.useRef(!isNestedEditor.current && isFullPage(props.editorProps.appearance) && fg('platform_editor_reduce_scroll_jump_on_editor_start') ? (_document$querySelect = document.querySelector('[data-editor-scroll-container]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollTop : undefined);
473
484
  var mitigateScrollJump =
474
485
  // The feature gate here is being used to avoid potential bugs with the scroll restoration code
475
486
  // moving it to the end of the expression negates the point of the feature gate
@@ -17,6 +17,7 @@ import { css, jsx } from '@emotion/react';
17
17
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
18
18
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
19
19
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
20
+ import { fg } from '@atlaskit/platform-feature-flags';
20
21
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
21
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
23
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -89,6 +90,15 @@ var chromelessEditorStylesNew = css({
89
90
  }
90
91
  }
91
92
  });
93
+ var extraSpaceLastLineFix = css({
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
95
+ '.ProseMirror': {
96
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
97
+ '& > p:last-of-type': {
98
+ marginBottom: "var(--ds-space-0, 0px)"
99
+ }
100
+ }
101
+ });
92
102
  export var ContentArea = createEditorContentStyle();
93
103
  ContentArea.displayName = 'ContentArea';
94
104
  var EditorContainer = componentWithCondition(function () {
@@ -218,7 +228,7 @@ function ChromelessEditorContainerNext(_ref3) {
218
228
  children = _ref3.children,
219
229
  containerRef = _ref3.containerRef;
220
230
  return jsx("div", {
221
- css: [chromelessEditorStylesNew, scrollbarStylesNew],
231
+ css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
222
232
  style: {
223
233
  maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
224
234
  minHeight: "".concat(minHeight, "px")
@@ -244,7 +254,7 @@ function ChromelessEditorContainerOld(_ref4) {
244
254
  css({
245
255
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
246
256
  minHeight: "".concat(minHeight, "px")
247
- })],
257
+ }), fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
248
258
  "data-testid": "chromeless-editor",
249
259
  id: "chromeless-editor",
250
260
  ref: containerRef
@@ -234,6 +234,16 @@ export var extensionStyles = css({
234
234
  '&.danger > span > div > .extension-label > span': {
235
235
  display: 'inline'
236
236
  },
237
+ /** Targets legacy content header in LCM extension */
238
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
239
+ '&.danger > span > .legacy-content-header': {
240
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)"),
241
+ backgroundColor: "var(--ds-background-danger, #FFECEB)",
242
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
243
+ '& .status-lozenge-span > span': {
244
+ backgroundColor: "var(--ds-background-accent-red-subtle-hovered, #FD9891)"
245
+ }
246
+ },
237
247
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
238
248
  '&:not(.danger).ak-editor-selected-node > span > div .extension-label > span': {
239
249
  display: 'inline'
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "209.0.0";
2
+ export var version = "209.0.2";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { jsx } from '@emotion/react';
2
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
4
  import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
@@ -8,6 +8,6 @@ export declare const useDispatchTransaction: ({ onChange, dispatchAnalyticsEvent
8
8
  onChange: EditorOnChangeHandler | undefined;
9
9
  dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
10
10
  onEditorViewUpdated: (params: EditorViewStateUpdatedCallbackProps) => void;
11
- isRemoteReplaceDocumentTransaction?: (tr: Transaction) => boolean;
11
+ isRemoteReplaceDocumentTransaction?: ((tr: Transaction) => boolean) | undefined;
12
12
  }) => DispatchTransaction;
13
13
  export {};