@atlaskit/adf-schema 36.8.0 → 36.8.2

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 (65) 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 +1 -1
  16. package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
  17. package/dist/cjs/next-schema/nodes/text.js +2 -1
  18. package/dist/es2019/next-schema/full-schema.adf.js +1 -1
  19. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  20. package/dist/es2019/next-schema/groups/inlineGroup.js +1 -1
  21. package/dist/es2019/next-schema/marks/backgroundColor.js +2 -0
  22. package/dist/es2019/next-schema/nodes/codeBlock.js +1 -1
  23. package/dist/es2019/next-schema/nodes/expand.js +1 -1
  24. package/dist/es2019/next-schema/nodes/extension.js +1 -1
  25. package/dist/es2019/next-schema/nodes/heading.js +1 -1
  26. package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -1
  27. package/dist/es2019/next-schema/nodes/layoutSection.js +1 -1
  28. package/dist/es2019/next-schema/nodes/mediaSingle.js +1 -1
  29. package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
  30. package/dist/es2019/next-schema/nodes/paragraph.js +1 -1
  31. package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
  32. package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
  33. package/dist/es2019/next-schema/nodes/text.js +2 -1
  34. package/dist/esm/next-schema/full-schema.adf.js +1 -1
  35. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  36. package/dist/esm/next-schema/groups/inlineGroup.js +1 -1
  37. package/dist/esm/next-schema/marks/backgroundColor.js +2 -0
  38. package/dist/esm/next-schema/nodes/codeBlock.js +1 -1
  39. package/dist/esm/next-schema/nodes/expand.js +1 -1
  40. package/dist/esm/next-schema/nodes/extension.js +1 -1
  41. package/dist/esm/next-schema/nodes/heading.js +1 -1
  42. package/dist/esm/next-schema/nodes/inlineExtension.js +1 -1
  43. package/dist/esm/next-schema/nodes/layoutSection.js +1 -1
  44. package/dist/esm/next-schema/nodes/mediaSingle.js +1 -1
  45. package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
  46. package/dist/esm/next-schema/nodes/paragraph.js +1 -1
  47. package/dist/esm/next-schema/nodes/tableCell.js +1 -1
  48. package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
  49. package/dist/esm/next-schema/nodes/text.js +2 -1
  50. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +20 -4
  51. package/dist/types/next-schema/marks/backgroundColor.d.ts +1 -0
  52. package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -2
  53. package/dist/types/next-schema/nodes/expand.d.ts +1 -1
  54. package/dist/types/next-schema/nodes/extension.d.ts +1 -1
  55. package/dist/types/next-schema/nodes/heading.d.ts +2 -2
  56. package/dist/types/next-schema/nodes/inlineExtension.d.ts +1 -1
  57. package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -1
  58. package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -1
  59. package/dist/types/next-schema/nodes/nestedExpand.d.ts +1 -1
  60. package/dist/types/next-schema/nodes/paragraph.d.ts +1 -1
  61. package/package.json +4 -3
  62. package/schema-generators/__tests__/unit/jqueries.md +27 -0
  63. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +484 -0
  64. package/schema-generators/json-full-schema.ts +11 -0
  65. /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.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f80bbc4: Process type for json schema generator from ADF DSL
8
+
9
+ ## 36.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 1b3718c: Add basic JSON Schema Transformer from ADF DSL
14
+
3
15
  ## 36.8.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', {});
@@ -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
  });
@@ -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
  });
@@ -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', {});
@@ -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
  });
@@ -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
  });
@@ -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', {});
@@ -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
  });
@@ -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
  });
@@ -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
  });
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.8.0",
3
+ "version": "36.8.2",
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
  },
@@ -43,7 +44,7 @@
43
44
  },
