@atlaskit/adf-schema
Version:
Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs
1,726 lines • 34.4 kB
JavaScript
export var alignment = {
props: {
type: {
type: 'enum',
values: ['alignment']
},
attrs: {
props: {
align: {
type: 'enum',
values: ['center', 'end']
}
}
}
}
};
export var annotation = {
props: {
type: {
type: 'enum',
values: ['annotation']
},
attrs: {
props: {
id: {
type: 'string'
},
annotationType: {
type: 'enum',
values: ['inlineComment']
}
}
}
}
};
export var backgroundColor = {
props: {
type: {
type: 'enum',
values: ['backgroundColor']
},
attrs: {
props: {
color: {
pattern: '^#[0-9a-fA-F]{6}$',
type: 'string'
}
}
}
}
};
export var block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
export var blockCard = {
props: {
type: {
type: 'enum',
values: ['blockCard']
},
attrs: [{
props: {
url: {
type: 'string',
optional: true,
validatorFn: 'safeUrl'
},
datasource: {
props: {
id: {
type: 'string'
},
parameters: {
type: 'object'
},
views: {
items: [{
props: {
properties: {
optional: true,
type: 'object'
},
type: {
type: 'string'
}
}
}],
minItems: 1,
type: 'array'
}
}
},
width: {
type: 'number',
optional: true
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
optional: true
}
}
}, {
props: {
url: {
type: 'string',
validatorFn: 'safeUrl'
}
}
}, {
props: {
data: {
type: 'object'
}
}
}]
},
required: ['attrs']
};
export var blockquote = {
props: {
type: {
type: 'enum',
values: ['blockquote']
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var blockRootOnly = ['multiBodiedExtension'];
export var bodiedExtension = {
props: {
type: {
type: 'enum',
values: ['bodiedExtension']
},
attrs: {
props: {
extensionKey: {
minLength: 1,
type: 'string'
},
extensionType: {
minLength: 1,
type: 'string'
},
parameters: {
type: 'object',
optional: true
},
text: {
type: 'string',
optional: true
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'default'],
optional: true
},
localId: {
minLength: 1,
type: 'string',
optional: true
}
}
},
content: {
type: 'array',
items: ['non_nestable_block_content'],
minItems: 1,
allowUnsupportedBlock: true
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var bodiedExtension_with_marks = ['bodiedExtension', {
props: {
marks: {
type: 'array',
optional: true,
items: [['dataConsumer', 'fragment']]
}
}
}];
export var border = {
props: {
type: {
type: 'enum',
values: ['border']
},
attrs: {
props: {
size: {
type: 'number',
minimum: 1,
maximum: 3
},
color: {
pattern: '^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$',
type: 'string'
}
}
}
}
};
export var breakout = {
props: {
type: {
type: 'enum',
values: ['breakout']
},
attrs: {
props: {
mode: {
type: 'enum',
values: ['wide', 'full-width']
},
width: {
type: 'number',
optional: true
}
}
}
}
};
export var bulletList = {
props: {
type: {
type: 'enum',
values: ['bulletList']
},
content: {
type: 'array',
items: [['listItem', 'listItem_with_nested_decision']],
minItems: 1
}
}
};
export var caption = {
props: {
type: {
type: 'enum',
values: ['caption']
},
content: {
type: 'array',
items: [['hardBreak', 'mention', 'emoji', 'date', 'placeholder', 'inlineCard', 'status', 'text_formatted', 'text_code_inline']],
optional: true,
allowUnsupportedInline: true
}
}
};
export var code = {
props: {
type: {
type: 'enum',
values: ['code']
}
}
};
export var codeBlock = {
props: {
type: {
type: 'enum',
values: ['codeBlock']
},
attrs: {
props: {
language: {
type: 'string',
optional: true
},
uniqueId: {
type: 'string',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: ['text_with_no_marks'],
optional: true,
allowUnsupportedInline: true
}
}
};
export var codeBlock_root_only = ['codeBlock', {
props: {
marks: {
type: 'array',
optional: true,
items: ['breakout']
}
}
}];
export var confluenceInlineComment = {
props: {
type: {
type: 'enum',
values: ['confluenceInlineComment']
},
attrs: {
props: {
reference: {
type: 'string'
}
}
}
}
};
export var dataConsumer = {
props: {
type: {
type: 'enum',
values: ['dataConsumer']
},
attrs: {
props: {
sources: {
type: 'array',
items: [{
type: 'string'
}],
minItems: 1
}
}
}
}
};
export var date = {
props: {
type: {
type: 'enum',
values: ['date']
},
attrs: {
props: {
timestamp: {
minLength: 1,
type: 'string'
}
}
},
marks: {
type: 'array',
optional: true,
items: ['annotation']
}
}
};
export var decisionItem = {
props: {
type: {
type: 'enum',
values: ['decisionItem']
},
attrs: {
props: {
localId: {
type: 'string'
},
state: {
type: 'string'
}
}
},
content: {
type: 'array',
items: ['inline_content'],
optional: true,
allowUnsupportedInline: true
}
}
};
export var decisionList = {
props: {
type: {
type: 'enum',
values: ['decisionList']
},
attrs: {
props: {
localId: {
type: 'string'
}
}
},
content: {
type: 'array',
items: ['decisionItem'],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var doc = {
props: {
type: {
type: 'enum',
values: ['doc']
},
version: {
type: 'enum',
values: [1]
},
content: {
type: 'array',
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only']],
allowUnsupportedBlock: true
}
}
};
export var em = {
props: {
type: {
type: 'enum',
values: ['em']
}
}
};
export var embedCard = {
props: {
type: {
type: 'enum',
values: ['embedCard']
},
attrs: {
props: {
url: {
type: 'string',
validatorFn: 'safeUrl'
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
},
width: {
type: 'number',
maximum: 100,
minimum: 0,
optional: true
},
originalHeight: {
type: 'number',
optional: true
},
originalWidth: {
type: 'number',
optional: true
}
}
}
}
};
export var emoji = {
props: {
type: {
type: 'enum',
values: ['emoji']
},
attrs: {
props: {
shortName: {
type: 'string'
},
id: {
type: 'string',
optional: true
},
text: {
type: 'string',
optional: true
}
}
},
marks: {
type: 'array',
optional: true,
items: ['annotation']
}
}
};
export var expand = {
props: {
type: {
type: 'enum',
values: ['expand']
},
attrs: {
props: {
title: {
type: 'string',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var expand_root_only = ['expand', {
props: {
marks: {
type: 'array',
optional: true,
items: ['breakout']
}
}
}];
export var extension = {
props: {
type: {
type: 'enum',
values: ['extension']
},
attrs: {
props: {
extensionKey: {
minLength: 1,
type: 'string'
},
extensionType: {
minLength: 1,
type: 'string'
},
parameters: {
type: 'object',
optional: true
},
text: {
type: 'string',
optional: true
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'default'],
optional: true
},
localId: {
minLength: 1,
type: 'string',
optional: true
}
}
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var extension_with_marks = ['extension', {
props: {
marks: {
type: 'array',
optional: true,
items: [['dataConsumer', 'fragment']]
}
}
}];
export var extensionFrame = {
props: {
type: {
type: 'enum',
values: ['extensionFrame']
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_full', 'mediaSingle_caption', 'decisionList', 'taskList', 'table', 'extension_with_marks', 'bodiedExtension_with_marks', 'blockCard', 'embedCard']],
minItems: 1
},
marks: {
type: 'array',
optional: true,
items: [['dataConsumer', 'fragment']]
}
}
};
export var fragment = {
props: {
type: {
type: 'enum',
values: ['fragment']
},
attrs: {
props: {
localId: {
minLength: 1,
type: 'string'
},
name: {
type: 'string',
optional: true
}
}
}
}
};
export var hardBreak = {
props: {
type: {
type: 'enum',
values: ['hardBreak']
},
attrs: {
props: {
text: {
type: 'enum',
values: ['\n'],
optional: true
}
},
optional: true
}
}
};
export var heading = {
props: {
type: {
type: 'enum',
values: ['heading']
},
attrs: {
props: {
level: {
type: 'number',
minimum: 1,
maximum: 6
},
localId: {
type: 'string',
optional: true
}
}
},
content: {
type: 'array',
items: ['inline_content'],
optional: true,
allowUnsupportedInline: true
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var heading_with_alignment = ['heading', {
props: {
marks: {
type: 'array',
optional: true,
items: ['alignment']
}
}
}];
export var heading_with_indentation = ['heading', {
props: {
marks: {
type: 'array',
optional: true,
items: ['indentation']
}
}
}];
export var heading_with_no_marks = ['heading', {
props: {
marks: {
type: 'array',
maxItems: 0,
items: [],
optional: true
}
}
}];
export var indentation = {
props: {
type: {
type: 'enum',
values: ['indentation']
},
attrs: {
props: {
level: {
type: 'number',
minimum: 1,
maximum: 6
}
}
}
}
};
export var inline_content = ['text_formatted', 'text_code_inline', 'date', 'emoji', 'hardBreak', 'inlineCard', 'mention', 'placeholder', 'status', 'inlineExtension_with_marks', 'mediaInline'];
export var inlineCard = {
props: {
type: {
type: 'enum',
values: ['inlineCard']
},
attrs: [{
props: {
url: {
type: 'string',
validatorFn: 'safeUrl'
}
}
}, {
props: {
data: {
type: 'object'
}
}
}],
marks: {
type: 'array',
optional: true,
items: ['annotation']
}
},
required: ['attrs']
};
export var inlineExtension = {
props: {
type: {
type: 'enum',
values: ['inlineExtension']
},
attrs: {
props: {
extensionKey: {
minLength: 1,
type: 'string'
},
extensionType: {
minLength: 1,
type: 'string'
},
parameters: {
type: 'object',
optional: true
},
text: {
type: 'string',
optional: true
},
localId: {
minLength: 1,
type: 'string',
optional: true
}
}
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var inlineExtension_with_marks = ['inlineExtension', {
props: {
marks: {
type: 'array',
optional: true,
items: [['dataConsumer', 'fragment']]
}
}
}];
export var layoutColumn = {
props: {
type: {
type: 'enum',
values: ['layoutColumn']
},
attrs: {
props: {
width: {
type: 'number',
minimum: 0,
maximum: 100
}
}
},
content: {
type: 'array',
items: ['block_content'],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var layoutSection = {
props: {
type: {
type: 'enum',
values: ['layoutSection']
},
content: {
type: 'array',
items: ['layoutColumn'],
minItems: 1,
maxItems: 3,
allowUnsupportedBlock: true
},
marks: {
type: 'array',
optional: true,
items: ['breakout']
}
}
};
export var layoutSection_full = ['layoutSection', {
props: {
content: {
type: 'array',
items: ['layoutColumn'],
minItems: 2,
maxItems: 3,
allowUnsupportedBlock: true
},
marks: {
type: 'array',
optional: true,
items: ['breakout']
}
}
}];
export var layoutSection_with_single_column = ['layoutSection', {
props: {
attrs: {
props: {
columnRuleStyle: {
type: 'enum',
values: ['solid'],
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: ['layoutColumn'],
minItems: 1,
maxItems: 5,
allowUnsupportedBlock: true
},
marks: {
type: 'array',
optional: true,
items: ['breakout']
}
}
}];
export var link = {
props: {
type: {
type: 'enum',
values: ['link']
},
attrs: {
props: {
href: {
type: 'string',
validatorFn: 'safeUrl'
},
title: {
type: 'string',
optional: true
},
id: {
type: 'string',
optional: true
},
collection: {
type: 'string',
optional: true
},
occurrenceKey: {
type: 'string',
optional: true
}
}
}
}
};
export var listItem = {
props: {
type: {
type: 'enum',
values: ['listItem']
},
content: {
type: 'array',
isTupleLike: true,
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var listItem_with_nested_decision = ['listItem', {
props: {
content: {
type: 'array',
isTupleLike: true,
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList', 'extension_with_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
}
}];
export var media = {
props: {
type: {
type: 'enum',
values: ['media']
},
attrs: [{
props: {
type: {
type: 'enum',
values: ['link', 'file']
},
id: {
minLength: 1,
type: 'string'
},
alt: {
type: 'string',
optional: true
},
collection: {
type: 'string'
},
height: {
type: 'number',
optional: true
},
occurrenceKey: {
minLength: 1,
type: 'string',
optional: true
},
width: {
type: 'number',
optional: true
}
}
}, {
props: {
type: {
type: 'enum',
values: ['external']
},
alt: {
type: 'string',
optional: true
},
height: {
type: 'number',
optional: true
},
width: {
type: 'number',
optional: true
},
url: {
type: 'string'
}
}
}],
marks: {
type: 'array',
optional: true,
items: [['link', 'annotation', 'border']]
}
},
required: ['attrs']
};
export var mediaGroup = {
props: {
type: {
type: 'enum',
values: ['mediaGroup']
},
content: {
type: 'array',
items: ['media'],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var mediaInline = {
props: {
type: {
type: 'enum',
values: ['mediaInline']
},
attrs: {
props: {
type: {
type: 'enum',
values: ['link', 'file', 'image'],
optional: true
},
url: {
type: 'string',
optional: true
},
id: {
minLength: 1,
type: 'string'
},
alt: {
type: 'string',
optional: true
},
collection: {
type: 'string'
},
occurrenceKey: {
minLength: 1,
type: 'string',
optional: true
},
width: {
type: 'number',
optional: true
},
height: {
type: 'number',
optional: true
},
data: {
type: 'object',
optional: true
}
}
},
marks: {
type: 'array',
optional: true,
items: [['link', 'annotation', 'border']]
}
}
};
export var mediaSingle = {
props: {
type: {
type: 'enum',
values: ['mediaSingle']
},
attrs: [{
props: {
width: {
type: 'number',
minimum: 0,
maximum: 100,
optional: true
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
},
widthType: {
type: 'enum',
values: ['percentage'],
optional: true
}
}
}, {
props: {
width: {
type: 'number',
minimum: 0
},
widthType: {
type: 'enum',
values: ['pixel']
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
}
}
}],
marks: {
type: 'array',
optional: true,
items: ['link']
}
}
};
export var mediaSingle_caption = ['mediaSingle', {
props: {
content: {
type: 'array',
isTupleLike: true,
items: ['media', 'caption'],
minItems: 1,
maxItems: 2,
allowUnsupportedBlock: true
}
}
}];
export var mediaSingle_full = ['mediaSingle', {
props: {
content: {
type: 'array',
items: ['media'],
minItems: 1,
maxItems: 1,
allowUnsupportedBlock: true
}
}
}];
export var mediaSingle_width_type = ['mediaSingle', {
props: {
content: {
type: 'array',
items: ['media'],
minItems: 1,
maxItems: 1,
allowUnsupportedBlock: true
}
}
}];
export var mention = {
props: {
type: {
type: 'enum',
values: ['mention']
},
attrs: {
props: {
id: {
type: 'string'
},
localId: {
type: 'string',
optional: true
},
text: {
type: 'string',
optional: true
},
accessLevel: {
type: 'string',
optional: true
},
userType: {
type: 'enum',
values: ['DEFAULT', 'SPECIAL', 'APP'],
optional: true
}
}
},
marks: {
type: 'array',
optional: true,
items: ['annotation']
}
}
};
export var multiBodiedExtension = {
props: {
type: {
type: 'enum',
values: ['multiBodiedExtension']
},
attrs: {
props: {
extensionKey: {
type: 'string',
minLength: 1
},
extensionType: {
type: 'string',
minLength: 1
},
parameters: {
type: 'object',
optional: true
},
text: {
type: 'string',
optional: true
},
layout: {
type: 'enum',
values: ['default', 'wide', 'full-width'],
optional: true
},
localId: {
type: 'string',
optional: true,
minLength: 1
}
}
},
content: {
type: 'array',
items: ['extensionFrame']
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var nestedExpand = {
props: {
type: {
type: 'enum',
values: ['nestedExpand']
},
attrs: {
props: {
title: {
type: 'string',
optional: true
}
}
},
content: 'nestedExpand_content'
},
required: ['content']
};
export var nestedExpand_content = {
type: 'array',
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
minItems: 1,
allowUnsupportedBlock: true
};
export var nestedExpand_with_no_marks = ['nestedExpand', {
props: {
marks: {
type: 'array',
maxItems: 0,
items: [],
optional: true
}
}
}];
export var non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
export var orderedList = {
props: {
type: {
type: 'enum',
values: ['orderedList']
},
attrs: {
props: {
order: {
type: 'number',
minimum: 0,
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: [['listItem', 'listItem_with_nested_decision']],
minItems: 1
}
}
};
export var panel = {
props: {
type: {
type: 'enum',
values: ['panel']
},
attrs: {
props: {
panelType: {
type: 'enum',
values: ['info', 'note', 'tip', 'warning', 'error', 'success', 'custom']
},
panelIcon: {
type: 'string',
optional: true
},
panelIconId: {
type: 'string',
optional: true
},
panelIconText: {
type: 'string',
optional: true
},
panelColor: {
type: 'string',
optional: true
}
}
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var paragraph = {
props: {
type: {
type: 'enum',
values: ['paragraph']
},
attrs: {
props: {
localId: {
type: 'string',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: ['inline_content'],
optional: true,
allowUnsupportedInline: true
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var paragraph_with_alignment = ['paragraph', {
props: {
marks: {
type: 'array',
optional: true,
items: ['alignment']
}
}
}];
export var paragraph_with_indentation = ['paragraph', {
props: {
marks: {
type: 'array',
optional: true,
items: ['indentation']
}
}
}];
export var paragraph_with_no_marks = ['paragraph', {
props: {
marks: {
type: 'array',
maxItems: 0,
items: [],
optional: true
}
}
}];
export var placeholder = {
props: {
type: {
type: 'enum',
values: ['placeholder']
},
attrs: {
props: {
text: {
type: 'string'
}
}
}
}
};
export var rule = {
props: {
type: {
type: 'enum',
values: ['rule']
}
}
};
export var status = {
props: {
type: {
type: 'enum',
values: ['status']
},
attrs: {
props: {
text: {
minLength: 1,
type: 'string'
},
color: {
type: 'enum',
values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green']
},
localId: {
type: 'string',
optional: true
},
style: {
type: 'string',
optional: true
}
}
},
marks: {
type: 'array',
optional: true,
items: ['annotation']
}
}
};
export var strike = {
props: {
type: {
type: 'enum',
values: ['strike']
}
}
};
export var strong = {
props: {
type: {
type: 'enum',
values: ['strong']
}
}
};
export var subsup = {
props: {
type: {
type: 'enum',
values: ['subsup']
},
attrs: {
props: {
type: {
type: 'enum',
values: ['sub', 'sup']
}
}
}
}
};
export var table = {
props: {
type: {
type: 'enum',
values: ['table']
},
attrs: {
props: {
displayMode: {
type: 'enum',
values: ['default', 'fixed'],
optional: true
},
isNumberColumnEnabled: {
type: 'boolean',
optional: true
},
layout: {
type: 'enum',
values: ['wide', 'full-width', 'center', 'align-end', 'align-start', 'default'],
optional: true
},
localId: {
type: 'string',
minLength: 1,
optional: true
},
width: {
type: 'number',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: ['tableRow'],
minItems: 1
},
marks: {
type: 'array',
optional: true,
items: ['fragment']
}
}
};
export var tableCell = {
props: {
type: {
type: 'enum',
values: ['tableCell']
},
attrs: {
props: {
colspan: {
type: 'number',
optional: true
},
rowspan: {
type: 'number',
optional: true
},
colwidth: {
type: 'array',
items: [{
type: 'number'
}],
optional: true
},
background: {
type: 'string',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
minItems: 1,
allowUnsupportedBlock: true
}
},
required: ['content']
};
export var tableHeader = {
props: {
type: {
type: 'enum',
values: ['tableHeader']
},
attrs: {
props: {
colspan: {
type: 'number',
optional: true
},
rowspan: {
type: 'number',
optional: true
},
colwidth: {
type: 'array',
items: [{
type: 'number'
}],
optional: true
},
background: {
type: 'string',
optional: true
}
},
optional: true
},
content: {
type: 'array',
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
minItems: 1
}
},
required: ['content']
};
export var tableRow = {
props: {
type: {
type: 'enum',
values: ['tableRow']
},
content: {
type: 'array',
items: [['tableCell', 'tableHeader']]
}
}
};
export var taskItem = {
props: {
type: {
type: 'enum',
values: ['taskItem']
},
attrs: {
props: {
localId: {
type: 'string'
},
state: {
type: 'enum',
values: ['TODO', 'DONE']
}
}
},
content: {
type: 'array',
items: ['inline_content'],
optional: true,
allowUnsupportedInline: true
}
}
};
export var taskList = {
props: {
type: {
type: 'enum',
values: ['taskList']
},
attrs: {
props: {
localId: {
type: 'string'
}
}
},
content: {
type: 'array',
isTupleLike: true,
items: ['taskItem', ['taskItem', 'taskList']],
minItems: 1,
allowUnsupportedBlock: true
}
}
};
export var text = {
props: {
type: {
type: 'enum',
values: ['text']
},
text: {
type: 'string',
minLength: 1
},
marks: {
type: 'array',
items: [],
optional: true
}
}
};
export var text_code_inline = ['text', {
props: {
marks: {
type: 'array',
optional: true,
items: [['code', 'link', 'annotation']]
}
}
}];
export var text_formatted = ['text', {
props: {
marks: {
type: 'array',
optional: true,
items: [['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'textColor', 'annotation', 'backgroundColor', null]]
}
}
}];
export var text_link_inline = ['text', {
props: {
marks: {
type: 'array',
optional: true,
items: ['link']
}
}
}];
export var text_with_no_marks = ['text', {
props: {
marks: {
type: 'array',
maxItems: 0,
items: [],
optional: true
}
}
}];
export var textColor = {
props: {
type: {
type: 'enum',
values: ['textColor']
},
attrs: {
props: {
color: {
type: 'string',
pattern: '^#[0-9a-fA-F]{6}$'
}
}
}
}
};
export var underline = {
props: {
type: {
type: 'enum',
values: ['underline']
}
}
};