@atlaskit/editor-core 187.35.0 → 187.35.2

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 (31) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -2
  3. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +36 -26
  4. package/dist/cjs/version-wrapper.js +1 -1
  5. package/dist/es2019/labs/next/presets/default.js +1 -1
  6. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +35 -26
  7. package/dist/es2019/version-wrapper.js +1 -1
  8. package/dist/esm/labs/next/presets/default.js +1 -1
  9. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +37 -27
  10. package/dist/esm/version-wrapper.js +1 -1
  11. package/dist/types/plugins/analytics/plugin.d.ts +2 -2
  12. package/dist/types/plugins/avatar-group/index.d.ts +2 -2
  13. package/dist/types/plugins/collab-edit/index.d.ts +2 -5
  14. package/dist/types/plugins/expand/index.d.ts +2 -2
  15. package/dist/types/plugins/find-replace/index.d.ts +2 -2
  16. package/dist/types/plugins/insert-block/types.d.ts +2 -2
  17. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -3
  18. package/dist/types/plugins/paste/index.d.ts +2 -2
  19. package/dist/types/plugins/rule/index.d.ts +2 -2
  20. package/dist/types/plugins/text-color/index.d.ts +2 -2
  21. package/dist/types-ts4.5/plugins/analytics/plugin.d.ts +2 -2
  22. package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +2 -2
  23. package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +2 -2
  24. package/dist/types-ts4.5/plugins/expand/index.d.ts +2 -2
  25. package/dist/types-ts4.5/plugins/find-replace/index.d.ts +2 -2
  26. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +2 -2
  27. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -3
  28. package/dist/types-ts4.5/plugins/paste/index.d.ts +2 -2
  29. package/dist/types-ts4.5/plugins/rule/index.d.ts +2 -2
  30. package/dist/types-ts4.5/plugins/text-color/index.d.ts +2 -2
  31. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.35.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6acf9830b36`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6acf9830b36) - Update feature flags plugin
8
+ (@atlaskit/editor-plugin-feature-flags) to use a named export
9
+ rather than default export to match other plugins.
10
+
11
+ ```ts
12
+ // Before
13
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
14
+
15
+ // After
16
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
17
+ ```
18
+
19
+ - Updated dependencies
20
+
21
+ ## 187.35.1
22
+
23
+ ### Patch Changes
24
+
25
+ - [`b1e03fb86a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1e03fb86a1) - Update layout and width calculation for resizing
26
+ - [`6f85651b350`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6f85651b350) - Reduce the gap between handles when image is a nested node
27
+
3
28
  ## 187.35.0
4
29
 
5
30
  ### Minor Changes
@@ -19,7 +19,7 @@ var _editorPluginEditorDisabled = require("@atlaskit/editor-plugin-editor-disabl
19
19
  var _typeAhead = _interopRequireDefault(require("../../../plugins/type-ahead"));
20
20
  var _submitEditor = _interopRequireDefault(require("../../../plugins/submit-editor"));
21
21
  var _fakeTextCursor = _interopRequireDefault(require("../../../plugins/fake-text-cursor"));
22
- var _editorPluginFeatureFlags = _interopRequireDefault(require("@atlaskit/editor-plugin-feature-flags"));
22
+ var _editorPluginFeatureFlags = require("@atlaskit/editor-plugin-feature-flags");
23
23
  var _floatingToolbar = _interopRequireDefault(require("../../../plugins/floating-toolbar"));
24
24
  var _clipboard = _interopRequireDefault(require("../../../plugins/clipboard"));
25
25
  var _plugins = require("../../../plugins");
@@ -42,7 +42,7 @@ var _preset = require("@atlaskit/editor-common/preset");
42
42
  * their placement in the editor toolbar
43
43
  */
44
44
  function createDefaultPreset(options) {
45
- var preset = new _preset.EditorPresetBuilder().add([_editorPluginFeatureFlags.default, options.featureFlags || {}]).maybeAdd(_editorPluginAnalytics.analyticsPlugin, function (plugin, builder) {
45
+ var preset = new _preset.EditorPresetBuilder().add([_editorPluginFeatureFlags.featureFlagsPlugin, options.featureFlags || {}]).maybeAdd(_editorPluginAnalytics.analyticsPlugin, function (plugin, builder) {
46
46
  if (options.allowAnalyticsGASV3) {
47
47
  var performanceTracking = options.performanceTracking,
48
48
  createAnalyticsEvent = options.createAnalyticsEvent;
@@ -78,7 +78,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
78
78
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calcNewSize", function (newWidth, stop) {
79
79
  var _this$props2 = _this.props,
80
80
  layout = _this$props2.layout,
81
- state = _this$props2.view.state,
82
81
  containerWidth = _this$props2.containerWidth,
83
82
  lineLength = _this$props2.lineLength,
84
83
  fullWidthMode = _this$props2.fullWidthMode;
@@ -86,29 +85,32 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
86
85
  _this.setState({
87
86
  resizedPctWidth: newPct
88
87
  });
89
- var newLayout = (0, _utils.hasParentNodeOfType)(state.schema.nodes.table)(state.selection) ? layout : _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode);
88
+ var newLayout = _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode, _this.isNestedNode());
90
89
  if (newPct <= 100) {
91
90
  if (_this.wrappedLayout && (stop ? newPct !== 100 : true)) {
92
91
  newLayout = layout;
93
92
  }
94
93
  return {
95
- width: newPct,
96
94
  layout: newLayout
97
95
  };
98
96
  } else {
99
97
  return {
100
- width: _this.props.pctWidth || null,
101
98
  layout: newLayout
102
99
  };
103
100
  }
104
101
  });
105
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode) {
102
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) {
103
+ if (isNestedNode) {
104
+ return 'center';
105
+ }
106
106
  if (fullWidthMode) {
107
107
  if (width < contentWidth) {
108
108
  return 'center';
109
109
  }
110
110
  return 'full-width';
111
111
  }
112
+
113
+ // handle top-level node in fixed-width editor
112
114
  if (width <= contentWidth) {
113
115
  return 'center';
114
116
  }
@@ -154,7 +156,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
154
156
  return dispatch(tr);
155
157
  }, _mediaSingle.MEDIA_SINGLE_RESIZE_THROTTLE_TIME));
