UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

32 lines (30 loc) 2.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tableHeaderContentPseudoGroup = exports.tableCellContentPseudoGroup = exports.tableCellContentNodes = void 0; var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator"); var _blockCard = require("../nodes/blockCard"); var _blockquote = require("../nodes/blockquote"); var _codeBlock = require("../nodes/codeBlock"); var _decisionList = require("../nodes/decisionList"); var _embedCard = require("../nodes/embedCard"); var _extension = require("../nodes/extension"); var _heading = require("../nodes/heading"); var _list = require("../nodes/list"); var _mediaGroup = require("../nodes/mediaGroup"); var _mediaSingle = require("../nodes/mediaSingle"); var _nestedExpand = require("../nodes/nestedExpand"); var _panel = require("../nodes/panel"); var _paragraph = require("../nodes/paragraph"); var _rule = require("../nodes/rule"); var _task = require("../nodes/task"); var _unsupportedBlock = require("../nodes/unsupportedBlock"); var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _decisionList.decisionList, _task.taskList, _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _nestedExpand.nestedExpand.use('content'), _nestedExpand.nestedExpand.use('with_no_marks')]; // This is not an actual group, but a collection of nodes // @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it // In PM Spec, they contain different items. (tableHeader using tableHeaderContentPseudoGroup, tableCell using tableCellContentPseudoGroup) // In JSON Schema, both tableHeader and tableCell points to tableCellContentPseudoGroup // The differences are highlighted below. var tableCellContentPseudoGroup = exports.tableCellContentPseudoGroup = (0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, tableCellContentNodes.concat([_unsupportedBlock.unsupportedBlock]))); var tableHeaderContentPseudoGroup = exports.tableHeaderContentPseudoGroup = (0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, tableCellContentNodes.concat([_nestedExpand.nestedExpand])));