@atlaskit/editor-core 187.20.0 → 187.21.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/plugins/annotation/commands/index.js +13 -1
  3. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +9 -2
  4. package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +4 -0
  5. package/dist/cjs/plugins/annotation/pm-plugins/types.js +1 -0
  6. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +2 -0
  7. package/dist/cjs/plugins/annotation/utils.js +1 -1
  8. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +28 -10
  9. package/dist/cjs/plugins/media/styles.js +1 -1
  10. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +25 -5
  11. package/dist/cjs/plugins/media/utils/media-single.js +21 -2
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/cjs/version.json +1 -1
  14. package/dist/es2019/plugins/annotation/commands/index.js +9 -0
  15. package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +10 -3
  16. package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +5 -0
  17. package/dist/es2019/plugins/annotation/pm-plugins/types.js +1 -0
  18. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +3 -1
  19. package/dist/es2019/plugins/annotation/utils.js +1 -1
  20. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +21 -3
  21. package/dist/es2019/plugins/media/styles.js +8 -2
  22. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +22 -3
  23. package/dist/es2019/plugins/media/utils/media-single.js +21 -2
  24. package/dist/es2019/version-wrapper.js +1 -1
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/plugins/annotation/commands/index.js +11 -0
  27. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +10 -3
  28. package/dist/esm/plugins/annotation/pm-plugins/reducer.js +4 -0
  29. package/dist/esm/plugins/annotation/pm-plugins/types.js +1 -0
  30. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +3 -1
  31. package/dist/esm/plugins/annotation/utils.js +1 -1
  32. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +21 -3
  33. package/dist/esm/plugins/media/styles.js +1 -1
  34. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +25 -5
  35. package/dist/esm/plugins/media/utils/media-single.js +20 -2
  36. package/dist/esm/version-wrapper.js +1 -1
  37. package/dist/esm/version.json +1 -1
  38. package/dist/types/actions/index.d.ts +2 -3
  39. package/dist/types/plugins/annotation/commands/index.d.ts +1 -0
  40. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +7 -1
  41. package/dist/types/plugins/annotation/types.d.ts +4 -0
  42. package/dist/types/plugins/annotation/update-provider.d.ts +1 -1
  43. package/dist/types/plugins/collab-edit/actions.d.ts +1 -1
  44. package/dist/types/plugins/collab-edit/events/handlers.d.ts +2 -2
  45. package/dist/types/plugins/collab-edit/events/initialize.d.ts +1 -1
  46. package/dist/types/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  47. package/dist/types/plugins/collab-edit/index.d.ts +1 -1
  48. package/dist/types/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  49. package/dist/types/plugins/collab-edit/participants.d.ts +1 -1
  50. package/dist/types/plugins/collab-edit/plugin.d.ts +5 -6
  51. package/dist/types/plugins/collab-edit/types.d.ts +1 -2
  52. package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +2 -2
  53. package/dist/types/plugins/collab-edit/utils.d.ts +1 -2
  54. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +6 -1
  55. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -1
  56. package/dist/types/plugins/media/utils/media-single.d.ts +2 -1
  57. package/dist/types-ts4.5/actions/index.d.ts +2 -3
  58. package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +1 -0
  59. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +7 -1
  60. package/dist/types-ts4.5/plugins/annotation/types.d.ts +4 -0
  61. package/dist/types-ts4.5/plugins/annotation/update-provider.d.ts +1 -1
  62. package/dist/types-ts4.5/plugins/collab-edit/actions.d.ts +1 -1
  63. package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +2 -2
  64. package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +1 -1
  65. package/dist/types-ts4.5/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  66. package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +1 -1
  67. package/dist/types-ts4.5/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  68. package/dist/types-ts4.5/plugins/collab-edit/participants.d.ts +1 -1
  69. package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +5 -6
  70. package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +1 -2
  71. package/dist/types-ts4.5/plugins/collab-edit/ui/to-avatar.d.ts +2 -2
  72. package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +1 -2
  73. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +6 -1
  74. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -1
  75. package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +2 -1
  76. package/package.json +3 -3
  77. package/report.api.md +8 -2
  78. package/tmp/api-report-tmp.d.ts +3 -2
