@atlaskit/adf-schema 36.4.0 → 36.5.0
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 +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +15 -0
- package/dist/cjs/next-schema/groups/alignementMarkExclusionGroup.js +9 -0
- package/dist/cjs/next-schema/groups/annotationGroup.js +8 -0
- package/dist/cjs/next-schema/groups/blockGroup.js +25 -0
- package/dist/cjs/next-schema/groups/blockRootOnlyGroup.js +8 -0
- package/dist/cjs/next-schema/groups/colorGroup.js +9 -0
- package/dist/cjs/next-schema/groups/fontStyleGroup.js +13 -0
- package/dist/cjs/next-schema/groups/indentationMarkExclusionGroup.js +9 -0
- package/dist/cjs/next-schema/groups/inlineGroup.js +18 -0
- package/dist/cjs/next-schema/groups/linkMarkGroup.js +9 -0
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +24 -0
- package/dist/cjs/next-schema/groups/searchQueryMarkGroup.js +8 -0
- package/dist/cjs/next-schema/marks/alignment.js +18 -0
- package/dist/cjs/next-schema/marks/annotation.js +21 -0
- package/dist/cjs/next-schema/marks/border.js +20 -0
- package/dist/cjs/next-schema/marks/breakout.js +18 -0
- package/dist/cjs/next-schema/marks/code.js +15 -0
- package/dist/cjs/next-schema/marks/dataConsumer.js +18 -0
- package/dist/cjs/next-schema/marks/em.js +10 -0
- package/dist/cjs/next-schema/marks/fragment.js +21 -0
- package/dist/cjs/next-schema/marks/indentation.js +18 -0
- package/dist/cjs/next-schema/marks/link.js +40 -0
- package/dist/cjs/next-schema/marks/strike.js +10 -0
- package/dist/cjs/next-schema/marks/strong.js +10 -0
- package/dist/cjs/next-schema/marks/subsup.js +17 -0
- package/dist/cjs/next-schema/marks/textColor.js +15 -0
- package/dist/cjs/next-schema/marks/underline.js +10 -0
- package/dist/cjs/next-schema/nodes/blockCard.js +34 -0
- package/dist/cjs/next-schema/nodes/blockquote.js +16 -0
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +51 -0
- package/dist/cjs/next-schema/nodes/caption.js +21 -0
- package/dist/cjs/next-schema/nodes/codeBlock.js +27 -0
- package/dist/cjs/next-schema/nodes/date.js +17 -0
- package/dist/cjs/next-schema/nodes/decisionItem.js +22 -0
- package/dist/cjs/next-schema/nodes/decisionList.js +19 -0
- package/dist/cjs/next-schema/nodes/embedCard.js +36 -0
- package/dist/cjs/next-schema/nodes/emoji.js +27 -0
- package/dist/cjs/next-schema/nodes/expand.js +30 -0
- package/dist/cjs/next-schema/nodes/extension.js +45 -0
- package/dist/cjs/next-schema/nodes/extensionFrame.js +33 -0
- package/dist/cjs/next-schema/nodes/hardBreak.js +18 -0
- package/dist/cjs/next-schema/nodes/heading.js +28 -0
- package/dist/cjs/next-schema/nodes/inlineCard.js +27 -0
- package/dist/cjs/next-schema/nodes/inlineExtension.js +36 -0
- package/dist/cjs/next-schema/nodes/layoutColumn.js +21 -0
- package/dist/cjs/next-schema/nodes/layoutSection.js +14 -0
- package/dist/cjs/next-schema/nodes/list.js +34 -0
- package/dist/cjs/next-schema/nodes/media.js +89 -0
- package/dist/cjs/next-schema/nodes/mediaGroup.js +12 -0
- package/dist/cjs/next-schema/nodes/mediaInline.js +78 -0
- package/dist/cjs/next-schema/nodes/mediaSingle.js +39 -0
- package/dist/cjs/next-schema/nodes/mention.js +33 -0
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +46 -0
- package/dist/cjs/next-schema/nodes/nestedExpand.js +35 -0
- package/dist/cjs/next-schema/nodes/panel.js +48 -0
- package/dist/cjs/next-schema/nodes/paragraph.js +21 -0
- package/dist/cjs/next-schema/nodes/placeholder.js +16 -0
- package/dist/cjs/next-schema/nodes/rule.js +8 -0
- package/dist/cjs/next-schema/nodes/status.js +31 -0
- package/dist/cjs/next-schema/nodes/table.js +43 -0
- package/dist/cjs/next-schema/nodes/tableCell.js +50 -0
- package/dist/cjs/next-schema/nodes/tableHeader.js +50 -0
- package/dist/cjs/next-schema/nodes/tableRow.js +13 -0
- package/dist/cjs/next-schema/nodes/task.js +37 -0
- package/dist/cjs/next-schema/nodes/text.js +21 -0
- package/dist/es2019/next-schema/full-schema.adf.js +9 -0
- package/dist/es2019/next-schema/groups/alignementMarkExclusionGroup.js +3 -0
- package/dist/es2019/next-schema/groups/annotationGroup.js +2 -0
- package/dist/es2019/next-schema/groups/blockGroup.js +19 -0
- package/dist/es2019/next-schema/groups/blockRootOnlyGroup.js +2 -0
- package/dist/es2019/next-schema/groups/colorGroup.js +3 -0
- package/dist/es2019/next-schema/groups/fontStyleGroup.js +7 -0
- package/dist/es2019/next-schema/groups/indentationMarkExclusionGroup.js +3 -0
- package/dist/es2019/next-schema/groups/inlineGroup.js +12 -0
- package/dist/es2019/next-schema/groups/linkMarkGroup.js +3 -0
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +19 -0
- package/dist/es2019/next-schema/groups/searchQueryMarkGroup.js +2 -0
- package/dist/es2019/next-schema/marks/alignment.js +12 -0
- package/dist/es2019/next-schema/marks/annotation.js +15 -0
- package/dist/es2019/next-schema/marks/border.js +14 -0
- package/dist/es2019/next-schema/marks/breakout.js +12 -0
- package/dist/es2019/next-schema/marks/code.js +9 -0
- package/dist/es2019/next-schema/marks/dataConsumer.js +12 -0
- package/dist/es2019/next-schema/marks/em.js +4 -0
- package/dist/es2019/next-schema/marks/fragment.js +15 -0
- package/dist/es2019/next-schema/marks/indentation.js +12 -0
- package/dist/es2019/next-schema/marks/link.js +34 -0
- package/dist/es2019/next-schema/marks/strike.js +4 -0
- package/dist/es2019/next-schema/marks/strong.js +4 -0
- package/dist/es2019/next-schema/marks/subsup.js +11 -0
- package/dist/es2019/next-schema/marks/textColor.js +9 -0
- package/dist/es2019/next-schema/marks/underline.js +4 -0
- package/dist/es2019/next-schema/nodes/blockCard.js +28 -0
- package/dist/es2019/next-schema/nodes/blockquote.js +10 -0
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +43 -0
- package/dist/es2019/next-schema/nodes/caption.js +16 -0
- package/dist/es2019/next-schema/nodes/codeBlock.js +21 -0
- package/dist/es2019/next-schema/nodes/date.js +11 -0
- package/dist/es2019/next-schema/nodes/decisionItem.js +16 -0
- package/dist/es2019/next-schema/nodes/decisionList.js +13 -0
- package/dist/es2019/next-schema/nodes/embedCard.js +30 -0
- package/dist/es2019/next-schema/nodes/emoji.js +21 -0
- package/dist/es2019/next-schema/nodes/expand.js +22 -0
- package/dist/es2019/next-schema/nodes/extension.js +39 -0
- package/dist/es2019/next-schema/nodes/extensionFrame.js +27 -0
- package/dist/es2019/next-schema/nodes/hardBreak.js +12 -0
- package/dist/es2019/next-schema/nodes/heading.js +22 -0
- package/dist/es2019/next-schema/nodes/inlineCard.js +21 -0
- package/dist/es2019/next-schema/nodes/inlineExtension.js +30 -0
- package/dist/es2019/next-schema/nodes/layoutColumn.js +15 -0
- package/dist/es2019/next-schema/nodes/layoutSection.js +8 -0
- package/dist/es2019/next-schema/nodes/list.js +28 -0
- package/dist/es2019/next-schema/nodes/media.js +83 -0
- package/dist/es2019/next-schema/nodes/mediaGroup.js +6 -0
- package/dist/es2019/next-schema/nodes/mediaInline.js +72 -0
- package/dist/es2019/next-schema/nodes/mediaSingle.js +33 -0
- package/dist/es2019/next-schema/nodes/mention.js +27 -0
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +40 -0
- package/dist/es2019/next-schema/nodes/nestedExpand.js +29 -0
- package/dist/es2019/next-schema/nodes/panel.js +42 -0
- package/dist/es2019/next-schema/nodes/paragraph.js +15 -0
- package/dist/es2019/next-schema/nodes/placeholder.js +10 -0
- package/dist/es2019/next-schema/nodes/rule.js +2 -0
- package/dist/es2019/next-schema/nodes/status.js +25 -0
- package/dist/es2019/next-schema/nodes/table.js +37 -0
- package/dist/es2019/next-schema/nodes/tableCell.js +44 -0
- package/dist/es2019/next-schema/nodes/tableHeader.js +44 -0
- package/dist/es2019/next-schema/nodes/tableRow.js +7 -0
- package/dist/es2019/next-schema/nodes/task.js +31 -0
- package/dist/es2019/next-schema/nodes/text.js +15 -0
- package/dist/esm/next-schema/full-schema.adf.js +9 -0
- package/dist/esm/next-schema/groups/alignementMarkExclusionGroup.js +3 -0
- package/dist/esm/next-schema/groups/annotationGroup.js +2 -0
- package/dist/esm/next-schema/groups/blockGroup.js +19 -0
- package/dist/esm/next-schema/groups/blockRootOnlyGroup.js +2 -0
- package/dist/esm/next-schema/groups/colorGroup.js +3 -0
- package/dist/esm/next-schema/groups/fontStyleGroup.js +7 -0
- package/dist/esm/next-schema/groups/indentationMarkExclusionGroup.js +3 -0
- package/dist/esm/next-schema/groups/inlineGroup.js +12 -0
- package/dist/esm/next-schema/groups/linkMarkGroup.js +3 -0
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +19 -0
- package/dist/esm/next-schema/groups/searchQueryMarkGroup.js +2 -0
- package/dist/esm/next-schema/marks/alignment.js +12 -0
- package/dist/esm/next-schema/marks/annotation.js +15 -0
- package/dist/esm/next-schema/marks/border.js +14 -0
- package/dist/esm/next-schema/marks/breakout.js +12 -0
- package/dist/esm/next-schema/marks/code.js +9 -0
- package/dist/esm/next-schema/marks/dataConsumer.js +12 -0
- package/dist/esm/next-schema/marks/em.js +4 -0
- package/dist/esm/next-schema/marks/fragment.js +15 -0
- package/dist/esm/next-schema/marks/indentation.js +12 -0
- package/dist/esm/next-schema/marks/link.js +34 -0
- package/dist/esm/next-schema/marks/strike.js +4 -0
- package/dist/esm/next-schema/marks/strong.js +4 -0
- package/dist/esm/next-schema/marks/subsup.js +11 -0
- package/dist/esm/next-schema/marks/textColor.js +9 -0
- package/dist/esm/next-schema/marks/underline.js +4 -0
- package/dist/esm/next-schema/nodes/blockCard.js +28 -0
- package/dist/esm/next-schema/nodes/blockquote.js +10 -0
- package/dist/esm/next-schema/nodes/bodiedExtension.js +44 -0
- package/dist/esm/next-schema/nodes/caption.js +16 -0
- package/dist/esm/next-schema/nodes/codeBlock.js +21 -0
- package/dist/esm/next-schema/nodes/date.js +11 -0
- package/dist/esm/next-schema/nodes/decisionItem.js +16 -0
- package/dist/esm/next-schema/nodes/decisionList.js +13 -0
- package/dist/esm/next-schema/nodes/embedCard.js +30 -0
- package/dist/esm/next-schema/nodes/emoji.js +21 -0
- package/dist/esm/next-schema/nodes/expand.js +23 -0
- package/dist/esm/next-schema/nodes/extension.js +39 -0
- package/dist/esm/next-schema/nodes/extensionFrame.js +27 -0
- package/dist/esm/next-schema/nodes/hardBreak.js +12 -0
- package/dist/esm/next-schema/nodes/heading.js +22 -0
- package/dist/esm/next-schema/nodes/inlineCard.js +21 -0
- package/dist/esm/next-schema/nodes/inlineExtension.js +30 -0
- package/dist/esm/next-schema/nodes/layoutColumn.js +15 -0
- package/dist/esm/next-schema/nodes/layoutSection.js +8 -0
- package/dist/esm/next-schema/nodes/list.js +28 -0
- package/dist/esm/next-schema/nodes/media.js +83 -0
- package/dist/esm/next-schema/nodes/mediaGroup.js +6 -0
- package/dist/esm/next-schema/nodes/mediaInline.js +72 -0
- package/dist/esm/next-schema/nodes/mediaSingle.js +33 -0
- package/dist/esm/next-schema/nodes/mention.js +27 -0
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +40 -0
- package/dist/esm/next-schema/nodes/nestedExpand.js +29 -0
- package/dist/esm/next-schema/nodes/panel.js +42 -0
- package/dist/esm/next-schema/nodes/paragraph.js +15 -0
- package/dist/esm/next-schema/nodes/placeholder.js +10 -0
- package/dist/esm/next-schema/nodes/rule.js +2 -0
- package/dist/esm/next-schema/nodes/status.js +25 -0
- package/dist/esm/next-schema/nodes/table.js +37 -0
- package/dist/esm/next-schema/nodes/tableCell.js +44 -0
- package/dist/esm/next-schema/nodes/tableHeader.js +44 -0
- package/dist/esm/next-schema/nodes/tableRow.js +7 -0
- package/dist/esm/next-schema/nodes/task.js +31 -0
- package/dist/esm/next-schema/nodes/text.js +15 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +18 -0
- package/dist/types/next-schema/groups/alignementMarkExclusionGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/annotationGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/blockGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/blockRootOnlyGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/colorGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/fontStyleGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/indentationMarkExclusionGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/inlineGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/linkMarkGroup.d.ts +1 -0
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +114 -0
- package/dist/types/next-schema/groups/searchQueryMarkGroup.d.ts +1 -0
- package/dist/types/next-schema/marks/alignment.d.ts +1 -0
- package/dist/types/next-schema/marks/annotation.d.ts +1 -0
- package/dist/types/next-schema/marks/border.d.ts +1 -0
- package/dist/types/next-schema/marks/breakout.d.ts +1 -0
- package/dist/types/next-schema/marks/code.d.ts +1 -0
- package/dist/types/next-schema/marks/dataConsumer.d.ts +1 -0
- package/dist/types/next-schema/marks/em.d.ts +1 -0
- package/dist/types/next-schema/marks/fragment.d.ts +1 -0
- package/dist/types/next-schema/marks/indentation.d.ts +1 -0
- package/dist/types/next-schema/marks/link.d.ts +1 -0
- package/dist/types/next-schema/marks/strike.d.ts +1 -0
- package/dist/types/next-schema/marks/strong.d.ts +1 -0
- package/dist/types/next-schema/marks/subsup.d.ts +1 -0
- package/dist/types/next-schema/marks/textColor.d.ts +1 -0
- package/dist/types/next-schema/marks/underline.d.ts +1 -0
- package/dist/types/next-schema/nodes/blockCard.d.ts +17 -0
- package/dist/types/next-schema/nodes/blockquote.d.ts +19 -0
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +19 -0
- package/dist/types/next-schema/nodes/caption.d.ts +17 -0
- package/dist/types/next-schema/nodes/codeBlock.d.ts +38 -0
- package/dist/types/next-schema/nodes/date.d.ts +17 -0
- package/dist/types/next-schema/nodes/decisionItem.d.ts +17 -0
- package/dist/types/next-schema/nodes/decisionList.d.ts +17 -0
- package/dist/types/next-schema/nodes/embedCard.d.ts +17 -0
- package/dist/types/next-schema/nodes/emoji.d.ts +17 -0
- package/dist/types/next-schema/nodes/expand.d.ts +19 -0
- package/dist/types/next-schema/nodes/extension.d.ts +17 -0
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +17 -0
- package/dist/types/next-schema/nodes/hardBreak.d.ts +17 -0
- package/dist/types/next-schema/nodes/heading.d.ts +42 -0
- package/dist/types/next-schema/nodes/inlineCard.d.ts +19 -0
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +17 -0
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +17 -0
- package/dist/types/next-schema/nodes/layoutSection.d.ts +17 -0
- package/dist/types/next-schema/nodes/list.d.ts +34 -0
- package/dist/types/next-schema/nodes/media.d.ts +17 -0
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +17 -0
- package/dist/types/next-schema/nodes/mediaInline.d.ts +17 -0
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +20 -0
- package/dist/types/next-schema/nodes/mention.d.ts +17 -0
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +17 -0
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +17 -0
- package/dist/types/next-schema/nodes/panel.d.ts +17 -0
- package/dist/types/next-schema/nodes/paragraph.d.ts +23 -0
- package/dist/types/next-schema/nodes/placeholder.d.ts +17 -0
- package/dist/types/next-schema/nodes/rule.d.ts +17 -0
- package/dist/types/next-schema/nodes/status.d.ts +17 -0
- package/dist/types/next-schema/nodes/table.d.ts +17 -0
- package/dist/types/next-schema/nodes/tableCell.d.ts +17 -0
- package/dist/types/next-schema/nodes/tableHeader.d.ts +17 -0
- package/dist/types/next-schema/nodes/tableRow.d.ts +17 -0
- package/dist/types/next-schema/nodes/task.d.ts +34 -0
- package/dist/types/next-schema/nodes/text.d.ts +21 -0
- package/package.json +3 -3
@@ -0,0 +1,12 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { alignementMarkExclusionGroup } from '../groups/alignementMarkExclusionGroup';
|
3
|
+
export const indentation = adfMark('indentation').define({
|
4
|
+
excludes: [alignementMarkExclusionGroup],
|
5
|
+
attrs: {
|
6
|
+
level: {
|
7
|
+
type: 'number',
|
8
|
+
minimum: 0,
|
9
|
+
maximum: 6
|
10
|
+
}
|
11
|
+
}
|
12
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { linkMarkGroup } from '../groups/linkMarkGroup';
|
3
|
+
export const link = adfMark('link').define({
|
4
|
+
excludes: [linkMarkGroup],
|
5
|
+
inclusive: false,
|
6
|
+
attrs: {
|
7
|
+
href: {
|
8
|
+
type: 'string'
|
9
|
+
},
|
10
|
+
title: {
|
11
|
+
type: 'string',
|
12
|
+
optional: true
|
13
|
+
},
|
14
|
+
id: {
|
15
|
+
type: 'string',
|
16
|
+
optional: true
|
17
|
+
},
|
18
|
+
collection: {
|
19
|
+
type: 'string',
|
20
|
+
optional: true
|
21
|
+
},
|
22
|
+
occurenceKey: {
|
23
|
+
type: 'string',
|
24
|
+
optional: true
|
25
|
+
},
|
26
|
+
// TODO: expand object
|
27
|
+
// packages/adf-schema/src/schema/marks/link.ts
|
28
|
+
__confluenceMetadata: {
|
29
|
+
type: 'object',
|
30
|
+
optional: true,
|
31
|
+
default: null
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const blockCard = adfNode('blockCard').define({
|
3
|
+
draggable: true,
|
4
|
+
selectable: true,
|
5
|
+
attrs: {
|
6
|
+
url: {
|
7
|
+
type: 'string',
|
8
|
+
optional: true
|
9
|
+
},
|
10
|
+
data: {
|
11
|
+
type: 'object',
|
12
|
+
optional: true
|
13
|
+
},
|
14
|
+
datasource: {
|
15
|
+
type: 'object',
|
16
|
+
optional: true
|
17
|
+
},
|
18
|
+
width: {
|
19
|
+
type: 'number',
|
20
|
+
optional: true
|
21
|
+
},
|
22
|
+
layout: {
|
23
|
+
type: 'enum',
|
24
|
+
values: ['wrap-right', 'center', 'wrap-left', 'wide', 'full-width', 'align-end', 'align-start'],
|
25
|
+
optional: true
|
26
|
+
}
|
27
|
+
}
|
28
|
+
});
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { bulletList, orderedList } from './list';
|
3
|
+
import { paragraph } from './paragraph';
|
4
|
+
export const blockquote = adfNode('blockquote').define({
|
5
|
+
defining: true,
|
6
|
+
selectable: false,
|
7
|
+
content: [$onePlus($or(paragraph))]
|
8
|
+
}).variant('with_list', {
|
9
|
+
content: [$onePlus($or(paragraph, orderedList, bulletList))]
|
10
|
+
});
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { nonNestableBlockContent } from '../groups/nonNestableBlockContentGroup';
|
3
|
+
import { dataConsumer } from '../marks/dataConsumer';
|
4
|
+
import { fragment } from '../marks/fragment';
|
5
|
+
export const bodiedExtension = adfNode('bodiedExtension').define({
|
6
|
+
defining: true,
|
7
|
+
selectable: true,
|
8
|
+
isolating: true,
|
9
|
+
attrs: {
|
10
|
+
extensionType: {
|
11
|
+
type: 'string',
|
12
|
+
default: ''
|
13
|
+
},
|
14
|
+
extensionKey: {
|
15
|
+
type: 'string',
|
16
|
+
default: ''
|
17
|
+
},
|
18
|
+
parameters: {
|
19
|
+
type: 'object',
|
20
|
+
optional: true,
|
21
|
+
default: null
|
22
|
+
},
|
23
|
+
text: {
|
24
|
+
type: 'string',
|
25
|
+
optional: true,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
layout: {
|
29
|
+
type: 'enum',
|
30
|
+
values: ['default', 'wide', 'full-width'],
|
31
|
+
optional: true,
|
32
|
+
default: 'default'
|
33
|
+
},
|
34
|
+
localId: {
|
35
|
+
type: 'string',
|
36
|
+
optional: true,
|
37
|
+
default: null
|
38
|
+
}
|
39
|
+
},
|
40
|
+
content: [$onePlus($or(...nonNestableBlockContent))]
|
41
|
+
}).variant('with_marks', {
|
42
|
+
marks: [dataConsumer, fragment]
|
43
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { date } from './date';
|
3
|
+
import { emoji } from './emoji';
|
4
|
+
import { hardBreak } from './hardBreak';
|
5
|
+
import { inlineCard } from './inlineCard';
|
6
|
+
import { mention } from './mention';
|
7
|
+
import { placeholder } from './placeholder';
|
8
|
+
import { status } from './status';
|
9
|
+
import { text } from './text';
|
10
|
+
|
11
|
+
// TODO: marks
|
12
|
+
export const caption = adfNode('caption').define({
|
13
|
+
isolating: true,
|
14
|
+
selectable: false,
|
15
|
+
content: [$zeroPlus($or(text.use('formatted'), hardBreak, mention, emoji, date, placeholder, inlineCard, status))]
|
16
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { breakout } from '../marks/breakout';
|
3
|
+
import { text } from './text';
|
4
|
+
export const codeBlock = adfNode('codeBlock').define({
|
5
|
+
code: true,
|
6
|
+
defining: true,
|
7
|
+
attrs: {
|
8
|
+
language: {
|
9
|
+
type: 'string',
|
10
|
+
default: null
|
11
|
+
},
|
12
|
+
uniqueId: {
|
13
|
+
type: 'string',
|
14
|
+
default: null
|
15
|
+
}
|
16
|
+
},
|
17
|
+
content: [$zeroPlus($or(text))]
|
18
|
+
}).variant('with_marks', {
|
19
|
+
marks: [breakout]
|
20
|
+
});
|
21
|
+
export const codeBlockWithMarks = codeBlock;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
+
export const decisionItem = adfNode('decisionItem').define({
|
4
|
+
defining: true,
|
5
|
+
attrs: {
|
6
|
+
localId: {
|
7
|
+
type: 'string',
|
8
|
+
default: ''
|
9
|
+
},
|
10
|
+
state: {
|
11
|
+
type: 'string',
|
12
|
+
default: 'DECIDED'
|
13
|
+
}
|
14
|
+
},
|
15
|
+
content: [$zeroPlus($or(inlineGroup))]
|
16
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { decisionItem } from './decisionItem';
|
3
|
+
export const decisionList = adfNode('decisionList').define({
|
4
|
+
defining: true,
|
5
|
+
selectable: false,
|
6
|
+
attrs: {
|
7
|
+
localId: {
|
8
|
+
type: 'string',
|
9
|
+
default: ''
|
10
|
+
}
|
11
|
+
},
|
12
|
+
content: [$onePlus($or(decisionItem))]
|
13
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const embedCard = adfNode('embedCard').define({
|
3
|
+
selectable: true,
|
4
|
+
attrs: {
|
5
|
+
url: {
|
6
|
+
type: 'string',
|
7
|
+
default: ''
|
8
|
+
},
|
9
|
+
layout: {
|
10
|
+
type: 'enum',
|
11
|
+
values: ['wrap-right', 'center', 'wrap-left', 'wide', 'full-width', 'align-end', 'align-start'],
|
12
|
+
default: 'center'
|
13
|
+
},
|
14
|
+
width: {
|
15
|
+
type: 'number',
|
16
|
+
default: 100,
|
17
|
+
optional: true
|
18
|
+
},
|
19
|
+
originalHeight: {
|
20
|
+
type: 'number',
|
21
|
+
default: null,
|
22
|
+
optional: true
|
23
|
+
},
|
24
|
+
originalWidth: {
|
25
|
+
type: 'number',
|
26
|
+
default: null,
|
27
|
+
optional: true
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const emoji = adfNode('emoji').define({
|
3
|
+
inline: true,
|
4
|
+
selectable: true,
|
5
|
+
attrs: {
|
6
|
+
shortName: {
|
7
|
+
type: 'string',
|
8
|
+
default: ''
|
9
|
+
},
|
10
|
+
id: {
|
11
|
+
type: 'string',
|
12
|
+
default: '',
|
13
|
+
optional: true
|
14
|
+
},
|
15
|
+
text: {
|
16
|
+
type: 'string',
|
17
|
+
default: '',
|
18
|
+
optional: true
|
19
|
+
}
|
20
|
+
}
|
21
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { nonNestableBlockContent } from '../groups/nonNestableBlockContentGroup';
|
3
|
+
import { breakout } from '../marks/breakout';
|
4
|
+
export const expand = adfNode('expand').define({
|
5
|
+
isolating: true,
|
6
|
+
selectable: true,
|
7
|
+
attrs: {
|
8
|
+
title: {
|
9
|
+
type: 'string',
|
10
|
+
default: '',
|
11
|
+
optional: true
|
12
|
+
},
|
13
|
+
__expanded: {
|
14
|
+
type: 'boolean',
|
15
|
+
default: true,
|
16
|
+
optional: true
|
17
|
+
}
|
18
|
+
},
|
19
|
+
content: [$onePlus($or(...nonNestableBlockContent))]
|
20
|
+
}).variant('with_breakout_mark', {
|
21
|
+
marks: [breakout]
|
22
|
+
});
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { dataConsumer } from '../marks/dataConsumer';
|
3
|
+
import { fragment } from '../marks/fragment';
|
4
|
+
export const extension = adfNode('extension').define({
|
5
|
+
atom: true,
|
6
|
+
selectable: true,
|
7
|
+
marks: [dataConsumer, fragment],
|
8
|
+
attrs: {
|
9
|
+
extensionType: {
|
10
|
+
type: 'string',
|
11
|
+
default: ''
|
12
|
+
},
|
13
|
+
extensionKey: {
|
14
|
+
type: 'string',
|
15
|
+
default: ''
|
16
|
+
},
|
17
|
+
parameters: {
|
18
|
+
type: 'object',
|
19
|
+
optional: true,
|
20
|
+
default: null
|
21
|
+
},
|
22
|
+
text: {
|
23
|
+
type: 'string',
|
24
|
+
optional: true,
|
25
|
+
default: null
|
26
|
+
},
|
27
|
+
layout: {
|
28
|
+
type: 'enum',
|
29
|
+
values: ['default', 'wide', 'full-width'],
|
30
|
+
optional: true,
|
31
|
+
default: 'default'
|
32
|
+
},
|
33
|
+
localId: {
|
34
|
+
type: 'string',
|
35
|
+
optional: true,
|
36
|
+
default: null
|
37
|
+
}
|
38
|
+
}
|
39
|
+
});
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { dataConsumer } from '../marks/dataConsumer';
|
3
|
+
import { fragment } from '../marks/fragment';
|
4
|
+
import { blockCard } from './blockCard';
|
5
|
+
import { blockquote } from './blockquote';
|
6
|
+
import { bodiedExtension } from './bodiedExtension';
|
7
|
+
import { codeBlock } from './codeBlock';
|
8
|
+
import { decisionList } from './decisionList';
|
9
|
+
import { embedCard } from './embedCard';
|
10
|
+
import { extension } from './extension';
|
11
|
+
import { heading } from './heading';
|
12
|
+
import { bulletList, orderedList } from './list';
|
13
|
+
import { mediaGroup } from './mediaGroup';
|
14
|
+
import { mediaSingle } from './mediaSingle';
|
15
|
+
import { panel } from './panel';
|
16
|
+
import { paragraph } from './paragraph';
|
17
|
+
import { rule } from './rule';
|
18
|
+
import { table } from './table';
|
19
|
+
import { taskList } from './task';
|
20
|
+
export const extensionFrame = adfNode('extensionFrame').define({
|
21
|
+
isolating: true,
|
22
|
+
definingAsContext: false,
|
23
|
+
definingForContent: true,
|
24
|
+
selectable: false,
|
25
|
+
marks: [dataConsumer, fragment],
|
26
|
+
content: [$onePlus($or(bodiedExtension, panel, paragraph, blockquote, orderedList, bulletList, rule, heading, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, table, extension, blockCard, embedCard))]
|
27
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
+
import { alignment } from '../marks/alignment';
|
4
|
+
import { indentation } from '../marks/indentation';
|
5
|
+
export const heading = adfNode('heading').define({
|
6
|
+
defining: true,
|
7
|
+
selectable: false,
|
8
|
+
attrs: {
|
9
|
+
level: {
|
10
|
+
type: 'number',
|
11
|
+
default: 1,
|
12
|
+
minimum: 1,
|
13
|
+
maximum: 6
|
14
|
+
}
|
15
|
+
},
|
16
|
+
content: [$zeroPlus($or(inlineGroup))]
|
17
|
+
}).variant('with_alignment', {
|
18
|
+
marks: [alignment]
|
19
|
+
}).variant('with_indentation', {
|
20
|
+
marks: [indentation]
|
21
|
+
});
|
22
|
+
export const headingWithMarks = heading;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { annotation } from '../marks/annotation';
|
3
|
+
export const inlineCard = adfNode('inlineCard').define({
|
4
|
+
inline: true,
|
5
|
+
selectable: true,
|
6
|
+
draggable: true,
|
7
|
+
attrs: {
|
8
|
+
url: {
|
9
|
+
type: 'string',
|
10
|
+
optional: true,
|
11
|
+
default: null
|
12
|
+
},
|
13
|
+
data: {
|
14
|
+
type: 'object',
|
15
|
+
optional: true,
|
16
|
+
default: null
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}).variant('with_annotation', {
|
20
|
+
marks: [annotation]
|
21
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const inlineExtension = adfNode('inlineExtension').define({
|
3
|
+
inline: true,
|
4
|
+
selectable: true,
|
5
|
+
attrs: {
|
6
|
+
extensionType: {
|
7
|
+
type: 'string',
|
8
|
+
default: ''
|
9
|
+
},
|
10
|
+
extensionKey: {
|
11
|
+
type: 'string',
|
12
|
+
default: ''
|
13
|
+
},
|
14
|
+
parameters: {
|
15
|
+
type: 'object',
|
16
|
+
optional: true,
|
17
|
+
default: null
|
18
|
+
},
|
19
|
+
text: {
|
20
|
+
type: 'string',
|
21
|
+
optional: true,
|
22
|
+
default: null
|
23
|
+
},
|
24
|
+
localId: {
|
25
|
+
type: 'string',
|
26
|
+
optional: true,
|
27
|
+
default: null
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockGroup } from '../groups/blockGroup';
|
3
|
+
export const layoutColumn = adfNode('layoutColumn').define({
|
4
|
+
isolating: true,
|
5
|
+
selectable: false,
|
6
|
+
attrs: {
|
7
|
+
width: {
|
8
|
+
type: 'number',
|
9
|
+
minimum: 0,
|
10
|
+
maximum: 100,
|
11
|
+
default: undefined
|
12
|
+
}
|
13
|
+
},
|
14
|
+
content: [$onePlus($or(blockGroup))]
|
15
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { breakout } from '../marks/breakout';
|
3
|
+
import { layoutColumn } from './layoutColumn';
|
4
|
+
export const layoutSection = adfNode('layoutSection').define({
|
5
|
+
isolating: true,
|
6
|
+
content: [$range(1, 3, $or(layoutColumn))],
|
7
|
+
marks: [breakout]
|
8
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { codeBlock } from './codeBlock';
|
3
|
+
import { mediaSingle } from './mediaSingle';
|
4
|
+
import { paragraph } from './paragraph';
|
5
|
+
import { taskList } from './task';
|
6
|
+
export const orderedList = adfNode('orderedList');
|
7
|
+
export const bulletList = adfNode('bulletList');
|
8
|
+
const listItem = adfNode('listItem');
|
9
|
+
orderedList.define({
|
10
|
+
selectable: false,
|
11
|
+
attrs: {
|
12
|
+
order: {
|
13
|
+
type: 'number',
|
14
|
+
minimum: 0,
|
15
|
+
default: 1
|
16
|
+
}
|
17
|
+
},
|
18
|
+
content: [$onePlus($or(listItem))]
|
19
|
+
});
|
20
|
+
bulletList.define({
|
21
|
+
selectable: false,
|
22
|
+
content: [$onePlus($or(listItem))]
|
23
|
+
});
|
24
|
+
listItem.define({
|
25
|
+
defining: true,
|
26
|
+
selectable: false,
|
27
|
+
content: [$or(paragraph, mediaSingle, codeBlock), $zeroPlus($or(paragraph, orderedList, bulletList, mediaSingle, codeBlock, taskList))]
|
28
|
+
});
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { annotation } from '../marks/annotation';
|
3
|
+
import { border } from '../marks/border';
|
4
|
+
import { link } from '../marks/link';
|
5
|
+
export const media = adfNode('media').define({
|
6
|
+
selectable: true,
|
7
|
+
marks: [link, border, annotation],
|
8
|
+
attrs: {
|
9
|
+
type: {
|
10
|
+
type: 'enum',
|
11
|
+
values: ['file', 'link', 'external'],
|
12
|
+
default: 'file'
|
13
|
+
},
|
14
|
+
alt: {
|
15
|
+
type: 'string',
|
16
|
+
default: '',
|
17
|
+
optional: true
|
18
|
+
},
|
19
|
+
collection: {
|
20
|
+
type: 'string',
|
21
|
+
default: ''
|
22
|
+
},
|
23
|
+
id: {
|
24
|
+
type: 'string',
|
25
|
+
default: ''
|
26
|
+
},
|
27
|
+
height: {
|
28
|
+
type: 'number',
|
29
|
+
default: null,
|
30
|
+
optional: true
|
31
|
+
},
|
32
|
+
occurrenceKey: {
|
33
|
+
type: 'string',
|
34
|
+
default: null,
|
35
|
+
optional: true
|
36
|
+
},
|
37
|
+
url: {
|
38
|
+
type: 'string',
|
39
|
+
default: null,
|
40
|
+
optional: true
|
41
|
+
},
|
42
|
+
width: {
|
43
|
+
type: 'number',
|
44
|
+
default: null,
|
45
|
+
optional: true
|
46
|
+
},
|
47
|
+
__contextId: {
|
48
|
+
type: 'string',
|
49
|
+
default: null,
|
50
|
+
optional: true
|
51
|
+
},
|
52
|
+
__displayType: {
|
53
|
+
type: 'string',
|
54
|
+
default: null,
|
55
|
+
optional: true
|
56
|
+
},
|
57
|
+
__external: {
|
58
|
+
type: 'number',
|
59
|
+
default: null,
|
60
|
+
optional: true
|
61
|
+
},
|
62
|
+
__fileMimeType: {
|
63
|
+
type: 'string',
|
64
|
+
default: null,
|
65
|
+
optional: true
|
66
|
+
},
|
67
|
+
__fileName: {
|
68
|
+
type: 'string',
|
69
|
+
default: null,
|
70
|
+
optional: true
|
71
|
+
},
|
72
|
+
__fileSize: {
|
73
|
+
type: 'string',
|
74
|
+
default: null,
|
75
|
+
optional: true
|
76
|
+
},
|
77
|
+
__mediaTraceId: {
|
78
|
+
type: 'string',
|
79
|
+
default: null,
|
80
|
+
optional: true
|
81
|
+
}
|
82
|
+
}
|
83
|
+
});
|