@atlaskit/adf-schema 36.7.0 → 36.8.1

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +1 -1
  3. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  4. package/dist/cjs/next-schema/groups/inlineGroup.js +1 -1
  5. package/dist/cjs/next-schema/marks/backgroundColor.js +8 -0
  6. package/dist/cjs/next-schema/nodes/codeBlock.js +1 -1
  7. package/dist/cjs/next-schema/nodes/expand.js +1 -1
  8. package/dist/cjs/next-schema/nodes/extension.js +1 -1
  9. package/dist/cjs/next-schema/nodes/heading.js +1 -1
  10. package/dist/cjs/next-schema/nodes/inlineExtension.js +1 -1
  11. package/dist/cjs/next-schema/nodes/layoutSection.js +1 -1
  12. package/dist/cjs/next-schema/nodes/mediaSingle.js +1 -1
  13. package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
  14. package/dist/cjs/next-schema/nodes/paragraph.js +1 -1
  15. package/dist/cjs/next-schema/nodes/tableCell.js +2 -2
  16. package/dist/cjs/next-schema/nodes/tableHeader.js +2 -2
  17. package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
  18. package/dist/cjs/next-schema/nodes/text.js +2 -1
  19. package/dist/es2019/next-schema/full-schema.adf.js +1 -1
  20. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  21. package/dist/es2019/next-schema/groups/inlineGroup.js +1 -1
  22. package/dist/es2019/next-schema/marks/backgroundColor.js +2 -0
  23. package/dist/es2019/next-schema/nodes/codeBlock.js +1 -1
  24. package/dist/es2019/next-schema/nodes/expand.js +1 -1
  25. package/dist/es2019/next-schema/nodes/extension.js +1 -1
  26. package/dist/es2019/next-schema/nodes/heading.js +1 -1
  27. package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -1
  28. package/dist/es2019/next-schema/nodes/layoutSection.js +1 -1
  29. package/dist/es2019/next-schema/nodes/mediaSingle.js +1 -1
  30. package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
  31. package/dist/es2019/next-schema/nodes/paragraph.js +1 -1
  32. package/dist/es2019/next-schema/nodes/tableCell.js +2 -2
  33. package/dist/es2019/next-schema/nodes/tableHeader.js +2 -2
  34. package/dist/es2019/next-schema/nodes/tableRow.js +1 -1
  35. package/dist/es2019/next-schema/nodes/text.js +2 -1
  36. package/dist/esm/next-schema/full-schema.adf.js +1 -1
  37. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  38. package/dist/esm/next-schema/groups/inlineGroup.js +1 -1
  39. package/dist/esm/next-schema/marks/backgroundColor.js +2 -0
  40. package/dist/esm/next-schema/nodes/codeBlock.js +1 -1
  41. package/dist/esm/next-schema/nodes/expand.js +1 -1
  42. package/dist/esm/next-schema/nodes/extension.js +1 -1
  43. package/dist/esm/next-schema/nodes/heading.js +1 -1
  44. package/dist/esm/next-schema/nodes/inlineExtension.js +1 -1
  45. package/dist/esm/next-schema/nodes/layoutSection.js +1 -1
  46. package/dist/esm/next-schema/nodes/mediaSingle.js +1 -1
  47. package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
  48. package/dist/esm/next-schema/nodes/paragraph.js +1 -1
  49. package/dist/esm/next-schema/nodes/tableCell.js +2 -2
  50. package/dist/esm/next-schema/nodes/tableHeader.js +2 -2
  51. package/dist/esm/next-schema/nodes/tableRow.js +1 -1
  52. package/dist/esm/next-schema/nodes/text.js +2 -1
  53. package/dist/json-schema/v1/stage-0.json +24 -0
  54. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +20 -4
  55. package/dist/types/next-schema/marks/backgroundColor.d.ts +1 -0
  56. package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -2
  57. package/dist/types/next-schema/nodes/expand.d.ts +1 -1
  58. package/dist/types/next-schema/nodes/extension.d.ts +1 -1
  59. package/dist/types/next-schema/nodes/heading.d.ts +2 -2
  60. package/dist/types/next-schema/nodes/inlineExtension.d.ts +1 -1
  61. package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -1
  62. package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -1
  63. package/dist/types/next-schema/nodes/nestedExpand.d.ts +1 -1
  64. package/dist/types/next-schema/nodes/paragraph.d.ts +1 -1
  65. package/dist/types/schema/nodes/date.d.ts +5 -0
  66. package/dist/types/schema/nodes/emoji.d.ts +5 -0
  67. package/dist/types/schema/nodes/mention.d.ts +5 -0
  68. package/dist/types/schema/nodes/status.d.ts +5 -0
  69. package/json-schema/v1/stage-0.json +24 -0
  70. package/package.json +5 -4
  71. package/schema-generators/__tests__/unit/jqueries.md +21 -0
  72. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +204 -0
  73. package/schema-generators/json-full-schema.ts +11 -0
  74. /package/schema-generators/{full-schema.ts → pm-full-schema.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 36.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b3718c: Add basic JSON Schema Transformer from ADF DSL
8
+
9
+ ## 36.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - e71ebfd: ED-23361 Introduce support for annotations on emojis, dates, statuses and mentions.
14
+
3
15
  ## 36.7.0
4
16
 
5
17
  ### Minor Changes
@@ -10,6 +10,6 @@ var _layoutSection = require("./nodes/layoutSection");
10
10
  var _blockRootOnlyGroup = require("./groups/blockRootOnlyGroup");
11
11
  var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
12
12
  root: true,
13
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _layoutSection.layoutSection, _blockRootOnlyGroup.blockRootOnlyGroup))]
13
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _layoutSection.layoutSection, _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup))]
14
14
  });
