@atlaskit/adf-schema 36.12.3 → 36.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +2 -1
  3. package/dist/cjs/next-schema/groups/blockGroup.js +3 -1
  4. package/dist/cjs/next-schema/groups/inlineGroup.js +3 -1
  5. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +2 -1
  6. package/dist/cjs/next-schema/marks/unsupportedMark.js +16 -0
  7. package/dist/cjs/next-schema/marks/unsupportedNodeAttribute.js +20 -0
  8. package/dist/cjs/next-schema/nodes/blockCard.js +3 -0
  9. package/dist/cjs/next-schema/nodes/blockquote.js +6 -2
  10. package/dist/cjs/next-schema/nodes/bodiedExtension.js +4 -1
  11. package/dist/cjs/next-schema/nodes/caption.js +5 -2
  12. package/dist/cjs/next-schema/nodes/codeBlock.js +6 -2
  13. package/dist/cjs/next-schema/nodes/confluenceUnsupportedBlock.js +16 -0
  14. package/dist/cjs/next-schema/nodes/confluenceUnsupportedInline.js +18 -0
  15. package/dist/cjs/next-schema/nodes/date.js +3 -0
  16. package/dist/cjs/next-schema/nodes/decisionItem.js +5 -1
  17. package/dist/cjs/next-schema/nodes/decisionList.js +5 -1
  18. package/dist/cjs/next-schema/nodes/embedCard.js +3 -0
  19. package/dist/cjs/next-schema/nodes/emoji.js +3 -0
  20. package/dist/cjs/next-schema/nodes/expand.js +4 -1
  21. package/dist/cjs/next-schema/nodes/extension.js +4 -1
  22. package/dist/cjs/next-schema/nodes/extensionFrame.js +3 -1
  23. package/dist/cjs/next-schema/nodes/hardBreak.js +3 -0
  24. package/dist/cjs/next-schema/nodes/heading.js +9 -6
  25. package/dist/cjs/next-schema/nodes/inlineCard.js +4 -1
  26. package/dist/cjs/next-schema/nodes/inlineExtension.js +3 -0
  27. package/dist/cjs/next-schema/nodes/layoutColumn.js +3 -0
  28. package/dist/cjs/next-schema/nodes/layoutSection.js +5 -2
  29. package/dist/cjs/next-schema/nodes/list.js +7 -1
  30. package/dist/cjs/next-schema/nodes/media.js +3 -1
  31. package/dist/cjs/next-schema/nodes/mediaGroup.js +5 -1
  32. package/dist/cjs/next-schema/nodes/mediaInline.js +3 -1
  33. package/dist/cjs/next-schema/nodes/mediaSingle.js +5 -2
  34. package/dist/cjs/next-schema/nodes/mention.js +3 -0
  35. package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +3 -0
  36. package/dist/cjs/next-schema/nodes/nestedExpand.js +5 -1
  37. package/dist/cjs/next-schema/nodes/panel.js +5 -1
  38. package/dist/cjs/next-schema/nodes/paragraph.js +8 -4
  39. package/dist/cjs/next-schema/nodes/placeholder.js +3 -0
  40. package/dist/cjs/next-schema/nodes/status.js +3 -0
  41. package/dist/cjs/next-schema/nodes/table.js +3 -1
  42. package/dist/cjs/next-schema/nodes/tableCell.js +5 -1
  43. package/dist/cjs/next-schema/nodes/tableHeader.js +3 -0
  44. package/dist/cjs/next-schema/nodes/tableRow.js +3 -0
  45. package/dist/cjs/next-schema/nodes/task.js +8 -2
  46. package/dist/cjs/next-schema/nodes/text.js +4 -2
  47. package/dist/cjs/next-schema/nodes/unsupportedBlock.js +18 -0
  48. package/dist/cjs/next-schema/nodes/unsupportedInline.js +18 -0
  49. package/dist/es2019/next-schema/full-schema.adf.js +2 -1
  50. package/dist/es2019/next-schema/groups/blockGroup.js +3 -1
  51. package/dist/es2019/next-schema/groups/inlineGroup.js +3 -1
  52. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +2 -1
  53. package/dist/es2019/next-schema/marks/unsupportedMark.js +10 -0
  54. package/dist/es2019/next-schema/marks/unsupportedNodeAttribute.js +14 -0
  55. package/dist/es2019/next-schema/nodes/blockCard.js +3 -0
  56. package/dist/es2019/next-schema/nodes/blockquote.js +6 -2
  57. package/dist/es2019/next-schema/nodes/bodiedExtension.js +4 -1
  58. package/dist/es2019/next-schema/nodes/caption.js +5 -3
  59. package/dist/es2019/next-schema/nodes/codeBlock.js +6 -2
  60. package/dist/es2019/next-schema/nodes/confluenceUnsupportedBlock.js +10 -0
  61. package/dist/es2019/next-schema/nodes/confluenceUnsupportedInline.js +12 -0
  62. package/dist/es2019/next-schema/nodes/date.js +3 -0
  63. package/dist/es2019/next-schema/nodes/decisionItem.js +5 -1
  64. package/dist/es2019/next-schema/nodes/decisionList.js +5 -1
  65. package/dist/es2019/next-schema/nodes/embedCard.js +3 -0
  66. package/dist/es2019/next-schema/nodes/emoji.js +3 -0
  67. package/dist/es2019/next-schema/nodes/expand.js +4 -1
  68. package/dist/es2019/next-schema/nodes/extension.js +4 -1
  69. package/dist/es2019/next-schema/nodes/extensionFrame.js +3 -1
  70. package/dist/es2019/next-schema/nodes/hardBreak.js +3 -0
  71. package/dist/es2019/next-schema/nodes/heading.js +8 -5
  72. package/dist/es2019/next-schema/nodes/inlineCard.js +4 -1
  73. package/dist/es2019/next-schema/nodes/inlineExtension.js +3 -0
  74. package/dist/es2019/next-schema/nodes/layoutColumn.js +3 -0
  75. package/dist/es2019/next-schema/nodes/layoutSection.js +5 -2
  76. package/dist/es2019/next-schema/nodes/list.js +7 -1
  77. package/dist/es2019/next-schema/nodes/media.js +3 -1
  78. package/dist/es2019/next-schema/nodes/mediaGroup.js +5 -1
  79. package/dist/es2019/next-schema/nodes/mediaInline.js +3 -1
  80. package/dist/es2019/next-schema/nodes/mediaSingle.js +5 -2
  81. package/dist/es2019/next-schema/nodes/mention.js +3 -0
  82. package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +3 -0
  83. package/dist/es2019/next-schema/nodes/nestedExpand.js +5 -1
  84. package/dist/es2019/next-schema/nodes/panel.js +5 -1
  85. package/dist/es2019/next-schema/nodes/paragraph.js +8 -4
  86. package/dist/es2019/next-schema/nodes/placeholder.js +3 -0
  87. package/dist/es2019/next-schema/nodes/status.js +3 -0
  88. package/dist/es2019/next-schema/nodes/table.js +3 -1
  89. package/dist/es2019/next-schema/nodes/tableCell.js +5 -1
  90. package/dist/es2019/next-schema/nodes/tableHeader.js +3 -0
  91. package/dist/es2019/next-schema/nodes/tableRow.js +4 -1
  92. package/dist/es2019/next-schema/nodes/task.js +8 -2
  93. package/dist/es2019/next-schema/nodes/text.js +4 -2
  94. package/dist/es2019/next-schema/nodes/unsupportedBlock.js +12 -0
  95. package/dist/es2019/next-schema/nodes/unsupportedInline.js +12 -0
  96. package/dist/esm/next-schema/full-schema.adf.js +2 -1
  97. package/dist/esm/next-schema/groups/blockGroup.js +3 -1
  98. package/dist/esm/next-schema/groups/inlineGroup.js +3 -1
  99. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +2 -1
  100. package/dist/esm/next-schema/marks/unsupportedMark.js +10 -0
  101. package/dist/esm/next-schema/marks/unsupportedNodeAttribute.js +14 -0
  102. package/dist/esm/next-schema/nodes/blockCard.js +3 -0
  103. package/dist/esm/next-schema/nodes/blockquote.js +6 -2
  104. package/dist/esm/next-schema/nodes/bodiedExtension.js +4 -1
  105. package/dist/esm/next-schema/nodes/caption.js +5 -3
  106. package/dist/esm/next-schema/nodes/codeBlock.js +6 -2
  107. package/dist/esm/next-schema/nodes/confluenceUnsupportedBlock.js +10 -0
  108. package/dist/esm/next-schema/nodes/confluenceUnsupportedInline.js +12 -0
  109. package/dist/esm/next-schema/nodes/date.js +3 -0
  110. package/dist/esm/next-schema/nodes/decisionItem.js +5 -1
  111. package/dist/esm/next-schema/nodes/decisionList.js +5 -1
  112. package/dist/esm/next-schema/nodes/embedCard.js +3 -0
  113. package/dist/esm/next-schema/nodes/emoji.js +3 -0
  114. package/dist/esm/next-schema/nodes/expand.js +4 -1
  115. package/dist/esm/next-schema/nodes/extension.js +4 -1
  116. package/dist/esm/next-schema/nodes/extensionFrame.js +3 -1
  117. package/dist/esm/next-schema/nodes/hardBreak.js +3 -0
  118. package/dist/esm/next-schema/nodes/heading.js +8 -5
  119. package/dist/esm/next-schema/nodes/inlineCard.js +4 -1
  120. package/dist/esm/next-schema/nodes/inlineExtension.js +3 -0
  121. package/dist/esm/next-schema/nodes/layoutColumn.js +3 -0
  122. package/dist/esm/next-schema/nodes/layoutSection.js +5 -2
  123. package/dist/esm/next-schema/nodes/list.js +7 -1
  124. package/dist/esm/next-schema/nodes/media.js +3 -1
  125. package/dist/esm/next-schema/nodes/mediaGroup.js +5 -1
  126. package/dist/esm/next-schema/nodes/mediaInline.js +3 -1
  127. package/dist/esm/next-schema/nodes/mediaSingle.js +5 -2
  128. package/dist/esm/next-schema/nodes/mention.js +3 -0
  129. package/dist/esm/next-schema/nodes/multiBodiedExtension.js +3 -0
  130. package/dist/esm/next-schema/nodes/nestedExpand.js +5 -1
  131. package/dist/esm/next-schema/nodes/panel.js +5 -1
  132. package/dist/esm/next-schema/nodes/paragraph.js +8 -4
  133. package/dist/esm/next-schema/nodes/placeholder.js +3 -0
  134. package/dist/esm/next-schema/nodes/status.js +3 -0
  135. package/dist/esm/next-schema/nodes/table.js +3 -1
  136. package/dist/esm/next-schema/nodes/tableCell.js +5 -1
  137. package/dist/esm/next-schema/nodes/tableHeader.js +3 -0
  138. package/dist/esm/next-schema/nodes/tableRow.js +4 -1
  139. package/dist/esm/next-schema/nodes/task.js +8 -2
  140. package/dist/esm/next-schema/nodes/text.js +4 -2
  141. package/dist/esm/next-schema/nodes/unsupportedBlock.js +12 -0
  142. package/dist/esm/next-schema/nodes/unsupportedInline.js +12 -0
  143. package/dist/types/next-schema/marks/unsupportedMark.d.ts +1 -0
  144. package/dist/types/next-schema/marks/unsupportedNodeAttribute.d.ts +1 -0
  145. package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +19 -0
  146. package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +19 -0
  147. package/dist/types/next-schema/nodes/heading.d.ts +0 -23
  148. package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +19 -0
  149. package/dist/types/next-schema/nodes/unsupportedInline.d.ts +19 -0
  150. package/package.json +2 -2
