@atlaskit/editor-plugin-block-menu 5.2.26 → 5.2.28

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 (25) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/editor-actions/isTransformToTargetDisabled.js +10 -4
  3. package/dist/cjs/editor-commands/transform-node-utils/tranformContent.js +18 -0
  4. package/dist/cjs/editor-commands/transform-node-utils/transform.js +29 -9
  5. package/dist/cjs/editor-commands/transform-node-utils/types.js +7 -2
  6. package/dist/cjs/editor-commands/transformNode.js +4 -18
  7. package/dist/es2019/editor-actions/isTransformToTargetDisabled.js +10 -4
  8. package/dist/es2019/editor-commands/transform-node-utils/tranformContent.js +12 -0
  9. package/dist/es2019/editor-commands/transform-node-utils/transform.js +30 -10
  10. package/dist/es2019/editor-commands/transform-node-utils/types.js +6 -1
  11. package/dist/es2019/editor-commands/transformNode.js +4 -18
  12. package/dist/esm/editor-actions/isTransformToTargetDisabled.js +10 -4
  13. package/dist/esm/editor-commands/transform-node-utils/tranformContent.js +12 -0
  14. package/dist/esm/editor-commands/transform-node-utils/transform.js +30 -10
  15. package/dist/esm/editor-commands/transform-node-utils/types.js +6 -1
  16. package/dist/esm/editor-commands/transformNode.js +4 -18
  17. package/dist/types/editor-actions/isTransformToTargetDisabled.d.ts +1 -1
  18. package/dist/types/editor-commands/transform-node-utils/tranformContent.d.ts +3 -0
  19. package/dist/types/editor-commands/transform-node-utils/transform.d.ts +2 -2
  20. package/dist/types/editor-commands/transform-node-utils/types.d.ts +3 -2
  21. package/dist/types-ts4.5/editor-actions/isTransformToTargetDisabled.d.ts +1 -1
  22. package/dist/types-ts4.5/editor-commands/transform-node-utils/tranformContent.d.ts +3 -0
  23. package/dist/types-ts4.5/editor-commands/transform-node-utils/transform.d.ts +2 -2
  24. package/dist/types-ts4.5/editor-commands/transform-node-utils/types.d.ts +3 -2
  25. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 5.2.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8c62a0141a5fa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c62a0141a5fa) -