15
15
  var _default = exports.default = doc;
@@ -22,4 +22,4 @@ var _paragraph = require("../nodes/paragraph");
22
22
  var _rule = require("../nodes/rule");
23
23
  var _table = require("../nodes/table");
24
24
  var _task = require("../nodes/task");
25
- var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _mediaSingle.mediaSingle, _paragraph.paragraph.use('with_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _heading.heading, _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _table.table, _bodiedExtension.bodiedExtension, _expand.expand]);
25
+ var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_breakout_mark'), _expand.expand.use('with_no_mark')]);
@@ -15,4 +15,4 @@ var _text = require("../nodes/text");
15
15
  var _status = require("../nodes/status");
16
16
  var _inlineExtension = require("../nodes/inlineExtension");
17
17
  var _mediaInline = require("../nodes/mediaInline");
18
- var inlineGroup = exports.inlineGroup = (0, _adfSchemaGenerator.adfNodeGroup)('inline', [_text.text, _date.date, _emoji.emoji, _hardBreak.hardBreak, _inlineCard.inlineCard, _mention.mention, _placeholder.placeholder, _status.status, _inlineExtension.inlineExtension, _mediaInline.mediaInline]);
18
+ var inlineGroup = exports.inlineGroup = (0, _adfSchemaGenerator.adfNodeGroup)('inline', [_text.text, _date.date, _emoji.emoji, _hardBreak.hardBreak, _inlineCard.inlineCard, _mention.mention, _placeholder.placeholder, _status.status, _text.text.use('code_inline'), _inlineExtension.inlineExtension, _inlineExtension.inlineExtension.use('with_marks'), _mediaInline.mediaInline]);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.backgroundColor = void 0;
7
+ var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
8
+ var backgroundColor = exports.backgroundColor = (0, _adfSchemaGenerator.adfMark)('backgroundColor').define({});
@@ -23,5 +23,5 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
23
23
  content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text))]
24
24
  }).variant('with_marks', {
25
25
  marks: [_breakout.breakout]
26
- });
26
+ }).variant('with_no_marks', {});
27
27
  var codeBlockWithMarks = exports.codeBlockWithMarks = codeBlock;
@@ -27,4 +27,4 @@ var expand = exports.expand = (0, _adfSchemaGenerator.adfNode)('expand').define(
27
27
  content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, (0, _toConsumableArray2.default)(_nonNestableBlockContentGroup.nonNestableBlockContent)))]
28
28
  }).variant('with_breakout_mark', {
29
29
  marks: [_breakout.breakout]
30
- });
30
+ }).variant('with_no_mark', {});
@@ -42,4 +42,4 @@ var extension = exports.extension = (0, _adfSchemaGenerator.adfNode)('extension'
42
42
  default: null
43
43
  }
44
44
  }
45
- });
45
+ }).variant('with_marks', {});
@@ -23,5 +23,5 @@ var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').defi
23
23
  marks: [_alignmentAndIndentation.alignment]
24
24
  }).variant('with_indentation', {
25
25
  marks: [_alignmentAndIndentation.indentation]
26
- });
26
+ }).variant('with_no_marks', {});
27
27
  var headingWithMarks = exports.headingWithMarks = heading;
@@ -33,4 +33,4 @@ var inlineExtension = exports.inlineExtension = (0, _adfSchemaGenerator.adfNode)
33
33
  default: null
34
34
  }
35
35
  }
36
- });
36
+ }).variant('with_marks', {});
@@ -11,4 +11,4 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
11
11
  isolating: true,
12
12
  content: [(0, _adfSchemaGenerator.$range)(1, 3, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn))],
13
13
  marks: [_breakout.breakout]
14
- });
14
+ }).variant('full', {});
@@ -36,4 +36,4 @@ var mediaSingle = exports.mediaSingle = (0, _adfSchemaGenerator.adfNode)('mediaS
36
36
  }).variant('caption', {
37
37
  atom: false,
38
38
  content: [(0, _adfSchemaGenerator.$or)(_media.media), (0, _adfSchemaGenerator.$or)(_caption.caption)]
39
- });
39
+ }).variant('full', {});
@@ -32,4 +32,4 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
32
32
  }
33
33
  },
34
34
  content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _heading.heading, _mediaSingle.mediaSingle, _mediaGroup.mediaGroup, _codeBlock.codeBlock, _list.bulletList, _list.orderedList, _task.taskList, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote))]
35
- });
35
+ }).variant('with_no_marks', {});
@@ -17,4 +17,4 @@ var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph'
17
17
  marks: [_alignmentAndIndentation.indentation]
18
18
  }).variant('with_marks', {
19
19
  marks: [_alignmentAndIndentation.alignment, _alignmentAndIndentation.indentation]
20
- });
20
+ }).variant('with_no_marks', {});
@@ -20,7 +20,7 @@ var _panel = require("./panel");
20
20
  var _paragraph = require("./paragraph");
21
21
  var _rule = require("./rule");
22
22
  var _task = require("./task");