@@ -1,7 +1,10 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export const hardBreak = adfNode('hardBreak').define({
3
5
  inline: true,
4
6
  selectable: false,
7
+ marks: [unsupportedNodeAttribute, unsupportedMark],
5
8
  attrs: {
6
9
  // Carried over from original JSON Schema as is
7
10
  text: {
@@ -1,9 +1,13 @@
1
1
  import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { inlineGroup } from '../groups/inlineGroup';
3
3
  import { alignment, indentation } from '../marks/alignmentAndIndentation';
4
+ import { unsupportedMark } from '../marks/unsupportedMark';
5
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
+ import { unsupportedInline } from './unsupportedInline';
4
7
  export const heading = adfNode('heading').define({
5
8
  defining: true,
6
9
  selectable: false,
10
+ marks: [unsupportedNodeAttribute, unsupportedMark],
7
11
  attrs: {
8
12
  level: {
9
13
  type: 'number',
@@ -12,10 +16,9 @@ export const heading = adfNode('heading').define({
12
16
  maximum: 6
13
17
  }
14
18
  },
15
- content: [$zeroPlus($or(inlineGroup))]
19
+ content: [$zeroPlus($or(inlineGroup, unsupportedInline))]
16
20
  }).variant('with_alignment', {
17
- marks: [alignment]
21
+ marks: [alignment, unsupportedNodeAttribute, unsupportedMark]
18
22
  }).variant('with_indentation', {
19
- marks: [indentation]
20
- }).variant('with_no_marks', {});
21
- export const headingWithMarks = heading;
23
+ marks: [indentation, unsupportedNodeAttribute, unsupportedMark]
24
+ }).variant('with_no_marks', {});
@@ -1,9 +1,12 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { annotation } from '../marks/annotation';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  export const inlineCard = adfNode('inlineCard').define({
4
6
  inline: true,
5
7
  selectable: true,
6
8
  draggable: true,
9
+ marks: [unsupportedNodeAttribute, unsupportedMark],
7
10
  attrs: {
8
11
  anyOf: [{
9
12
  url: {
@@ -17,5 +20,5 @@ export const inlineCard = adfNode('inlineCard').define({
17
20
  }]
18
21
  }
19
22
  }).variant('with_annotation', {
20
- marks: [annotation]
23
+ marks: [annotation, unsupportedNodeAttribute, unsupportedMark]
21
24
  });
@@ -1,7 +1,10 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export const inlineExtension = adfNode('inlineExtension').define({
3
5
  inline: true,
4
6
  selectable: true,
7
+ marks: [unsupportedNodeAttribute, unsupportedMark],
5
8
  attrs: {
6
9
  extensionKey: {
7
10
  minLength: 1,
@@ -1,8 +1,11 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { blockGroup } from '../groups/blockGroup';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  export const layoutColumn = adfNode('layoutColumn').define({
4
6
  isolating: true,
5
7
  selectable: false,
8
+ marks: [unsupportedNodeAttribute, unsupportedMark],
6
9
  attrs: {
7
10
  width: {
8
11
  type: 'number',
@@ -1,8 +1,11 @@
1
1
  import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { breakout } from '../marks/breakout';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  import { layoutColumn } from './layoutColumn';
6
+ import { unsupportedBlock } from './unsupportedBlock';
4
7
  export const layoutSection = adfNode('layoutSection').define({
5
8
  isolating: true,
6
- content: [$range(1, 3, $or(layoutColumn))],
7
- marks: [breakout]
9
+ marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
10
+ content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))]
8
11
  }).variant('full', {});
@@ -1,13 +1,17 @@
1
1
  import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { codeBlock } from './codeBlock';
3
5
  import { mediaSingle } from './mediaSingle';
4
6
  import { paragraph } from './paragraph';
5
7
  import { taskList } from './task';
8
+ import { unsupportedBlock } from './unsupportedBlock';
6
9
  export const orderedList = adfNode('orderedList');
7
10
  export const bulletList = adfNode('bulletList');
8
11
  const listItem = adfNode('listItem');
9
12
  orderedList.define({
10
13
  selectable: false,
14
+ marks: [unsupportedNodeAttribute, unsupportedMark],
11
15
  attrs: {
12
16
  order: {
13
17
  type: 'number',
@@ -20,10 +24,12 @@ orderedList.define({
20
24
  });
21
25
  bulletList.define({
22
26
  selectable: false,
27
+ marks: [unsupportedNodeAttribute, unsupportedMark],
23
28
  content: [$onePlus($or(listItem))]
24
29
  });
25
30
  listItem.define({
26
31
  defining: true,
27
32
  selectable: false,
28
- content: [$or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full')), $zeroPlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList))]
33
+ marks: [unsupportedNodeAttribute, unsupportedMark],
34
+ content: [$or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), unsupportedBlock), $zeroPlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, unsupportedBlock))]
29
35
  });
@@ -2,9 +2,11 @@ import { adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { annotation } from '../marks/annotation';
3
3
  import { border } from '../marks/border';
4
4
  import { link } from '../marks/link';
5
+ import { unsupportedMark } from '../marks/unsupportedMark';
6
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
7
  export const media = adfNode('media').define({
6
8
  selectable: true,
7
- marks: [link, annotation, border],
9
+ marks: [link, annotation, border, unsupportedNodeAttribute, unsupportedMark],
8
10
  attrs: {
9
11
  anyOf: [{
10
12
  type: {
@@ -1,6 +1,10 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { media } from './media';
5
+ import { unsupportedBlock } from './unsupportedBlock';
3
6
  export const mediaGroup = adfNode('mediaGroup').define({
4
7
  selectable: false,
5
- content: [$onePlus($or(media))]
8
+ marks: [unsupportedNodeAttribute, unsupportedMark],
9
+ content: [$onePlus($or(media, unsupportedBlock))]
6
10
  });
@@ -2,10 +2,12 @@ import { adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { annotation } from '../marks/annotation';
3
3
  import { border } from '../marks/border';
4
4
  import { link } from '../marks/link';
5
+ import { unsupportedMark } from '../marks/unsupportedMark';
6
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
7
  export const mediaInline = adfNode('mediaInline').define({
6
8
  selectable: true,
7
9
  atom: false,
8
- marks: [link, annotation, border],
10
+ marks: [link, annotation, border, unsupportedNodeAttribute, unsupportedMark],
9
11
  attrs: {
10
12
  data: {
11
13
  optional: true
@@ -1,11 +1,14 @@
1
1
  import { $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { link } from '../marks/link';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  import { caption } from './caption';
4
6
  import { media } from './media';
7
+ import { unsupportedBlock } from './unsupportedBlock';
5
8
  export const mediaSingle = adfNode('mediaSingle').define({
6
9
  atom: false,
7
10
  selectable: true,
8
- marks: [link],
11
+ marks: [link, unsupportedNodeAttribute, unsupportedMark],
9
12
  attrs: {
10
13
  anyOf: [{
11
14
  width: {
@@ -46,5 +49,5 @@ export const mediaSingle = adfNode('mediaSingle').define({
46
49
  }
47
50
  }).variant('caption', {
48
51
  atom: false,
49
- content: [$or(media), $or(caption)]
52
+ content: [$or(media, unsupportedBlock), $or(caption, unsupportedBlock)]
50
53
  }).variant('full', {});
@@ -1,7 +1,10 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export const mention = adfNode('mention').define({
3
5
  inline: true,
4
6
  selectable: true,
7
+ marks: [unsupportedNodeAttribute, unsupportedMark],
5
8
  attrs: {
6
9
  id: {
7
10
  type: 'string',
@@ -1,10 +1,13 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { blockRootOnlyGroup } from '../groups/blockRootOnlyGroup';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  import { extensionFrame } from './extensionFrame';
4
6
  export const multiBodiedExtension = adfNode('multiBodiedExtension').define({
5
7
  definingAsContext: true,
6
8
  selectable: true,
7
9
  group: blockRootOnlyGroup,
10
+ marks: [unsupportedNodeAttribute, unsupportedMark],
8
11
  attrs: {
9
12
  extensionKey: {
10
13
  type: 'string',
@@ -1,4 +1,6 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { blockquote } from './blockquote';
3
5
  import { codeBlock } from './codeBlock';
4
6
  import { decisionList } from './decisionList';
@@ -10,9 +12,11 @@ import { panel } from './panel';
10
12
  import { paragraph } from './paragraph';
11
13
  import { rule } from './rule';
12
14
  import { taskList } from './task';
15
+ import { unsupportedBlock } from './unsupportedBlock';
13
16
  export const nestedExpand = adfNode('nestedExpand').define({
14
17
  isolating: true,
15
18
  selectable: true,
19
+ marks: [unsupportedNodeAttribute, unsupportedMark],
16
20
  attrs: {
17
21
  title: {
18
22
  type: 'string',
@@ -25,5 +29,5 @@ export const nestedExpand = adfNode('nestedExpand').define({
25
29
  optional: true
26
30
  }
27
31
  },
28
- content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote))]
32
+ content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, unsupportedBlock))]
29
33
  }).variant('with_no_marks', {});
@@ -1,4 +1,6 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { blockCard } from './blockCard';
3
5
  import { codeBlock } from './codeBlock';
4
6
  import { decisionList } from './decisionList';
@@ -9,8 +11,10 @@ import { mediaSingle } from './mediaSingle';
9
11
  import { paragraph } from './paragraph';
10
12
  import { rule } from './rule';
11
13
  import { taskList } from './task';
14
+ import { unsupportedBlock } from './unsupportedBlock';
12
15
  export const panel = adfNode('panel').define({
13
16
  selectable: true,
17
+ marks: [unsupportedNodeAttribute, unsupportedMark],
14
18
  attrs: {
15
19
  panelType: {
16
20
  type: 'enum',
@@ -38,5 +42,5 @@ export const panel = adfNode('panel').define({
38
42
  optional: true
39
43
  }
40
44
  },
41
- content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule))]
45
+ content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, unsupportedBlock))]
42
46
  });
@@ -1,13 +1,17 @@
1
1
  import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { inlineGroup } from '../groups/inlineGroup';
3
3
  import { alignment, indentation } from '../marks/alignmentAndIndentation';
4
+ import { unsupportedMark } from '../marks/unsupportedMark';
5
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
+ import { unsupportedInline } from './unsupportedInline';
4
7
  export const paragraph = adfNode('paragraph').define({
5
8
  selectable: false,
6
- content: [$zeroPlus($or(inlineGroup))]
9
+ marks: [unsupportedNodeAttribute, unsupportedMark],
10
+ content: [$zeroPlus($or(inlineGroup, unsupportedInline))]
7
11
  }).variant('with_alignment', {
8
- marks: [alignment]
12
+ marks: [alignment, unsupportedNodeAttribute, unsupportedMark]
9
13
  }).variant('with_indentation', {
10
- marks: [indentation]
14
+ marks: [indentation, unsupportedNodeAttribute, unsupportedMark]
11
15
  }).variant('with_marks', {
12
- marks: [alignment, indentation]
16
+ marks: [alignment, indentation, unsupportedNodeAttribute, unsupportedMark]
13
17
  }).variant('with_no_marks', {});
@@ -1,6 +1,9 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export const placeholder = adfNode('placeholder').define({
3
5
  selectable: false,
6
+ marks: [unsupportedNodeAttribute, unsupportedMark],
4
7
  attrs: {
5
8
  text: {
6
9
  type: 'string',
@@ -1,6 +1,9 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export const status = adfNode('status').define({
3
5
  selectable: true,
6
+ marks: [unsupportedNodeAttribute, unsupportedMark],
4
7
  attrs: {
5
8
  text: {
6
9
  minLength: 1,
@@ -1,10 +1,12 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { fragment } from '../marks/fragment';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
3
5
  import { tableRow } from './tableRow';
4
6
  export const table = adfNode('table').define({
5
7
  isolating: true,
6
8
  selectable: true,
7
- marks: [fragment],
9
+ marks: [fragment, unsupportedNodeAttribute, unsupportedMark],
8
10
  attrs: {
9
11
  displayMode: {
10
12
  type: 'enum',
@@ -1,4 +1,6 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { blockCard } from './blockCard';
3
5
  import { blockquote } from './blockquote';
4
6
  import { codeBlock } from './codeBlock';
@@ -14,10 +16,12 @@ import { panel } from './panel';
14
16
  import { paragraph } from './paragraph';
15
17
  import { rule } from './rule';
16
18
  import { taskList } from './task';
19
+ import { unsupportedBlock } from './unsupportedBlock';
17
20
  export const tableCell = adfNode('tableCell').define({
18
21
  isolating: true,
19
22
  selectable: false,
20
23
  tableRole: 'cell',
24
+ marks: [unsupportedNodeAttribute, unsupportedMark],
21
25
  attrs: {
22
26
  colspan: {
23
27
  type: 'number',
@@ -40,5 +44,5 @@ export const tableCell = adfNode('tableCell').define({
40
44
  optional: true
41
45
  }
42
46
  },
43
- content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, nestedExpand.use('with_no_marks')))]
47
+ content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, nestedExpand.use('with_no_marks'), unsupportedBlock))]
44
48
  });
@@ -1,4 +1,6 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { blockCard } from './blockCard';
3
5
  import { blockquote } from './blockquote';
4
6
  import { codeBlock } from './codeBlock';
@@ -18,6 +20,7 @@ export const tableHeader = adfNode('tableHeader').define({
18
20
  isolating: true,
19
21
  selectable: false,
20
22
  tableRole: 'header_cell',
23
+ marks: [unsupportedNodeAttribute, unsupportedMark],
21
24
  attrs: {
22
25
  colspan: {
23
26
  type: 'number',
@@ -1,7 +1,10 @@
1
- import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
1
+ import { $or, $onePlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { tableCell } from './tableCell';
3
5
  import { tableHeader } from './tableHeader';
4
6
  export const tableRow = adfNode('tableRow').define({
5
7
  selectable: false,
8
+ marks: [unsupportedNodeAttribute, unsupportedMark],
6
9
  content: [$onePlus($or(tableCell, tableHeader))]
7
10
  });
@@ -1,10 +1,15 @@
1
1
  import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { inlineGroup } from '../groups/inlineGroup';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
+ import { unsupportedInline } from './unsupportedInline';
6
+ import { unsupportedBlock } from './unsupportedBlock';
3
7
  export const taskItem = adfNode('taskItem');
4
8
  export const taskList = adfNode('taskList');
5
9
  taskItem.define({
6
10
  defining: true,
7
11
  selectable: false,
12
+ marks: [unsupportedNodeAttribute, unsupportedMark],
8
13
  attrs: {
9
14
  localId: {
10
15
  type: 'string',
@@ -16,16 +21,17 @@ taskItem.define({
16
21
  default: 'TODO'
17
22
  }
18
23
  },
19
- content: [$zeroPlus($or(inlineGroup))]
24
+ content: [$zeroPlus($or(inlineGroup, unsupportedInline))]
20
25
  });
21
26
  taskList.define({
22
27
  defining: true,
23
28
  selectable: false,
29
+ marks: [unsupportedNodeAttribute, unsupportedMark],
24
30
  attrs: {
25
31
  localId: {
26
32
  type: 'string',
27
33
  default: ''
28
34
  }
29
35
  },
30
- content: [$onePlus($or(taskItem)), $zeroPlus($or(taskItem, taskList))]
36
+ content: [$onePlus($or(taskItem, unsupportedBlock)), $zeroPlus($or(taskItem, taskList, unsupportedBlock))]
31
37
  });
@@ -8,8 +8,10 @@ import { strong } from '../marks/strong';
8
8
  import { subsup } from '../marks/subsup';
9
9
  import { underline } from '../marks/underline';
10
10
  import { backgroundColor, textColor } from '../marks/color';
11
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
12
+ import { unsupportedMark } from '../marks/unsupportedMark';
11
13
  export const text = adfNode('text').define({}).variant('formatted', {
12
- marks: [link, em, strong, strike, subsup, underline, textColor, annotation, backgroundColor]
14
+ marks: [link, em, strong, strike, subsup, underline, textColor, annotation, backgroundColor, unsupportedNodeAttribute, unsupportedMark]
13
15
  }).variant('code_inline', {
14
- marks: [code, link, annotation]
16
+ marks: [code, link, annotation, unsupportedNodeAttribute, unsupportedMark]
15
17
  });
@@ -0,0 +1,12 @@
1
+ import { adfNode, JSONSchemaTransformerName, ValidatorSpecTransformerName } from '@atlaskit/adf-schema-generator';
2
+ export const unsupportedBlock = adfNode('unsupportedBlock').define({
3
+ ignore: [JSONSchemaTransformerName, ValidatorSpecTransformerName],
4
+ atom: true,
5
+ selectable: true,
6
+ attrs: {
7
+ originalValue: {
8
+ type: 'object',
9
+ default: {}
10
+ }
11
+ }
12
+ });
@@ -0,0 +1,12 @@
1
+ import { adfNode, JSONSchemaTransformerName, ValidatorSpecTransformerName } from '@atlaskit/adf-schema-generator';
2
+ export const unsupportedInline = adfNode('unsupportedInline').define({
3
+ ignore: [JSONSchemaTransformerName, ValidatorSpecTransformerName],
4
+ inline: true,
5
+ selectable: true,
6
+ attrs: {
7
+ originalValue: {
8
+ type: 'object',
9
+ default: {}
10
+ }
11
+ }
12
+ });
@@ -4,9 +4,10 @@ import { layoutSection } from './nodes/layoutSection';
4
4
  import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
5
5
  import { nestedExpand } from './nodes/nestedExpand';
6
6
  import { paragraph } from './nodes/paragraph';
7
+ import { unsupportedBlock } from './nodes/unsupportedBlock';
7
8
  var doc = adfNode('doc').define({
8
9
  root: true,
9
10
  version: 1,
10
- content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup, nestedExpand, paragraph))]
11
+ content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup, nestedExpand, paragraph, unsupportedBlock))]
11
12
  });
12
13
  export default doc;
@@ -3,6 +3,7 @@ import { blockCard } from '../nodes/blockCard';
3
3
  import { blockquote } from '../nodes/blockquote';
4
4
  import { bodiedExtension } from '../nodes/bodiedExtension';
5
5
  import { codeBlock } from '../nodes/codeBlock';
6
+ import { confluenceUnsupportedBlock } from '../nodes/confluenceUnsupportedBlock';
6
7
  import { decisionList } from '../nodes/decisionList';
7
8
  import { embedCard } from '../nodes/embedCard';
8
9
  import { expand } from '../nodes/expand';
@@ -16,4 +17,5 @@ import { paragraph } from '../nodes/paragraph';
16
17
  import { rule } from '../nodes/rule';
17
18
  import { table } from '../nodes/table';
18
19
  import { taskList } from '../nodes/task';
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')]);
20
+ import { unsupportedBlock } from '../nodes/unsupportedBlock';
21
+ 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'), confluenceUnsupportedBlock, unsupportedBlock]);
@@ -9,6 +9,8 @@ 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
+ import { unsupportedInline } from '../nodes/unsupportedInline';
13
+ import { confluenceUnsupportedInline } from '../nodes/confluenceUnsupportedInline';
12
14
  export var inlineGroup = adfNodeGroup('inline', [
13
15
  // text,
14
- text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, inlineExtension.use('with_marks'), mediaInline]);
16
+ text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, inlineExtension.use('with_marks'), mediaInline, confluenceUnsupportedInline, unsupportedInline]);
@@ -13,7 +13,8 @@ import { paragraph } from '../nodes/paragraph';
13
13
  import { rule } from '../nodes/rule';
14
14
  import { table } from '../nodes/table';
15
15
  import { taskList } from '../nodes/task';
16
+ import { unsupportedBlock } from '../nodes/unsupportedBlock';
16
17
 
17
18
  // Not an actual group, but a collection of nodes that can't be nested inside each other
18
19
  // TODO: make it an actual group
19
- export var nonNestableBlockContent = [codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table];
20
+ export var nonNestableBlockContent = [codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table, unsupportedBlock];
@@ -0,0 +1,10 @@
1
+ import { adfMark, JSONSchemaTransformerName, ValidatorSpecTransformerName } from '@atlaskit/adf-schema-generator';
2
+ export var unsupportedMark = adfMark('unsupportedMark').define({
3
+ ignore: [JSONSchemaTransformerName, ValidatorSpecTransformerName],
4
+ attrs: {
5
+ originalValue: {
6
+ type: 'object',
7
+ default: {}
8
+ }
9
+ }
10
+ });
@@ -0,0 +1,14 @@
1
+ import { adfMark, JSONSchemaTransformerName, ValidatorSpecTransformerName } from '@atlaskit/adf-schema-generator';
2
+ export var unsupportedNodeAttribute = adfMark('unsupportedNodeAttribute').define({
3
+ ignore: [JSONSchemaTransformerName, ValidatorSpecTransformerName],
4
+ attrs: {
5
+ type: {
6
+ type: 'string',
7
+ default: null
8
+ },
9
+ unsupported: {
10
+ type: 'object',
11
+ default: {}
12
+ }
13
+ }
14
+ });
@@ -1,7 +1,10 @@
1
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  export var blockCard = adfNode('blockCard').define({
3
5
  draggable: true,
4
6
  selectable: true,
7
+ marks: [unsupportedNodeAttribute, unsupportedMark],
5
8
  attrs: {
6
9
  anyOf: [{
7
10
  url: {
@@ -1,10 +1,14 @@
1
1
  import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { bulletList, orderedList } from './list';
3
5
  import { paragraph } from './paragraph';
6
+ import { unsupportedBlock } from './unsupportedBlock';
4
7
  export var blockquote = adfNode('blockquote').define({
5
8
  defining: true,
6
9
  selectable: false,
7
- content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList))]
10
+ marks: [unsupportedNodeAttribute, unsupportedMark],
11
+ content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, unsupportedBlock))]
8
12
  }).variant('with_list', {
9
- content: [$onePlus($or(paragraph, orderedList, bulletList))]
13
+ content: [$onePlus($or(paragraph, orderedList, bulletList, unsupportedBlock))]
10
14
  });
@@ -3,10 +3,13 @@ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
3
3
  import { nonNestableBlockContent } from '../groups/nonNestableBlockContentGroup';
4
4
  import { dataConsumer } from '../marks/dataConsumer';
5
5
  import { fragment } from '../marks/fragment';
6
+ import { unsupportedMark } from '../marks/unsupportedMark';
7
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
8
  export var bodiedExtension = adfNode('bodiedExtension').define({
7
9
  defining: true,
8
10
  selectable: true,
9
11
  isolating: true,
12
+ marks: [unsupportedNodeAttribute, unsupportedMark],
10
13
  attrs: {
11
14
  extensionKey: {
12
15
  minLength: 1,
@@ -42,5 +45,5 @@ export var bodiedExtension = adfNode('bodiedExtension').define({
42
45
  },
43
46
  content: [$onePlus($or.apply(void 0, _toConsumableArray(nonNestableBlockContent)))]
44
47
  }).variant('with_marks', {
45
- marks: [dataConsumer, fragment]
48
+ marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark]
46
49
  });
@@ -1,4 +1,6 @@
1
1
  import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { unsupportedMark } from '../marks/unsupportedMark';
3
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
2
4
  import { date } from './date';
3
5
  import { emoji } from './emoji';
4
6
  import { hardBreak } from './hardBreak';
@@ -7,10 +9,10 @@ import { mention } from './mention';
7
9
  import { placeholder } from './placeholder';
8
10
  import { status } from './status';
9
11
  import { text } from './text';
10
-
11
- // TODO: marks
12
+ import { unsupportedInline } from './unsupportedInline';
12
13
  export var caption = adfNode('caption').define({
13
14
  isolating: true,
14
15
  selectable: false,
15
- content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline')))]
16
+ marks: [unsupportedNodeAttribute, unsupportedMark],
17
+ content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
16
18
  });