44
45
  "devDependencies": {
45
46
  "@atlassian/adf-schema-json": "^1.15.0",
46
- "@atlaskit/adf-schema-generator": "^1.6.0",
47
+ "@atlaskit/adf-schema-generator": "^1.7.1",
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,27 @@
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
+ ```
22
+
23
+ Delete all subfields except for type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
24
+
25
+ ```sh
26
+ cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .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)'
27
+ ```
@@ -0,0 +1,484 @@
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
+ properties: {
19
+ type: {
20
+ enum: ['text'],
21
+ },
22
+ },
23
+ },
24
+ breakout_mark: {
25
+ type: 'object',
26
+ properties: {
27
+ type: {
28
+ enum: ['breakout'],
29
+ },
30
+ },
31
+ },
32
+ codeBlock_node: {
33
+ type: 'object',
34
+ properties: {
35
+ type: {
36
+ enum: ['codeBlock'],
37
+ },
38
+ },
39
+ },
40
+ codeBlock_with_no_marks_node: {},
41
+ codeBlock_with_marks_node: {},
42
+ em_mark: {
43
+ type: 'object',
44
+ properties: {
45
+ type: {
46
+ enum: ['em'],
47
+ },
48
+ },
49
+ },
50
+ code_mark: {
51
+ type: 'object',
52
+ properties: {
53
+ type: {
54
+ enum: ['code'],
55
+ },
56
+ },
57
+ },
58
+ strike_mark: {
59
+ type: 'object',
60
+ properties: {
61
+ type: {
62
+ enum: ['strike'],
63
+ },
64
+ },
65
+ },
66
+ strong_mark: {
67
+ type: 'object',
68
+ properties: {
69
+ type: {
70
+ enum: ['strong'],
71
+ },
72
+ },
73
+ },
74
+ underline_mark: {
75
+ type: 'object',
76
+ properties: {
77
+ type: {
78
+ enum: ['underline'],
79
+ },
80
+ },
81
+ },
82
+ link_mark: {
83
+ type: 'object',
84
+ properties: {
85
+ type: {
86
+ enum: ['link'],
87
+ },
88
+ },
89
+ },
90
+ subsup_mark: {
91
+ type: 'object',
92
+ properties: {
93
+ type: {
94
+ enum: ['subsup'],
95
+ },
96
+ },
97
+ },
98
+ textColor_mark: {
99
+ type: 'object',
100
+ properties: {
101
+ type: {
102
+ enum: ['textColor'],
103
+ },
104
+ },
105
+ },
106
+ alignment_mark: {
107
+ type: 'object',
108
+ properties: {
109
+ type: {
110
+ enum: ['alignment'],
111
+ },
112
+ },
113
+ },
114
+ indentation_mark: {
115
+ type: 'object',
116
+ properties: {
117
+ type: {
118
+ enum: ['indentation'],
119
+ },
120
+ },
121
+ },
122
+ annotation_mark: {
123
+ type: 'object',
124
+ properties: {
125
+ type: {
126
+ enum: ['annotation'],
127
+ },
128
+ },
129
+ },
130
+ dataConsumer_mark: {
131
+ type: 'object',
132
+ properties: {
133
+ type: {
134
+ enum: ['dataConsumer'],
135
+ },
136
+ },
137
+ },
138
+ fragment_mark: {
139
+ type: 'object',
140
+ properties: {
141
+ type: {
142
+ enum: ['fragment'],
143
+ },
144
+ },
145
+ },
146
+ border_mark: {
147
+ type: 'object',
148
+ properties: {
149
+ type: {
150
+ enum: ['border'],
151
+ },
152
+ },
153
+ },
154
+ backgroundColor_mark: {
155
+ type: 'object',
156
+ properties: {
157
+ type: {
158
+ enum: ['backgroundColor'],
159
+ },
160
+ },
161
+ },
162
+ hardBreak_node: {
163
+ type: 'object',
164
+ properties: {
165
+ type: {
166
+ enum: ['hardBreak'],
167
+ },
168
+ },
169
+ },
170
+ mention_node: {
171
+ type: 'object',
172
+ properties: {
173
+ type: {
174
+ enum: ['mention'],
175
+ },
176
+ },
177
+ },
178
+ emoji_node: {
179
+ type: 'object',
180
+ properties: {
181
+ type: {
182
+ enum: ['emoji'],
183
+ },
184
+ },
185
+ },
186
+ inlineExtension_node: {
187
+ type: 'object',
188
+ properties: {
189
+ type: {
190
+ enum: ['inlineExtension'],
191
+ },
192
+ },
193
+ },
194
+ inlineExtension_with_marks_node: {},
195
+ date_node: {
196
+ type: 'object',
197
+ properties: {
198
+ type: {
199
+ enum: ['date'],
200
+ },
201
+ },
202
+ },
203
+ placeholder_node: {
204
+ type: 'object',
205
+ properties: {
206
+ type: {
207
+ enum: ['placeholder'],
208
+ },
209
+ },
210
+ },
211
+ blockCard_node: {
212
+ type: 'object',
213
+ properties: {
214
+ type: {
215
+ enum: ['blockCard'],
216
+ },
217
+ },
218
+ },
219
+ inlineCard_node: {
220
+ type: 'object',
221
+ properties: {
222
+ type: {
223
+ enum: ['inlineCard'],
224
+ },
225
+ },
226
+ },
227
+ status_node: {
228
+ type: 'object',
229
+ properties: {
230
+ type: {
231
+ enum: ['status'],
232
+ },
233
+ },
234
+ },
235
+ media_node: {
236
+ type: 'object',
237
+ properties: {
238
+ type: {
239
+ enum: ['media'],
240
+ },
241
+ },
242
+ },
243
+ mediaInline_node: {
244
+ type: 'object',
245
+ properties: {
246
+ type: {
247
+ enum: ['mediaInline'],
248
+ },
249
+ },
250
+ },
251
+ formatted_text_inline_node: {},
252
+ code_inline_node: {},
253
+ paragraph_node: {
254
+ type: 'object',
255
+ properties: {
256
+ type: {
257
+ enum: ['paragraph'],
258
+ },
259
+ },
260
+ },
261
+ paragraph_with_no_marks_node: {},
262
+ paragraph_with_alignment_node: {},
263
+ paragraph_with_indentation_node: {},
264
+ caption_node: {
265
+ type: 'object',
266
+ properties: {
267
+ type: {
268
+ enum: ['caption'],
269
+ },
270
+ },
271
+ },
272
+ mediaSingle_node: {
273
+ type: 'object',
274
+ properties: {
275
+ type: {
276
+ enum: ['mediaSingle'],
277
+ },
278
+ },
279
+ },
280
+ mediaSingle_caption_node: {},
281
+ mediaSingle_full_node: {},
282
+ taskItem_node: {
283
+ type: 'object',
284
+ properties: {
285
+ type: {
286
+ enum: ['taskItem'],
287
+ },
288
+ },
289
+ },
290
+ taskList_node: {
291
+ type: 'object',
292
+ properties: {
293
+ type: {
294
+ enum: ['taskList'],
295
+ },
296
+ },
297
+ },
298
+ listItem_node: {
299
+ type: 'object',
300
+ properties: {
301
+ type: {
302
+ enum: ['listItem'],
303
+ },
304
+ },
305
+ },
306
+ bulletList_node: {
307
+ type: 'object',
308
+ properties: {
309
+ type: {
310
+ enum: ['bulletList'],
311
+ },
312
+ },
313
+ },
314
+ orderedList_node: {
315
+ type: 'object',
316
+ properties: {
317
+ type: {
318
+ enum: ['orderedList'],
319
+ },
320
+ },
321
+ },
322
+ heading_node: {
323
+ type: 'object',
324
+ properties: {
325
+ type: {
326
+ enum: ['heading'],
327
+ },
328
+ },
329
+ },
330
+ heading_with_no_marks_node: {},
331
+ heading_with_alignment_node: {},
332
+ heading_with_indentation_node: {},
333
+ mediaGroup_node: {
334
+ type: 'object',
335
+ properties: {
336
+ type: {
337
+ enum: ['mediaGroup'],
338
+ },
339
+ },
340
+ },
341
+ decisionItem_node: {
342
+ type: 'object',
343
+ properties: {
344
+ type: {
345
+ enum: ['decisionItem'],
346
+ },
347
+ },
348
+ },
349
+ decisionList_node: {
350
+ type: 'object',
351
+ properties: {
352
+ type: {
353
+ enum: ['decisionList'],
354
+ },
355
+ },
356
+ },
357
+ rule_node: {
358
+ type: 'object',
359
+ properties: {
360
+ type: {
361
+ enum: ['rule'],
362
+ },
363
+ },
364
+ },
365
+ panel_node: {
366
+ type: 'object',
367
+ properties: {
368
+ type: {
369
+ enum: ['panel'],
370
+ },
371
+ },
372
+ },
373
+ blockquote_node: {
374
+ type: 'object',
375
+ properties: {
376
+ type: {
377
+ enum: ['blockquote'],
378
+ },
379
+ },
380
+ },
381
+ extension_node: {
382
+ type: 'object',
383
+ properties: {
384
+ type: {
385
+ enum: ['extension'],
386
+ },
387
+ },
388
+ },
389
+ extension_with_marks_node: {},
390
+ embedCard_node: {
391
+ type: 'object',
392
+ properties: {
393
+ type: {
394
+ enum: ['embedCard'],
395
+ },
396
+ },
397
+ },
398
+ nestedExpand_node: {
399
+ type: 'object',
400
+ properties: {
401
+ type: {
402
+ enum: ['nestedExpand'],
403
+ },
404
+ },
405
+ },
406
+ nestedExpand_with_no_marks_node: {},
407
+ table_node: {
408
+ type: 'object',
409
+ properties: {
410
+ type: {
411
+ enum: ['table'],
412
+ },
413
+ },
414
+ },
415
+ table_row_node: {
416
+ type: 'object',
417
+ properties: {
418
+ type: {
419
+ enum: ['tableRow'],
420
+ },
421
+ },
422
+ },
423
+ table_cell_node: {
424
+ type: 'object',
425
+ properties: {
426
+ type: {
427
+ enum: ['tableCell'],
428
+ },
429
+ },
430
+ },
431
+ table_header_node: {
432
+ type: 'object',
433
+ properties: {
434
+ type: {
435
+ enum: ['tableHeader'],
436
+ },
437
+ },
438
+ },
439
+ expand_node: {
440
+ type: 'object',
441
+ properties: {
442
+ type: {
443
+ enum: ['expand'],
444
+ },
445
+ },
446
+ },
447
+ expand_with_no_mark_node: {},
448
+ expand_with_breakout_mark_node: {},
449
+ bodiedExtension_node: {
450
+ type: 'object',
451
+ properties: {
452
+ type: {
453
+ enum: ['bodiedExtension'],
454
+ },
455
+ },
456
+ },
457
+ bodiedExtension_with_marks_node: {},
458
+ layoutColumn_node: {
459
+ type: 'object',
460
+ properties: {
461
+ type: {
462
+ enum: ['layoutColumn'],
463
+ },
464
+ },
465
+ },
466
+ layoutSection_node: {
467
+ type: 'object',
468
+ properties: {
469
+ type: {
470
+ enum: ['layoutSection'],
471
+ },
472
+ },
473
+ },
474
+ layoutSection_full_node: {},
475
+ doc_node: {
476
+ type: 'object',
477
+ properties: {
478
+ type: {
479
+ enum: ['doc'],
480
+ },
481
+ },
482
+ },
483
+ },
484
+ };
@@ -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();