23
- var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('tableCell').define({
23
+ var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('table_cell').define({
24
24
  isolating: true,
25
25
  selectable: false,
26
26
  tableRole: 'cell',
@@ -46,5 +46,5 @@ var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('tableCell'
46
46
  optional: true
47
47
  }
48
48
  },
49
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_panel.panel, _paragraph.paragraph, _paragraph.paragraph.use('with_marks'), _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _decisionList.decisionList, _task.taskList, _extension.extension, _blockCard.blockCard, _nestedExpand.nestedExpand, _embedCard.embedCard))]
49
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_panel.panel, _paragraph.paragraph, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _decisionList.decisionList, _task.taskList, _extension.extension, _blockCard.blockCard, _nestedExpand.nestedExpand, _embedCard.embedCard))]
50
50
  });
@@ -20,7 +20,7 @@ var _panel = require("./panel");
20
20
  var _paragraph = require("./paragraph");
21
21
  var _rule = require("./rule");
22
22
  var _task = require("./task");
23
- var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('tableHeader').define({
23
+ var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('table_header').define({
24
24
  isolating: true,
25
25
  selectable: false,
26
26
  tableRole: 'header_cell',
@@ -46,5 +46,5 @@ var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('tableH
46
46
  optional: true
47
47
  }
48
48
  },
49
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_panel.panel, _paragraph.paragraph, _paragraph.paragraph.use('with_marks'), _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _decisionList.decisionList, _task.taskList, _extension.extension, _blockCard.blockCard, _nestedExpand.nestedExpand, _embedCard.embedCard))]
49
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_panel.panel, _paragraph.paragraph, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _decisionList.decisionList, _task.taskList, _extension.extension, _blockCard.blockCard, _nestedExpand.nestedExpand, _nestedExpand.nestedExpand.use('with_no_marks'), _embedCard.embedCard))]
50
50
  });
@@ -7,7 +7,7 @@ exports.tableRow = void 0;
7
7
  var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
8
8
  var _tableCell = require("./tableCell");
9
9
  var _tableHeader = require("./tableHeader");
10
- var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('tableRow').define({
10
+ var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('table_row').define({
11
11
  selectable: false,
12
12
  content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_tableCell.tableCell, _tableHeader.tableHeader))]
13
13
  });
@@ -14,8 +14,9 @@ var _strong = require("../marks/strong");
14
14
  var _subsup = require("../marks/subsup");
15
15
  var _textColor = require("../marks/textColor");
16
16
  var _underline = require("../marks/underline");
17
+ var _backgroundColor = require("../marks/backgroundColor");
17
18
  var text = exports.text = (0, _adfSchemaGenerator.adfNode)('text').define({}).variant('formatted', {
18
- marks: [_link.link, _em.em, _strong.strong, _strike.strike, _subsup.subsup, _underline.underline, _textColor.textColor, _annotation.annotation]
19
+ marks: [_link.link, _em.em, _strong.strong, _strike.strike, _subsup.subsup, _underline.underline, _textColor.textColor, _annotation.annotation, _backgroundColor.backgroundColor]
19
20
  }).variant('code_inline', {
20
21
  marks: [_code.code, _link.link, _annotation.annotation]
21
22
  });
@@ -4,6 +4,6 @@ import { layoutSection } from './nodes/layoutSection';
4
4
  import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
5
5
  const doc = adfNode('doc').define({
6
6
  root: true,
7
- content: [$onePlus($or(blockGroup, layoutSection, blockRootOnlyGroup))]
7
+ content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
8
8
  });
9
9
  export default doc;
@@ -16,4 +16,4 @@ import { paragraph } from '../nodes/paragraph';
16
16
  import { rule } from '../nodes/rule';
17
17
  import { table } from '../nodes/table';
18
18
  import { taskList } from '../nodes/task';
19
- export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, paragraph.use('with_marks'), taskList, orderedList, bulletList, blockquote, decisionList, embedCard, extension, heading, mediaGroup, rule, panel, table, bodiedExtension, expand]);
19
+ export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_no_marks'), mediaGroup, rule, panel, table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_breakout_mark'), expand.use('with_no_mark')]);
@@ -9,4 +9,4 @@ import { text } from '../nodes/text';
9
9
  import { status } from '../nodes/status';
10
10
  import { inlineExtension } from '../nodes/inlineExtension';
11
11
  import { mediaInline } from '../nodes/mediaInline';
12
- export const inlineGroup = adfNodeGroup('inline', [text, date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, mediaInline]);
12
+ export const inlineGroup = adfNodeGroup('inline', [text, date, emoji, hardBreak, inlineCard, mention, placeholder, status, text.use('code_inline'), inlineExtension, inlineExtension.use('with_marks'), mediaInline]);
@@ -0,0 +1,2 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const backgroundColor = adfMark('backgroundColor').define({});
@@ -17,5 +17,5 @@ export const codeBlock = adfNode('codeBlock').define({
17
17
  content: [$zeroPlus($or(text))]
18
18
  }).variant('with_marks', {
19
19
  marks: [breakout]
20
- });
20
+ }).variant('with_no_marks', {});
21
21
  export const codeBlockWithMarks = codeBlock;
@@ -19,4 +19,4 @@ export const expand = adfNode('expand').define({
19
19
  content: [$onePlus($or(...nonNestableBlockContent))]
20
20
  }).variant('with_breakout_mark', {
21
21
  marks: [breakout]
22
- });
22
+ }).variant('with_no_mark', {});
@@ -36,4 +36,4 @@ export const extension = adfNode('extension').define({
36
36
  default: null
37
37
  }
38
38
  }
