@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,72 @@
|
|
1
|
+
import { $or, 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
|
+
import { caption } from './caption';
|
6
|
+
import { media } from './media';
|
7
|
+
export const mediaInline = adfNode('mediaInline').define({
|
8
|
+
selectable: true,
|
9
|
+
atom: false,
|
10
|
+
marks: [link, border, annotation],
|
11
|
+
attrs: {
|
12
|
+
data: {
|
13
|
+
type: 'object',
|
14
|
+
optional: true
|
15
|
+
},
|
16
|
+
type: {
|
17
|
+
type: 'enum',
|
18
|
+
values: ['file', 'link', 'image'],
|
19
|
+
optional: true
|
20
|
+
},
|
21
|
+
id: {
|
22
|
+
type: 'string'
|
23
|
+
},
|
24
|
+
collection: {
|
25
|
+
type: 'string'
|
26
|
+
},
|
27
|
+
occurrenceKey: {
|
28
|
+
type: 'string',
|
29
|
+
optional: true
|
30
|
+
},
|
31
|
+
width: {
|
32
|
+
type: 'number',
|
33
|
+
default: null,
|
34
|
+
optional: true
|
35
|
+
},
|
36
|
+
height: {
|
37
|
+
type: 'number',
|
38
|
+
default: null,
|
39
|
+
optional: true
|
40
|
+
},
|
41
|
+
__fileName: {
|
42
|
+
type: 'string',
|
43
|
+
optional: true
|
44
|
+
},
|
45
|
+
__fileSize: {
|
46
|
+
type: 'number',
|
47
|
+
optional: true
|
48
|
+
},
|
49
|
+
__fileMimeType: {
|
50
|
+
type: 'string',
|
51
|
+
optional: true
|
52
|
+
},
|
53
|
+
__displayType: {
|
54
|
+
type: 'enum',
|
55
|
+
values: ['file', 'thumbnail'],
|
56
|
+
optional: true
|
57
|
+
},
|
58
|
+
__contextId: {
|
59
|
+
type: 'string',
|
60
|
+
optional: true
|
61
|
+
},
|
62
|
+
__mediaTraceId: {
|
63
|
+
type: 'string',
|
64
|
+
optional: true
|
65
|
+
},
|
66
|
+
__external: {
|
67
|
+
type: 'boolean',
|
68
|
+
optional: true
|
69
|
+
}
|
70
|
+
},
|
71
|
+
content: [$or(media), $or(caption)]
|
72
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { link } from '../marks/link';
|
3
|
+
import { caption } from './caption';
|
4
|
+
import { media } from './media';
|
5
|
+
export const mediaSingle = adfNode('mediaSingle').define({
|
6
|
+
atom: false,
|
7
|
+
selectable: true,
|
8
|
+
marks: [link],
|
9
|
+
attrs: {
|
10
|
+
width: {
|
11
|
+
type: 'number',
|
12
|
+
minimum: 0,
|
13
|
+
// maximum: 100, – can't encode both? 100 is for percentage, and for pixel it's unlimited
|
14
|
+
default: null,
|
15
|
+
optional: true
|
16
|
+
},
|
17
|
+
layout: {
|
18
|
+
type: 'enum',
|
19
|
+
values: ['wrap-right', 'center', 'wrap-left', 'wide', 'full-width', 'align-end', 'align-start'],
|
20
|
+
default: 'center'
|
21
|
+
},
|
22
|
+
widthType: {
|
23
|
+
type: 'enum',
|
24
|
+
values: ['pixel', 'percentage'],
|
25
|
+
default: 'percentage',
|
26
|
+
optional: true
|
27
|
+
}
|
28
|
+
},
|
29
|
+
content: [$or(media)]
|
30
|
+
}).variant('caption', {
|
31
|
+
atom: false,
|
32
|
+
content: [$or(media), $or(caption)]
|
33
|
+
});
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const mention = adfNode('mention').define({
|
3
|
+
inline: true,
|
4
|
+
selectable: true,
|
5
|
+
attrs: {
|
6
|
+
id: {
|
7
|
+
type: 'string',
|
8
|
+
default: ''
|
9
|
+
},
|
10
|
+
text: {
|
11
|
+
type: 'string',
|
12
|
+
default: '',
|
13
|
+
optional: true
|
14
|
+
},
|
15
|
+
accessLevel: {
|
16
|
+
type: 'string',
|
17
|
+
default: '',
|
18
|
+
optional: true
|
19
|
+
},
|
20
|
+
userType: {
|
21
|
+
type: 'enum',
|
22
|
+
values: ['DEFAULT', 'SPECIAL', 'APP'],
|
23
|
+
default: null,
|
24
|
+
optional: true
|
25
|
+
}
|
26
|
+
}
|
27
|
+
});
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockRootOnlyGroup } from '../groups/blockRootOnlyGroup';
|
3
|
+
import { extensionFrame } from './extensionFrame';
|
4
|
+
export const multiBodiedExtension = adfNode('multiBodiedExtension').define({
|
5
|
+
definingAsContext: true,
|
6
|
+
selectable: true,
|
7
|
+
group: blockRootOnlyGroup,
|
8
|
+
attrs: {
|
9
|
+
extensionKey: {
|
10
|
+
type: 'string',
|
11
|
+
default: ''
|
12
|
+
},
|
13
|
+
extensionType: {
|
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
|
+
content: [$onePlus($or(extensionFrame))]
|
40
|
+
});
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockquote } from './blockquote';
|
3
|
+
import { codeBlock } from './codeBlock';
|
4
|
+
import { decisionList } from './decisionList';
|
5
|
+
import { heading } from './heading';
|
6
|
+
import { bulletList, orderedList } from './list';
|
7
|
+
import { mediaGroup } from './mediaGroup';
|
8
|
+
import { mediaSingle } from './mediaSingle';
|
9
|
+
import { panel } from './panel';
|
10
|
+
import { paragraph } from './paragraph';
|
11
|
+
import { rule } from './rule';
|
12
|
+
import { taskList } from './task';
|
13
|
+
export const nestedExpand = adfNode('nestedExpand').define({
|
14
|
+
isolating: true,
|
15
|
+
selectable: true,
|
16
|
+
attrs: {
|
17
|
+
title: {
|
18
|
+
type: 'string',
|
19
|
+
default: '',
|
20
|
+
optional: true
|
21
|
+
},
|
22
|
+
__expanded: {
|
23
|
+
type: 'boolean',
|
24
|
+
default: true,
|
25
|
+
optional: true
|
26
|
+
}
|
27
|
+
},
|
28
|
+
content: [$onePlus($or(paragraph, heading, mediaSingle, mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote))]
|
29
|
+
});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockCard } from './blockCard';
|
3
|
+
import { codeBlock } from './codeBlock';
|
4
|
+
import { decisionList } from './decisionList';
|
5
|
+
import { heading } from './heading';
|
6
|
+
import { bulletList, orderedList } from './list';
|
7
|
+
import { mediaGroup } from './mediaGroup';
|
8
|
+
import { mediaSingle } from './mediaSingle';
|
9
|
+
import { paragraph } from './paragraph';
|
10
|
+
import { rule } from './rule';
|
11
|
+
import { taskList } from './task';
|
12
|
+
export const panel = adfNode('panel').define({
|
13
|
+
selectable: true,
|
14
|
+
attrs: {
|
15
|
+
panelType: {
|
16
|
+
type: 'enum',
|
17
|
+
values: ['info', 'note', 'tip', 'warning', 'error', 'success'],
|
18
|
+
default: 'info'
|
19
|
+
},
|
20
|
+
panelIcon: {
|
21
|
+
type: 'string',
|
22
|
+
default: null,
|
23
|
+
optional: true
|
24
|
+
},
|
25
|
+
panelIconId: {
|
26
|
+
type: 'string',
|
27
|
+
default: null,
|
28
|
+
optional: true
|
29
|
+
},
|
30
|
+
panelIconText: {
|
31
|
+
type: 'string',
|
32
|
+
default: null,
|
33
|
+
optional: true
|
34
|
+
},
|
35
|
+
panelColor: {
|
36
|
+
type: 'string',
|
37
|
+
default: null,
|
38
|
+
optional: true
|
39
|
+
}
|
40
|
+
},
|
41
|
+
content: [$onePlus($or(paragraph, heading, bulletList, orderedList, blockCard, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, rule))]
|
42
|
+
});
|
@@ -0,0 +1,15 @@
|
|
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 paragraph = adfNode('paragraph').define({
|
6
|
+
selectable: false,
|
7
|
+
marks: [alignment],
|
8
|
+
content: [$zeroPlus($or(inlineGroup))]
|
9
|
+
}).variant('with_alignment', {
|
10
|
+
marks: [alignment]
|
11
|
+
}).variant('with_indentation', {
|
12
|
+
marks: [indentation]
|
13
|
+
}).variant('with_marks', {
|
14
|
+
marks: [alignment, indentation]
|
15
|
+
});
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
export const status = adfNode('status').define({
|
3
|
+
selectable: true,
|
4
|
+
attrs: {
|
5
|
+
text: {
|
6
|
+
type: 'string',
|
7
|
+
default: ''
|
8
|
+
},
|
9
|
+
color: {
|
10
|
+
type: 'enum',
|
11
|
+
values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green'],
|
12
|
+
default: ''
|
13
|
+
},
|
14
|
+
localId: {
|
15
|
+
type: 'string',
|
16
|
+
optional: true,
|
17
|
+
default: ''
|
18
|
+
},
|
19
|
+
style: {
|
20
|
+
type: 'string',
|
21
|
+
optional: true,
|
22
|
+
default: ''
|
23
|
+
}
|
24
|
+
}
|
25
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { fragment } from '../marks/fragment';
|
3
|
+
import { tableRow } from './tableRow';
|
4
|
+
export const table = adfNode('table').define({
|
5
|
+
isolating: true,
|
6
|
+
selectable: true,
|
7
|
+
marks: [fragment],
|
8
|
+
attrs: {
|
9
|
+
isNumberColumnEnabled: {
|
10
|
+
type: 'boolean',
|
11
|
+
default: false,
|
12
|
+
optional: true
|
13
|
+
},
|
14
|
+
layout: {
|
15
|
+
type: 'enum',
|
16
|
+
values: ['default', 'wide', 'full-width'],
|
17
|
+
default: 'default',
|
18
|
+
optional: true
|
19
|
+
},
|
20
|
+
localId: {
|
21
|
+
type: 'string',
|
22
|
+
default: '',
|
23
|
+
optional: true
|
24
|
+
},
|
25
|
+
width: {
|
26
|
+
type: 'number',
|
27
|
+
default: null,
|
28
|
+
optional: true
|
29
|
+
},
|
30
|
+
__autoSize: {
|
31
|
+
type: 'boolean',
|
32
|
+
default: false,
|
33
|
+
optional: true
|
34
|
+
}
|
35
|
+
},
|
36
|
+
content: [$onePlus($or(tableRow))]
|
37
|
+
});
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockCard } from './blockCard';
|
3
|
+
import { blockquote } from './blockquote';
|
4
|
+
import { codeBlock } from './codeBlock';
|
5
|
+
import { decisionList } from './decisionList';
|
6
|
+
import { embedCard } from './embedCard';
|
7
|
+
import { extension } from './extension';
|
8
|
+
import { heading } from './heading';
|
9
|
+
import { bulletList, orderedList } from './list';
|
10
|
+
import { mediaGroup } from './mediaGroup';
|
11
|
+
import { mediaSingle } from './mediaSingle';
|
12
|
+
import { nestedExpand } from './nestedExpand';
|
13
|
+
import { panel } from './panel';
|
14
|
+
import { paragraph } from './paragraph';
|
15
|
+
import { rule } from './rule';
|
16
|
+
import { taskList } from './task';
|
17
|
+
export const tableCell = adfNode('tableCell').define({
|
18
|
+
isolating: true,
|
19
|
+
selectable: false,
|
20
|
+
tableRole: 'cell',
|
21
|
+
attrs: {
|
22
|
+
colspan: {
|
23
|
+
type: 'number',
|
24
|
+
default: 1,
|
25
|
+
optional: true
|
26
|
+
},
|
27
|
+
rowspan: {
|
28
|
+
type: 'number',
|
29
|
+
default: 1,
|
30
|
+
optional: true
|
31
|
+
},
|
32
|
+
colswidth: {
|
33
|
+
type: 'numberList',
|
34
|
+
default: [],
|
35
|
+
optional: true
|
36
|
+
},
|
37
|
+
background: {
|
38
|
+
type: 'string',
|
39
|
+
default: '',
|
40
|
+
optional: true
|
41
|
+
}
|
42
|
+
},
|
43
|
+
content: [$onePlus($or(panel, paragraph, paragraph.use('with_marks'), blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, embedCard))]
|
44
|
+
});
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockCard } from './blockCard';
|
3
|
+
import { blockquote } from './blockquote';
|
4
|
+
import { codeBlock } from './codeBlock';
|
5
|
+
import { decisionList } from './decisionList';
|
6
|
+
import { embedCard } from './embedCard';
|
7
|
+
import { extension } from './extension';
|
8
|
+
import { heading } from './heading';
|
9
|
+
import { bulletList, orderedList } from './list';
|
10
|
+
import { mediaGroup } from './mediaGroup';
|
11
|
+
import { mediaSingle } from './mediaSingle';
|
12
|
+
import { nestedExpand } from './nestedExpand';
|
13
|
+
import { panel } from './panel';
|
14
|
+
import { paragraph } from './paragraph';
|
15
|
+
import { rule } from './rule';
|
16
|
+
import { taskList } from './task';
|
17
|
+
export const tableHeader = adfNode('tableHeader').define({
|
18
|
+
isolating: true,
|
19
|
+
selectable: false,
|
20
|
+
tableRole: 'header_cell',
|
21
|
+
attrs: {
|
22
|
+
colspan: {
|
23
|
+
type: 'number',
|
24
|
+
default: 1,
|
25
|
+
optional: true
|
26
|
+
},
|
27
|
+
rowspan: {
|
28
|
+
type: 'number',
|
29
|
+
default: 1,
|
30
|
+
optional: true
|
31
|
+
},
|
32
|
+
colswidth: {
|
33
|
+
type: 'numberList',
|
34
|
+
default: [],
|
35
|
+
optional: true
|
36
|
+
},
|
37
|
+
background: {
|
38
|
+
type: 'string',
|
39
|
+
default: '',
|
40
|
+
optional: true
|
41
|
+
}
|
42
|
+
},
|
43
|
+
content: [$onePlus($or(panel, paragraph, paragraph.use('with_marks'), blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, embedCard))]
|
44
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { tableCell } from './tableCell';
|
3
|
+
import { tableHeader } from './tableHeader';
|
4
|
+
export const tableRow = adfNode('tableRow').define({
|
5
|
+
selectable: false,
|
6
|
+
content: [$onePlus($or(tableCell, tableHeader))]
|
7
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { inlineGroup } from '../groups/inlineGroup';
|
3
|
+
export const taskItem = adfNode('taskItem');
|
4
|
+
export const taskList = adfNode('taskList');
|
5
|
+
taskItem.define({
|
6
|
+
defining: true,
|
7
|
+
selectable: false,
|
8
|
+
attrs: {
|
9
|
+
localId: {
|
10
|
+
type: 'string',
|
11
|
+
default: ''
|
12
|
+
},
|
13
|
+
state: {
|
14
|
+
type: 'enum',
|
15
|
+
values: ['TODO', 'DONE'],
|
16
|
+
default: 'TODO'
|
17
|
+
}
|
18
|
+
},
|
19
|
+
content: [$zeroPlus($or(inlineGroup))]
|
20
|
+
});
|
21
|
+
taskList.define({
|
22
|
+
defining: true,
|
23
|
+
selectable: false,
|
24
|
+
attrs: {
|
25
|
+
localId: {
|
26
|
+
type: 'string',
|
27
|
+
default: ''
|
28
|
+
}
|
29
|
+
},
|
30
|
+
content: [$onePlus($or(taskItem)), $zeroPlus($or(taskItem, taskList))]
|
31
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { annotation } from '../marks/annotation';
|
3
|
+
import { code } from '../marks/code';
|
4
|
+
import { em } from '../marks/em';
|
5
|
+
import { link } from '../marks/link';
|
6
|
+
import { strike } from '../marks/strike';
|
7
|
+
import { strong } from '../marks/strong';
|
8
|
+
import { subsup } from '../marks/subsup';
|
9
|
+
import { textColor } from '../marks/textColor';
|
10
|
+
import { underline } from '../marks/underline';
|
11
|
+
export const text = adfNode('text').define({}).variant('formatted', {
|
12
|
+
marks: [link, em, strong, strike, subsup, underline, textColor, annotation]
|
13
|
+
}).variant('code_inline', {
|
14
|
+
marks: [code, link, annotation]
|
15
|
+
});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockGroup } from './groups/blockGroup';
|
3
|
+
import { layoutSection } from './nodes/layoutSection';
|
4
|
+
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
|
+
var doc = adfNode('doc').define({
|
6
|
+
root: true,
|
7
|
+
content: [$onePlus($or(blockGroup, layoutSection, blockRootOnlyGroup))]
|
8
|
+
});
|
9
|
+
export default doc;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { adfNodeGroup } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { blockCard } from '../nodes/blockCard';
|
3
|
+
import { blockquote } from '../nodes/blockquote';
|
4
|
+
import { bodiedExtension } from '../nodes/bodiedExtension';
|
5
|
+
import { codeBlock } from '../nodes/codeBlock';
|
6
|
+
import { decisionList } from '../nodes/decisionList';
|
7
|
+
import { embedCard } from '../nodes/embedCard';
|
8
|
+
import { expand } from '../nodes/expand';
|
9
|
+
import { extension } from '../nodes/extension';
|
10
|
+
import { heading } from '../nodes/heading';
|
11
|
+
import { bulletList, orderedList } from '../nodes/list';
|
12
|
+
import { mediaGroup } from '../nodes/mediaGroup';
|
13
|
+
import { mediaSingle } from '../nodes/mediaSingle';
|
14
|
+
import { panel } from '../nodes/panel';
|
15
|
+
import { paragraph } from '../nodes/paragraph';
|
16
|
+
import { rule } from '../nodes/rule';
|
17
|
+
import { table } from '../nodes/table';
|
18
|
+
import { taskList } from '../nodes/task';
|
19
|
+
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, paragraph.use('with_marks'), taskList, orderedList, bulletList, blockquote, decisionList, embedCard, extension, heading, mediaGroup, rule, panel, table, bodiedExtension, expand]);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { em } from '../marks/em';
|
3
|
+
import { strike } from '../marks/strike';
|
4
|
+
import { strong } from '../marks/strong';
|
5
|
+
import { subsup } from '../marks/subsup';
|
6
|
+
import { underline } from '../marks/underline';
|
7
|
+
export var fontStyleGroup = adfMarkGroup('fontStyle', [em, strike, strong, subsup, underline]);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { adfNodeGroup } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { date } from '../nodes/date';
|
3
|
+
import { emoji } from '../nodes/emoji';
|
4
|
+
import { hardBreak } from '../nodes/hardBreak';
|
5
|
+
import { inlineCard } from '../nodes/inlineCard';
|
6
|
+
import { mention } from '../nodes/mention';
|
7
|
+
import { placeholder } from '../nodes/placeholder';
|
8
|
+
import { text } from '../nodes/text';
|
9
|
+
import { status } from '../nodes/status';
|
10
|
+
import { inlineExtension } from '../nodes/inlineExtension';
|
11
|
+
import { mediaInline } from '../nodes/mediaInline';
|
12
|
+
export var inlineGroup = adfNodeGroup('inline', [text, date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, mediaInline]);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { blockCard } from '../nodes/blockCard';
|
2
|
+
import { blockquote } from '../nodes/blockquote';
|
3
|
+
import { codeBlock } from '../nodes/codeBlock';
|
4
|
+
import { decisionList } from '../nodes/decisionList';
|
5
|
+
import { embedCard } from '../nodes/embedCard';
|
6
|
+
import { extension } from '../nodes/extension';
|
7
|
+
import { heading } from '../nodes/heading';
|
8
|
+
import { bulletList, orderedList } from '../nodes/list';
|
9
|
+
import { mediaGroup } from '../nodes/mediaGroup';
|
10
|
+
import { mediaSingle } from '../nodes/mediaSingle';
|
11
|
+
import { panel } from '../nodes/panel';
|
12
|
+
import { paragraph } from '../nodes/paragraph';
|
13
|
+
import { rule } from '../nodes/rule';
|
14
|
+
import { table } from '../nodes/table';
|
15
|
+
import { taskList } from '../nodes/task';
|
16
|
+
|
17
|
+
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
18
|
+
// TODO: make it an actual group
|
19
|
+
export var nonNestableBlockContent = [panel, paragraph, blockquote, orderedList, bulletList, rule, heading, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, table, extension, blockCard, embedCard];
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { indentationMarkExclusionGroup } from '../groups/indentationMarkExclusionGroup';
|
3
|
+
export var alignment = adfMark('alignment').define({
|
4
|
+
excludes: [indentationMarkExclusionGroup],
|
5
|
+
attrs: {
|
6
|
+
align: {
|
7
|
+
type: 'enum',
|
8
|
+
values: ['center', 'end'],
|
9
|
+
default: 'center'
|
10
|
+
}
|
11
|
+
}
|
12
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
2
|
+
export var annotation = adfMark('annotation').define({
|
3
|
+
inclusive: true,
|
4
|
+
attrs: {
|
5
|
+
id: {
|
6
|
+
type: 'string',
|
7
|
+
default: ''
|
8
|
+
},
|
9
|
+
annotationType: {
|
10
|
+
type: 'enum',
|
11
|
+
values: ['inlineComment'],
|
12
|
+
default: 'inlineComment'
|
13
|
+
}
|
14
|
+
}
|
15
|
+
});
|