@atlaskit/editor-plugin-block-menu
Version:
BlockMenu plugin for @atlaskit/editor-core
222 lines (221 loc) • 10.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TRANSFORMATION_MATRIX = void 0;
var _applyTargetTextTypeStep = require("./steps/applyTargetTextTypeStep");
var _convertEachNodeStep = require("./steps/convertEachNodeStep");
var _decisionListToListStep = require("./steps/decisionListToListStep");
var _flattenListStep = require("./steps/flattenListStep");
var _flattenStep = require("./steps/flattenStep");
var _listToDecisionListStep = require("./steps/listToDecisionListStep");
var _listToListStep = require("./steps/listToListStep");
var _mergeNeighbourListsStep = require("./steps/mergeNeighbourListsStep");
var _unwrapExpandStep = require("./steps/unwrapExpandStep");
var _unwrapLayoutStep = require("./steps/unwrapLayoutStep");
var _unwrapListStep = require("./steps/unwrapListStep");
var _unwrapStep = require("./steps/unwrapStep");
var _wrapBlockquoteToDecisionListStep = require("./steps/wrapBlockquoteToDecisionListStep");
var _wrapIntoListStep = require("./steps/wrapIntoListStep");
var _wrapMixedContentStep = require("./steps/wrapMixedContentStep");
var _wrapStep = require("./steps/wrapStep");
// Transform steps for all node type pairs.
// If a transformation is not defined (undefined), it is not available.
var TRANSFORMATION_MATRIX = exports.TRANSFORMATION_MATRIX = {
paragraph: {
heading: [_flattenStep.flattenStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
blockquote: [_wrapMixedContentStep.wrapMixedContentStep],
codeBlock: [_wrapMixedContentStep.wrapMixedContentStep],
expand: [_wrapMixedContentStep.wrapMixedContentStep],
nestedExpand: [_wrapMixedContentStep.wrapMixedContentStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapMixedContentStep.wrapMixedContentStep],
bulletList: [_wrapIntoListStep.wrapIntoListStep],
orderedList: [_wrapIntoListStep.wrapIntoListStep],
taskList: [_wrapIntoListStep.wrapIntoListStep],
decisionList: [_wrapIntoListStep.wrapIntoListStep]
},
heading: {
heading: [_flattenStep.flattenStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
paragraph: [_flattenStep.flattenStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
blockquote: [_wrapMixedContentStep.wrapMixedContentStep],
codeBlock: [_wrapMixedContentStep.wrapMixedContentStep],
expand: [_wrapMixedContentStep.wrapMixedContentStep],
nestedExpand: [_wrapMixedContentStep.wrapMixedContentStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapMixedContentStep.wrapMixedContentStep],
bulletList: [_wrapIntoListStep.wrapIntoListStep],
orderedList: [_wrapIntoListStep.wrapIntoListStep],
taskList: [_wrapIntoListStep.wrapIntoListStep],
decisionList: [_wrapIntoListStep.wrapIntoListStep]
},
panel: {
blockquote: [_unwrapStep.unwrapStep, _wrapMixedContentStep.wrapMixedContentStep],
codeBlock: [_unwrapStep.unwrapStep, _wrapMixedContentStep.wrapMixedContentStep],
expand: [_unwrapStep.unwrapStep, _wrapStep.wrapStep],
nestedExpand: [_unwrapStep.unwrapStep, _wrapStep.wrapStep],
layoutSection: [_unwrapStep.unwrapStep, _wrapMixedContentStep.wrapMixedContentStep],
paragraph: [_unwrapStep.unwrapStep]
},
expand: {
panel: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
blockquote: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
layoutSection: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
nestedExpand: [_unwrapExpandStep.unwrapExpandStep, _wrapStep.wrapStep],
paragraph: [_unwrapExpandStep.unwrapExpandStep]
},
nestedExpand: {
panel: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
blockquote: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
layoutSection: [_unwrapExpandStep.unwrapExpandStep, _wrapMixedContentStep.wrapMixedContentStep],
paragraph: [_unwrapExpandStep.unwrapExpandStep]
},
blockquote: {
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_unwrapStep.unwrapStep, _wrapStep.wrapStep],
paragraph: [_unwrapStep.unwrapStep],
decisionList: [_unwrapStep.unwrapStep, _wrapBlockquoteToDecisionListStep.wrapBlockquoteToDecisionListStep]
},
layoutSection: {
blockquote: [_unwrapLayoutStep.unwrapLayoutStep, _wrapMixedContentStep.wrapMixedContentStep],
expand: [_unwrapLayoutStep.unwrapLayoutStep, _wrapStep.wrapStep],
nestedExpand: [_unwrapLayoutStep.unwrapLayoutStep, _wrapStep.wrapStep],
panel: [_unwrapLayoutStep.unwrapLayoutStep, _wrapMixedContentStep.wrapMixedContentStep],
paragraph: [_unwrapLayoutStep.unwrapLayoutStep]
},
codeBlock: {
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
paragraph: [_applyTargetTextTypeStep.applyTargetTextTypeStep]
},
bulletList: {
orderedList: [_listToListStep.listToListStep],
taskList: [_listToListStep.listToListStep],
decisionList: [_flattenListStep.flattenListStep, _listToDecisionListStep.listToDecisionListStep],
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
paragraph: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
},
orderedList: {
bulletList: [_listToListStep.listToListStep],
taskList: [_listToListStep.listToListStep],
decisionList: [_flattenListStep.flattenListStep, _listToDecisionListStep.listToDecisionListStep],
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
paragraph: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
},
taskList: {
bulletList: [_listToListStep.listToListStep],
orderedList: [_listToListStep.listToListStep],
decisionList: [_flattenListStep.flattenListStep, _listToDecisionListStep.listToDecisionListStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
paragraph: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
},
table: {
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep]
},
mediaSingle: {
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
bulletList: [_wrapIntoListStep.wrapIntoListStep],
orderedList: [_wrapIntoListStep.wrapIntoListStep]
},
mediaGroup: {
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep]
},
media: {
blockquote: [_wrapStep.wrapStep],
codeBlock: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapStep.wrapStep],
panel: [_wrapStep.wrapStep],
bulletList: [_wrapIntoListStep.wrapIntoListStep],
orderedList: [_wrapIntoListStep.wrapIntoListStep],
taskList: [_wrapIntoListStep.wrapIntoListStep],
decisionList: [_wrapIntoListStep.wrapIntoListStep]
},
decisionList: {
bulletList: [_decisionListToListStep.decisionListToListStep],
orderedList: [_decisionListToListStep.decisionListToListStep],
taskList: [_decisionListToListStep.decisionListToListStep],
blockquote: [_unwrapListStep.unwrapListStep, _wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep],
paragraph: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep],
heading: [_flattenListStep.flattenListStep, _unwrapListStep.unwrapListStep, _applyTargetTextTypeStep.applyTargetTextTypeStep]
},
blockCard: {
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep]
},
embedCard: {
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep]
},
extension: {
blockquote: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapStep.wrapStep]
},
bodiedExtension: {
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep]
},
multiBodiedExtension: {
blockquote: [_wrapStep.wrapStep],
codeBlock: [_wrapStep.wrapStep],
expand: [_wrapStep.wrapStep],
nestedExpand: [_wrapStep.wrapStep],
layoutSection: [_wrapStep.wrapStep],
panel: [_wrapStep.wrapStep],
bulletList: [_wrapIntoListStep.wrapIntoListStep],
orderedList: [_wrapIntoListStep.wrapIntoListStep],
taskList: [_wrapIntoListStep.wrapIntoListStep],
decisionList: [_wrapIntoListStep.wrapIntoListStep]
},
multi: {
blockquote: [_wrapMixedContentStep.wrapMixedContentStep],
codeBlock: [_wrapMixedContentStep.wrapMixedContentStep],
expand: [_wrapMixedContentStep.wrapMixedContentStep],
nestedExpand: [_wrapMixedContentStep.wrapMixedContentStep],
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
panel: [_wrapMixedContentStep.wrapMixedContentStep],
bulletList: [_convertEachNodeStep.convertEachNodeStep, _mergeNeighbourListsStep.mergeNeighbourListsStep],
orderedList: [_convertEachNodeStep.convertEachNodeStep, _mergeNeighbourListsStep.mergeNeighbourListsStep],
taskList: [_convertEachNodeStep.convertEachNodeStep, _mergeNeighbourListsStep.mergeNeighbourListsStep],
decisionList: [_convertEachNodeStep.convertEachNodeStep, _mergeNeighbourListsStep.mergeNeighbourListsStep],
paragraph: [_convertEachNodeStep.convertEachNodeStep],
heading: [_applyTargetTextTypeStep.applyTargetTextTypeStep]
}
};