39
- });
39
+ }).variant('with_marks', {});
@@ -17,5 +17,5 @@ export const heading = adfNode('heading').define({
17
17
  marks: [alignment]
18
18
  }).variant('with_indentation', {
19
19
  marks: [indentation]
20
- });
20
+ }).variant('with_no_marks', {});
21
21
  export const headingWithMarks = heading;
@@ -27,4 +27,4 @@ export const inlineExtension = adfNode('inlineExtension').define({
27
27
  default: null
28
28
  }
29
29
  }
30
- });
30
+ }).variant('with_marks', {});
@@ -5,4 +5,4 @@ export const layoutSection = adfNode('layoutSection').define({
5
5
  isolating: true,
6
6
  content: [$range(1, 3, $or(layoutColumn))],
7
7
  marks: [breakout]
8
- });
8
+ }).variant('full', {});
@@ -30,4 +30,4 @@ export const mediaSingle = adfNode('mediaSingle').define({
30
30
  }).variant('caption', {
31
31
  atom: false,
32
32
  content: [$or(media), $or(caption)]
33
- });
33
+ }).variant('full', {});
@@ -26,4 +26,4 @@ export const nestedExpand = adfNode('nestedExpand').define({
26
26
  }
27
27
  },
28
28
  content: [$onePlus($or(paragraph, heading, mediaSingle, mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote))]
29
- });
29
+ }).variant('with_no_marks', {});
@@ -11,4 +11,4 @@ export const paragraph = adfNode('paragraph').define({
11
11
  marks: [indentation]
12
12
  }).variant('with_marks', {
13
13
  marks: [alignment, indentation]
14
- });
14
+ }).variant('with_no_marks', {});
@@ -14,7 +14,7 @@ import { panel } from './panel';
14
14
  import { paragraph } from './paragraph';
15
15
  import { rule } from './rule';
16
16
  import { taskList } from './task';
17
- export const tableCell = adfNode('tableCell').define({
17
+ export const tableCell = adfNode('table_cell').define({
18
18
  isolating: true,
19
19
  selectable: false,
20
20
  tableRole: 'cell',
@@ -40,5 +40,5 @@ export const tableCell = adfNode('tableCell').define({
40
40
  optional: true
41
41
  }
42
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))]
43
+ content: [$onePlus($or(panel, paragraph, blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, embedCard))]
44
44
  });
@@ -14,7 +14,7 @@ import { panel } from './panel';
14
14
  import { paragraph } from './paragraph';
15
15
  import { rule } from './rule';
16
16
  import { taskList } from './task';
17
- export const tableHeader = adfNode('tableHeader').define({
17
+ export const tableHeader = adfNode('table_header').define({
18
18
  isolating: true,
19
19
  selectable: false,
20
20
  tableRole: 'header_cell',
@@ -40,5 +40,5 @@ export const tableHeader = adfNode('tableHeader').define({
40
40
  optional: true
41
41
  }
42
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))]
43
+ content: [$onePlus($or(panel, paragraph, blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, nestedExpand.use('with_no_marks'), embedCard))]
44
44
  });
@@ -1,7 +1,7 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { tableCell } from './tableCell';
3
3
  import { tableHeader } from './tableHeader';
4
- export const tableRow = adfNode('tableRow').define({
4
+ export const tableRow = adfNode('table_row').define({
5
5
  selectable: false,
6
6
  content: [$onePlus($or(tableCell, tableHeader))]
7
7
  });
@@ -8,8 +8,9 @@ import { strong } from '../marks/strong';
8
8
  import { subsup } from '../marks/subsup';
9
9
  import { textColor } from '../marks/textColor';
10
10
  import { underline } from '../marks/underline';
11
+ import { backgroundColor } from '../marks/backgroundColor';
11
12
  export const text = adfNode('text').define({}).variant('formatted', {
12
- marks: [link, em, strong, strike, subsup, underline, textColor, annotation]
13
+ marks: [link, em, strong, strike, subsup, underline, textColor, annotation, backgroundColor]
13
14
  }).variant('code_inline', {
14
15
  marks: [code, link, annotation]
15
16
  });
@@ -4,6 +4,6 @@ import { layoutSection } from './nodes/layoutSection';
4
4
  import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
5
5
  var doc = adfNode('doc').define({
6
6
  root: true,
7
- content: [$onePlus($or(blockGroup, layoutSection, blockRootOnlyGroup))]
7
+ content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
8
8
  });
9
9
  export default doc;
@@ -16,4 +16,4 @@ import { paragraph } from '../nodes/paragraph';
16
16
  import { rule } from '../nodes/rule';
17
17
  import { table } from '../nodes/table';
18
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]);
19
+ export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_no_marks'), mediaGroup, rule, panel, table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_breakout_mark'), expand.use('with_no_mark')]);
@@ -9,4 +9,4 @@ import { text } from '../nodes/text';
9
9
  import { status } from '../nodes/status';
10
10
  import { inlineExtension } from '../nodes/inlineExtension';
11
11
  import { mediaInline } from '../nodes/mediaInline';
12
- export var inlineGroup = adfNodeGroup('inline', [text, date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, mediaInline]);
12
+ export var inlineGroup = adfNodeGroup('inline', [text, date, emoji, hardBreak, inlineCard, mention, placeholder, status, text.use('code_inline'), inlineExtension, inlineExtension.use('with_marks'), mediaInline]);
@@ -0,0 +1,2 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export var backgroundColor = adfMark('backgroundColor').define({});
@@ -17,5 +17,5 @@ export var codeBlock = adfNode('codeBlock').define({
17
17
  content: [$zeroPlus($or(text))]
18
18
  }).variant('with_marks', {
19
19
  marks: [breakout]
20
- });
20
+ }).variant('with_no_marks', {});
21
21
  export var codeBlockWithMarks = codeBlock;