156
158
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calcMaxWidth", (0, _memoizeOne.default)(function (contentWidth, containerWidth, fullWidthMode) {
157
- if (fullWidthMode) {
159
+ if (_this.isNestedNode() || fullWidthMode) {
158
160
  return contentWidth;
159
161
  }
160
162
  return (0, _mediaSingle.calcMediaSingleMaxWidth)(containerWidth);
@@ -269,14 +271,20 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
269
271
  }
270
272
  _this.setIsResizing(false);
271
273
  _this.displayGuideline([]);
274
+ var newWidth = width;
275
+ if (calculatedWidthWithLayout.layout === 'full-width') {
276
+ // When a node reaches full width in current viewport,
277
+ // update its width with 1800 to align with pixel entry
278
+ newWidth = _editorSharedStyles.akEditorFullWidthLayoutWidth;
279
+ }
272
280
  _this.setState({
273
281
  isResizing: false,
274
282
  size: {
275
- width: width,
283
+ width: newWidth,
276
284
  height: height
277
285
  }
278
286
  }, function () {
279
- updateSize(width, calculatedWidthWithLayout.layout);
287
+ updateSize(newWidth, calculatedWidthWithLayout.layout);
280
288
  });
281
289
  });
282
290
  var initialWidth = props.mediaSingleWidth || _mediaSingle.DEFAULT_IMAGE_WIDTH;
