@atlaskit/editor-plugin-breakout 13.0.5 → 14.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-breakout
2
2
 
3
+ ## 14.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`777bedbb77fe3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/777bedbb77fe3) -
14
+ [ux] [EDITOR-8115] fix the resizing guidelines for syncBlock and bodiedSyncBlock nodes
15
+ - Updated dependencies
16
+
3
17
  ## 13.0.5
4
18
 
5
19
  ### Patch Changes
@@ -8,6 +8,7 @@ exports.getGuidelines = exports.GUIDELINE_KEYS = void 0;
8
8
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
9
9
  var _styles = require("@atlaskit/editor-common/styles");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
11
12
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
14
  var WIDTHS = {
@@ -26,6 +27,7 @@ var GUIDELINE_KEYS = exports.GUIDELINE_KEYS = {
26
27
  maxWidthLeft: 'max_width_left',
27
28
  maxWidthRight: 'max_width_right'
28
29
  };
30
+ var SYNC_BLOCK_PADDING = 19;
29
31
  var AK_NESTED_DND_GUTTER_OFFSET = 8;
30
32
  var roundToNearest = function roundToNearest(value) {
31
33
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
@@ -45,6 +47,12 @@ var getGuidelines = exports.getGuidelines = (0, _memoizeOne.default)(function (i
45
47
  case 'layoutSection':
46
48
  innerPaddingOffset = _styles.LAYOUT_COLUMN_PADDING + AK_NESTED_DND_GUTTER_OFFSET;
47
49
  break;
50
+ case 'bodiedSyncBlock':
51
+ case 'syncBlock':
52
+ if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_sync_block_guideline_bugfix')) {
53
+ innerPaddingOffset = SYNC_BLOCK_PADDING;
54
+ }
55
+ break;
48
56
  default:
49
57
  break;
50
58
  }
@@ -1,6 +1,7 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { EXPAND_CONTAINER_PADDING, LAYOUT_COLUMN_PADDING, resizerHandleThumbWidth } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorCalculatedWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorMaxLayoutWidth } from '@atlaskit/editor-shared-styles';
4
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  const WIDTHS = {
@@ -19,6 +20,7 @@ export const GUIDELINE_KEYS = {
19
20
  maxWidthLeft: 'max_width_left',
20
21
  maxWidthRight: 'max_width_right'
21
22
  };
23
+ const SYNC_BLOCK_PADDING = 19;
22
24
  const AK_NESTED_DND_GUTTER_OFFSET = 8;
23
25
  const roundToNearest = (value, interval = 0.5) => Math.round(value / interval) * interval;
24
26
  export const getGuidelines = memoizeOne((isResizing, newWidth, getEditorWidth, nodeType) => {
@@ -35,6 +37,12 @@ export const getGuidelines = memoizeOne((isResizing, newWidth, getEditorWidth, n
35
37
  case 'layoutSection':
36
38
  innerPaddingOffset = LAYOUT_COLUMN_PADDING + AK_NESTED_DND_GUTTER_OFFSET;
37
39
  break;
40
+ case 'bodiedSyncBlock':
41
+ case 'syncBlock':
42
+ if (isExperimentEnabled('platform_editor_sync_block_guideline_bugfix')) {
43
+ innerPaddingOffset = SYNC_BLOCK_PADDING;
44
+ }
45
+ break;
38
46
  default:
39
47
  break;
40
48
  }
@@ -1,6 +1,7 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { EXPAND_CONTAINER_PADDING, LAYOUT_COLUMN_PADDING, resizerHandleThumbWidth } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorCalculatedWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorMaxLayoutWidth } from '@atlaskit/editor-shared-styles';
4
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  var WIDTHS = {
@@ -19,6 +20,7 @@ export var GUIDELINE_KEYS = {
19
20
  maxWidthLeft: 'max_width_left',
20
21
  maxWidthRight: 'max_width_right'
21
22
  };
23
+ var SYNC_BLOCK_PADDING = 19;
22
24
  var AK_NESTED_DND_GUTTER_OFFSET = 8;
23
25
  var roundToNearest = function roundToNearest(value) {
24
26
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
@@ -38,6 +40,12 @@ export var getGuidelines = memoizeOne(function (isResizing, newWidth, getEditorW
38
40
  case 'layoutSection':
39
41
  innerPaddingOffset = LAYOUT_COLUMN_PADDING + AK_NESTED_DND_GUTTER_OFFSET;
40
42
  break;
43
+ case 'bodiedSyncBlock':
44
+ case 'syncBlock':
45
+ if (isExperimentEnabled('platform_editor_sync_block_guideline_bugfix')) {
46
+ innerPaddingOffset = SYNC_BLOCK_PADDING;
47
+ }
48
+ break;
41
49
  default:
42
50
  break;
43
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-breakout",
3
- "version": "13.0.5",
3
+ "version": "14.0.0",
4
4
  "description": "Breakout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -22,16 +22,17 @@
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
24
  "@atlaskit/adf-schema": "^56.6.0",
25
- "@atlaskit/editor-plugin-block-controls": "^14.0.0",
26
- "@atlaskit/editor-plugin-editor-disabled": "^13.0.0",
27
- "@atlaskit/editor-plugin-editor-viewmode": "^15.0.0",
28
- "@atlaskit/editor-plugin-guideline": "^13.0.0",
29
- "@atlaskit/editor-plugin-interaction": "^24.0.0",
30
- "@atlaskit/editor-plugin-user-intent": "^11.0.0",
31
- "@atlaskit/editor-plugin-width": "^14.0.0",
25
+ "@atlaskit/editor-plugin-block-controls": "^15.0.0",
26
+ "@atlaskit/editor-plugin-editor-disabled": "^14.0.0",
27
+ "@atlaskit/editor-plugin-editor-viewmode": "^16.0.0",
28
+ "@atlaskit/editor-plugin-guideline": "^14.0.0",
29
+ "@atlaskit/editor-plugin-interaction": "^25.0.0",
30
+ "@atlaskit/editor-plugin-user-intent": "^12.0.0",
31
+ "@atlaskit/editor-plugin-width": "^15.0.0",
32
32
  "@atlaskit/editor-prosemirror": "^8.0.0",
33
33
  "@atlaskit/editor-shared-styles": "^4.0.0",
34
34
  "@atlaskit/icon": "^37.3.0",
35
+ "@atlaskit/platform-feature-experiments": "^0.3.0",
35
36
  "@atlaskit/platform-feature-flags": "^2.1.0",
36
37
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
37
38
  "@atlaskit/theme": "^27.0.0",
@@ -45,7 +46,7 @@
45
46
  "uuid": "^3.1.0"
46
47
  },
47
48
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^117.4.0",
49
+ "@atlaskit/editor-common": "^118.0.0",
49
50
  "react": "^18.2.0 || ^19.2.0",
50
51
  "react-dom": "^18.2.0 || ^19.2.0",
51
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"