@@ -20,4 +20,4 @@ export var expand = adfNode('expand').define({
20
20
  content: [$onePlus($or.apply(void 0, _toConsumableArray(nonNestableBlockContent)))]
21
21
  }).variant('with_breakout_mark', {
22
22
  marks: [breakout]
23
- });
23
+ }).variant('with_no_mark', {});
@@ -36,4 +36,4 @@ export var extension = adfNode('extension').define({
36
36
  default: null
37
37
  }
38
38
  }
39
- });
39
+ }).variant('with_marks', {});
@@ -17,5 +17,5 @@ export var heading = adfNode('heading').define({
17
17
  marks: [alignment]
18
18
  }).variant('with_indentation', {
19
19
  marks: [indentation]
20
- });
20
+ }).variant('with_no_marks', {});
21
21
  export var headingWithMarks = heading;
@@ -27,4 +27,4 @@ export var inlineExtension = adfNode('inlineExtension').define({
27
27
  default: null
28
28
  }
29
29
  }
30
- });
30
+ }).variant('with_marks', {});
@@ -5,4 +5,4 @@ export var layoutSection = adfNode('layoutSection').define({
5
5
  isolating: true,
6
6
  content: [$range(1, 3, $or(layoutColumn))],
7
7
  marks: [breakout]
8
- });
8
+ }).variant('full', {});
@@ -30,4 +30,4 @@ export var mediaSingle = adfNode('mediaSingle').define({
30
30
  }).variant('caption', {
31
31
  atom: false,
32
32
  content: [$or(media), $or(caption)]
33
- });
33
+ }).variant('full', {});
@@ -26,4 +26,4 @@ export var nestedExpand = adfNode('nestedExpand').define({
26
26
  }
27
27
  },
28
28
  content: [$onePlus($or(paragraph, heading, mediaSingle, mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote))]
29
- });
29
+ }).variant('with_no_marks', {});
@@ -11,4 +11,4 @@ export var paragraph = adfNode('paragraph').define({
11
11
  marks: [indentation]
12
12
  }).variant('with_marks', {
13
13
  marks: [alignment, indentation]
14
- });
14
+ }).variant('with_no_marks', {});
@@ -14,7 +14,7 @@ import { panel } from './panel';
14
14
  import { paragraph } from './paragraph';
15
15
  import { rule } from './rule';
16
16
  import { taskList } from './task';
17
- export var tableCell = adfNode('tableCell').define({
17
+ export var tableCell = adfNode('table_cell').define({
18
18
  isolating: true,
19
19
  selectable: false,
20
20
  tableRole: 'cell',
@@ -40,5 +40,5 @@ export var tableCell = adfNode('tableCell').define({
40
40
  optional: true
41
41
  }
42
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))]
43
+ content: [$onePlus($or(panel, paragraph, blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, embedCard))]
44
44
  });
@@ -14,7 +14,7 @@ import { panel } from './panel';
14
14
  import { paragraph } from './paragraph';
15
15
  import { rule } from './rule';
16
16
  import { taskList } from './task';
17
- export var tableHeader = adfNode('tableHeader').define({
17
+ export var tableHeader = adfNode('table_header').define({
18
18
  isolating: true,
19
19
  selectable: false,
20
20
  tableRole: 'header_cell',
@@ -40,5 +40,5 @@ export var tableHeader = adfNode('tableHeader').define({
40
40
  optional: true
41
41
  }
42
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))]
43
+ content: [$onePlus($or(panel, paragraph, blockquote, orderedList, bulletList, rule, heading, heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaGroup, mediaSingle, decisionList, taskList, extension, blockCard, nestedExpand, nestedExpand.use('with_no_marks'), embedCard))]
44
44
  });
@@ -1,7 +1,7 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { tableCell } from './tableCell';
3
3
  import { tableHeader } from './tableHeader';
4
- export var tableRow = adfNode('tableRow').define({
4
+ export var tableRow = adfNode('table_row').define({
5
5
  selectable: false,
6
6
  content: [$onePlus($or(tableCell, tableHeader))]
7
7
  });
@@ -8,8 +8,9 @@ import { strong } from '../marks/strong';
8
8
  import { subsup } from '../marks/subsup';
9
9
  import { textColor } from '../marks/textColor';
10
10
  import { underline } from '../marks/underline';
11
+ import { backgroundColor } from '../marks/backgroundColor';
11
12
  export var text = adfNode('text').define({}).variant('formatted', {
12
- marks: [link, em, strong, strike, subsup, underline, textColor, annotation]
13
+ marks: [link, em, strong, strike, subsup, underline, textColor, annotation, backgroundColor]
13
14
  }).variant('code_inline', {
14
15
  marks: [code, link, annotation]
15
16
  });
@@ -580,6 +580,12 @@
580
580
  "id"
581
581
  ],
582
582
  "additionalProperties": false
583
+ },
584
+ "marks": {
585
+ "type": "array",
586
+ "items": {
587
+ "$ref": "#/definitions/annotation_mark"
588
+ }
583
589
  }
584
590
  },