@@ -60,13 +60,14 @@ class ResizableMediaSingleNext extends React.Component {
60
60
  state
61
61
  },
62
62
  containerWidth,
63
- lineLength
63
+ lineLength,
64
+ fullWidthMode
64
65
  } = this.props;
65
66
  const newPct = calcPctFromPx(newWidth, this.props.lineLength) * 100;
66
67
  this.setState({
67
68
  resizedPctWidth: newPct
68
69
  });
69
- let newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : this.calcUnwrappedLayout(newWidth, containerWidth, lineLength);
70
+ let newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode);
70
71
  if (newPct <= 100) {
71
72
  if (this.wrappedLayout && (stop ? newPct !== 100 : true)) {
72
73
  newLayout = layout;
@@ -82,7 +83,13 @@ class ResizableMediaSingleNext extends React.Component {
82
83
  };
83
84
  }
84
85
  });
85
- _defineProperty(this, "calcUnwrappedLayout", (width, containerWidth, contentWidth) => {
86
+ _defineProperty(this, "calcUnwrappedLayout", (width, containerWidth, contentWidth, fullWidthMode) => {
87
+ if (fullWidthMode) {
88
+ if (width < contentWidth) {
89
+ return 'center';
90
+ }
91
+ return 'full-width';
92
+ }
86
93
  if (width <= contentWidth) {
87
94
  return 'center';
88
95
  }
@@ -292,6 +299,18 @@ class ResizableMediaSingleNext extends React.Component {
292
299
  }
293
300
  });
294
301
  }
302
+ if (this.props.layout === 'full-width' && !this.isNestedNode() && prevProps.containerWidth !== this.props.containerWidth) {
303
+ // To achieve edge-to-edge for full-width, we need to update its width according to containerWidth
304
+ // Update state to allow resizer to get most up-to-date width to avoid jumping when start resizing
305
+ this.setState(prevState => {
306
+ return {
307
+ size: {
308
+ width: calcMediaSingleMaxWidth(this.props.containerWidth),
309
+ height: prevState.size.height
310
+ }
311
+ };
312
+ });
313
+ }
295
314
  return true;
296
315
  }
297
316
 
@@ -1,7 +1,7 @@
1
1
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
2
2
  import { safeInsert as pmSafeInsert, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
3
3
  import { checkNodeDown } from '../../../utils';
4
- import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
4
+ import { isEmptyParagraph, floatingLayouts } from '@atlaskit/editor-common/utils';
5
5
  import { getMediaSingleInitialWidth } from '@atlaskit/editor-common/media-single';
6
6
  import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
7
7
  import { mapSlice } from '../../../utils/slice';
@@ -218,4 +218,23 @@ export function isCaptionNode(editorView) {
218
218
  return true;
219
219
  }
220
220
  return false;
221
- }
221
+ }
222
+ export const getParentWidthForNestedMediaSingleNode = (resolvedPos, view) => {
223
+ const domNode = view.nodeDOM(resolvedPos.pos);
224
+ if (resolvedPos.nodeAfter && floatingLayouts.includes(resolvedPos.nodeAfter.attrs.layout) && domNode && domNode.parentElement) {
225
+ const {
226
+ tableCell,
227
+ tableHeader
228
+ } = view.state.schema.nodes;
229
+ if ([tableCell, tableHeader].includes(resolvedPos.parent.type)) {
230
+ // since table has constant padding, use hardcoded constant instead of query the dom
231
+ const tablePadding = 8;
232
+ return domNode.parentElement.offsetWidth - tablePadding * 2;
233
+ }
234
+ return domNode.parentElement.offsetWidth;
235
+ }
236
+ if (domNode instanceof HTMLElement) {
237
+ return domNode.offsetWidth;
238
+ }
239
+ return null;
240
+ };
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.20.0";
2
+ export const version = "187.21.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.20.0",
3
+ "version": "187.21.0",
4
4
  "sideEffects": false
5
5
  }
@@ -99,6 +99,17 @@ export var updateMouseState = function updateMouseState(mouseData) {
99
99
  }
