@atlaskit/editor-core 192.6.0 → 192.7.0

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.
@@ -1,3 +1,4 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/createClass";
3
4
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
@@ -5,12 +6,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
10
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
11
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
12
12
  /** @jsx jsx */
13
- import React, { Fragment } from 'react';
13
+ import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
14
14
  import { css, jsx } from '@emotion/react';
15
15
  import classnames from 'classnames';
16
16
  import { injectIntl } from 'react-intl-next';
@@ -34,10 +34,44 @@ import Toolbar from '../../Toolbar';
34
34
  import WithFlash from '../../WithFlash';
35
35
  import { MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
36
36
  var CommentEditorMargin = 14;
37
- var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: ", " ", "\n ", ";\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
38
- var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: ", ";\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: ", ";\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", ";\n\n ", ";\n"])), getBooleanFF('platform.editor.table-sticky-scrollbar') ? 'clip' : 'hidden', "var(--ds-space-150, 12px)", CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, "var(--ds-space-250, 20px)", tableCommentEditorStyles));
37
+ var commentEditorStyle = css({
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ '.less-margin .ProseMirror': {
41
+ margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
42
+ },
43
+ minWidth: '272px',
44
+ height: 'auto',
45
+ backgroundColor: "var(--ds-background-input, white)",
46
+ border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
47
+ boxSizing: 'border-box',
48
+ borderRadius: "".concat(borderRadius(), "px"),
49
+ maxWidth: 'inherit',
50
+ wordWrap: 'break-word'
51
+ });
52
+ var ContentArea = createEditorContentStyle(css({
53
+ flexGrow: 1,
54
+ overflowX: getBooleanFF('platform.editor.table-sticky-scrollbar') ? 'clip' : 'hidden',
55
+ lineHeight: '24px',
56
+ '.ProseMirror': {
57
+ margin: "var(--ds-space-150, 12px)"
58
+ },
59
+ '.gridParent': {
60
+ marginLeft: "".concat(CommentEditorMargin - GRID_GUTTER, "px"),
61
+ marginRight: "".concat(CommentEditorMargin - GRID_GUTTER, "px"),
62
+ width: "calc(100% + ".concat(CommentEditorMargin - GRID_GUTTER, "px)")
63
+ },
64
+ padding: "var(--ds-space-250, 20px)"
65
+ }, tableCommentEditorStyles));
39
66
  ContentArea.displayName = 'ContentArea';
40
- var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: ", " ", ";\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-025, 2px)");
67
+ var secondaryToolbarStyle = css({
68
+ boxSizing: 'border-box',
69
+ justifyContent: 'flex-end',
70
+ alignItems: 'center',
71
+ display: 'flex',
72
+ padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
73
+ });
74
+ var appearance = 'comment';
41
75
  var Editor = /*#__PURE__*/function (_React$Component) {
42
76
  _inherits(Editor, _React$Component);
43
77
  var _super = _createSuper(Editor);
@@ -104,7 +138,9 @@ var Editor = /*#__PURE__*/function (_React$Component) {
104
138
  return jsx(WithFlash, {
105
139
  animate: maxContentSizeReached
106
140
  }, jsx("div", {
107
- css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
141
+ css: [commentEditorStyle, css({
142
+ minHeight: "".concat(minHeight, "px")
143
+ })],
108
144
  className: "akEditor",
109
145
  ref: _this.wrapperElementRef
110
146
  }, jsx(MainToolbar, {
@@ -143,7 +179,9 @@ var Editor = /*#__PURE__*/function (_React$Component) {
143
179
  ref: function ref(_ref3) {
144
180
  return _this.containerElement = _ref3;
145
181
  },
146
- css: maxHeight ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight) : null,
182
+ css: maxHeight ? css({
183
+ maxHeight: "".concat(maxHeight, "px")
184
+ }) : null,
147
185
  className: classnames('ak-editor-content-area', {
148
186
  'less-margin': width < akEditorMobileBreakoutPoint
149
187
  }),
@@ -209,4 +247,165 @@ function RenderWithPluginState(_ref4) {
209
247
  mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
210
248
  }));
211
249
  }
212
- export var CommentEditorWithIntl = injectIntl(Editor);
250
+ var EditorNext = function EditorNext(props) {
251
+ var api = usePresetContext();
252
+ var _useSharedPluginState2 = useSharedPluginState(api, ['media', 'maxContentSize']),
253
+ mediaState = _useSharedPluginState2.mediaState,
254
+ maxContentSizeState = _useSharedPluginState2.maxContentSizeState;
255
+ var editorDOMElement = props.editorDOMElement,
256
+ editorView = props.editorView,
257
+ editorActions = props.editorActions,
258
+ eventDispatcher = props.eventDispatcher,
259
+ providerFactory = props.providerFactory,
260
+ contentComponents = props.contentComponents,
261
+ customContentComponents = props.customContentComponents,
262
+ customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
263
+ primaryToolbarComponents = props.primaryToolbarComponents,
264
+ customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
265
+ popupsMountPoint = props.popupsMountPoint,
266
+ popupsBoundariesElement = props.popupsBoundariesElement,
267
+ popupsScrollableElement = props.popupsScrollableElement,
268
+ maxHeight = props.maxHeight,
269
+ _props$minHeight = props.minHeight,
270
+ minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
271
+ onSave = props.onSave,
272
+ onCancel = props.onCancel,
273
+ disabled = props.disabled,
274
+ dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
275
+ intl = props.intl,
276
+ useStickyToolbar = props.useStickyToolbar,
277
+ pluginHooks = props.pluginHooks,
278
+ featureFlags = props.featureFlags,
279
+ innerRef = props.innerRef;
280
+ var maxContentSizeReached = Boolean(maxContentSizeState === null || maxContentSizeState === void 0 ? void 0 : maxContentSizeState.maxContentSizeReached);
281
+ var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
282
+ var containerElement = null;
283
+
284
+ // Wrapper container for toolbar and content area
285
+ var wrapperElementRef = useMemo(function () {
286
+ return innerRef || /*#__PURE__*/React.createRef();
287
+ }, [innerRef]);
288
+ var _useState = useState(disabled),
289
+ _useState2 = _slicedToArray(_useState, 2),
290
+ saveButtonDisabled = _useState2[0],
291
+ setSaveButtonDisabled = _useState2[1];
292
+ useEffect(function () {
293
+ if (mediaState) {
294
+ mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
295
+ }
296
+ return function () {
297
+ return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
298
+ };
299
+ }, [mediaState]);
300
+ var handleSave = useCallback(function () {
301
+ if (editorView && onSave) {
302
+ onSave(editorView);
303
+ }
304
+ }, [editorView, onSave]);
305
+ var handleCancel = useCallback(function () {
306
+ if (editorView && onCancel) {
307
+ onCancel(editorView);
308
+ }
309
+ }, [editorView, onCancel]);
310
+ var isShortcutToFocusToolbar = useCallback(function (event) {
311
+ //Alt + F9 to reach first element in this main toolbar
312
+ return event.altKey && (event.key === 'F9' || event.keyCode === 120);
313
+ }, []);
314
+ var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents && !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar);
315
+ var handleEscape = useCallback(function (event) {
316
+ if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
317
+ editorView === null || editorView === void 0 || editorView.focus();
318
+ }
319
+ event.preventDefault();
320
+ event.stopPropagation();
321
+ }, [editorView]);
322
+ return jsx(WithFlash, {
323
+ animate: maxContentSizeReached
324
+ }, jsx("div", {
325
+ css: [commentEditorStyle, css({
326
+ minHeight: "".concat(minHeight, "px")
327
+ })],
328
+ className: "akEditor",
329
+ ref: wrapperElementRef
330
+ }, jsx(MainToolbar, {
331
+ useStickyToolbar: useStickyToolbar,
332
+ twoLineEditorToolbar: isTwoLineToolbarEnabled
333
+ }, jsx(ToolbarArrowKeyNavigationProvider, {
334
+ editorView: editorView,
335
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
336
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
337
+ handleEscape: handleEscape,
338
+ editorAppearance: appearance,
339
+ useStickyToolbar: useStickyToolbar,
340
+ intl: intl
341
+ }, jsx(Toolbar, {
342
+ editorView: editorView,
343
+ editorActions: editorActions,
344
+ eventDispatcher: eventDispatcher,
345
+ providerFactory: providerFactory,
346
+ appearance: appearance,
347
+ items: primaryToolbarComponents,
348
+ popupsMountPoint: popupsMountPoint,
349
+ popupsBoundariesElement: popupsBoundariesElement,
350
+ popupsScrollableElement: popupsScrollableElement,
351
+ disabled: !!disabled,
352
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
353
+ containerElement: containerElement,
354
+ twoLineEditorToolbar: isTwoLineToolbarEnabled
355
+ }), jsx("div", {
356
+ css: mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
357
+ }, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
358
+ editorView: editorView,
359
+ editorDisabled: disabled
360
+ }, jsx(WidthConsumer, null, function (_ref5) {
361
+ var width = _ref5.width;
362
+ return jsx(ContentArea, {
363
+ ref: function ref(_ref6) {
364
+ return containerElement = _ref6;
365
+ },
366
+ css: maxHeight ? css({
367
+ maxHeight: "".concat(maxHeight, "px")
368
+ }) : null,
369
+ className: classnames('ak-editor-content-area', {
370
+ 'less-margin': width < akEditorMobileBreakoutPoint
371
+ }),
372
+ featureFlags: featureFlags
373
+ }, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, jsx(PluginSlot, {
374
+ editorView: editorView,
375
+ editorActions: editorActions,
376
+ eventDispatcher: eventDispatcher,
377
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
378
+ providerFactory: providerFactory,
379
+ appearance: appearance,
380
+ items: contentComponents,
381
+ popupsMountPoint: popupsMountPoint,
382
+ popupsBoundariesElement: popupsBoundariesElement,
383
+ popupsScrollableElement: popupsScrollableElement,
384
+ containerElement: containerElement,
385
+ disabled: !!disabled,
386
+ wrapperElement: wrapperElementRef.current,
387
+ pluginHooks: pluginHooks
388
+ }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? customContentComponents.after : null);
389
+ }))), showSecondaryToolbar && jsx("div", {
390
+ css: secondaryToolbarStyle,
391
+ "data-testid": "ak-editor-secondary-toolbar"
392
+ }, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
393
+ appearance: "primary",
394
+ onClick: handleSave,
395
+ testId: "comment-save-button",
396
+ isDisabled: disabled || saveButtonDisabled
397
+ }, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
398
+ appearance: "subtle",
399
+ onClick: handleCancel,
400
+ isDisabled: disabled
401
+ }, intl.formatMessage(messages.cancelButton))), jsx("span", {
402
+ style: {
403
+ flexGrow: 1
404
+ }
405
+ }), customSecondaryToolbarComponents));
406
+ };
407
+ EditorNext.displayName = 'CommentEditorAppearance';
408
+ var CommentEditorNextWithIntl = injectIntl(EditorNext);
409
+ var CommentEditorOldWithIntl = injectIntl(Editor);
410
+ var ExportComp = getBooleanFF('platform.editor.media.alluploadsfinished-dispatch-update_ivtow') ? CommentEditorNextWithIntl : CommentEditorOldWithIntl;
411
+ export var CommentEditorWithIntl = ExportComp;
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "192.6.0";
2
+ export var version = "192.7.0";
@@ -549,9 +549,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
549
549
  };