585
591
  "required": [
@@ -613,6 +619,12 @@
613
619
  "required": [
614
620
  "shortName"
615
621
  ]
622
+ },
623
+ "marks": {
624
+ "type": "array",
625
+ "items": {
626
+ "$ref": "#/definitions/annotation_mark"
627
+ }
616
628
  }
617
629
  },
618
630
  "required": [
@@ -711,6 +723,12 @@
711
723
  "timestamp"
712
724
  ],
713
725
  "additionalProperties": false
726
+ },
727
+ "marks": {
728
+ "type": "array",
729
+ "items": {
730
+ "$ref": "#/definitions/annotation_mark"
731
+ }
714
732
  }
715
733
  },
716
734
  "required": [
@@ -929,6 +947,12 @@
929
947
  "color"
930
948
  ],
931
949
  "additionalProperties": false
950
+ },
951
+ "marks": {
952
+ "type": "array",
953
+ "items": {
954
+ "$ref": "#/definitions/annotation_mark"
955
+ }
932
956
  }
933
957
  },
934
958
  "required": [
@@ -14,7 +14,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
14
14
  marks?: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<unknown>[];
15
15
  selectable?: boolean;
16
16
  whitespace?: "pre" | "normal";
17
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
17
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks", "with_no_marks"], {
18
18
  root?: boolean;
19
19
  atom?: boolean;
20
20
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -32,7 +32,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
32
32
  whitespace?: "pre" | "normal";
33
33
  } & {
34
34
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
35
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "caption"], {
35
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "caption", "full"], {
36
36
  root?: boolean;
37
37
  atom?: boolean;
38
38
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -51,7 +51,23 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
51
51
  } & {
52
52
  atom: false;
53
53
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOrSpec[];
54
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_marks"], {
54
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
55
+ root?: boolean;
56
+ atom?: boolean;
57
+ attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
58
+ inline?: true;
59
+ code?: boolean;
60
+ content?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentSpec[];
61
+ defining?: boolean;
62
+ definingAsContext?: boolean;
63
+ definingForContent?: boolean;
64
+ draggable?: boolean;
65
+ group?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeGroup").ADFNodeGroup;
66
+ isolating?: boolean;
67
+ marks?: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<unknown>[];
68
+ selectable?: boolean;
69
+ whitespace?: "pre" | "normal";
70
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_marks", "with_no_marks"], {
55
71
  root?: boolean;
56
72
  atom?: boolean;
57
73
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -91,7 +107,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
91
107
  whitespace?: "pre" | "normal";
92
108
  } & {
93
109
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
94
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation"], {
110
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_no_marks"], {
95
111
  root?: boolean;
96
112
  atom?: boolean;
97
113
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -0,0 +1 @@
1
+ export declare const backgroundColor: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>;
@@ -1,4 +1,4 @@
1
- export declare const codeBlock: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
1
+ export declare const codeBlock: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks", "with_no_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -17,7 +17,7 @@ export declare const codeBlock: import("@atlaskit/adf-schema-generator/dist/type
17
17
  } & {
18
18
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
19
19
  }>;
20
- export declare const codeBlockWithMarks: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
20
+ export declare const codeBlockWithMarks: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks", "with_no_marks"], {
21
21
  root?: boolean;
22
22
  atom?: boolean;
23
23
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const expand: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_breakout_mark"], {
1
+ export declare const expand: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_breakout_mark", "with_no_mark"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const extension: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], {
1
+ export declare const extension: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const heading: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation"], {
1
+ export declare const heading: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_no_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -19,7 +19,7 @@ export declare const heading: import("@atlaskit/adf-schema-generator/dist/types/
19
19
  } & {
20
20
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
21
21
  }>;
22
- export declare const headingWithMarks: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation"], {
22
+ export declare const headingWithMarks: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_no_marks"], {
23
23
  root?: boolean;
24
24
  atom?: boolean;
25
25
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const inlineExtension: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], {
1
+ export declare const inlineExtension: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], {
1
+ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "full"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const mediaSingle: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "caption"], {
1
+ export declare const mediaSingle: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "caption", "full"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const nestedExpand: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], {
1
+ export declare const nestedExpand: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_no_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,4 @@
1
- export declare const paragraph: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_marks"], {
1
+ export declare const paragraph: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_marks", "with_no_marks"], {
2
2
  root?: boolean;
3
3
  atom?: boolean;
4
4
  attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
@@ -1,4 +1,5 @@
1
1
  import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { AnnotationMarkDefinition } from '../marks/annotation';
2
3
  /**
3
4
  * @name date_node
4
5
  */
@@ -10,5 +11,9 @@ export interface DateDefinition {
10
11
  */
11
12
  timestamp: string;
12
13
  };
14
+ /**
15
+ * @stage 0
16
+ */
17
+ marks?: Array<AnnotationMarkDefinition>;
13
18
  }
14
19
  export declare const date: NodeSpec;
@@ -1,10 +1,15 @@
1
1
  import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { AnnotationMarkDefinition } from '../marks/annotation';
2
3
  /**
3
4
  * @name emoji_node
4
5
  */
5
6
  export interface EmojiDefinition {
6
7
  type: 'emoji';
7
8
  attrs: EmojiAttributes;
9
+ /**
10
+ * @stage 0
11
+ */
12
+ marks?: Array<AnnotationMarkDefinition>;
8
13
  }