8
+ [ux] Fixes contextual transform options for direct children of top level nodes.
9
+ - Updated dependencies
10
+
11
+ ## 5.2.27
12
+
13
+ ### Patch Changes
14
+
15
+ - [`6eba84d34e1a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6eba84d34e1a5) -
16
+ Add a new multi node type which supports multi-selected content
17
+ - Updated dependencies
18
+
3
19
  ## 5.2.26
4
20
 
5
21
  ### Patch Changes
@@ -9,13 +9,19 @@ var _model = require("@atlaskit/editor-prosemirror/model");
9
9
  var _transform = require("../editor-commands/transform-node-utils/transform");
10
10
  var _types = require("../editor-commands/transform-node-utils/types");
11
11
  var _utils = require("../editor-commands/transform-node-utils/utils");
12
- var canParentContainNodeType = exports.canParentContainNodeType = function canParentContainNodeType(schema, parentNode, nodeTypeName, nodeTypeAttrs) {
13
- var adjustedNodeTypeName = (0, _utils.getTargetNodeTypeNameInContext)(nodeTypeName, true);
12
+ var canParentContainNodeType = exports.canParentContainNodeType = function canParentContainNodeType(schema, selectedNodeTypeName, parentNode, nodeTypeName, nodeTypeAttrs) {
13
+ var adjustedNodeTypeName = parentNode.type.name === 'layoutColumn' || parentNode.type.name === 'bodiedSyncBlock' ? nodeTypeName : (0, _utils.getTargetNodeTypeNameInContext)(nodeTypeName, true);
14
14
  if (!adjustedNodeTypeName) {
15
15
  return false;
16
16
  }
17
17
  var nodeType = schema.nodes[adjustedNodeTypeName];
18
- return parentNode.type.validContent(_model.Fragment.from(nodeType.createAndFill(nodeTypeAttrs)));
18
+ var content = null;
19
+ var nodesThatCantBeNestedInNestedExpand = ['blockCard', 'embedCard', 'table'];
20
+ if (nodesThatCantBeNestedInNestedExpand.includes(selectedNodeTypeName) && (adjustedNodeTypeName === 'expand' || adjustedNodeTypeName === 'nestedExpand')) {
21
+ var table = schema.nodes[selectedNodeTypeName];
22
+ content = table.createAndFill();
23
+ }
24
+ return parentNode.type.validContent(_model.Fragment.from(nodeType.createAndFill(nodeTypeAttrs, content)));
19
25
  };
20
26
  var isHeadingToHeadingTransformEnabled = function isHeadingToHeadingTransformEnabled(selectedNode, targetNodeTypeAttrs) {
21
27
  var _selectedNode$attrs;
@@ -38,7 +44,7 @@ var isTransformEnabledForNode = function isTransformEnabledForNode(node, targetN
38
44
  if (selectedNodeTypeName === 'heading' && targetNodeTypeName === 'heading') {
39
45
  return isHeadingToHeadingTransformEnabled(node, targetNodeTypeAttrs);
40
46
  }
41
- if (isNested && !canParentContainNodeType(schema, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
47
+ if (isNested && !canParentContainNodeType(schema, selectedNodeTypeName, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
42
48
  return false;
43
49
  }
44
50
  return true;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.tranformContent = void 0;
7
+ var _model = require("@atlaskit/editor-prosemirror/model");
8
+ var _transform = require("./transform");
9
+ var tranformContent = exports.tranformContent = function tranformContent(content, targetNodeType, schema, isNested, targetAttrs) {
10
+ var outputNodes = (0, _transform.getOutputNodes)({
11
+ sourceNodes: Array.from(content.content),
12
+ targetNodeType: targetNodeType,
13
+ schema: schema,
14
+ isNested: isNested,
15
+ targetAttrs: targetAttrs
16
+ });
17
+ return outputNodes ? _model.Fragment.fromArray(outputNodes) : content;
18
+ };
@@ -28,25 +28,38 @@ var TRANSFORM_STEPS = {
28
28
  atomic: undefined,
29
29
  container: [_wrapStep.wrapStep],
30
30
  list: [_wrapIntoListStep.wrapIntoListStep],
31
- text: undefined
31
+ text: undefined,
32
+ multi: undefined
32
33
  },
33
34
  container: {
34
35
  atomic: undefined,
35
36
  container: [_unwrapStep.unwrapStep, _wrapStep.wrapStep],
36
37
  list: undefined,
37
- text: [_unwrapStep.unwrapStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
38
+ text: [_unwrapStep.unwrapStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
39
+ multi: undefined
38
40
  },
39
41
  list: {
40
42
  atomic: undefined,
41
43
  container: [_wrapStep.wrapStep],
42
44
  list: [_listToListStep.listToListStep],
43
- text: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
45
+ text: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
46
+ multi: undefined
44
47
  },
45
48
  text: {
46
49
  atomic: undefined,
47
50
  container: [_wrapMixedContentStep.wrapMixedContentStep],
48
51
  list: [_wrapIntoListStep.wrapIntoListStep],
49
- text: [_flattenStep.flattenStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
52
+ text: [_flattenStep.flattenStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
53
+ multi: undefined
54
+ },
55
+ multi: {
56
+ atomic: undefined,
57
+ container: [_wrapMixedContentStep.wrapMixedContentStep],
58
+ // TODO: EDITOR-4137 - Implement multi list transform
59
+ list: undefined,
60
+ // TODO: EDITOR-4140 - Implement multi text transform
61
+ text: undefined,
62
+ multi: undefined
50
63
  }
51
64
  };
52
65
 
@@ -205,6 +218,10 @@ var TRANSFORM_STEPS_OVERRIDE = {
205
218
  bulletList: null,
206
219
  taskList: null,
207
220
  decisionList: null
221
+ },
222
+ multi: {
223
+ // TODO: EDITOR-4138 - Implement multi content to layout transform
224
+ layoutSection: undefined
208
225
  }
209
226
  };
210
227
  var getTransformStepsForNodeTypes = function getTransformStepsForNodeTypes(selectedNodeTypeName, targetNodeTypeName) {
@@ -218,15 +235,17 @@ var getTransformStepsForNodeTypes = function getTransformStepsForNodeTypes(selec
218
235
  var steps = overrideSteps !== null && overrideSteps !== void 0 ? overrideSteps : TRANSFORM_STEPS[fromCategory][toCategory];
219
236
  return steps;
220
237
  };
221
- // Note: Currently works only for single node in the selection
222
238
  var getOutputNodes = exports.getOutputNodes = function getOutputNodes(_ref) {
223
- var sourceNode = _ref.sourceNode,
239
+ var sourceNodes = _ref.sourceNodes,
224
240
  targetNodeType = _ref.targetNodeType,
225
241
  schema = _ref.schema,
226
242
  isNested = _ref.isNested,
227
243
  targetAttrs = _ref.targetAttrs;
228
- var nodesToReplace = [sourceNode];
229
- var selectedNodeTypeName = (0, _types.toNodeTypeValue)(sourceNode.type.name);
244
+ var sourceNode = sourceNodes.at(0);
245
+ if (!sourceNode) {
246
+ return;
247
+ }
248
+ var selectedNodeTypeName = (0, _types.toNodeTypeValue)((0, _types.getNodeName)(sourceNodes));
230
249
  var initialTargetNodeTypeName = (0, _types.toNodeTypeValue)(targetNodeType.name);
231
250
  var targetNodeTypeName = (0, _utils.getTargetNodeTypeNameInContext)(initialTargetNodeTypeName, isNested);
232
251
  if (!selectedNodeTypeName || !targetNodeTypeName) {
@@ -235,6 +254,7 @@ var getOutputNodes = exports.getOutputNodes = function getOutputNodes(_ref) {
235
254
  }
236
255
  var steps = getTransformStepsForNodeTypes(selectedNodeTypeName, targetNodeTypeName);
237
256
  var context = {
257
+ // sourceNode is incorrect now - what to do here?
238
258
  fromNode: sourceNode,
239
259
  targetNodeTypeName: targetNodeTypeName,
240
260
  schema: schema,
@@ -245,7 +265,7 @@ var getOutputNodes = exports.getOutputNodes = function getOutputNodes(_ref) {
245
265
  }
246
266
  return steps.reduce(function (nodes, step) {
247
267
  return step(nodes, context);
248
- }, nodesToReplace);
268
+ }, sourceNodes);
249
269
  };
250
270
  var isTransformDisabledBasedOnStepsConfig = exports.isTransformDisabledBasedOnStepsConfig = function isTransformDisabledBasedOnStepsConfig(selectedNodeType, targetNodeType) {
251
271
  var steps = getTransformStepsForNodeTypes(selectedNodeType, targetNodeType);
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toNodeTypeValue = exports.isNodeTypeName = exports.NODE_CATEGORY_BY_TYPE = void 0;
6
+ exports.toNodeTypeValue = exports.isNodeTypeName = exports.getNodeName = exports.NODE_CATEGORY_BY_TYPE = void 0;
7
7
  var NODE_CATEGORY_BY_TYPE = exports.NODE_CATEGORY_BY_TYPE = {
8
8
  blockquote: 'container',
9
9
  blockCard: 'atomic',
@@ -25,7 +25,8 @@ var NODE_CATEGORY_BY_TYPE = exports.NODE_CATEGORY_BY_TYPE = {
25
25
  paragraph: 'text',
26
26
  nestedExpand: 'container',
27
27
  taskList: 'list',
28
- table: 'atomic'
28
+ table: 'atomic',
29
+ multi: 'multi'
29
30
  };
30
31
  var isNodeTypeName = exports.isNodeTypeName = function isNodeTypeName(value) {
31
32
  return value in NODE_CATEGORY_BY_TYPE;
@@ -33,5 +34,9 @@ var isNodeTypeName = exports.isNodeTypeName = function isNodeTypeName(value) {
33
34
  var toNodeTypeValue = exports.toNodeTypeValue = function toNodeTypeValue(value) {
34
35
  return value && isNodeTypeName(value) ? value : null;
35
36
  };
37
+ var getNodeName = exports.getNodeName = function getNodeName(nodes) {
38
+ var _nodes$at;
39
+ return nodes.length > 1 ? 'multi' : (_nodes$at = nodes.at(0)) === null || _nodes$at === void 0 ? void 0 : _nodes$at.type.name;
40
+ };
36
41
 
37
42
  // Note: We are still deciding what should be in the context.
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.transformNode = void 0;
7
7
  var _selection = require("@atlaskit/editor-common/selection");
8
- var _model = require("@atlaskit/editor-prosemirror/model");
9
8
  var _state = require("@atlaskit/editor-prosemirror/state");
10
9
  var _isNestedNode = require("../ui/utils/isNestedNode");
11
- var _transform = require("./transform-node-utils/transform");
10
+ var _tranformContent = require("./transform-node-utils/tranformContent");
12
11
  var _utils = require("./transforms/utils");
13
12
  var transformNode = exports.transformNode = function transformNode(api) {
14
13
  return (
@@ -29,29 +28,16 @@ var transformNode = exports.transformNode = function transformNode(api) {
29
28
  var selectedParent = $from.parent;
30
29
  var isParentLayout = selectedParent.type === nodes.layoutColumn;
31
30
  var isNestedExceptLayout = (0, _isNestedNode.isNestedNode)(preservedSelection, '') && !isParentLayout;
32
- var fragment = _model.Fragment.empty;
33
31
  var isList = (0, _utils.isListNode)(selectedParent);
34
32
  var slice = tr.doc.slice(isList ? $from.pos - 1 : $from.pos, isList ? $to.pos + 1 : $to.pos);
35
- slice.content.forEach(function (node) {
36
- var outputNode = (0, _transform.getOutputNodes)({
37
- sourceNode: node,
38
- targetNodeType: targetType,
39
- schema: tr.doc.type.schema,
40
- isNested: isNestedExceptLayout,
41
- targetAttrs: metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs
42
- });
43
- if (outputNode) {
44
- fragment = fragment.append(_model.Fragment.fromArray(outputNode));
45
- }
46
- });
33
+ var transformedNodes = (0, _tranformContent.tranformContent)(slice.content, targetType, schema, isNestedExceptLayout, metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs);
47
34
  var nodesToDeleteAndInsert = [nodes.mediaSingle];
48
35
  if (preservedSelection instanceof _state.NodeSelection && nodesToDeleteAndInsert.includes(preservedSelection.node.type)) {
49
36
  // when node is media single, use tr.replaceWith freeze editor, if modify position, tr.replaceWith creates duplicats
50
37
  tr.deleteRange($from.pos, $to.pos);
51
- tr.insert($from.pos, fragment);
38
+ tr.insert($from.pos, transformedNodes);
52
39
  } else {
53
- // TODO: ED-12345 - selection is broken post transaction, to fix.
54
- tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, fragment);
40
+ tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, transformedNodes);
55
41
  }
56
42
  return tr;
57
43
  };
@@ -3,13 +3,19 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
3
  import { isTransformDisabledBasedOnStepsConfig } from '../editor-commands/transform-node-utils/transform';
4
4
  import { toNodeTypeValue } from '../editor-commands/transform-node-utils/types';
5
5
  import { getBlockNodesInRange, getTargetNodeTypeNameInContext } from '../editor-commands/transform-node-utils/utils';
6
- export const canParentContainNodeType = (schema, parentNode, nodeTypeName, nodeTypeAttrs) => {
7
- const adjustedNodeTypeName = getTargetNodeTypeNameInContext(nodeTypeName, true);
6
+ export const canParentContainNodeType = (schema, selectedNodeTypeName, parentNode, nodeTypeName, nodeTypeAttrs) => {
7
+ const adjustedNodeTypeName = parentNode.type.name === 'layoutColumn' || parentNode.type.name === 'bodiedSyncBlock' ? nodeTypeName : getTargetNodeTypeNameInContext(nodeTypeName, true);
8
8
  if (!adjustedNodeTypeName) {
9
9
  return false;
10
10
  }
11
11
  const nodeType = schema.nodes[adjustedNodeTypeName];
12
- return parentNode.type.validContent(Fragment.from(nodeType.createAndFill(nodeTypeAttrs)));
12
+ let content = null;
13
+ const nodesThatCantBeNestedInNestedExpand = ['blockCard', 'embedCard', 'table'];
14
+ if (nodesThatCantBeNestedInNestedExpand.includes(selectedNodeTypeName) && (adjustedNodeTypeName === 'expand' || adjustedNodeTypeName === 'nestedExpand')) {
15
+ const table = schema.nodes[selectedNodeTypeName];
16
+ content = table.createAndFill();
17
+ }
18
+ return parentNode.type.validContent(Fragment.from(nodeType.createAndFill(nodeTypeAttrs, content)));
13
19
  };
14
20
  const isHeadingToHeadingTransformEnabled = (selectedNode, targetNodeTypeAttrs) => {
15
21
  var _selectedNode$attrs;
@@ -32,7 +38,7 @@ const isTransformEnabledForNode = (node, targetNodeTypeName, targetNodeTypeAttrs
32
38
  if (selectedNodeTypeName === 'heading' && targetNodeTypeName === 'heading') {
33
39
  return isHeadingToHeadingTransformEnabled(node, targetNodeTypeAttrs);
34
40
  }
35
- if (isNested && !canParentContainNodeType(schema, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
41
+ if (isNested && !canParentContainNodeType(schema, selectedNodeTypeName, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
36
42
  return false;
37
43
  }
38
44
  return true;
@@ -0,0 +1,12 @@
1
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
+ import { getOutputNodes } from './transform';
3
+ export const tranformContent = (content, targetNodeType, schema, isNested, targetAttrs) => {
4
+ const outputNodes = getOutputNodes({
5
+ sourceNodes: Array.from(content.content),
6
+ targetNodeType,
7
+ schema,
8
+ isNested,
9
+ targetAttrs
10
+ });
11
+ return outputNodes ? Fragment.fromArray(outputNodes) : content;
12
+ };
@@ -10,7 +10,7 @@ import { unwrapListStep } from './steps/unwrapListStep';
10
10
  import { wrapBlockquoteToDecisionListStep } from './steps/wrapBlockquoteToDecisionListStep';
11
11
  import { wrapMixedContentStep } from './steps/wrapMixedContentStep';
12
12
  import { wrapTextToCodeblockStep } from './steps/wrapTextToCodeblock';
13
- import { NODE_CATEGORY_BY_TYPE, toNodeTypeValue } from './types';
13
+ import { getNodeName, NODE_CATEGORY_BY_TYPE, toNodeTypeValue } from './types';
14
14
  import { unwrapExpandStep } from './unwrapExpandStep';
15
15
  import { unwrapStep } from './unwrapStep';
16
16
  import { wrapIntoLayoutStep } from './wrapIntoLayoutStep';
@@ -23,25 +23,38 @@ const TRANSFORM_STEPS = {
23
23
  atomic: undefined,
24
24
  container: [wrapStep],
25
25
  list: [wrapIntoListStep],
26
- text: undefined
26
+ text: undefined,
27
+ multi: undefined
27
28
  },
28
29
  container: {
29
30
  atomic: undefined,
30
31
  container: [unwrapStep, wrapStep],
31
32
  list: undefined,
32
- text: [unwrapStep, applyTargetTextTypeStep]
33
+ text: [unwrapStep, applyTargetTextTypeStep],
34
+ multi: undefined
33
35
  },
34
36
  list: {
35
37
  atomic: undefined,
36
38
  container: [wrapStep],
37
39
  list: [listToListStep],
38
- text: [flattenListStep, unwrapListStep, applyTargetTextTypeStep]
40
+ text: [flattenListStep, unwrapListStep, applyTargetTextTypeStep],
41
+ multi: undefined
39
42
  },
40
43
  text: {
41
44
  atomic: undefined,
42
45
  container: [wrapMixedContentStep],
43
46
  list: [wrapIntoListStep],
44
- text: [flattenStep, applyTargetTextTypeStep]
47
+ text: [flattenStep, applyTargetTextTypeStep],
48
+ multi: undefined
49
+ },
50
+ multi: {
51
+ atomic: undefined,
52
+ container: [wrapMixedContentStep],
53
+ // TODO: EDITOR-4137 - Implement multi list transform
54
+ list: undefined,
55
+ // TODO: EDITOR-4140 - Implement multi text transform
56
+ text: undefined,
57
+ multi: undefined
45
58
  }
46
59
  };
47
60
 
@@ -200,6 +213,10 @@ const TRANSFORM_STEPS_OVERRIDE = {
200
213
  bulletList: null,
201
214
  taskList: null,
202
215
  decisionList: null
216
+ },
217
+ multi: {
218
+ // TODO: EDITOR-4138 - Implement multi content to layout transform
219
+ layoutSection: undefined
203
220
  }
204
221
  };
205
222
  const getTransformStepsForNodeTypes = (selectedNodeTypeName, targetNodeTypeName) => {
@@ -213,16 +230,18 @@ const getTransformStepsForNodeTypes = (selectedNodeTypeName, targetNodeTypeName)
213
230
  const steps = overrideSteps !== null && overrideSteps !== void 0 ? overrideSteps : TRANSFORM_STEPS[fromCategory][toCategory];
214
231
  return steps;
215
232
  };
216
- // Note: Currently works only for single node in the selection
217
233
  export const getOutputNodes = ({
218
- sourceNode,
234
+ sourceNodes,
219
235
  targetNodeType,
220
236
  schema,
221
237
  isNested,
222
238
  targetAttrs
223
239
  }) => {
224
- const nodesToReplace = [sourceNode];
225
- const selectedNodeTypeName = toNodeTypeValue(sourceNode.type.name);
240
+ const sourceNode = sourceNodes.at(0);
241
+ if (!sourceNode) {
242
+ return;
243
+ }
244
+ const selectedNodeTypeName = toNodeTypeValue(getNodeName(sourceNodes));
226
245
  const initialTargetNodeTypeName = toNodeTypeValue(targetNodeType.name);
227
246
  const targetNodeTypeName = getTargetNodeTypeNameInContext(initialTargetNodeTypeName, isNested);
228
247
  if (!selectedNodeTypeName || !targetNodeTypeName) {
@@ -231,6 +250,7 @@ export const getOutputNodes = ({
231
250
  }
232
251
  const steps = getTransformStepsForNodeTypes(selectedNodeTypeName, targetNodeTypeName);
233
252
  const context = {
253
+ // sourceNode is incorrect now - what to do here?
234
254
  fromNode: sourceNode,
235
255
  targetNodeTypeName,
236
256
  schema,
@@ -241,7 +261,7 @@ export const getOutputNodes = ({
241
261
  }
242
262
  return steps.reduce((nodes, step) => {
243
263
  return step(nodes, context);
244
- }, nodesToReplace);
264
+ }, sourceNodes);
245
265
  };
246
266
  export const isTransformDisabledBasedOnStepsConfig = (selectedNodeType, targetNodeType) => {
247
267
  const steps = getTransformStepsForNodeTypes(selectedNodeType, targetNodeType);
@@ -19,9 +19,14 @@ export const NODE_CATEGORY_BY_TYPE = {
19
19
  paragraph: 'text',
20
20
  nestedExpand: 'container',
21
21
  taskList: 'list',
22
- table: 'atomic'
22
+ table: 'atomic',
23
+ multi: 'multi'
23
24
  };
24
25
  export const isNodeTypeName = value => value in NODE_CATEGORY_BY_TYPE;
25
26
  export const toNodeTypeValue = value => value && isNodeTypeName(value) ? value : null;
27
+ export const getNodeName = nodes => {
28
+ var _nodes$at;
29
+ return nodes.length > 1 ? 'multi' : (_nodes$at = nodes.at(0)) === null || _nodes$at === void 0 ? void 0 : _nodes$at.type.name;
30
+ };
26
31
 
27
32
  // Note: We are still deciding what should be in the context.
@@ -1,8 +1,7 @@
1
1
  import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
2
- import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
2
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
3
  import { isNestedNode } from '../ui/utils/isNestedNode';
5
- import { getOutputNodes } from './transform-node-utils/transform';
4
+ import { tranformContent } from './transform-node-utils/tranformContent';
6
5
  import { isListNode } from './transforms/utils';
7
6
  export const transformNode = api =>
8
7
  // eslint-disable-next-line no-unused-vars
@@ -26,29 +25,16 @@ export const transformNode = api =>
26
25
  const selectedParent = $from.parent;
27
26
  const isParentLayout = selectedParent.type === nodes.layoutColumn;
28
27
  const isNestedExceptLayout = isNestedNode(preservedSelection, '') && !isParentLayout;
29
- let fragment = Fragment.empty;
30
28
  const isList = isListNode(selectedParent);
31
29
  const slice = tr.doc.slice(isList ? $from.pos - 1 : $from.pos, isList ? $to.pos + 1 : $to.pos);
32
- slice.content.forEach(node => {
33
- const outputNode = getOutputNodes({
34
- sourceNode: node,
35
- targetNodeType: targetType,
36
- schema: tr.doc.type.schema,
37
- isNested: isNestedExceptLayout,
38
- targetAttrs: metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs
39
- });
40
- if (outputNode) {
41
- fragment = fragment.append(Fragment.fromArray(outputNode));
42
- }
43
- });
30
+ const transformedNodes = tranformContent(slice.content, targetType, schema, isNestedExceptLayout, metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs);
44
31
  const nodesToDeleteAndInsert = [nodes.mediaSingle];
45
32
  if (preservedSelection instanceof NodeSelection && nodesToDeleteAndInsert.includes(preservedSelection.node.type)) {
46
33
  // when node is media single, use tr.replaceWith freeze editor, if modify position, tr.replaceWith creates duplicats
47
34
  tr.deleteRange($from.pos, $to.pos);
48
- tr.insert($from.pos, fragment);
35
+ tr.insert($from.pos, transformedNodes);
49
36
  } else {
50
- // TODO: ED-12345 - selection is broken post transaction, to fix.
51
- tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, fragment);
37
+ tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, transformedNodes);
52
38
  }
53
39
  return tr;
54
40
  };
@@ -3,13 +3,19 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
3
  import { isTransformDisabledBasedOnStepsConfig } from '../editor-commands/transform-node-utils/transform';
4
4
  import { toNodeTypeValue } from '../editor-commands/transform-node-utils/types';
5
5
  import { getBlockNodesInRange, getTargetNodeTypeNameInContext } from '../editor-commands/transform-node-utils/utils';
6
- export var canParentContainNodeType = function canParentContainNodeType(schema, parentNode, nodeTypeName, nodeTypeAttrs) {
7
- var adjustedNodeTypeName = getTargetNodeTypeNameInContext(nodeTypeName, true);
6
+ export var canParentContainNodeType = function canParentContainNodeType(schema, selectedNodeTypeName, parentNode, nodeTypeName, nodeTypeAttrs) {
7
+ var adjustedNodeTypeName = parentNode.type.name === 'layoutColumn' || parentNode.type.name === 'bodiedSyncBlock' ? nodeTypeName : getTargetNodeTypeNameInContext(nodeTypeName, true);
8
8
  if (!adjustedNodeTypeName) {
9
9
  return false;
10
10
  }
11
11
  var nodeType = schema.nodes[adjustedNodeTypeName];
12
- return parentNode.type.validContent(Fragment.from(nodeType.createAndFill(nodeTypeAttrs)));
12
+ var content = null;
13
+ var nodesThatCantBeNestedInNestedExpand = ['blockCard', 'embedCard', 'table'];
14
+ if (nodesThatCantBeNestedInNestedExpand.includes(selectedNodeTypeName) && (adjustedNodeTypeName === 'expand' || adjustedNodeTypeName === 'nestedExpand')) {
15
+ var table = schema.nodes[selectedNodeTypeName];
16
+ content = table.createAndFill();
17
+ }
18
+ return parentNode.type.validContent(Fragment.from(nodeType.createAndFill(nodeTypeAttrs, content)));
13
19
  };
14
20
  var isHeadingToHeadingTransformEnabled = function isHeadingToHeadingTransformEnabled(selectedNode, targetNodeTypeAttrs) {
15
21
  var _selectedNode$attrs;
@@ -32,7 +38,7 @@ var isTransformEnabledForNode = function isTransformEnabledForNode(node, targetN
32
38
  if (selectedNodeTypeName === 'heading' && targetNodeTypeName === 'heading') {
33
39
  return isHeadingToHeadingTransformEnabled(node, targetNodeTypeAttrs);
34
40
  }
35
- if (isNested && !canParentContainNodeType(schema, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
41
+ if (isNested && !canParentContainNodeType(schema, selectedNodeTypeName, parent, targetNodeTypeName, targetNodeTypeAttrs)) {
36
42
  return false;
37
43
  }
38
44
  return true;
@@ -0,0 +1,12 @@
1
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
+ import { getOutputNodes } from './transform';
3
+ export var tranformContent = function tranformContent(content, targetNodeType, schema, isNested, targetAttrs) {
4
+ var outputNodes = getOutputNodes({
5
+ sourceNodes: Array.from(content.content),
6
+ targetNodeType: targetNodeType,
7
+ schema: schema,
8
+ isNested: isNested,
9
+ targetAttrs: targetAttrs
10
+ });
11
+ return outputNodes ? Fragment.fromArray(outputNodes) : content;
12
+ };
@@ -10,7 +10,7 @@ import { unwrapListStep } from './steps/unwrapListStep';
10
10
  import { wrapBlockquoteToDecisionListStep } from './steps/wrapBlockquoteToDecisionListStep';
11
11
  import { wrapMixedContentStep } from './steps/wrapMixedContentStep';
12
12
  import { wrapTextToCodeblockStep } from './steps/wrapTextToCodeblock';
13
- import { NODE_CATEGORY_BY_TYPE, toNodeTypeValue } from './types';
13
+ import { getNodeName, NODE_CATEGORY_BY_TYPE, toNodeTypeValue } from './types';
14
14
  import { unwrapExpandStep } from './unwrapExpandStep';
15
15
  import { unwrapStep } from './unwrapStep';
16
16
  import { wrapIntoLayoutStep } from './wrapIntoLayoutStep';
@@ -23,25 +23,38 @@ var TRANSFORM_STEPS = {
23
23
  atomic: undefined,
24
24
  container: [wrapStep],
25
25
  list: [wrapIntoListStep],
26
- text: undefined
26
+ text: undefined,
27
+ multi: undefined
27
28
  },
28
29
  container: {
29
30
  atomic: undefined,
30
31
  container: [unwrapStep, wrapStep],
31
32
  list: undefined,
32
- text: [unwrapStep, applyTargetTextTypeStep]
33
+ text: [unwrapStep, applyTargetTextTypeStep],
34
+ multi: undefined
33
35
  },
34
36
  list: {
35
37
  atomic: undefined,
36
38
  container: [wrapStep],
37
39
  list: [listToListStep],
38
- text: [flattenListStep, unwrapListStep, applyTargetTextTypeStep]
40
+ text: [flattenListStep, unwrapListStep, applyTargetTextTypeStep],
41
+ multi: undefined
39
42
  },
40
43
  text: {
41
44
  atomic: undefined,
42
45
  container: [wrapMixedContentStep],
43
46
  list: [wrapIntoListStep],
44
- text: [flattenStep, applyTargetTextTypeStep]
47
+ text: [flattenStep, applyTargetTextTypeStep],
48
+ multi: undefined
49
+ },
50
+ multi: {
51
+ atomic: undefined,
52
+ container: [wrapMixedContentStep],
53
+ // TODO: EDITOR-4137 - Implement multi list transform
54
+ list: undefined,
55
+ // TODO: EDITOR-4140 - Implement multi text transform
56
+ text: undefined,
57
+ multi: undefined
45
58
  }
46
59
  };
47
60
 
@@ -200,6 +213,10 @@ var TRANSFORM_STEPS_OVERRIDE = {
200
213
  bulletList: null,
201
214
  taskList: null,
202
215
  decisionList: null
216
+ },
217
+ multi: {
218
+ // TODO: EDITOR-4138 - Implement multi content to layout transform
219
+ layoutSection: undefined
203
220
  }
204
221
  };
205
222
  var getTransformStepsForNodeTypes = function getTransformStepsForNodeTypes(selectedNodeTypeName, targetNodeTypeName) {
@@ -213,15 +230,17 @@ var getTransformStepsForNodeTypes = function getTransformStepsForNodeTypes(selec
213
230
  var steps = overrideSteps !== null && overrideSteps !== void 0 ? overrideSteps : TRANSFORM_STEPS[fromCategory][toCategory];
214
231
  return steps;
215
232
  };
216
- // Note: Currently works only for single node in the selection
217
233
  export var getOutputNodes = function getOutputNodes(_ref) {
218
- var sourceNode = _ref.sourceNode,
234
+ var sourceNodes = _ref.sourceNodes,
219
235
  targetNodeType = _ref.targetNodeType,
220
236
  schema = _ref.schema,
221
237
  isNested = _ref.isNested,
222
238
  targetAttrs = _ref.targetAttrs;
223
- var nodesToReplace = [sourceNode];
224
- var selectedNodeTypeName = toNodeTypeValue(sourceNode.type.name);
239
+ var sourceNode = sourceNodes.at(0);
240
+ if (!sourceNode) {
241
+ return;
242
+ }
243
+ var selectedNodeTypeName = toNodeTypeValue(getNodeName(sourceNodes));
225
244
  var initialTargetNodeTypeName = toNodeTypeValue(targetNodeType.name);
226
245
  var targetNodeTypeName = getTargetNodeTypeNameInContext(initialTargetNodeTypeName, isNested);
227
246
  if (!selectedNodeTypeName || !targetNodeTypeName) {
@@ -230,6 +249,7 @@ export var getOutputNodes = function getOutputNodes(_ref) {
230
249
  }
231
250
  var steps = getTransformStepsForNodeTypes(selectedNodeTypeName, targetNodeTypeName);
232
251
  var context = {
252
+ // sourceNode is incorrect now - what to do here?
233
253
  fromNode: sourceNode,
234
254
  targetNodeTypeName: targetNodeTypeName,
235
255
  schema: schema,
@@ -240,7 +260,7 @@ export var getOutputNodes = function getOutputNodes(_ref) {
240
260
  }
241
261
  return steps.reduce(function (nodes, step) {
242
262
  return step(nodes, context);
243
- }, nodesToReplace);
263
+ }, sourceNodes);
244
264
  };
245
265
  export var isTransformDisabledBasedOnStepsConfig = function isTransformDisabledBasedOnStepsConfig(selectedNodeType, targetNodeType) {
246
266
  var steps = getTransformStepsForNodeTypes(selectedNodeType, targetNodeType);
@@ -19,7 +19,8 @@ export var NODE_CATEGORY_BY_TYPE = {
19
19
  paragraph: 'text',
20
20
  nestedExpand: 'container',
21
21
  taskList: 'list',
22
- table: 'atomic'
22
+ table: 'atomic',
23
+ multi: 'multi'
23
24
  };
24
25
  export var isNodeTypeName = function isNodeTypeName(value) {
25
26
  return value in NODE_CATEGORY_BY_TYPE;
@@ -27,5 +28,9 @@ export var isNodeTypeName = function isNodeTypeName(value) {
27
28
  export var toNodeTypeValue = function toNodeTypeValue(value) {
28
29
  return value && isNodeTypeName(value) ? value : null;
29
30
  };
31
+ export var getNodeName = function getNodeName(nodes) {
32
+ var _nodes$at;
33
+ return nodes.length > 1 ? 'multi' : (_nodes$at = nodes.at(0)) === null || _nodes$at === void 0 ? void 0 : _nodes$at.type.name;
34
+ };
30
35
 
31
36
  // Note: We are still deciding what should be in the context.
@@ -1,8 +1,7 @@
1
1
  import { expandSelectionToBlockRange } from '@atlaskit/editor-common/selection';
2
- import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
2
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
3
  import { isNestedNode } from '../ui/utils/isNestedNode';
5
- import { getOutputNodes } from './transform-node-utils/transform';
4
+ import { tranformContent } from './transform-node-utils/tranformContent';
6
5
  import { isListNode } from './transforms/utils';
7
6
  export var transformNode = function transformNode(api) {
8
7
  return (
@@ -23,29 +22,16 @@ export var transformNode = function transformNode(api) {
23
22
  var selectedParent = $from.parent;
24
23
  var isParentLayout = selectedParent.type === nodes.layoutColumn;
25
24
  var isNestedExceptLayout = isNestedNode(preservedSelection, '') && !isParentLayout;
26
- var fragment = Fragment.empty;
27
25
  var isList = isListNode(selectedParent);
28
26
  var slice = tr.doc.slice(isList ? $from.pos - 1 : $from.pos, isList ? $to.pos + 1 : $to.pos);
29
- slice.content.forEach(function (node) {
30
- var outputNode = getOutputNodes({
31
- sourceNode: node,
32
- targetNodeType: targetType,
33
- schema: tr.doc.type.schema,
34
- isNested: isNestedExceptLayout,
35
- targetAttrs: metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs
36
- });
37
- if (outputNode) {
38
- fragment = fragment.append(Fragment.fromArray(outputNode));
39
- }
40
- });
27
+ var transformedNodes = tranformContent(slice.content, targetType, schema, isNestedExceptLayout, metadata === null || metadata === void 0 ? void 0 : metadata.targetAttrs);
41
28
  var nodesToDeleteAndInsert = [nodes.mediaSingle];
42
29
  if (preservedSelection instanceof NodeSelection && nodesToDeleteAndInsert.includes(preservedSelection.node.type)) {
43
30
  // when node is media single, use tr.replaceWith freeze editor, if modify position, tr.replaceWith creates duplicats
44
31
  tr.deleteRange($from.pos, $to.pos);
45
- tr.insert($from.pos, fragment);
32
+ tr.insert($from.pos, transformedNodes);
46
33
  } else {
47
- // TODO: ED-12345 - selection is broken post transaction, to fix.
48
- tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, fragment);
34
+ tr.replaceWith(isList ? $from.pos - 1 : $from.pos, $to.pos, transformedNodes);
49
35
  }
50
36
  return tr;
51
37
  };
@@ -6,6 +6,6 @@ type TransformDisabledArgs = {
6
6
  targetNodeTypeAttrs?: Record<string, unknown>;
7
7
  targetNodeTypeName: string;
8
8
  };
9
- export declare const canParentContainNodeType: (schema: Schema, parentNode: PMNode, nodeTypeName: NodeTypeName, nodeTypeAttrs?: Record<string, unknown>) => boolean;
9
+ export declare const canParentContainNodeType: (schema: Schema, selectedNodeTypeName: NodeTypeName, parentNode: PMNode, nodeTypeName: NodeTypeName, nodeTypeAttrs?: Record<string, unknown>) => boolean;
10
10
  export declare const isTransformToTargetDisabled: ({ selection, targetNodeTypeName, targetNodeTypeAttrs, }: TransformDisabledArgs) => boolean;
11
11
  export {};
@@ -0,0 +1,3 @@
1
+ import type { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
+ export declare const tranformContent: (content: Fragment, targetNodeType: NodeType, schema: Schema, isNested: boolean, targetAttrs?: Record<string, unknown>) => Fragment;
@@ -3,10 +3,10 @@ import type { NodeTypeName } from './types';
3
3
  interface GetOutputNodesArgs {
4
4
  isNested: boolean;
5
5
  schema: Schema;
6
- sourceNode: PMNode;
6
+ sourceNodes: PMNode[];
7
7
  targetAttrs?: Record<string, unknown>;
8
8
  targetNodeType: NodeType;
9
9
  }
10
- export declare const getOutputNodes: ({ sourceNode, targetNodeType, schema, isNested, targetAttrs, }: GetOutputNodesArgs) => PMNode[] | undefined;
10
+ export declare const getOutputNodes: ({ sourceNodes, targetNodeType, schema, isNested, targetAttrs, }: GetOutputNodesArgs) => PMNode[] | undefined;
11
11
  export declare const isTransformDisabledBasedOnStepsConfig: (selectedNodeType: NodeTypeName, targetNodeType: NodeTypeName) => boolean;
12
12
  export {};
@@ -1,9 +1,10 @@
1
1
  import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- export type NodeTypeName = 'blockquote' | 'blockCard' | 'bodiedExtension' | 'bulletList' | 'codeBlock' | 'decisionList' | 'embedCard' | 'expand' | 'extension' | 'heading' | 'layoutSection' | 'media' | 'mediaGroup' | 'mediaSingle' | 'multiBodiedExtension' | 'orderedList' | 'panel' | 'paragraph' | 'nestedExpand' | 'taskList' | 'table';
3
- export type NodeCategory = 'atomic' | 'container' | 'list' | 'text';
2
+ export type NodeTypeName = 'blockquote' | 'blockCard' | 'bodiedExtension' | 'bulletList' | 'codeBlock' | 'decisionList' | 'embedCard' | 'expand' | 'extension' | 'heading' | 'layoutSection' | 'media' | 'mediaGroup' | 'mediaSingle' | 'multiBodiedExtension' | 'orderedList' | 'panel' | 'paragraph' | 'nestedExpand' | 'taskList' | 'table' | 'multi';
3
+ export type NodeCategory = 'atomic' | 'container' | 'list' | 'text' | 'multi';
4
4
  export declare const NODE_CATEGORY_BY_TYPE: Record<NodeTypeName, NodeCategory>;
5
5
  export declare const isNodeTypeName: (value: string) => value is NodeTypeName;
6
6
  export declare const toNodeTypeValue: (value?: string | null) => NodeTypeName | null;
7
+ export declare const getNodeName: (nodes: PMNode[]) => string | undefined;
7
8
  export type TransformStep = (nodes: PMNode[], context: TransformStepContext) => PMNode[];
8
9
  export interface TransformStepContext {
9
10
  fromNode: PMNode;
@@ -6,6 +6,6 @@ type TransformDisabledArgs = {
6
6
  targetNodeTypeAttrs?: Record<string, unknown>;
7
7
  targetNodeTypeName: string;
8
8
  };
9
- export declare const canParentContainNodeType: (schema: Schema, parentNode: PMNode, nodeTypeName: NodeTypeName, nodeTypeAttrs?: Record<string, unknown>) => boolean;
9
+ export declare const canParentContainNodeType: (schema: Schema, selectedNodeTypeName: NodeTypeName, parentNode: PMNode, nodeTypeName: NodeTypeName, nodeTypeAttrs?: Record<string, unknown>) => boolean;
10
10
  export declare const isTransformToTargetDisabled: ({ selection, targetNodeTypeName, targetNodeTypeAttrs, }: TransformDisabledArgs) => boolean;
11
11
  export {};
@@ -0,0 +1,3 @@
1
+ import type { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
+ export declare const tranformContent: (content: Fragment, targetNodeType: NodeType, schema: Schema, isNested: boolean, targetAttrs?: Record<string, unknown>) => Fragment;
@@ -3,10 +3,10 @@ import type { NodeTypeName } from './types';
3
3
  interface GetOutputNodesArgs {
4
4
  isNested: boolean;
5
5
  schema: Schema;
6
- sourceNode: PMNode;
6
+ sourceNodes: PMNode[];
7
7
  targetAttrs?: Record<string, unknown>;
8
8
  targetNodeType: NodeType;
9
9
  }
10
- export declare const getOutputNodes: ({ sourceNode, targetNodeType, schema, isNested, targetAttrs, }: GetOutputNodesArgs) => PMNode[] | undefined;
10
+ export declare const getOutputNodes: ({ sourceNodes, targetNodeType, schema, isNested, targetAttrs, }: GetOutputNodesArgs) => PMNode[] | undefined;
11
11
  export declare const isTransformDisabledBasedOnStepsConfig: (selectedNodeType: NodeTypeName, targetNodeType: NodeTypeName) => boolean;
12
12
  export {};
@@ -1,9 +1,10 @@
1
1
  import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- export type NodeTypeName = 'blockquote' | 'blockCard' | 'bodiedExtension' | 'bulletList' | 'codeBlock' | 'decisionList' | 'embedCard' | 'expand' | 'extension' | 'heading' | 'layoutSection' | 'media' | 'mediaGroup' | 'mediaSingle' | 'multiBodiedExtension' | 'orderedList' | 'panel' | 'paragraph' | 'nestedExpand' | 'taskList' | 'table';
3
- export type NodeCategory = 'atomic' | 'container' | 'list' | 'text';
2
+ export type NodeTypeName = 'blockquote' | 'blockCard' | 'bodiedExtension' | 'bulletList' | 'codeBlock' | 'decisionList' | 'embedCard' | 'expand' | 'extension' | 'heading' | 'layoutSection' | 'media' | 'mediaGroup' | 'mediaSingle' | 'multiBodiedExtension' | 'orderedList' | 'panel' | 'paragraph' | 'nestedExpand' | 'taskList' | 'table' | 'multi';
3
+ export type NodeCategory = 'atomic' | 'container' | 'list' | 'text' | 'multi';
4
4
  export declare const NODE_CATEGORY_BY_TYPE: Record<NodeTypeName, NodeCategory>;
5
5
  export declare const isNodeTypeName: (value: string) => value is NodeTypeName;
6
6
  export declare const toNodeTypeValue: (value?: string | null) => NodeTypeName | null;
7
+ export declare const getNodeName: (nodes: PMNode[]) => string | undefined;
7
8
  export type TransformStep = (nodes: PMNode[], context: TransformStepContext) => PMNode[];
8
9
  export interface TransformStepContext {
9
10
  fromNode: PMNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "5.2.26",
3
+ "version": "5.2.28",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/css": "^0.19.0",
32
32
  "@atlaskit/dropdown-menu": "^16.3.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
- "@atlaskit/editor-plugin-block-controls": "^7.18.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^7.19.0",
35
35
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
36
36
  "@atlaskit/editor-plugin-selection": "^6.1.0",
37
37
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
@@ -44,12 +44,12 @@
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
46
46
  "@atlaskit/primitives": "^17.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^16.2.0",
47
+ "@atlaskit/tmp-editor-statsig": "^16.3.0",
48
48
  "@atlaskit/tokens": "^9.0.0",
49
49
  "@babel/runtime": "^7.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^110.49.0",
52
+ "@atlaskit/editor-common": "^110.50.0",
53
53
  "react": "^18.2.0",
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"
55
55
  },