550
550
  }, {
551
551
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
552
- } | undefined>>];
552
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
553
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
554
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
555
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
553
556
  actions: {
554
557
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
558
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
555
559
  };
556
560
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>];
557
561
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -663,9 +667,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
663
667
  };
664
668
  }, {
665
669
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
666
- } | undefined>>];
670
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
671
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
672
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
673
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
667
674
  actions: {
668
675
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
676
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
669
677
  };
670
678
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>];
671
679
  sharedState: {
@@ -1317,9 +1325,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
1317
1325
  };
1318
1326
  }, {
1319
1327
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
1320
- } | undefined>>];
1328
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
1329
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
1330
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
1331
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
1321
1332
  actions: {
1322
1333
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
1334
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
1323
1335
  };
1324
1336
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>, import("@atlaskit/editor-common/types").MaybePlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
1325
1337
  pluginConfiguration: import("@atlaskit/editor-plugin-extension").ExtensionPluginOptions | undefined;
@@ -1677,9 +1689,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
1677
1689
  };
1678
1690
  }, {
1679
1691
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
1680
- } | undefined>>];
1692
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
1693
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
1694
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
1695
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
1681
1696
  actions: {
1682
1697
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
1698
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
1683
1699
  };
1684
1700
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>];
1685
1701
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -2305,9 +2321,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
2305
2321
  };