9
14
  export interface EmojiAttributes {
10
15
  id?: string;
@@ -1,4 +1,5 @@
1
1
  import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import { AnnotationMarkDefinition } from '../marks/annotation';
2
3
  export declare enum USER_TYPES {
3
4
  DEFAULT = "DEFAULT",
4
5
  SPECIAL = "SPECIAL",
@@ -18,6 +19,10 @@ export interface MentionAttributes {
18
19
  export interface MentionDefinition {
19
20
  type: 'mention';
20
21
  attrs: MentionAttributes;
22
+ /**
23
+ * @stage 0
24
+ */
25
+ marks?: Array<AnnotationMarkDefinition>;
21
26
  }
22
27
  export declare const mention: NodeSpec;
23
28
  export declare const toJSON: (node: PMNode) => {
@@ -1,4 +1,5 @@
1
1
  import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { AnnotationMarkDefinition } from '../marks/annotation';
2
3
  /**
3
4
  * @name status_node
4
5
  */
@@ -16,5 +17,9 @@ export interface StatusDefinition {
16
17
  */
17
18
  style?: string;
18
19
  };
20
+ /**
21
+ * @stage 0
22
+ */
23
+ marks?: Array<AnnotationMarkDefinition>;
19
24
  }
20
25
  export declare const status: NodeSpec;
@@ -580,6 +580,12 @@
580
580
  "id"
581
581
  ],
582
582
  "additionalProperties": false
583
+ },
584
+ "marks": {
585
+ "type": "array",
586
+ "items": {
587
+ "$ref": "#/definitions/annotation_mark"
588
+ }
583
589
  }
584
590
  },
585
591
  "required": [
@@ -613,6 +619,12 @@
613
619
  "required": [
614
620
  "shortName"
615
621
  ]
622
+ },
623
+ "marks": {
624
+ "type": "array",
625
+ "items": {
626
+ "$ref": "#/definitions/annotation_mark"
627
+ }
616
628
  }
617
629
  },
618
630
  "required": [
@@ -711,6 +723,12 @@
711
723
  "timestamp"
712
724
  ],
713
725
  "additionalProperties": false
726
+ },
727
+ "marks": {
728
+ "type": "array",
729
+ "items": {
730
+ "$ref": "#/definitions/annotation_mark"
731
+ }
714
732
  }
715
733
  },
716
734
  "required": [
@@ -929,6 +947,12 @@
929
947
  "color"
930
948
  ],
931
949
  "additionalProperties": false
950
+ },
951
+ "marks": {
952
+ "type": "array",
953
+ "items": {
954
+ "$ref": "#/definitions/annotation_mark"
955
+ }
932
956
  }
933
957
  },
934
958
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.7.0",
3
+ "version": "36.8.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,8 @@
28
28
  "build:jsontypes": "mkdir -p dist/types/json-schema && cp src/json-schema/index.ts dist/types/json-schema/index.d.ts",
29
29
  "build:all": "yarn build:cjs && yarn build:esm && yarn build:es2019 && yarn build:types",
30
30
  "build": "yarn workspace @atlaskit/editor-prosemirror build && yarn workspace @atlaskit/adf-schema-generator build && yarn run build:all && yarn run generate:json-schema && yarn run build:json-schema",
31
- "build:full": "yarn ts-node ./schema-generators/full-schema.ts",
31
+ "build:pm:full": "yarn ts-node ./schema-generators/pm-full-schema.ts",
32
+ "build:json:full": "yarn ts-node ./schema-generators/json-full-schema.ts",
32
33
  "clean": "../../scripts/build-clean.sh",
33
34
  "link:afe": "yarn build:all && node ./copy-dist-to-afe.js"
34
35
  },
@@ -42,8 +43,8 @@
42
43
  "memoize-one": "^6.0.0"
43
44
  },
