@atlaskit/editor-plugin-breakout 6.2.5 → 6.2.6

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,13 @@
1
1
  # @atlaskit/editor-plugin-breakout
2
2
 
3
+ ## 6.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0c0f8207e7294`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0c0f8207e7294) -
8
+ Added sync block resizing
9
+ - Updated dependencies
10
+
3
11
  ## 6.2.5
4
12
 
5
13
  ### Patch Changes
@@ -11,6 +11,7 @@ var _utils = require("@atlaskit/editor-common/utils");
11
11
  var _document = require("@atlaskit/editor-common/utils/document");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
15
  var _handleKeyDown = require("./handle-key-down");
15
16
  var _resizingMarkView = require("./resizing-mark-view");
16
17
  var _singlePlayerExpand = require("./utils/single-player-expand");
@@ -129,8 +130,14 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
129
130
  var _newState$schema$node = newState.schema.nodes,
130
131
  expand = _newState$schema$node.expand,
131
132
  codeBlock = _newState$schema$node.codeBlock,
132
- layoutSection = _newState$schema$node.layoutSection;
133
+ layoutSection = _newState$schema$node.layoutSection,
134
+ syncBlock = _newState$schema$node.syncBlock,
135
+ bodiedSyncBlock = _newState$schema$node.bodiedSyncBlock;
133
136
  var breakoutResizableNodes = new Set([expand, codeBlock, layoutSection]);
137
+ if ((0, _experiments.editorExperiment)('platform_synced_block', true)) {
138
+ breakoutResizableNodes.add(syncBlock);
139
+ breakoutResizableNodes.add(bodiedSyncBlock);
140
+ }
134
141
  var isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
135
142
  if ((0, _document.isReplaceDocOperation)(transactions, oldState)) {
136
143
  newState.doc.forEach(function (node, pos) {
@@ -3,6 +3,7 @@ import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
3
3
  import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
5
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
6
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { handleKeyDown } from './handle-key-down';
7
8
  import { ResizingMarkView } from './resizing-mark-view';
8
9
  import { updateExpandedStateNew } from './utils/single-player-expand';
@@ -125,9 +126,15 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
125
126
  const {
126
127
  expand,
127
128
  codeBlock,
128
- layoutSection
129
+ layoutSection,
130
+ syncBlock,
131
+ bodiedSyncBlock
129
132
  } = newState.schema.nodes;
130
133
  const breakoutResizableNodes = new Set([expand, codeBlock, layoutSection]);
134
+ if (editorExperiment('platform_synced_block', true)) {
135
+ breakoutResizableNodes.add(syncBlock);
136
+ breakoutResizableNodes.add(bodiedSyncBlock);
137
+ }
131
138
  const isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
132
139
  if (isReplaceDocOperation(transactions, oldState)) {
133
140
  newState.doc.forEach((node, pos) => {
@@ -6,6 +6,7 @@ import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
6
6
  import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
8
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
9
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
10
  import { handleKeyDown } from './handle-key-down';
10
11
  import { ResizingMarkView } from './resizing-mark-view';
11
12
  import { updateExpandedStateNew } from './utils/single-player-expand';
@@ -122,8 +123,14 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
122
123
  var _newState$schema$node = newState.schema.nodes,
123
124
  expand = _newState$schema$node.expand,
124
125
  codeBlock = _newState$schema$node.codeBlock,
125
- layoutSection = _newState$schema$node.layoutSection;
126
+ layoutSection = _newState$schema$node.layoutSection,
127
+ syncBlock = _newState$schema$node.syncBlock,
128
+ bodiedSyncBlock = _newState$schema$node.bodiedSyncBlock;
126
129
  var breakoutResizableNodes = new Set([expand, codeBlock, layoutSection]);
130
+ if (editorExperiment('platform_synced_block', true)) {
131
+ breakoutResizableNodes.add(syncBlock);
132
+ breakoutResizableNodes.add(bodiedSyncBlock);
133
+ }
127
134
  var isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
128
135
  if (isReplaceDocOperation(transactions, oldState)) {
129
136
  newState.doc.forEach(function (node, pos) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-breakout",
3
- "version": "6.2.5",
3
+ "version": "6.2.6",
4
4
  "description": "Breakout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
44
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
45
45
  "@atlaskit/theme": "^21.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^15.6.0",
46
+ "@atlaskit/tmp-editor-statsig": "^15.7.0",
47
47
  "@atlaskit/tokens": "^8.4.0",
48
48
  "@atlaskit/tooltip": "^20.11.0",
49
49
  "@babel/runtime": "^7.0.0",
@@ -59,7 +59,7 @@
59
59
  "react-intl-next": "npm:react-intl@^5.18.1"
60
60
  },
61
61
  "devDependencies": {
62
- "@testing-library/react": "^13.4.0",
62
+ "@testing-library/react": "^16.3.0",
63
63
  "wait-for-expect": "^1.2.0"
64
64
  },
65
65
  "techstack": {