2306
2322
  }, {
2307
2323
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
2308
- } | undefined>>];
2324
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
2325
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
2326
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
2327
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
2309
2328
  actions: {
2310
2329
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
2330
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
2311
2331
  };
2312
2332
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>];
2313
2333
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -2883,9 +2903,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
2883
2903
  };
2884
2904
  }, {
2885
2905
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
2886
- } | undefined>>];
2906
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
2907
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
2908
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
2909
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
2887
2910
  actions: {
2888
2911
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
2912
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
2889
2913
  };
2890
2914
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>];
2891
2915
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -3162,9 +3186,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
3162
3186
  };
3163
3187
  }, {
3164
3188
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
3165
- } | undefined>>];
3189
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
3190
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
3191
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
3192
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
3166
3193
  actions: {
3167
3194
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
3195
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
3168
3196
  };
3169
3197
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clearMarksOnEmptyDoc", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockType", {
3170
3198
  pluginConfiguration: import("@atlaskit/editor-plugin-block-type").BlockTypePluginOptions | undefined;
@@ -3802,9 +3830,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
3802
3830
  };
3803
3831
  }, {
3804
3832
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
3805
- } | undefined>>];
3833
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
3834
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
3835
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
3836
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
3806
3837
  actions: {
3807
3838
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
3839
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
3808
3840
  };
