UNPKG

@atlaskit/adf-schema

Version:

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

21 lines 955 B
import { $or, $onePlus, adfNode } from '@atlaskit/adf-schema-generator'; import { blockGroup } from './groups/blockGroup'; import { layoutSection } from './nodes/layoutSection'; import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup'; import { blockContentGroup } from './groups/blockContentGroup'; import { expand } from './nodes/expand'; import { codeBlock } from './nodes/codeBlock'; const doc = adfNode('doc').define({ root: true, version: 1, content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only')))], DANGEROUS_MANUAL_OVERRIDE: { 'validator-spec': { 'props.content.minItems': { remove: true, reason: "@DSLCompatibilityException - The content expression and minItems don't match in the current validator schema." } } } }); export default doc;