@@ -298,7 +306,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
298
306
  (0, _createClass2.default)(ResizableMediaSingleNext, [{
299
307
  key: "componentDidUpdate",
300
308
  value: function componentDidUpdate(prevProps) {
301
- var _this2 = this;
302
309
  var offsetLeft = (0, _mediaSingle.calculateOffsetLeft)(this.insideInlineLike, this.insideLayout, this.props.view.dom, this.wrapper);
303
310
  if (offsetLeft !== this.state.offsetLeft && offsetLeft >= 0) {
304
311
  this.setState({
@@ -324,18 +331,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
324
331
  }
325
332
  });
326
333
  }
327
- if (this.props.layout === 'full-width' && !this.isNestedNode() && prevProps.containerWidth !== this.props.containerWidth) {
328
- // To achieve edge-to-edge for full-width, we need to update its width according to containerWidth
329
- // Update state to allow resizer to get most up-to-date width to avoid jumping when start resizing
330
- this.setState(function (prevState) {
331
- return {
332
- size: {
333
- width: (0, _mediaSingle.calcMediaSingleMaxWidth)(_this2.props.containerWidth),
334
- height: prevState.size.height
335
- }
336
- };
337
- });
338
- }
339
334
  return true;
340
335
  }
341
336
  }, {
@@ -503,7 +498,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
503
498
  }, {
504
499
  key: "render",
505
500
  value: function render() {
506
- var _this3 = this;
501
+ var _this2 = this;
507
502
  var _this$props8 = this.props,
508
503
  origWidth = _this$props8.width,
509
504
  layout = _this$props8.layout,
@@ -521,7 +516,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
521
516
  _ui.handleSides.forEach(function (side) {
522
517
  var oppositeSide = side === 'left' ? 'right' : 'left';
523
518
  enable[side] = _utils2.nonWrappedLayouts.concat("wrap-".concat(oppositeSide)).concat("align-".concat(_ui.imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
524
- if (side === 'left' && _this3.insideInlineLike) {
519
+ if (side === 'left' && _this2.insideInlineLike) {
525
520
  enable[side] = false;
526
521
  }
527
522
  });
@@ -533,9 +528,23 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
533
528
  'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
534
529
  });
535
530
  var resizerNextClassName = (0, _classnames.default)(className, _styles.resizerStyles);
536
- var maxWidth = this.isNestedNode() ? undefined // fall back to 'max-width: 100%'
537
- : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
531
+ var maxWidth = !isResizing && this.isNestedNode() ?
532
+ // set undefined to fall back to 100%
533
+ undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
538
534
  var minWidth = this.calcMinWidth(isVideoFile, lineLength);
535
+ var nestedHandleStyles = function nestedHandleStyles(isNestedNode) {
536
+ if (!isNestedNode) {
537
+ return;
538
+ }
539
+ return {
540
+ left: {
541
+ left: "calc(".concat("var(--ds-space-075, 0.375em)", " * -1)")
542
+ },
543
+ right: {
544
+ right: "calc(".concat("var(--ds-space-075, 0.375em)", " * -1)")
545
+ }
546
+ };
547
+ };
539
548
  return (0, _react2.jsx)("div", {
540
549
  ref: this.saveWrapper,
541
550
  css: (0, _styled.wrapperStyle)({
@@ -561,7 +570,8 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
561
570
  resizeRatio: _utils2.nonWrappedLayouts.includes(layout) ? 2 : 1,
562
571
  handleComponent: handleComponent,
563
572
  "data-testid": resizerNextTestId,
564
- isHandleVisible: selected
573
+ isHandleVisible: selected,
574
+ handleStyles: nestedHandleStyles(this.isNestedNode())
565
575
  }, children));
566
576
  }
567
577
  }]);
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.35.0";
9
+ var version = "187.35.2";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -13,7 +13,7 @@ import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
13
13
  import typeAheadPlugin from '../../../plugins/type-ahead';
14
14
  import submitEditorPlugin from '../../../plugins/submit-editor';
15
15
  import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
16
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
16
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
17
17
  import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
18
18
  import clipboardPlugin from '../../../plugins/clipboard';
19
19
  import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
  import React from 'react';
4
4
  import { jsx } from '@emotion/react';
5
- import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
+ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { getMediaClient } from '@atlaskit/media-client';
7
7
  import { calcPctFromPx, wrappedLayouts, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
8
8
  import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/utils';
@@ -58,9 +58,6 @@ class ResizableMediaSingleNext extends React.Component {
58
58
  _defineProperty(this, "calcNewSize", (newWidth, stop) => {
59
59
  const {
60
60
  layout,
61
- view: {
62
- state
63
- },
64
61
  containerWidth,
65
62
  lineLength,
66
63
  fullWidthMode
@@ -69,29 +66,32 @@ class ResizableMediaSingleNext extends React.Component {
69
66
  this.setState({
70
67
  resizedPctWidth: newPct
71
68
  });
72
- let newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode);
69
+ let newLayout = this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode, this.isNestedNode());
73
70
  if (newPct <= 100) {
74
71
  if (this.wrappedLayout && (stop ? newPct !== 100 : true)) {
75
72
  newLayout = layout;
76
73
  }
77
74
  return {
78
- width: newPct,
79
75
  layout: newLayout
80
76
  };
81
77
  } else {
82
78
  return {
83
- width: this.props.pctWidth || null,
84
79
  layout: newLayout
85
80
  };
86
81
  }
87
82
  });
88
- _defineProperty(this, "calcUnwrappedLayout", (width, containerWidth, contentWidth, fullWidthMode) => {
83
+ _defineProperty(this, "calcUnwrappedLayout", (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) => {
84
+ if (isNestedNode) {
85
+ return 'center';
86
+ }
89
87
  if (fullWidthMode) {
90
88
  if (width < contentWidth) {
91
89
  return 'center';
92
90
  }
93
91
  return 'full-width';
94
92
  }
93
+
94
+ // handle top-level node in fixed-width editor
95
95
  if (width <= contentWidth) {
96
96
  return 'center';
97
97
  }
@@ -137,7 +137,7 @@ class ResizableMediaSingleNext extends React.Component {
137
137
  return dispatch(tr);
138
138
  }, MEDIA_SINGLE_RESIZE_THROTTLE_TIME));
139
139
  _defineProperty(this, "calcMaxWidth", memoizeOne((contentWidth, containerWidth, fullWidthMode) => {
140
- if (fullWidthMode) {
140
+ if (this.isNestedNode() || fullWidthMode) {
141
141
  return contentWidth;
142
142
  }
143
143
  return calcMediaSingleMaxWidth(containerWidth);
@@ -252,14 +252,20 @@ class ResizableMediaSingleNext extends React.Component {
252
252
  }
253
253
  this.setIsResizing(false);
254
254
  this.displayGuideline([]);
255
+ let newWidth = width;
256
+ if (calculatedWidthWithLayout.layout === 'full-width') {
257
+ // When a node reaches full width in current viewport,
258
+ // update its width with 1800 to align with pixel entry
259
+ newWidth = akEditorFullWidthLayoutWidth;
260
+ }
255
261
  this.setState({
256
262
  isResizing: false,
257
263
  size: {
258
- width,
264
+ width: newWidth,
259
265
  height
260
266
  }
261
267
  }, () => {
262
- updateSize(width, calculatedWidthWithLayout.layout);
268
+ updateSize(newWidth, calculatedWidthWithLayout.layout);
263
269
  });
264
270
  });
265
271
  const initialWidth = props.mediaSingleWidth || DEFAULT_IMAGE_WIDTH;
@@ -303,18 +309,6 @@ class ResizableMediaSingleNext extends React.Component {
303
309
  }
304
310
  });
305
311
  }
306
- if (this.props.layout === 'full-width' && !this.isNestedNode() && prevProps.containerWidth !== this.props.containerWidth) {
307
- // To achieve edge-to-edge for full-width, we need to update its width according to containerWidth
308
- // Update state to allow resizer to get most up-to-date width to avoid jumping when start resizing
309
- this.setState(prevState => {
310
- return {
311
- size: {
312
- width: calcMediaSingleMaxWidth(this.props.containerWidth),
313
- height: prevState.size.height
314
- }
315
- };
316
- });
317
- }
318
312
  return true;
319
313
  }
320
314
  async componentDidMount() {
@@ -452,9 +446,23 @@ class ResizableMediaSingleNext extends React.Component {
452
446
  'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
453
447
  });
454
448
  const resizerNextClassName = classnames(className, resizerStyles);
455
- const maxWidth = this.isNestedNode() ? undefined // fall back to 'max-width: 100%'
456
- : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
449
+ const maxWidth = !isResizing && this.isNestedNode() ?
450
+ // set undefined to fall back to 100%
451
+ undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
457
452
  const minWidth = this.calcMinWidth(isVideoFile, lineLength);
453
+ const nestedHandleStyles = isNestedNode => {
454
+ if (!isNestedNode) {
455
+ return;
456
+ }
457
+ return {
458
+ left: {
459
+ left: `calc(${"var(--ds-space-075, 0.375em)"} * -1)`
460
+ },
461
+ right: {
462
+ right: `calc(${"var(--ds-space-075, 0.375em)"} * -1)`
463
+ }
464
+ };
465
+ };
458
466
  return jsx("div", {
459
467
  ref: this.saveWrapper,
460
468
  css: wrapperStyle({
@@ -480,7 +488,8 @@ class ResizableMediaSingleNext extends React.Component {
480
488
  resizeRatio: nonWrappedLayouts.includes(layout) ? 2 : 1,
481
489
  handleComponent: handleComponent,
482
490
  "data-testid": resizerNextTestId,
483
- isHandleVisible: selected
491
+ isHandleVisible: selected,
492
+ handleStyles: nestedHandleStyles(this.isNestedNode())
484
493
  }, children));
485
494
  }
486
495
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.35.0";
2
+ export const version = "187.35.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -13,7 +13,7 @@ import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
13
13
  import typeAheadPlugin from '../../../plugins/type-ahead';
14
14
  import submitEditorPlugin from '../../../plugins/submit-editor';
15
15
  import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
16
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
16
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
17
17
  import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
18
18
  import clipboardPlugin from '../../../plugins/clipboard';
19
19
  import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  /** @jsx jsx */
14
14
  import React from 'react';
15
15
  import { jsx } from '@emotion/react';
16
- import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
16
+ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
17
17
  import { getMediaClient } from '@atlaskit/media-client';
18
18
  import { calcPctFromPx, wrappedLayouts, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
19
19
  import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/utils';
@@ -71,7 +71,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
71
71
  _defineProperty(_assertThisInitialized(_this), "calcNewSize", function (newWidth, stop) {
72
72
  var _this$props2 = _this.props,
73
73
  layout = _this$props2.layout,
74
- state = _this$props2.view.state,
75
74
  containerWidth = _this$props2.containerWidth,
76
75
  lineLength = _this$props2.lineLength,
77
76
  fullWidthMode = _this$props2.fullWidthMode;
@@ -79,29 +78,32 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
79
78
  _this.setState({
80
79
  resizedPctWidth: newPct
81
80
  });
82
- var newLayout = hasParentNodeOfType(state.schema.nodes.table)(state.selection) ? layout : _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode);
81
+ var newLayout = _this.calcUnwrappedLayout(newWidth, containerWidth, lineLength, fullWidthMode, _this.isNestedNode());
83
82
  if (newPct <= 100) {
84
83
  if (_this.wrappedLayout && (stop ? newPct !== 100 : true)) {
85
84
  newLayout = layout;
86
85
  }
87
86
  return {
88
- width: newPct,
89
87
  layout: newLayout
90
88
  };
91
89
  } else {
92
90
  return {
93
- width: _this.props.pctWidth || null,
94
91
  layout: newLayout
95
92
  };
96
93
  }
97
94
  });
98
- _defineProperty(_assertThisInitialized(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode) {
95
+ _defineProperty(_assertThisInitialized(_this), "calcUnwrappedLayout", function (width, containerWidth, contentWidth, fullWidthMode, isNestedNode) {
96
+ if (isNestedNode) {
97
+ return 'center';
98
+ }
99
99
  if (fullWidthMode) {
100
100
  if (width < contentWidth) {
101
101
  return 'center';
102
102
  }
103
103
  return 'full-width';
104
104
  }
105
+
106
+ // handle top-level node in fixed-width editor
105
107
  if (width <= contentWidth) {
106
108
  return 'center';
107
109
  }
@@ -147,7 +149,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
147
149
  return dispatch(tr);
148
150
  }, MEDIA_SINGLE_RESIZE_THROTTLE_TIME));
149
151
  _defineProperty(_assertThisInitialized(_this), "calcMaxWidth", memoizeOne(function (contentWidth, containerWidth, fullWidthMode) {
150
- if (fullWidthMode) {
152
+ if (_this.isNestedNode() || fullWidthMode) {
151
153
  return contentWidth;
152
154
  }
153
155
  return calcMediaSingleMaxWidth(containerWidth);
@@ -262,14 +264,20 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
262
264
  }
263
265
  _this.setIsResizing(false);
264
266
  _this.displayGuideline([]);
267
+ var newWidth = width;
268
+ if (calculatedWidthWithLayout.layout === 'full-width') {
269
+ // When a node reaches full width in current viewport,
270
+ // update its width with 1800 to align with pixel entry
271
+ newWidth = akEditorFullWidthLayoutWidth;
272
+ }
265
273
  _this.setState({
266
274
  isResizing: false,
267
275
  size: {
268
- width: width,
276
+ width: newWidth,
269
277
  height: height
270
278
  }
271
279
  }, function () {
272
- updateSize(width, calculatedWidthWithLayout.layout);
280
+ updateSize(newWidth, calculatedWidthWithLayout.layout);
273
281
  });
274
282
  });
275
283
  var initialWidth = props.mediaSingleWidth || DEFAULT_IMAGE_WIDTH;
@@ -291,7 +299,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
291
299
  _createClass(ResizableMediaSingleNext, [{
292
300
  key: "componentDidUpdate",
293
301
  value: function componentDidUpdate(prevProps) {
294
- var _this2 = this;
295
302
  var offsetLeft = calculateOffsetLeft(this.insideInlineLike, this.insideLayout, this.props.view.dom, this.wrapper);
296
303
  if (offsetLeft !== this.state.offsetLeft && offsetLeft >= 0) {
297
304
  this.setState({
@@ -317,18 +324,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
317
324
  }
318
325
  });
319
326
  }
320
- if (this.props.layout === 'full-width' && !this.isNestedNode() && prevProps.containerWidth !== this.props.containerWidth) {
321
- // To achieve edge-to-edge for full-width, we need to update its width according to containerWidth
322
- // Update state to allow resizer to get most up-to-date width to avoid jumping when start resizing
323
- this.setState(function (prevState) {
324
- return {
325
- size: {
326
- width: calcMediaSingleMaxWidth(_this2.props.containerWidth),
327
- height: prevState.size.height
328
- }
329
- };
330
- });
331
- }
332
327
  return true;
333
328
  }
334
329
  }, {
@@ -496,7 +491,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
496
491
  }, {
497
492
  key: "render",
498
493
  value: function render() {
499
- var _this3 = this;
494
+ var _this2 = this;
500
495
  var _this$props8 = this.props,
501
496
  origWidth = _this$props8.width,
502
497
  layout = _this$props8.layout,
@@ -514,7 +509,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
514
509
  handleSides.forEach(function (side) {
515
510
  var oppositeSide = side === 'left' ? 'right' : 'left';
516
511
  enable[side] = nonWrappedLayouts.concat("wrap-".concat(oppositeSide)).concat("align-".concat(imageAlignmentMap[oppositeSide])).indexOf(layout) > -1;
517
- if (side === 'left' && _this3.insideInlineLike) {
512
+ if (side === 'left' && _this2.insideInlineLike) {
518
513
  enable[side] = false;
519
514
  }
520
515
  });
@@ -526,9 +521,23 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
526
521
  'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
527
522
  });
528
523
  var resizerNextClassName = classnames(className, resizerStyles);
529
- var maxWidth = this.isNestedNode() ? undefined // fall back to 'max-width: 100%'
530
- : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
524
+ var maxWidth = !isResizing && this.isNestedNode() ?
525
+ // set undefined to fall back to 100%
526
+ undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
531
527
  var minWidth = this.calcMinWidth(isVideoFile, lineLength);
528
+ var nestedHandleStyles = function nestedHandleStyles(isNestedNode) {
529
+ if (!isNestedNode) {
530
+ return;
531
+ }
532
+ return {
533
+ left: {
534
+ left: "calc(".concat("var(--ds-space-075, 0.375em)", " * -1)")
535
+ },
536
+ right: {
537
+ right: "calc(".concat("var(--ds-space-075, 0.375em)", " * -1)")
538
+ }
539
+ };
540
+ };
532
541
  return jsx("div", {
533
542
  ref: this.saveWrapper,
534
543
  css: wrapperStyle({
@@ -554,7 +563,8 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
554
563
  resizeRatio: nonWrappedLayouts.includes(layout) ? 2 : 1,
555
564
  handleComponent: handleComponent,
556
565
  "data-testid": resizerNextTestId,
557
- isHandleVisible: selected
566
+ isHandleVisible: selected,
567
+ handleStyles: nestedHandleStyles(this.isNestedNode())
558
568
  }, children));
559
569
  }
560
570
  }]);
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.35.0";
2
+ export var version = "187.35.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsEventPayload } from './types';
4
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { PerformanceTracking } from '../../types/performance-tracking';
6
6
  import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  interface AnalyticsPluginOptions {
@@ -16,7 +16,7 @@ interface AnalyticsPluginOptions {
16
16
  */
17
17
  declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
18
18
  pluginConfiguration: AnalyticsPluginOptions;
19
- dependencies: [typeof featureFlagsPlugin, typeof newAnalyticsPlugin];
19
+ dependencies: [FeatureFlagsPlugin, typeof newAnalyticsPlugin];
20
20
  }>;
21
21
  export declare function extendPayload({ payload, duration, distortedDuration, }: {
22
22
  payload: AnalyticsEventPayload;
@@ -1,12 +1,12 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  type Config = {
5
5
  collabEdit?: CollabEditOptions;
6
6
  takeFullWidth: boolean;
7
7
  };
8
8
  declare const avatarGroup: NextEditorPlugin<'avatarGroup', {
9
9
  pluginConfiguration: Config;
10
- dependencies: [typeof featureFlagsPlugin];
10
+ dependencies: [FeatureFlagsPlugin];
11
11
  }>;
12
12
  export default avatarGroup;
@@ -1,14 +1,11 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import { pluginKey } from './plugin';
3
3
  import type { PrivateCollabEditOptions } from './types';
4
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  export { pluginKey };
7
7
  declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
8
8
  pluginConfiguration: PrivateCollabEditOptions;
9
- dependencies: [
10
- typeof featureFlagsPlugin,
11
- OptionalPlugin<typeof analyticsPlugin>
12
- ];
9
+ dependencies: [FeatureFlagsPlugin, OptionalPlugin<typeof analyticsPlugin>];
13
10
  }>;
14
11
  export default collabEditPlugin;
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin, EditorProps } from '../../types';
2
2
  import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
6
6
  allowInsertion?: boolean;
@@ -8,7 +8,7 @@ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
8
8
  }
9
9
  declare const expandPlugin: NextEditorPlugin<'expand', {
10
10
  pluginConfiguration: ExpandPluginOptions | undefined;
11
- dependencies: [typeof featureFlagsPlugin, typeof decorationsPlugin];
11
+ dependencies: [FeatureFlagsPlugin, typeof decorationsPlugin];
12
12
  }>;
13
13
  interface ExpandEditorProps {
14
14
  allowExpand?: EditorProps['allowExpand'];
@@ -1,11 +1,11 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  type Config = {
4
4
  takeFullWidth: boolean;
5
5
  twoLineEditorToolbar: boolean;
6
6
  };
7
7
  export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
8
8
  pluginConfiguration: Config;
9
- dependencies: [typeof featureFlagsPlugin];
9
+ dependencies: [FeatureFlagsPlugin];
10
10
  }>;
11
11
  export default findReplacePlugin;
@@ -4,7 +4,7 @@ import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
4
4
  import type datePlugin from '../date';
5
5
  import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
6
  import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
7
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
9
  import type mentionsPlugin from '../mentions';
10
10
  import type quickInsertPlugin from '../quick-insert';
@@ -12,7 +12,7 @@ import type blockTypePlugin from '../block-type';
12
12
  import type codeBlockPlugin from '../code-block';
13
13
  import type panelPlugin from '../panel';
14
14
  export type InsertBlockPluginDependencies = [
15
- typeof featureFlagsPlugin,
15
+ FeatureFlagsPlugin,
16
16
  OptionalPlugin<typeof tablesPlugin>,
17
17
  OptionalPlugin<typeof hyperlinkPlugin>,
18
18
  OptionalPlugin<typeof datePlugin>,
@@ -36,10 +36,9 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
36
36
  private updateGuidelines;
37
37
  checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
38
38
  calcNewSize: (newWidth: number, stop: boolean) => {
39
- width: number | null;
40
39
  layout: MediaSingleLayout;
41
40
  };
42
- calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number, fullWidthMode?: boolean) => 'center' | 'wide' | 'full-width';
41
+ calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number, fullWidthMode?: boolean, isNestedNode?: boolean) => 'center' | 'wide' | 'full-width';
43
42
  calcPxHeight: (newWidth: number) => number;
44
43
  private saveWrapper;
45
44
  private displayGuideline;
@@ -53,7 +52,6 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
53
52
  width: number;
54
53
  height: number;
55
54
  calculatedWidthWithLayout: {
56
- width: number | null;
57
55
  layout: MediaSingleLayout;
58
56
  };
59
57
  };
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { CardOptions } from '@atlaskit/editor-common/card';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { cardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type betterTypeHistoryPlugin from '../better-type-history';
6
6
  import type { listPlugin } from '@atlaskit/editor-plugin-list';
@@ -12,7 +12,7 @@ export type PastePluginOptions = {
12
12
  declare const pastePlugin: NextEditorPlugin<'paste', {
13
13
  pluginConfiguration: PastePluginOptions;
14
14
  dependencies: [
15
- typeof featureFlagsPlugin,
15
+ FeatureFlagsPlugin,
16
16
  OptionalPlugin<typeof listPlugin>,
17
17
  typeof betterTypeHistoryPlugin,
18
18
  OptionalPlugin<typeof cardPlugin>,
@@ -1,7 +1,7 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  declare const rulePlugin: NextEditorPlugin<'rule', {
4
4
  pluginConfiguration: undefined;
5
- dependencies: [typeof featureFlagsPlugin];
5
+ dependencies: [FeatureFlagsPlugin];
6
6
  }>;
7
7
  export default rulePlugin;
@@ -1,11 +1,11 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
4
4
  import { pluginKey as textColorPluginKey } from './pm-plugins/main';
5
5
  type Config = TextColorPluginConfig | boolean;
6
6
  declare const textColorPlugin: NextEditorPlugin<'textColor', {
7
7
  pluginConfiguration: Config | undefined;
8
- dependencies: [typeof featureFlagsPlugin];
8
+ dependencies: [FeatureFlagsPlugin];
9
9
  }>;
10
10
  export { textColorPluginKey };
11
11
  export type { TextColorPluginState };
@@ -1,7 +1,7 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsEventPayload } from './types';
4
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { PerformanceTracking } from '../../types/performance-tracking';
6
6
  import type { analyticsPlugin as newAnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  interface AnalyticsPluginOptions {
@@ -17,7 +17,7 @@ interface AnalyticsPluginOptions {
17
17
  declare const analyticsPlugin: NextEditorPlugin<'deprecatedAnalytics', {
18
18
  pluginConfiguration: AnalyticsPluginOptions;
19
19
  dependencies: [
20
- typeof featureFlagsPlugin,
20
+ FeatureFlagsPlugin,
21
21
  typeof newAnalyticsPlugin
22
22
  ];
23
23
  }>;
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  type Config = {
5
5
  collabEdit?: CollabEditOptions;
6
6
  takeFullWidth: boolean;
@@ -8,7 +8,7 @@ type Config = {
8
8
  declare const avatarGroup: NextEditorPlugin<'avatarGroup', {
9
9
  pluginConfiguration: Config;
10
10
  dependencies: [
11
- typeof featureFlagsPlugin
11
+ FeatureFlagsPlugin
12
12
  ];
13
13
  }>;
14
14
  export default avatarGroup;
@@ -1,13 +1,13 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import { pluginKey } from './plugin';
3
3
  import type { PrivateCollabEditOptions } from './types';
4
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  export { pluginKey };
7
7
  declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
8
8
  pluginConfiguration: PrivateCollabEditOptions;
9
9
  dependencies: [
10
- typeof featureFlagsPlugin,
10
+ FeatureFlagsPlugin,
11
11
  OptionalPlugin<typeof analyticsPlugin>
12
12
  ];
13
13
  }>;
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin, EditorProps } from '../../types';
2
2
  import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
6
6
  allowInsertion?: boolean;
@@ -9,7 +9,7 @@ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
9
9
  declare const expandPlugin: NextEditorPlugin<'expand', {
10
10
  pluginConfiguration: ExpandPluginOptions | undefined;
11
11
  dependencies: [
12
- typeof featureFlagsPlugin,
12
+ FeatureFlagsPlugin,
13
13
  typeof decorationsPlugin
14
14
  ];
15
15
  }>;
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  type Config = {
4
4
  takeFullWidth: boolean;
5
5
  twoLineEditorToolbar: boolean;
@@ -7,7 +7,7 @@ type Config = {
7
7
  export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
8
8
  pluginConfiguration: Config;
9
9
  dependencies: [
10
- typeof featureFlagsPlugin
10
+ FeatureFlagsPlugin
11
11
  ];
12
12
  }>;
13
13
  export default findReplacePlugin;
@@ -4,7 +4,7 @@ import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
4
4
  import type datePlugin from '../date';
5
5
  import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
6
  import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
7
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
9
  import type mentionsPlugin from '../mentions';
10
10
  import type quickInsertPlugin from '../quick-insert';
@@ -12,7 +12,7 @@ import type blockTypePlugin from '../block-type';
12
12
  import type codeBlockPlugin from '../code-block';
13
13
  import type panelPlugin from '../panel';
14
14
  export type InsertBlockPluginDependencies = [
15
- typeof featureFlagsPlugin,
15
+ FeatureFlagsPlugin,
16
16
  OptionalPlugin<typeof tablesPlugin>,
17
17
  OptionalPlugin<typeof hyperlinkPlugin>,
18
18
  OptionalPlugin<typeof datePlugin>,
@@ -36,10 +36,9 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
36
36
  private updateGuidelines;
37
37
  checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
38
38
  calcNewSize: (newWidth: number, stop: boolean) => {
39
- width: number | null;
40
39
  layout: MediaSingleLayout;
41
40
  };
42
- calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number, fullWidthMode?: boolean) => 'center' | 'wide' | 'full-width';
41
+ calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number, fullWidthMode?: boolean, isNestedNode?: boolean) => 'center' | 'wide' | 'full-width';
43
42
  calcPxHeight: (newWidth: number) => number;
44
43
  private saveWrapper;
45
44
  private displayGuideline;
@@ -53,7 +52,6 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
53
52
  width: number;
54
53
  height: number;
55
54
  calculatedWidthWithLayout: {
56
- width: number | null;
57
55
  layout: MediaSingleLayout;
58
56
  };
59
57
  };
@@ -1,6 +1,6 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { CardOptions } from '@atlaskit/editor-common/card';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { cardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type betterTypeHistoryPlugin from '../better-type-history';
6
6
  import type { listPlugin } from '@atlaskit/editor-plugin-list';
@@ -12,7 +12,7 @@ export type PastePluginOptions = {
12
12
  declare const pastePlugin: NextEditorPlugin<'paste', {
13
13
  pluginConfiguration: PastePluginOptions;
14
14
  dependencies: [
15
- typeof featureFlagsPlugin,
15
+ FeatureFlagsPlugin,
16
16
  OptionalPlugin<typeof listPlugin>,
17
17
  typeof betterTypeHistoryPlugin,
18
18
  OptionalPlugin<typeof cardPlugin>,
@@ -1,9 +1,9 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  declare const rulePlugin: NextEditorPlugin<'rule', {
4
4
  pluginConfiguration: undefined;
5
5
  dependencies: [
6
- typeof featureFlagsPlugin
6
+ FeatureFlagsPlugin
7
7
  ];
8
8
  }>;
9
9
  export default rulePlugin;
@@ -1,12 +1,12 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
2
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
3
3
  import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
4
4
  import { pluginKey as textColorPluginKey } from './pm-plugins/main';
5
5
  type Config = TextColorPluginConfig | boolean;
6
6
  declare const textColorPlugin: NextEditorPlugin<'textColor', {
7
7
  pluginConfiguration: Config | undefined;
8
8
  dependencies: [
9
- typeof featureFlagsPlugin
9
+ FeatureFlagsPlugin
10
10
  ];
11
11
  }>;
12
12
  export { textColorPluginKey };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.35.0",
3
+ "version": "187.35.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -67,7 +67,7 @@
67
67
  "@atlaskit/editor-plugin-decorations": "^0.2.0",
68
68
  "@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
69
69
  "@atlaskit/editor-plugin-emoji": "^0.3.0",
70
- "@atlaskit/editor-plugin-feature-flags": "^0.2.0",
70
+ "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
71
71
  "@atlaskit/editor-plugin-floating-toolbar": "^0.4.0",
72
72
  "@atlaskit/editor-plugin-focus": "^0.2.0",
73
73
  "@atlaskit/editor-plugin-grid": "^0.2.0",