3809
3841
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>];
3810
3842
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -3916,9 +3948,13 @@ export declare function createPreset(props: EditorProps, prevProps?: EditorProps
3916
3948
  };
3917
3949
  }, {
3918
3950
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
3919
- } | undefined>>];
3951
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
3952
+ pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
3953
+ sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
3954
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>];
3920
3955
  actions: {
3921
3956
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
3957
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
3922
3958
  };
3923
3959
  }, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>];
3924
3960
  sharedState: {
@@ -475,9 +475,13 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
475
475
  };
476
476
  }, {
477
477
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
478
- } | undefined>>];
478
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
479
+ pluginConfiguration: FeatureFlags;
480
+ sharedState: FeatureFlags;
481
+ }, FeatureFlags>>];
479
482
  actions: {
480
483
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
484
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
481
485
  };
482
486
  }, AnnotationProviders | undefined>];
483
487
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -754,9 +758,13 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
754
758
  };
755
759
  }, {
756
760
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
757
- } | undefined>>];
761
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
762
+ pluginConfiguration: FeatureFlags;
763
+ sharedState: FeatureFlags;
764
+ }, FeatureFlags>>];
758
765
  actions: {
759
766
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
767
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
760
768
  };
761
769
  }, AnnotationProviders | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clearMarksOnEmptyDoc", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockType", {
762
770
  pluginConfiguration: BlockTypePluginOptions | undefined;
@@ -1394,9 +1402,13 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
1394
1402
  };
1395
1403
  }, {
1396
1404
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
1397
- } | undefined>>];
1405
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
1406
+ pluginConfiguration: FeatureFlags;
1407
+ sharedState: FeatureFlags;
1408
+ }, FeatureFlags>>];
1398
1409
  actions: {
1399
1410
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
1411
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
1400
1412
  };
1401
1413
  }, AnnotationProviders | undefined>];
1402
1414
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -1508,9 +1520,13 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
1508
1520
  };
1509
1521
  }, {
1510
1522
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
1511
- } | undefined>>];
1523
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
1524
+ pluginConfiguration: FeatureFlags;
1525
+ sharedState: FeatureFlags;
1526
+ }, FeatureFlags>>];
1512
1527
  actions: {
1513
1528
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
1529
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
1514
1530
  };
1515
1531
  }, AnnotationProviders | undefined>>];
1516
1532
  sharedState: {
@@ -1963,9 +1979,13 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
1963
1979
  };
1964
1980
  }, {
1965
1981
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
1966
- } | undefined>>];
1982
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
1983
+ pluginConfiguration: FeatureFlags;
1984
+ sharedState: FeatureFlags;
1985
+ }, FeatureFlags>>];
1967
1986
  actions: {
1968
1987
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
1988
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
1969
1989
  };
1970
1990
  }, AnnotationProviders | undefined>];
1971
1991
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -2242,9 +2262,13 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
2242
2262
  };
2243
2263
  }, {
2244
2264
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
2245
- } | undefined>>];
2265
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
2266
+ pluginConfiguration: FeatureFlags;
2267
+ sharedState: FeatureFlags;
2268
+ }, FeatureFlags>>];
2246
2269
  actions: {
2247
2270
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
2271
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
2248
2272
  };
2249
2273
  }, AnnotationProviders | undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clearMarksOnEmptyDoc", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockType", {
2250
2274
  pluginConfiguration: BlockTypePluginOptions | undefined;
@@ -2882,9 +2906,13 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
2882
2906
  };
2883
2907
  }, {
2884
2908
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
2885
- } | undefined>>];
2909
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
2910
+ pluginConfiguration: FeatureFlags;
2911
+ sharedState: FeatureFlags;
2912
+ }, FeatureFlags>>];
2886
2913
  actions: {
2887
2914
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
2915
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
2888
2916
  };
2889
2917
  }, AnnotationProviders | undefined>];
2890
2918
  sharedState: import("@atlaskit/editor-plugins/media/types").MediaPluginState | null;
@@ -2996,9 +3024,13 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
2996
3024
  };
2997
3025
  }, {
2998
3026
  mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
2999
- } | undefined>>];
3027
+ } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
3028
+ pluginConfiguration: FeatureFlags;
3029
+ sharedState: FeatureFlags;
3030
+ }, FeatureFlags>>];
3000
3031
  actions: {
3001
3032
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
3033
+ setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, isCommentOnMediaOn?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
3002
3034
  };
3003
3035
  }, AnnotationProviders | undefined>>];
3004
3036
  sharedState: {