44
45
  "devDependencies": {
45
- "@atlassian/adf-schema-json": "^1.14.0",
46
- "@atlaskit/adf-schema-generator": "^1.6.0",
46
+ "@atlassian/adf-schema-json": "^1.15.0",
47
+ "@atlaskit/adf-schema-generator": "^1.7.0",
47
48
  "@babel/cli": "^7.22.9",
48
49
  "@babel/core": "^7.22.9",
49
50
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -0,0 +1,21 @@
1
+ # Jqueries
2
+
3
+ Temp file to hold jqueries for whittling down the json spec
4
+
5
+ Delete all subfields:
6
+
7
+ ```sh
8
+ cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .type, .items, .minItems) else . end)'
9
+ ```
10
+
11
+ Delete all subfields and content objects:
12
+
13
+ ```sh
14
+ cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .type, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content) else . end)'
15
+ ```
16
+
17
+ Delete all subfields except for type. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
18
+
19
+ ```sh
20
+ cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
21
+ ```
@@ -0,0 +1,204 @@
1
+ import { adfToJSON } from '@atlaskit/adf-schema-generator';
2
+ import adfNode from '@atlaskit/adf-schema/src/next-schema/full-schema.adf';
3
+
4
+ test('It should match the existing schema', () => {
5
+ const result = adfToJSON(adfNode);
6
+
7
+ // TODO Compare this to the real ADF Schema as it becomes ready
8
+ expect(result).toEqual(jsonWithTypes);
9
+ });
10
+
11
+ const jsonWithTypes = {
12
+ $schema: 'http://json-schema.org/draft-04/schema#',
13
+ description: 'Schema for Atlassian Document Format.',
14
+ $ref: '#/definitions/doc_node',
15
+ definitions: {
16
+ text_node: {
17
+ type: 'object',
18
+ },
19
+ breakout_mark: {
20
+ type: 'object',
21
+ },
22
+ codeBlock_node: {
23
+ type: 'object',
24
+ },
25
+ codeBlock_with_no_marks_node: {},
26
+ codeBlock_with_marks_node: {},
27
+ em_mark: {
28
+ type: 'object',
29
+ },
30
+ code_mark: {
31
+ type: 'object',
32
+ },
33
+ strike_mark: {
34
+ type: 'object',
35
+ },
36
+ strong_mark: {
37
+ type: 'object',
38
+ },
39
+ underline_mark: {
40
+ type: 'object',
41
+ },
42
+ link_mark: {
43
+ type: 'object',
44
+ },
45
+ subsup_mark: {
46
+ type: 'object',
47
+ },
48
+ textColor_mark: {
49
+ type: 'object',
50
+ },
51
+ alignment_mark: {
52
+ type: 'object',
53
+ },
54
+ indentation_mark: {
55
+ type: 'object',
56
+ },
57
+ annotation_mark: {
58
+ type: 'object',
59
+ },
60
+ dataConsumer_mark: {
61
+ type: 'object',
62
+ },
63
+ fragment_mark: {
64
+ type: 'object',
65
+ },
66
+ border_mark: {
67
+ type: 'object',
68
+ },
69
+ backgroundColor_mark: {
70
+ type: 'object',
71
+ },
72
+ hardBreak_node: {
73
+ type: 'object',
74
+ },
75
+ mention_node: {
76
+ type: 'object',
77
+ },
78
+ emoji_node: {
79
+ type: 'object',
80
+ },
81
+ inlineExtension_node: {
82
+ type: 'object',
83
+ },
84
+ inlineExtension_with_marks_node: {},
85
+ date_node: {
86
+ type: 'object',
87
+ },
88
+ placeholder_node: {
89
+ type: 'object',
90
+ },
91
+ blockCard_node: {
92
+ type: 'object',
93
+ },
94
+ inlineCard_node: {
95
+ type: 'object',
96
+ },
97
+ status_node: {
98
+ type: 'object',
99
+ },
100
+ media_node: {
101
+ type: 'object',
102
+ },
103
+ mediaInline_node: {
104
+ type: 'object',
105
+ },
106
+ formatted_text_inline_node: {},
107
+ code_inline_node: {},
108
+ paragraph_node: {
109
+ type: 'object',
110
+ },
111
+ paragraph_with_no_marks_node: {},
112
+ paragraph_with_alignment_node: {},
113
+ paragraph_with_indentation_node: {},
114
+ caption_node: {
115
+ type: 'object',
116
+ },
117
+ mediaSingle_node: {
118
+ type: 'object',
119
+ },
120
+ mediaSingle_caption_node: {},
121
+ mediaSingle_full_node: {},
122
+ taskItem_node: {
123
+ type: 'object',
124
+ },
125
+ taskList_node: {
126
+ type: 'object',
127
+ },
128
+ listItem_node: {
129
+ type: 'object',
130
+ },
131
+ bulletList_node: {
132
+ type: 'object',
133
+ },
134
+ orderedList_node: {
135
+ type: 'object',
136
+ },
137
+ heading_node: {
138
+ type: 'object',
139
+ },
140
+ heading_with_no_marks_node: {},
141
+ heading_with_alignment_node: {},
142
+ heading_with_indentation_node: {},
143
+ mediaGroup_node: {
144
+ type: 'object',
145
+ },
146
+ decisionItem_node: {
147
+ type: 'object',
148
+ },
149
+ decisionList_node: {
150
+ type: 'object',
151
+ },
152
+ rule_node: {
153
+ type: 'object',
154
+ },
155
+ panel_node: {
156
+ type: 'object',
157
+ },
158
+ blockquote_node: {
159
+ type: 'object',
160
+ },
161
+ extension_node: {
162
+ type: 'object',
163
+ },
164
+ extension_with_marks_node: {},
165
+ embedCard_node: {
166
+ type: 'object',
167
+ },
168
+ nestedExpand_node: {
169
+ type: 'object',
170
+ },
171
+ nestedExpand_with_no_marks_node: {},
172
+ table_node: {
173
+ type: 'object',
174
+ },
175
+ table_row_node: {
176
+ type: 'object',
177
+ },
178
+ table_cell_node: {
179
+ type: 'object',
180
+ },
181
+ table_header_node: {
182
+ type: 'object',
183
+ },
184
+ expand_node: {
185
+ type: 'object',
186
+ },
187
+ expand_with_no_mark_node: {},
188
+ expand_with_breakout_mark_node: {},
189
+ bodiedExtension_node: {
190
+ type: 'object',
191
+ },
192
+ bodiedExtension_with_marks_node: {},
193
+ layoutColumn_node: {
194
+ type: 'object',
195
+ },
196
+ layoutSection_node: {
197
+ type: 'object',
198
+ },
199
+ layoutSection_full_node: {},
200
+ doc_node: {
201
+ type: 'object',
202
+ },
203
+ },
204
+ };
@@ -0,0 +1,11 @@
1
+ import { adfToJSON } from '@atlaskit/adf-schema-generator';
2
+ import adfNode from 'src/next-schema/full-schema.adf';
3
+
4
+ function main() {
5
+ const output = adfToJSON(adfNode);
6
+
7
+ // TODO - remove console log
8
+ console.log(JSON.stringify(output, null, 2));
9
+ }
10
+
11
+ main();