100
100
  });
101
101
  };
102
+ export var setSelectedAnnotation = function setSelectedAnnotation(id) {
103
+ return createCommand({
104
+ type: ACTIONS.SET_SELECTED_ANNOTATION,
105
+ data: {
106
+ selectedAnnotations: [{
107
+ id: id,
108
+ type: AnnotationTypes.INLINE_COMMENT
109
+ }]
110
+ }
111
+ });
112
+ };
102
113
  export var createAnnotation = function createAnnotation(id) {
103
114
  var annotationType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : AnnotationTypes.INLINE_COMMENT;
104
115
  return function (state, dispatch) {
@@ -6,7 +6,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
7
7
  import { AnnotationTypes } from '@atlaskit/adf-schema';
8
8
  import { AnnotationNodeView, getAnnotationViewClassname } from '../nodeviews';
9
- import { updateInlineCommentResolvedState, updateMouseState, clearDirtyMark, setInlineCommentsVisibility } from '../commands';
9
+ import { updateInlineCommentResolvedState, updateMouseState, clearDirtyMark, setInlineCommentsVisibility, setSelectedAnnotation, closeComponent } from '../commands';
10
10
  import { getAllAnnotations, inlineCommentPluginKey, getPluginState } from '../utils';
11
11
  import { createPluginState } from './plugin-factory';
12
12
  var fetchProviderStates = /*#__PURE__*/function () {
@@ -147,9 +147,16 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
147
147
  var setVisibility = function setVisibility(isVisible) {
148
148
  return onSetVisibility(editorView)(isVisible);
149
149
  };
150
+ var setSelectedAnnotationFn = function setSelectedAnnotationFn(annotationId) {
151
+ if (!annotationId) {
152
+ closeComponent()(editorView.state, editorView.dispatch);
153
+ } else {
154
+ setSelectedAnnotation(annotationId)(editorView.state, editorView.dispatch);
155
+ }
156
+ };
150
157
  var updateSubscriber = provider.updateSubscriber;
151
158
  if (updateSubscriber) {
152
- updateSubscriber.on('resolve', resolve).on('delete', resolve).on('unresolve', unResolve).on('create', unResolve).on('setvisibility', setVisibility);
159
+ updateSubscriber.on('resolve', resolve).on('delete', resolve).on('unresolve', unResolve).on('create', unResolve).on('setvisibility', setVisibility).on('setselectedannotation', setSelectedAnnotationFn);
153
160
  }
154
161
  editorView.root.addEventListener('mouseup', mouseUp);
155
162
  return {
@@ -165,7 +172,7 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
165
172
  destroy: function destroy() {
166
173
  editorView.root.removeEventListener('mouseup', mouseUp);
167
174
  if (updateSubscriber) {
168
- updateSubscriber.off('resolve', resolve).off('delete', resolve).off('unresolve', unResolve).off('create', unResolve).off('setvisibility', setVisibility);
175
+ updateSubscriber.off('resolve', resolve).off('delete', resolve).off('unresolve', unResolve).off('create', unResolve).off('setvisibility', setVisibility).off('setselectedannotation', setSelectedAnnotationFn);
169
176
  }
170
177
  }
171
178
  };
@@ -41,6 +41,10 @@ export default (function (pluginState, action) {
41
41
  return _objectSpread(_objectSpread({}, isVisible ? pluginState : getNewDraftState(pluginState, false)), {}, {
42
42
  isVisible: isVisible
43
43
  });
44
+ case ACTIONS.SET_SELECTED_ANNOTATION:
45
+ return _objectSpread(_objectSpread({}, pluginState), {}, {
46
+ selectedAnnotations: _toConsumableArray(action.data.selectedAnnotations)
47
+ });
44
48
  default:
45
49
  return pluginState;
46
50
  }
@@ -6,5 +6,6 @@ export var ACTIONS = /*#__PURE__*/function (ACTIONS) {
6
6
  ACTIONS[ACTIONS["ADD_INLINE_COMMENT"] = 4] = "ADD_INLINE_COMMENT";
7
7
  ACTIONS[ACTIONS["INLINE_COMMENT_SET_VISIBLE"] = 5] = "INLINE_COMMENT_SET_VISIBLE";
8
8
  ACTIONS[ACTIONS["CLOSE_COMPONENT"] = 6] = "CLOSE_COMPONENT";
9
+ ACTIONS[ACTIONS["SET_SELECTED_ANNOTATION"] = 7] = "SET_SELECTED_ANNOTATION";
9
10
  return ACTIONS;
10
11
  }({});
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
4
4
  import { AnnotationViewWrapper } from './AnnotationViewWrapper';
5
5
  import { AnnotationTestIds } from '../types';
6
- import { getAnnotationViewKey, getSelectionPositions, getPluginState } from '../utils';
6
+ import { getAnnotationViewKey, getSelectionPositions, getPluginState, getAllAnnotations } from '../utils';
7
7
  import { removeInlineCommentNearSelection, updateInlineCommentResolvedState, setInlineCommentDraftState, createAnnotation, closeComponent } from '../commands';
8
8
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '../../analytics';
9
9
  import { CONTENT_COMPONENT } from '../../analytics/types';
@@ -39,6 +39,7 @@ export function InlineCommentView(_ref) {
39
39
  bookmark = _ref2.bookmark,
40
40
  selectedAnnotations = _ref2.selectedAnnotations,
41
41
  annotations = _ref2.annotations;
42
+ var annotationsList = getAllAnnotations(editorView.state.doc);
42
43
  var selection = getSelectionPositions(state, inlineCommentState);
43
44
  var position = findPosForDOM(selection);
44
45
  var dom;
@@ -127,6 +128,7 @@ export function InlineCommentView(_ref) {
127
128
  key: getAnnotationViewKey(activeAnnotations),
128
129
  onViewed: onAnnotationViewed
129
130
  }, /*#__PURE__*/React.createElement(ViewComponent, {
131
+ annotationsList: annotationsList,
130
132
  annotations: activeAnnotations,
131
133
  dom: dom,
132
134
  onDelete: function onDelete(id) {
@@ -60,7 +60,7 @@ export var getAllAnnotations = function getAllAnnotations(doc) {
60
60
  node.marks.filter(function (mark) {
61
61
  return mark.type.name === 'annotation';
62
62
  })
63
- // filter out annotations with invalid attribues as they cause errors when interacting with them
63
+ // filter out annotations with invalid attributes as they cause errors when interacting with them
64
64
  .filter(validateAnnotationMark).forEach(function (m) {
65
65
  return allAnnotationIds.add(m.attrs.id);
66
66
  });
@@ -21,6 +21,7 @@ import { MediaSingle } from '@atlaskit/editor-common/ui';
21
21
  import { browser, floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
22
22
  import { isNodeSelectedOrInRange } from '../../../utils/nodes';
23
23
  import { setNodeSelection, setTextSelection } from '../../../utils';
24
+ import { getParentWidthForNestedMediaSingleNode } from '../utils/media-single';
24
25
  import ResizableMediaSingleNext from '../ui/ResizableMediaSingle/ResizableMediaSingleNext';
25
26
  import ResizableMediaSingle from '../ui/ResizableMediaSingle';
26
27
  import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
@@ -245,13 +246,12 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
245
246
  * Get parent width for a nested media single node
246
247
  * @param view Editor view
247
248
  * @param pos node position
248
- * @param includeMoreParentNodeTypes should consider table and list as parent nodes(only true for new experience)
249
249
  */
250
250
  _defineProperty(_assertThisInitialized(_this), "getLineLength", function (view, pos, includeMoreParentNodeTypes) {
251
251
  if (typeof pos !== 'number') {
252
252
  return null;
253
253
  }
254
- if (isRichMediaInsideOfBlockNode(view, pos, includeMoreParentNodeTypes)) {
254
+ if (isRichMediaInsideOfBlockNode(view, pos)) {
255
255
  var $pos = view.state.doc.resolve(pos);
256
256
  var domNode = view.nodeDOM($pos.pos);
257
257
  if ($pos.nodeAfter && floatingLayouts.indexOf($pos.nodeAfter.attrs.layout) > -1 && domNode && domNode.parentElement) {
@@ -263,6 +263,21 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
263
263
  }
264
264
  return null;
265
265
  });
266
+ /**
267
+ * Get parent width for a nested media single node for new experience
268
+ * @param view Editor view
269
+ * @param pos node position
270
+ */
271
+ _defineProperty(_assertThisInitialized(_this), "getLineLengthNext", function (view, pos) {
272
+ if (typeof pos !== 'number') {
273
+ return null;
274
+ }
275
+ var $pos = view.state.doc.resolve(pos);
276
+ if ($pos && $pos.parent.type.name !== 'doc') {
277
+ return getParentWidthForNestedMediaSingleNode($pos, view);
278
+ }
279
+ return null;
280
+ });
266
281
  return _this;
267
282
  }
268
283
  _createClass(MediaSingleNode, [{
@@ -364,7 +379,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
364
379
  }
365
380
  var isSelected = selected();
366
381
  var contentWidthForLegacyExperience = this.getLineLength(view, getPos()) || lineLength;
367
- var contentWidth = this.getLineLength(view, getPos(), true) || lineLength;
382
+ var contentWidth = this.getLineLengthNext(view, getPos()) || lineLength;
368
383
  var mediaSingleProps = {
369
384
  layout: layout,
370
385
  width: width,
@@ -501,6 +516,9 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
501
516
  // see also: https://github.com/ProseMirror/prosemirror/issues/884
502
517
  domRef.contentEditable = 'true';
503
518
  }
519
+ if (getBooleanFF('platform.editor.media.extended-resize-experience')) {
520
+ domRef.classList.add('media-extended-resize-experience');
521
+ }
504
522
  return domRef;
505
523
  }
506
524
  }, {
@@ -5,7 +5,7 @@ import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-com
5
5
  import { akEditorDeleteBorder, akEditorDeleteBackground, akEditorSelectedBorderBoldSize, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorSelectedNodeClassName, akEditorDeleteIconColor } from '@atlaskit/editor-shared-styles';
6
6
  import { N60, B200 } from '@atlaskit/theme/colors';
7
7
  import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
8
- export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, ".concat(N60, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, ".concat(B200, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))");
8
+ export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, ".concat(N60, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, ".concat(B200, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))");
9
9
 
10
10
  /* `left: unset` above is to work around Chrome bug where rendering a div with
11
11
  * that style applied inside a container that has a scroll, causes any svgs on
@@ -72,12 +72,13 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
72
72
  layout = _this$props2.layout,
73
73
  state = _this$props2.view.state,
74
74
  containerWidth = _this$props2.containerWidth,
75
- lineLength = _this$props2.lineLength;
75
+ lineLength = _this$props2.lineLength,
76
+ fullWidthMode = _this$props2.fullWidthMode;
76
77
  var newPct = calcPctFromPx(newWidth, _this.props.lineLength) * 100;
77
78
  _this.setState({
78
79
  resizedPctWidth: newPct
79
80
  });
80
- var newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength);
81
+ var newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode);
81
82
  if (newPct <= 100) {
82
83
  if (_this.wrappedLayout && (stop ? newPct !== 100 : true)) {
83
84
  newLayout = layout;
@@ -93,7 +94,13 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
93
94
  };
94
95
  }
95
96
  });
96
- _defineProperty(_assertThisInitialized(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth) {
97
+ _defineProperty(_assertThisInitialized(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode) {
98
+ if (fullWidthMode) {
99
+ if (width < contentWidth) {
100
+ return 'center';
101
+ }
102
+ return 'full-width';
103
+ }
97
104
  if (width <= contentWidth) {
98
105
  return 'center';
99
106
  }
@@ -283,6 +290,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
283
290
  }, {
284
291
  key: "componentDidUpdate",
285
292
  value: function componentDidUpdate(prevProps) {
293
+ var _this2 = this;
286
294
  var offsetLeft = calculateOffsetLeft(this.insideInlineLike, this.insideLayout, this.props.view.dom, this.wrapper);
287
295
  if (offsetLeft !== this.state.offsetLeft && offsetLeft >= 0) {
288
296
  this.setState({
@@ -308,6 +316,18 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
308
316
  }
309
317
  });
310
318
  }
319
+ if (this.props.layout === 'full-width' && !this.isNestedNode() && prevProps.containerWidth !== this.props.containerWidth) {
320
+ // To achieve edge-to-edge for full-width, we need to update its width according to containerWidth
321
+ // Update state to allow resizer to get most up-to-date width to avoid jumping when start resizing
322
+ this.setState(function (prevState) {
323
+ return {
324
+ size: {
325
+ width: calcMediaSingleMaxWidth(_this2.props.containerWidth),
326
+ height: prevState.size.height
327
+ }
328
+ };
329
+ });
330
+ }
311
331
  return true;
312
332
  }
313
333
 
@@ -467,7 +487,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
467
487
  }, {
468
488
  key: "render",
469
489
  value: function render() {
470
- var _this2 = this;
490
+ var _this3 = this;
471
491
  var _this$props8 = this.props,
472
492
  origWidth = _this$props8.width,
473
493
  layout = _this$props8.layout,
@@ -484,7 +504,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
484
504
  handleSides.forEach(function (side) {
485
505
  var oppositeSide = side === 'left' ? 'right' : 'left';
486
506
  enable[side] = nonWrappedLayouts.concat("wrap-".concat(oppositeSide)).concat("align-".concat(imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
487
- if (side === 'left' && _this2.insideInlineLike) {
507
+ if (side === 'left' && _this3.insideInlineLike) {
488
508
  enable[side] = false;
489
509
  }
490
510
  });
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
5
5
  import { safeInsert as pmSafeInsert, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { checkNodeDown } from '../../../utils';
7
- import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
7
+ import { isEmptyParagraph, floatingLayouts } from '@atlaskit/editor-common/utils';
8
8
  import { getMediaSingleInitialWidth } from '@atlaskit/editor-common/media-single';
9
9
  import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
10
10
  import { mapSlice } from '../../../utils/slice';
@@ -209,4 +209,22 @@ export function isCaptionNode(editorView) {
209
209
  return true;
210
210
  }
211
211
  return false;
212
- }
212
+ }
213
+ export var getParentWidthForNestedMediaSingleNode = function getParentWidthForNestedMediaSingleNode(resolvedPos, view) {
214
+ var domNode = view.nodeDOM(resolvedPos.pos);
215
+ if (resolvedPos.nodeAfter && floatingLayouts.includes(resolvedPos.nodeAfter.attrs.layout) && domNode && domNode.parentElement) {
216
+ var _view$state$schema$no = view.state.schema.nodes,
217
+ tableCell = _view$state$schema$no.tableCell,
218
+ tableHeader = _view$state$schema$no.tableHeader;
219
+ if ([tableCell, tableHeader].includes(resolvedPos.parent.type)) {
220
+ // since table has constant padding, use hardcoded constant instead of query the dom
221
+ var tablePadding = 8;
222
+ return domNode.parentElement.offsetWidth - tablePadding * 2;
223
+ }
224
+ return domNode.parentElement.offsetWidth;
225
+ }
226
+ if (domNode instanceof HTMLElement) {
227
+ return domNode.offsetWidth;
228
+ }
229
+ return null;
230
+ };
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.20.0";
2
+ export var version = "187.21.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.20.0",
3
+ "version": "187.21.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,9 +1,8 @@
1
1
  import { Node } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
4
- import type { ResolvedEditorState } from '@atlaskit/collab-provider';
5
- import type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue } from '@atlaskit/editor-common/types';
6
- import type { FeatureFlags, Transformer } from '@atlaskit/editor-common/types';
4
+ import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
5
+ import type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, FeatureFlags, Transformer } from '@atlaskit/editor-common/types';
7
6
  import type { EventDispatcher } from '../event-dispatcher';
8
7
  export default class EditorActions<T = any> implements EditorActionsOptions<T> {
9
8
  private editorView?;
@@ -10,5 +10,6 @@ export declare const removeInlineCommentNearSelection: (id: string) => Command;
10
10
  export declare const setInlineCommentDraftState: (drafting: boolean, inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT) => Command;
11
11
  export declare const addInlineComment: (id: string) => Command;
12
12
  export declare const updateMouseState: (mouseData: InlineCommentMouseData) => Command;
13
+ export declare const setSelectedAnnotation: (id: string) => Command;
13
14
  export declare const createAnnotation: (id: string, annotationType?: AnnotationTypes) => Command;
14
15
  export declare const setInlineCommentsVisibility: (isVisible: boolean) => Command;
@@ -10,7 +10,8 @@ export declare enum ACTIONS {
10
10
  INLINE_COMMENT_CLEAR_DIRTY_MARK = 3,
11
11
  ADD_INLINE_COMMENT = 4,
12
12
  INLINE_COMMENT_SET_VISIBLE = 5,
13
- CLOSE_COMPONENT = 6
13
+ CLOSE_COMPONENT = 6,
14
+ SET_SELECTED_ANNOTATION = 7
14
15
  }
15
16
  export interface InlineCommentPluginOptions {
16
17
  dispatch: Dispatch;
@@ -55,6 +56,11 @@ export type InlineCommentAction = {
55
56
  data: {
56
57
  isVisible: boolean;
57
58
  };
59
+ } | {
60
+ type: ACTIONS.SET_SELECTED_ANNOTATION;
61
+ data: {
62
+ selectedAnnotations: AnnotationInfo[];
63
+ };
58
64
  };
59
65
  export type InlineCommentPluginState = {
60
66
  annotations: InlineCommentMap;
@@ -39,6 +39,10 @@ export type InlineCommentViewComponentProps = AnnotationComponentProps & {
39
39
  * Removes the annotation from the document
40
40
  */
41
41
  onDelete?: (id: string) => void;
42
+ /**
43
+ * Ordered list of annotation ids as shown in the document
44
+ */
45
+ annotationsList?: string[];
42
46
  };
43
47
  export interface AnnotationState<Type, State> {
44
48
  annotationType: Type;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
- export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve';
3
+ export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation';
4
4
  export type VisibilityEvent = 'setvisibility';
5
5
  export declare class AnnotationUpdateEmitter extends EventEmitter {
6
6
  on(event: VisibilityEvent, listener: (isVisible: boolean) => void): this;
@@ -1,6 +1,6 @@
1
1
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { CollabEventInitData, CollabEventRemoteData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabSendableSelection } from '@atlaskit/collab-provider';
3
+ import type { CollabEventInitData, CollabEventRemoteData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabSendableSelection } from '@atlaskit/editor-common/collab';
4
4
  import type { PrivateCollabEditOptions } from './types';
5
5
  export declare const handleInit: (initData: CollabEventInitData, view: EditorView, options?: PrivateCollabEditOptions) => void;
6
6
  export declare const handleConnection: (connectionData: CollabEventConnectionData, view: EditorView) => void;
@@ -1,5 +1,5 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/collab-provider';
2
+ import type { CollabEventInitData, CollabEventConnectionData, CollabEventPresenceData, CollabTelepointerPayload, CollabEventRemoteData, CollabEventLocalStepData, CollabEditProvider } from '@atlaskit/editor-common/collab';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { PrivateCollabEditOptions } from '../types';
5
5
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -21,4 +21,4 @@ export interface CollabHandlers {
21
21
  }) => void;
22
22
  }
23
23
  export type Cleanup = () => void;
24
- export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined, currentDeps_5?: EditorAnalyticsAPI | undefined) => Cleanup;
24
+ export declare const subscribe: (currentDeps_0: EditorView, currentDeps_1: CollabEditProvider<import("@atlaskit/editor-common/collab").CollabEvents>, currentDeps_2: PrivateCollabEditOptions, currentDeps_3: FeatureFlags, currentDeps_4?: ProviderFactory | undefined, currentDeps_5?: EditorAnalyticsAPI | undefined) => Cleanup;
@@ -1,6 +1,6 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { CollabEditProvider } from '@atlaskit/collab-provider';
3
+ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
4
4
  import type { PrivateCollabEditOptions } from '../types';
5
5
  import type { Cleanup } from './handlers';
6
6
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -1,4 +1,4 @@
1
- import type { CollabEditProvider } from '@atlaskit/collab-provider';
1
+ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
2
2
  import type { Transaction, EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  type Props = {
4
4
  originalTransaction: Readonly<Transaction>;
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import { pluginKey } from './plugin';
3
- import { PrivateCollabEditOptions } from './types';
3
+ import type { PrivateCollabEditOptions } from './types';
4
4
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  export { pluginKey };
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
- import type { CollabEditProvider } from '@atlaskit/collab-provider';
3
+ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
4
4
  export declare const nativeCollabProviderPlugin: ({ providerPromise, }: {
5
5
  providerPromise: Promise<CollabEditProvider>;
6
- }) => SafePlugin<CollabEditProvider<import("@atlaskit/collab-provider").CollabEvents> | null>;
6
+ }) => SafePlugin<CollabEditProvider<import("@atlaskit/editor-common/collab").CollabEvents> | null>;
7
7
  export declare const getCollabProvider: (editorState: EditorState) => CollabEditProvider | null;
@@ -1,4 +1,4 @@
1
- import type { CollabParticipant } from '@atlaskit/collab-provider';
1
+ import type { CollabParticipant } from '@atlaskit/editor-common/collab';
2
2
  export interface ReadOnlyParticipants {
3
3
  get(sessionId: string): CollabParticipant | undefined;
4
4
  toArray(): ReadonlyArray<CollabParticipant>;
@@ -1,12 +1,11 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import { Dispatch } from '../../event-dispatcher';
4
- import { PrivateCollabEditOptions, ProviderCallback } from './types';
2
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
+ import type { Dispatch } from '../../event-dispatcher';
4
+ import type { PrivateCollabEditOptions, ProviderCallback } from './types';
5
5
  import { PluginState } from './plugin-state';
6
6
  import { pluginKey } from './plugin-key';
7
- import { FeatureFlags } from '@atlaskit/editor-common/types';
8
- import type { CollabEditProvider } from '@atlaskit/collab-provider/types';
9
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
+ import type { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
+ import type { CollabEditProvider } from '@atlaskit/editor-common/collab';
10
9
  import type collabEditPlugin from './index';
11
10
  export { PluginState, pluginKey };
12
11
  export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, providerResolver: (value: CollabEditProvider) => void, collabProviderCallback: ProviderCallback, options: PrivateCollabEditOptions, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<typeof collabEditPlugin> | undefined) => SafePlugin<PluginState>;
@@ -1,5 +1,4 @@
1
- import type { CollabEditProvider, SyncUpErrorFunction } from '@atlaskit/collab-provider';
2
- import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
1
+ import type { CollabEditProvider, SyncUpErrorFunction, CollabEditOptions } from '@atlaskit/editor-common/collab';
3
2
  export type { InviteToEditComponentProps, InviteToEditButtonProps, CollabInviteToEditProps, CollabAnalyticsProps, } from '@atlaskit/editor-common/collab';
4
3
  export type PrivateCollabEditOptions = CollabEditOptions & {
5
4
  sanitizePrivateContent?: boolean;
@@ -1,4 +1,4 @@
1
- import { AvatarProps } from '@atlaskit/avatar-group';
2
- import type { CollabParticipant } from '@atlaskit/collab-provider';
1
+ import type { AvatarProps } from '@atlaskit/avatar-group';
2
+ import type { CollabParticipant } from '@atlaskit/editor-common/collab';
3
3
  declare const _default: import("memoize-one").MemoizedFn<(participant: CollabParticipant) => AvatarProps>;
4
4
  export default _default;
@@ -1,8 +1,7 @@
1
1
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { EditorView, DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
4
- import type { CollabParticipant } from '@atlaskit/collab-provider';
5
- import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
4
+ import type { CollabParticipant, CollabEditOptions } from '@atlaskit/editor-common/collab';
6
5
  export interface Color {
7
6
  solid: string;
8
7
  selection: string;