@atlaskit/editor-plugin-block-menu 5.2.25 → 5.2.27
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 +16 -0
- package/dist/cjs/editor-commands/transform-node-utils/tranformContent.js +18 -0
- package/dist/cjs/editor-commands/transform-node-utils/transform.js +29 -9
- package/dist/cjs/editor-commands/transform-node-utils/types.js +7 -2
- package/dist/cjs/editor-commands/transformNode.js +4 -18
- package/dist/cjs/ui/block-menu.js +4 -1
- package/dist/es2019/editor-commands/transform-node-utils/tranformContent.js +12 -0
- package/dist/es2019/editor-commands/transform-node-utils/transform.js +30 -10
- package/dist/es2019/editor-commands/transform-node-utils/types.js +6 -1
- package/dist/es2019/editor-commands/transformNode.js +4 -18
- package/dist/es2019/ui/block-menu.js +2 -1
- package/dist/esm/editor-commands/transform-node-utils/tranformContent.js +12 -0
- package/dist/esm/editor-commands/transform-node-utils/transform.js +30 -10
- package/dist/esm/editor-commands/transform-node-utils/types.js +6 -1
- package/dist/esm/editor-commands/transformNode.js +4 -18
- package/dist/esm/ui/block-menu.js +4 -1
- package/dist/types/editor-commands/transform-node-utils/tranformContent.d.ts +3 -0
- package/dist/types/editor-commands/transform-node-utils/transform.d.ts +2 -2
- package/dist/types/editor-commands/transform-node-utils/types.d.ts +3 -2
- package/dist/types-ts4.5/editor-commands/transform-node-utils/tranformContent.d.ts +3 -0
- package/dist/types-ts4.5/editor-commands/transform-node-utils/transform.d.ts +2 -2
- package/dist/types-ts4.5/editor-commands/transform-node-utils/types.d.ts +3 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 5.2.27
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6eba84d34e1a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6eba84d34e1a5) -
|
|
8
|
+
Add a new multi node type which supports multi-selected content
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 5.2.26
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`7b47062997f9b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b47062997f9b) -
|
|
16
|
+
EDITOR-3793 Stop preserving selection on click into editor
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 5.2.25
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -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
|
|
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
|
|
229
|
-
|
|
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
|
-
},
|
|
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
|
|
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.
|
|
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,
|
|
38
|
+
tr.insert($from.pos, transformedNodes);
|
|
52
39
|
} else {
|
|
53
|
-
|
|
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
|
};
|
|
@@ -121,7 +121,10 @@ var BlockMenuContent = function BlockMenuContent(_ref3) {
|
|
|
121
121
|
ref: ref,
|
|
122
122
|
xcss: (0, _css.cx)(styles.base, (0, _experiments.editorExperiment)('platform_synced_block', true) && styles.emptyMenuSectionStyles)
|
|
123
123
|
}, /*#__PURE__*/_react.default.createElement(_uiMenu.ArrowKeyNavigationProvider, {
|
|
124
|
-
type: _uiMenu.ArrowKeyNavigationType.MENU
|
|
124
|
+
type: _uiMenu.ArrowKeyNavigationType.MENU,
|
|
125
|
+
handleClose: function handleClose(e) {
|
|
126
|
+
return e.preventDefault();
|
|
127
|
+
}
|
|
125
128
|
}, /*#__PURE__*/_react.default.createElement(_BlockMenuRenderer.BlockMenuRenderer, {
|
|
126
129
|
allRegisteredComponents: blockMenuComponents || []
|
|
127
130
|
})));
|
|
@@ -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
|
-
|
|
234
|
+
sourceNodes,
|
|
219
235
|
targetNodeType,
|
|
220
236
|
schema,
|
|
221
237
|
isNested,
|
|
222
238
|
targetAttrs
|
|
223
239
|
}) => {
|
|
224
|
-
const
|
|
225
|
-
|
|
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
|
-
},
|
|
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 {
|
|
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
|
|
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,
|
|
35
|
+
tr.insert($from.pos, transformedNodes);
|
|
49
36
|
} else {
|
|
50
|
-
|
|
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
|
};
|
|
@@ -112,7 +112,8 @@ const BlockMenuContent = ({
|
|
|
112
112
|
ref: ref,
|
|
113
113
|
xcss: cx(styles.base, editorExperiment('platform_synced_block', true) && styles.emptyMenuSectionStyles)
|
|
114
114
|
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, {
|
|
115
|
-
type: ArrowKeyNavigationType.MENU
|
|
115
|
+
type: ArrowKeyNavigationType.MENU,
|
|
116
|
+
handleClose: e => e.preventDefault()
|
|
116
117
|
}, /*#__PURE__*/React.createElement(BlockMenuRenderer, {
|
|
117
118
|
allRegisteredComponents: blockMenuComponents || []
|
|
118
119
|
})));
|
|
@@ -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
|
|
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
|
|
224
|
-
|
|
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
|
-
},
|
|
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 {
|
|
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.
|
|
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,
|
|
32
|
+
tr.insert($from.pos, transformedNodes);
|
|
46
33
|
} else {
|
|
47
|
-
|
|
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
|
};
|
|
@@ -112,7 +112,10 @@ var BlockMenuContent = function BlockMenuContent(_ref3) {
|
|
|
112
112
|
ref: ref,
|
|
113
113
|
xcss: cx(styles.base, editorExperiment('platform_synced_block', true) && styles.emptyMenuSectionStyles)
|
|
114
114
|
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, {
|
|
115
|
-
type: ArrowKeyNavigationType.MENU
|
|
115
|
+
type: ArrowKeyNavigationType.MENU,
|
|
116
|
+
handleClose: function handleClose(e) {
|
|
117
|
+
return e.preventDefault();
|
|
118
|
+
}
|
|
116
119
|
}, /*#__PURE__*/React.createElement(BlockMenuRenderer, {
|
|
117
120
|
allRegisteredComponents: blockMenuComponents || []
|
|
118
121
|
})));
|
|
@@ -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
|
-
|
|
6
|
+
sourceNodes: PMNode[];
|
|
7
7
|
targetAttrs?: Record<string, unknown>;
|
|
8
8
|
targetNodeType: NodeType;
|
|
9
9
|
}
|
|
10
|
-
export declare const getOutputNodes: ({
|
|
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;
|
|
@@ -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
|
-
|
|
6
|
+
sourceNodes: PMNode[];
|
|
7
7
|
targetAttrs?: Record<string, unknown>;
|
|
8
8
|
targetNodeType: NodeType;
|
|
9
9
|
}
|
|
10
|
-
export declare const getOutputNodes: ({
|
|
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.
|
|
3
|
+
"version": "5.2.27",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.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.
|
|
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.
|
|
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
|
},
|