@atlaskit/adf-schema 36.4.0 → 36.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +15 -0
  3. package/dist/cjs/next-schema/groups/alignementMarkExclusionGroup.js +9 -0
  4. package/dist/cjs/next-schema/groups/annotationGroup.js +8 -0
  5. package/dist/cjs/next-schema/groups/blockGroup.js +25 -0
  6. package/dist/cjs/next-schema/groups/blockRootOnlyGroup.js +8 -0
  7. package/dist/cjs/next-schema/groups/colorGroup.js +9 -0
  8. package/dist/cjs/next-schema/groups/fontStyleGroup.js +13 -0
  9. package/dist/cjs/next-schema/groups/indentationMarkExclusionGroup.js +9 -0
  10. package/dist/cjs/next-schema/groups/inlineGroup.js +18 -0
  11. package/dist/cjs/next-schema/groups/linkMarkGroup.js +9 -0
  12. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +24 -0
  13. package/dist/cjs/next-schema/groups/searchQueryMarkGroup.js +8 -0
  14. package/dist/cjs/next-schema/marks/alignment.js +18 -0
  15. package/dist/cjs/next-schema/marks/annotation.js +21 -0
  16. package/dist/cjs/next-schema/marks/border.js +20 -0
  17. package/dist/cjs/next-schema/marks/breakout.js +18 -0
  18. package/dist/cjs/next-schema/marks/code.js +15 -0
  19. package/dist/cjs/next-schema/marks/dataConsumer.js +18 -0
  20. package/dist/cjs/next-schema/marks/em.js +10 -0
  21. package/dist/cjs/next-schema/marks/fragment.js +21 -0
  22. package/dist/cjs/next-schema/marks/indentation.js +18 -0
  23. package/dist/cjs/next-schema/marks/link.js +40 -0
  24. package/dist/cjs/next-schema/marks/strike.js +10 -0
  25. package/dist/cjs/next-schema/marks/strong.js +10 -0
  26. package/dist/cjs/next-schema/marks/subsup.js +17 -0
  27. package/dist/cjs/next-schema/marks/textColor.js +15 -0
  28. package/dist/cjs/next-schema/marks/underline.js +10 -0
  29. package/dist/cjs/next-schema/nodes/blockCard.js +34 -0
  30. package/dist/cjs/next-schema/nodes/blockquote.js +16 -0
  31. package/dist/cjs/next-schema/nodes/bodiedExtension.js +51 -0
  32. package/dist/cjs/next-schema/nodes/caption.js +21 -0
  33. package/dist/cjs/next-schema/nodes/codeBlock.js +27 -0
  34. package/dist/cjs/next-schema/nodes/date.js +17 -0
  35. package/dist/cjs/next-schema/nodes/decisionItem.js +22 -0
  36. package/dist/cjs/next-schema/nodes/decisionList.js +19 -0
  37. package/dist/cjs/next-schema/nodes/embedCard.js +36 -0
  38. package/dist/cjs/next-schema/nodes/emoji.js +27 -0
  39. package/dist/cjs/next-schema/nodes/expand.js +30 -0
  40. package/dist/cjs/next-schema/nodes/extension.js +45 -0
  41. package/dist/cjs/next-schema/nodes/extensionFrame.js +33 -0
  42. package/dist/cjs/next-schema/nodes/hardBreak.js +18 -0
  43. package/dist/cjs/next-schema/nodes/heading.js +28 -0
  44. package/dist/cjs/next-schema/nodes/inlineCard.js +27 -0
  45. package/dist/cjs/next-schema/nodes/inlineExtension.js +36 -0
  46. package/dist/cjs/next-schema/nodes/layoutColumn.js +21 -0
  47. package/dist/cjs/next-schema/nodes/layoutSection.js +14 -0
  48. package/dist/cjs/next-schema/nodes/list.js +34 -0
  49. package/dist/cjs/next-schema/nodes/media.js +89 -0
  50. package/dist/cjs/next-schema/nodes/mediaGroup.js +12 -0
  51. package/dist/cjs/next-schema/nodes/mediaInline.js +78 -0
  52. package/dist/cjs/next-schema/nodes/mediaSingle.js +39 -0
  53. package/dist/cjs/next-schema/nodes/mention.js +33 -0
  54. package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +46 -0
  55. package/dist/cjs/next-schema/nodes/nestedExpand.js +35 -0
  56. package/dist/cjs/next-schema/nodes/panel.js +48 -0
  57. package/dist/cjs/next-schema/nodes/paragraph.js +21 -0
  58. package/dist/cjs/next-schema/nodes/placeholder.js +16 -0
  59. package/dist/cjs/next-schema/nodes/rule.js +8 -0
  60. package/dist/cjs/next-schema/nodes/status.js +31 -0
  61. package/dist/cjs/next-schema/nodes/table.js +43 -0
  62. package/dist/cjs/next-schema/nodes/tableCell.js +50 -0
  63. package/dist/cjs/next-schema/nodes/tableHeader.js +50 -0
  64. package/dist/cjs/next-schema/nodes/tableRow.js +13 -0
  65. package/dist/cjs/next-schema/nodes/task.js +37 -0
  66. package/dist/cjs/next-schema/nodes/text.js +21 -0
  67. package/dist/es2019/next-schema/full-schema.adf.js +9 -0
  68. package/dist/es2019/next-schema/groups/alignementMarkExclusionGroup.js +3 -0
  69. package/dist/es2019/next-schema/groups/annotationGroup.js +2 -0
  70. package/dist/es2019/next-schema/groups/blockGroup.js +19 -0
  71. package/dist/es2019/next-schema/groups/blockRootOnlyGroup.js +2 -0
  72. package/dist/es2019/next-schema/groups/colorGroup.js +3 -0
  73. package/dist/es2019/next-schema/groups/fontStyleGroup.js +7 -0
  74. package/dist/es2019/next-schema/groups/indentationMarkExclusionGroup.js +3 -0
  75. package/dist/es2019/next-schema/groups/inlineGroup.js +12 -0
  76. package/dist/es2019/next-schema/groups/linkMarkGroup.js +3 -0
  77. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +19 -0
  78. package/dist/es2019/next-schema/groups/searchQueryMarkGroup.js +2 -0
  79. package/dist/es2019/next-schema/marks/alignment.js +12 -0
  80. package/dist/es2019/next-schema/marks/annotation.js +15 -0
  81. package/dist/es2019/next-schema/marks/border.js +14 -0
  82. package/dist/es2019/next-schema/marks/breakout.js +12 -0
  83. package/dist/es2019/next-schema/marks/code.js +9 -0
  84. package/dist/es2019/next-schema/marks/dataConsumer.js +12 -0
  85. package/dist/es2019/next-schema/marks/em.js +4 -0
  86. package/dist/es2019/next-schema/marks/fragment.js +15 -0
  87. package/dist/es2019/next-schema/marks/indentation.js +12 -0
  88. package/dist/es2019/next-schema/marks/link.js +34 -0
  89. package/dist/es2019/next-schema/marks/strike.js +4 -0
  90. package/dist/es2019/next-schema/marks/strong.js +4 -0
  91. package/dist/es2019/next-schema/marks/subsup.js +11 -0
  92. package/dist/es2019/next-schema/marks/textColor.js +9 -0
  93. package/dist/es2019/next-schema/marks/underline.js +4 -0
  94. package/dist/es2019/next-schema/nodes/blockCard.js +28 -0
  95. package/dist/es2019/next-schema/nodes/blockquote.js +10 -0
  96. package/dist/es2019/next-schema/nodes/bodiedExtension.js +43 -0
  97. package/dist/es2019/next-schema/nodes/caption.js +16 -0
  98. package/dist/es2019/next-schema/nodes/codeBlock.js +21 -0
  99. package/dist/es2019/next-schema/nodes/date.js +11 -0
  100. package/dist/es2019/next-schema/nodes/decisionItem.js +16 -0
  101. package/dist/es2019/next-schema/nodes/decisionList.js +13 -0
  102. package/dist/es2019/next-schema/nodes/embedCard.js +30 -0
  103. package/dist/es2019/next-schema/nodes/emoji.js +21 -0
  104. package/dist/es2019/next-schema/nodes/expand.js +22 -0
  105. package/dist/es2019/next-schema/nodes/extension.js +39 -0
  106. package/dist/es2019/next-schema/nodes/extensionFrame.js +27 -0
  107. package/dist/es2019/next-schema/nodes/hardBreak.js +12 -0
  108. package/dist/es2019/next-schema/nodes/heading.js +22 -0
  109. package/dist/es2019/next-schema/nodes/inlineCard.js +21 -0
  110. package/dist/es2019/next-schema/nodes/inlineExtension.js +30 -0
  111. package/dist/es2019/next-schema/nodes/layoutColumn.js +15 -0
  112. package/dist/es2019/next-schema/nodes/layoutSection.js +8 -0
  113. package/dist/es2019/next-schema/nodes/list.js +28 -0
  114. package/dist/es2019/next-schema/nodes/media.js +83 -0
  115. package/dist/es2019/next-schema/nodes/mediaGroup.js +6 -0
  116. package/dist/es2019/next-schema/nodes/mediaInline.js +72 -0
  117. package/dist/es2019/next-schema/nodes/mediaSingle.js +33 -0
  118. package/dist/es2019/next-schema/nodes/mention.js +27 -0
  119. package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +40 -0
  120. package/dist/es2019/next-schema/nodes/nestedExpand.js +29 -0
  121. package/dist/es2019/next-schema/nodes/panel.js +42 -0
  122. package/dist/es2019/next-schema/nodes/paragraph.js +15 -0
  123. package/dist/es2019/next-schema/nodes/placeholder.js +10 -0
  124. package/dist/es2019/next-schema/nodes/rule.js +2 -0
  125. package/dist/es2019/next-schema/nodes/status.js +25 -0
  126. package/dist/es2019/next-schema/nodes/table.js +37 -0
  127. package/dist/es2019/next-schema/nodes/tableCell.js +44 -0
  128. package/dist/es2019/next-schema/nodes/tableHeader.js +44 -0
  129. package/dist/es2019/next-schema/nodes/tableRow.js +7 -0
  130. package/dist/es2019/next-schema/nodes/task.js +31 -0
  131. package/dist/es2019/next-schema/nodes/text.js +15 -0
  132. package/dist/esm/next-schema/full-schema.adf.js +9 -0
  133. package/dist/esm/next-schema/groups/alignementMarkExclusionGroup.js +3 -0
  134. package/dist/esm/next-schema/groups/annotationGroup.js +2 -0
  135. package/dist/esm/next-schema/groups/blockGroup.js +19 -0
  136. package/dist/esm/next-schema/groups/blockRootOnlyGroup.js +2 -0
  137. package/dist/esm/next-schema/groups/colorGroup.js +3 -0
  138. package/dist/esm/next-schema/groups/fontStyleGroup.js +7 -0
  139. package/dist/esm/next-schema/groups/indentationMarkExclusionGroup.js +3 -0
  140. package/dist/esm/next-schema/groups/inlineGroup.js +12 -0
  141. package/dist/esm/next-schema/groups/linkMarkGroup.js +3 -0
  142. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +19 -0
  143. package/dist/esm/next-schema/groups/searchQueryMarkGroup.js +2 -0
  144. package/dist/esm/next-schema/marks/alignment.js +12 -0
  145. package/dist/esm/next-schema/marks/annotation.js +15 -0
  146. package/dist/esm/next-schema/marks/border.js +14 -0
  147. package/dist/esm/next-schema/marks/breakout.js +12 -0
  148. package/dist/esm/next-schema/marks/code.js +9 -0
  149. package/dist/esm/next-schema/marks/dataConsumer.js +12 -0
  150. package/dist/esm/next-schema/marks/em.js +4 -0
  151. package/dist/esm/next-schema/marks/fragment.js +15 -0
  152. package/dist/esm/next-schema/marks/indentation.js +12 -0
  153. package/dist/esm/next-schema/marks/link.js +34 -0
  154. package/dist/esm/next-schema/marks/strike.js +4 -0
  155. package/dist/esm/next-schema/marks/strong.js +4 -0
  156. package/dist/esm/next-schema/marks/subsup.js +11 -0
  157. package/dist/esm/next-schema/marks/textColor.js +9 -0
  158. package/dist/esm/next-schema/marks/underline.js +4 -0
  159. package/dist/esm/next-schema/nodes/blockCard.js +28 -0
  160. package/dist/esm/next-schema/nodes/blockquote.js +10 -0
  161. package/dist/esm/next-schema/nodes/bodiedExtension.js +44 -0
  162. package/dist/esm/next-schema/nodes/caption.js +16 -0
  163. package/dist/esm/next-schema/nodes/codeBlock.js +21 -0
  164. package/dist/esm/next-schema/nodes/date.js +11 -0
  165. package/dist/esm/next-schema/nodes/decisionItem.js +16 -0
  166. package/dist/esm/next-schema/nodes/decisionList.js +13 -0
  167. package/dist/esm/next-schema/nodes/embedCard.js +30 -0
  168. package/dist/esm/next-schema/nodes/emoji.js +21 -0
  169. package/dist/esm/next-schema/nodes/expand.js +23 -0
  170. package/dist/esm/next-schema/nodes/extension.js +39 -0
  171. package/dist/esm/next-schema/nodes/extensionFrame.js +27 -0
  172. package/dist/esm/next-schema/nodes/hardBreak.js +12 -0
  173. package/dist/esm/next-schema/nodes/heading.js +22 -0
  174. package/dist/esm/next-schema/nodes/inlineCard.js +21 -0
  175. package/dist/esm/next-schema/nodes/inlineExtension.js +30 -0
  176. package/dist/esm/next-schema/nodes/layoutColumn.js +15 -0
  177. package/dist/esm/next-schema/nodes/layoutSection.js +8 -0
  178. package/dist/esm/next-schema/nodes/list.js +28 -0
  179. package/dist/esm/next-schema/nodes/media.js +83 -0
  180. package/dist/esm/next-schema/nodes/mediaGroup.js +6 -0
  181. package/dist/esm/next-schema/nodes/mediaInline.js +72 -0
  182. package/dist/esm/next-schema/nodes/mediaSingle.js +33 -0
  183. package/dist/esm/next-schema/nodes/mention.js +27 -0
  184. package/dist/esm/next-schema/nodes/multiBodiedExtension.js +40 -0
  185. package/dist/esm/next-schema/nodes/nestedExpand.js +29 -0
  186. package/dist/esm/next-schema/nodes/panel.js +42 -0
  187. package/dist/esm/next-schema/nodes/paragraph.js +15 -0
  188. package/dist/esm/next-schema/nodes/placeholder.js +10 -0
  189. package/dist/esm/next-schema/nodes/rule.js +2 -0
  190. package/dist/esm/next-schema/nodes/status.js +25 -0
  191. package/dist/esm/next-schema/nodes/table.js +37 -0
  192. package/dist/esm/next-schema/nodes/tableCell.js +44 -0
  193. package/dist/esm/next-schema/nodes/tableHeader.js +44 -0
  194. package/dist/esm/next-schema/nodes/tableRow.js +7 -0
  195. package/dist/esm/next-schema/nodes/task.js +31 -0
  196. package/dist/esm/next-schema/nodes/text.js +15 -0
  197. package/dist/types/next-schema/full-schema.adf.d.ts +18 -0
  198. package/dist/types/next-schema/groups/alignementMarkExclusionGroup.d.ts +1 -0
  199. package/dist/types/next-schema/groups/annotationGroup.d.ts +1 -0
  200. package/dist/types/next-schema/groups/blockGroup.d.ts +1 -0
  201. package/dist/types/next-schema/groups/blockRootOnlyGroup.d.ts +1 -0
  202. package/dist/types/next-schema/groups/colorGroup.d.ts +1 -0
  203. package/dist/types/next-schema/groups/fontStyleGroup.d.ts +1 -0
  204. package/dist/types/next-schema/groups/indentationMarkExclusionGroup.d.ts +1 -0
  205. package/dist/types/next-schema/groups/inlineGroup.d.ts +1 -0
  206. package/dist/types/next-schema/groups/linkMarkGroup.d.ts +1 -0
  207. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +114 -0
  208. package/dist/types/next-schema/groups/searchQueryMarkGroup.d.ts +1 -0
  209. package/dist/types/next-schema/marks/alignment.d.ts +1 -0
  210. package/dist/types/next-schema/marks/annotation.d.ts +1 -0
  211. package/dist/types/next-schema/marks/border.d.ts +1 -0
  212. package/dist/types/next-schema/marks/breakout.d.ts +1 -0
  213. package/dist/types/next-schema/marks/code.d.ts +1 -0
  214. package/dist/types/next-schema/marks/dataConsumer.d.ts +1 -0
  215. package/dist/types/next-schema/marks/em.d.ts +1 -0
  216. package/dist/types/next-schema/marks/fragment.d.ts +1 -0
  217. package/dist/types/next-schema/marks/indentation.d.ts +1 -0
  218. package/dist/types/next-schema/marks/link.d.ts +1 -0
  219. package/dist/types/next-schema/marks/strike.d.ts +1 -0
  220. package/dist/types/next-schema/marks/strong.d.ts +1 -0
  221. package/dist/types/next-schema/marks/subsup.d.ts +1 -0
  222. package/dist/types/next-schema/marks/textColor.d.ts +1 -0
  223. package/dist/types/next-schema/marks/underline.d.ts +1 -0
  224. package/dist/types/next-schema/nodes/blockCard.d.ts +17 -0
  225. package/dist/types/next-schema/nodes/blockquote.d.ts +19 -0
  226. package/dist/types/next-schema/nodes/bodiedExtension.d.ts +19 -0
  227. package/dist/types/next-schema/nodes/caption.d.ts +17 -0
  228. package/dist/types/next-schema/nodes/codeBlock.d.ts +38 -0
  229. package/dist/types/next-schema/nodes/date.d.ts +17 -0
  230. package/dist/types/next-schema/nodes/decisionItem.d.ts +17 -0
  231. package/dist/types/next-schema/nodes/decisionList.d.ts +17 -0
  232. package/dist/types/next-schema/nodes/embedCard.d.ts +17 -0
  233. package/dist/types/next-schema/nodes/emoji.d.ts +17 -0
  234. package/dist/types/next-schema/nodes/expand.d.ts +19 -0
  235. package/dist/types/next-schema/nodes/extension.d.ts +17 -0
  236. package/dist/types/next-schema/nodes/extensionFrame.d.ts +17 -0
  237. package/dist/types/next-schema/nodes/hardBreak.d.ts +17 -0
  238. package/dist/types/next-schema/nodes/heading.d.ts +42 -0
  239. package/dist/types/next-schema/nodes/inlineCard.d.ts +19 -0
  240. package/dist/types/next-schema/nodes/inlineExtension.d.ts +17 -0
  241. package/dist/types/next-schema/nodes/layoutColumn.d.ts +17 -0
  242. package/dist/types/next-schema/nodes/layoutSection.d.ts +17 -0
  243. package/dist/types/next-schema/nodes/list.d.ts +34 -0
  244. package/dist/types/next-schema/nodes/media.d.ts +17 -0
  245. package/dist/types/next-schema/nodes/mediaGroup.d.ts +17 -0
  246. package/dist/types/next-schema/nodes/mediaInline.d.ts +17 -0
  247. package/dist/types/next-schema/nodes/mediaSingle.d.ts +20 -0
  248. package/dist/types/next-schema/nodes/mention.d.ts +17 -0
  249. package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +17 -0
  250. package/dist/types/next-schema/nodes/nestedExpand.d.ts +17 -0
  251. package/dist/types/next-schema/nodes/panel.d.ts +17 -0
  252. package/dist/types/next-schema/nodes/paragraph.d.ts +23 -0
  253. package/dist/types/next-schema/nodes/placeholder.d.ts +17 -0
  254. package/dist/types/next-schema/nodes/rule.d.ts +17 -0
  255. package/dist/types/next-schema/nodes/status.d.ts +17 -0
  256. package/dist/types/next-schema/nodes/table.d.ts +17 -0
  257. package/dist/types/next-schema/nodes/tableCell.d.ts +17 -0
  258. package/dist/types/next-schema/nodes/tableHeader.d.ts +17 -0
  259. package/dist/types/next-schema/nodes/tableRow.d.ts +17 -0
  260. package/dist/types/next-schema/nodes/task.d.ts +34 -0
  261. package/dist/types/next-schema/nodes/text.d.ts +21 -0
  262. package/package.json +3 -3
@@ -0,0 +1,12 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ import { alignementMarkExclusionGroup } from '../groups/alignementMarkExclusionGroup';
3
+ export const indentation = adfMark('indentation').define({
4
+ excludes: [alignementMarkExclusionGroup],
5
+ attrs: {
6
+ level: {
7
+ type: 'number',
8
+ minimum: 0,
9
+ maximum: 6
10
+ }
11
+ }
12
+ });
@@ -0,0 +1,34 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ import { linkMarkGroup } from '../groups/linkMarkGroup';
3
+ export const link = adfMark('link').define({
4
+ excludes: [linkMarkGroup],
5
+ inclusive: false,
6
+ attrs: {
7
+ href: {
8
+ type: 'string'
9
+ },
10
+ title: {
11
+ type: 'string',
12
+ optional: true
13
+ },
14
+ id: {
15
+ type: 'string',
16
+ optional: true
17
+ },
18
+ collection: {
19
+ type: 'string',
20
+ optional: true
21
+ },
22
+ occurenceKey: {
23
+ type: 'string',
24
+ optional: true
25
+ },
26
+ // TODO: expand object
27
+ // packages/adf-schema/src/schema/marks/link.ts
28
+ __confluenceMetadata: {
29
+ type: 'object',
30
+ optional: true,
31
+ default: null
32
+ }
33
+ }
34
+ });
@@ -0,0 +1,4 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const strike = adfMark('strike').define({
3
+ inclusive: true
4
+ });
@@ -0,0 +1,4 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const strong = adfMark('strong').define({
3
+ inclusive: true
4
+ });
@@ -0,0 +1,11 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const subsup = adfMark('subsup').define({
3
+ inclusive: true,
4
+ attrs: {
5
+ type: {
6
+ type: 'enum',
7
+ values: ['sub', 'sup'],
8
+ default: 'sub'
9
+ }
10
+ }
11
+ });
@@ -0,0 +1,9 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const textColor = adfMark('textColor').define({
3
+ inclusive: true,
4
+ attrs: {
5
+ color: {
6
+ type: 'string'
7
+ }
8
+ }
9
+ });
@@ -0,0 +1,4 @@
1
+ import { adfMark } from '@atlaskit/adf-schema-generator';
2
+ export const underline = adfMark('underline').define({
3
+ inclusive: true
4
+ });
@@ -0,0 +1,28 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const blockCard = adfNode('blockCard').define({
3
+ draggable: true,
4
+ selectable: true,
5
+ attrs: {
6
+ url: {
7
+ type: 'string',
8
+ optional: true
9
+ },
10
+ data: {
11
+ type: 'object',
12
+ optional: true
13
+ },
14
+ datasource: {
15
+ type: 'object',
16
+ optional: true
17
+ },
18
+ width: {
19
+ type: 'number',
20
+ optional: true
21
+ },
22
+ layout: {
23
+ type: 'enum',
24
+ values: ['wrap-right', 'center', 'wrap-left', 'wide', 'full-width', 'align-end', 'align-start'],
25
+ optional: true
26
+ }
27
+ }
28
+ });
@@ -0,0 +1,10 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { bulletList, orderedList } from './list';
3
+ import { paragraph } from './paragraph';
4
+ export const blockquote = adfNode('blockquote').define({
5
+ defining: true,
6
+ selectable: false,
7
+ content: [$onePlus($or(paragraph))]
8
+ }).variant('with_list', {
9
+ content: [$onePlus($or(paragraph, orderedList, bulletList))]
10
+ });
@@ -0,0 +1,43 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { nonNestableBlockContent } from '../groups/nonNestableBlockContentGroup';
3
+ import { dataConsumer } from '../marks/dataConsumer';
4
+ import { fragment } from '../marks/fragment';
5
+ export const bodiedExtension = adfNode('bodiedExtension').define({
6
+ defining: true,
7
+ selectable: true,
8
+ isolating: true,
9
+ attrs: {
10
+ extensionType: {
11
+ type: 'string',
12
+ default: ''
13
+ },
14
+ extensionKey: {
15
+ type: 'string',
16
+ default: ''
17
+ },
18
+ parameters: {
19
+ type: 'object',
20
+ optional: true,
21
+ default: null
22
+ },
23
+ text: {
24
+ type: 'string',
25
+ optional: true,
26
+ default: null
27
+ },
28
+ layout: {
29
+ type: 'enum',
30
+ values: ['default', 'wide', 'full-width'],
31
+ optional: true,
32
+ default: 'default'
33
+ },
34
+ localId: {
35
+ type: 'string',
36
+ optional: true,
37
+ default: null
38
+ }
39
+ },
40
+ content: [$onePlus($or(...nonNestableBlockContent))]
41
+ }).variant('with_marks', {
42
+ marks: [dataConsumer, fragment]
43
+ });
@@ -0,0 +1,16 @@
1
+ import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { date } from './date';
3
+ import { emoji } from './emoji';
4
+ import { hardBreak } from './hardBreak';
5
+ import { inlineCard } from './inlineCard';
6
+ import { mention } from './mention';
7
+ import { placeholder } from './placeholder';
8
+ import { status } from './status';
9
+ import { text } from './text';
10
+
11
+ // TODO: marks
12
+ export const caption = adfNode('caption').define({
13
+ isolating: true,
14
+ selectable: false,
15
+ content: [$zeroPlus($or(text.use('formatted'), hardBreak, mention, emoji, date, placeholder, inlineCard, status))]
16
+ });
@@ -0,0 +1,21 @@
1
+ import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { text } from './text';
4
+ export const codeBlock = adfNode('codeBlock').define({
5
+ code: true,
6
+ defining: true,
7
+ attrs: {
8
+ language: {
9
+ type: 'string',
10
+ default: null
11
+ },
12
+ uniqueId: {
13
+ type: 'string',
14
+ default: null
15
+ }
16
+ },
17
+ content: [$zeroPlus($or(text))]
18
+ }).variant('with_marks', {
19
+ marks: [breakout]
20
+ });
21
+ export const codeBlockWithMarks = codeBlock;
@@ -0,0 +1,11 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const date = adfNode('date').define({
3
+ inline: true,
4
+ selectable: true,
5
+ attrs: {
6
+ timestamp: {
7
+ type: 'string',
8
+ default: ''
9
+ }
10
+ }
11
+ });
@@ -0,0 +1,16 @@
1
+ import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { inlineGroup } from '../groups/inlineGroup';
3
+ export const decisionItem = adfNode('decisionItem').define({
4
+ defining: true,
5
+ attrs: {
6
+ localId: {
7
+ type: 'string',
8
+ default: ''
9
+ },
10
+ state: {
11
+ type: 'string',
12
+ default: 'DECIDED'
13
+ }
14
+ },
15
+ content: [$zeroPlus($or(inlineGroup))]
16
+ });
@@ -0,0 +1,13 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { decisionItem } from './decisionItem';
3
+ export const decisionList = adfNode('decisionList').define({
4
+ defining: true,
5
+ selectable: false,
6
+ attrs: {
7
+ localId: {
8
+ type: 'string',
9
+ default: ''
10
+ }
11
+ },
12
+ content: [$onePlus($or(decisionItem))]
13
+ });
@@ -0,0 +1,30 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const embedCard = adfNode('embedCard').define({
3
+ selectable: true,
4
+ attrs: {
5
+ url: {
6
+ type: 'string',
7
+ default: ''
8
+ },
9
+ layout: {
10
+ type: 'enum',
11
+ values: ['wrap-right', 'center', 'wrap-left', 'wide', 'full-width', 'align-end', 'align-start'],
12
+ default: 'center'
13
+ },
14
+ width: {
15
+ type: 'number',
16
+ default: 100,
17
+ optional: true
18
+ },
19
+ originalHeight: {
20
+ type: 'number',
21
+ default: null,
22
+ optional: true
23
+ },
24
+ originalWidth: {
25
+ type: 'number',
26
+ default: null,
27
+ optional: true
28
+ }
29
+ }
30
+ });
@@ -0,0 +1,21 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const emoji = adfNode('emoji').define({
3
+ inline: true,
4
+ selectable: true,
5
+ attrs: {
6
+ shortName: {
7
+ type: 'string',
8
+ default: ''
9
+ },
10
+ id: {
11
+ type: 'string',
12
+ default: '',
13
+ optional: true
14
+ },
15
+ text: {
16
+ type: 'string',
17
+ default: '',
18
+ optional: true
19
+ }
20
+ }
21
+ });
@@ -0,0 +1,22 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { nonNestableBlockContent } from '../groups/nonNestableBlockContentGroup';
3
+ import { breakout } from '../marks/breakout';
4
+ export const expand = adfNode('expand').define({
5
+ isolating: true,
6
+ selectable: true,
7
+ attrs: {
8
+ title: {
9
+ type: 'string',
10
+ default: '',
11
+ optional: true
12
+ },
13
+ __expanded: {
14
+ type: 'boolean',
15
+ default: true,
16
+ optional: true
17
+ }
18
+ },
19
+ content: [$onePlus($or(...nonNestableBlockContent))]
20
+ }).variant('with_breakout_mark', {
21
+ marks: [breakout]
22
+ });
@@ -0,0 +1,39 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { dataConsumer } from '../marks/dataConsumer';
3
+ import { fragment } from '../marks/fragment';
4
+ export const extension = adfNode('extension').define({
5
+ atom: true,
6
+ selectable: true,
7
+ marks: [dataConsumer, fragment],
8
+ attrs: {
9
+ extensionType: {
10
+ type: 'string',
11
+ default: ''
12
+ },
13
+ extensionKey: {
14
+ type: 'string',
15
+ default: ''
16
+ },
17
+ parameters: {
18
+ type: 'object',
19
+ optional: true,
20
+ default: null
21
+ },
22
+ text: {
23
+ type: 'string',
24
+ optional: true,
25
+ default: null
26
+ },
27
+ layout: {
28
+ type: 'enum',
29
+ values: ['default', 'wide', 'full-width'],
30
+ optional: true,
31
+ default: 'default'
32
+ },
33
+ localId: {
34
+ type: 'string',
35
+ optional: true,
36
+ default: null
37
+ }
38
+ }
39
+ });
@@ -0,0 +1,27 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { dataConsumer } from '../marks/dataConsumer';
3
+ import { fragment } from '../marks/fragment';
4
+ import { blockCard } from './blockCard';
5
+ import { blockquote } from './blockquote';
6
+ import { bodiedExtension } from './bodiedExtension';
7
+ import { codeBlock } from './codeBlock';
8
+ import { decisionList } from './decisionList';
9
+ import { embedCard } from './embedCard';
10
+ import { extension } from './extension';
11
+ import { heading } from './heading';
12
+ import { bulletList, orderedList } from './list';
13
+ import { mediaGroup } from './mediaGroup';
14
+ import { mediaSingle } from './mediaSingle';
15
+ import { panel } from './panel';
16
+ import { paragraph } from './paragraph';
17
+ import { rule } from './rule';
18
+ import { table } from './table';
19
+ import { taskList } from './task';
20
+ export const extensionFrame = adfNode('extensionFrame').define({
21
+ isolating: true,
22
+ definingAsContext: false,
23
+ definingForContent: true,
24
+ selectable: false,
25
+ marks: [dataConsumer, fragment],
26
+ content: [$onePlus($or(bodiedExtension, panel, paragraph, blockquote, orderedList, bulletList, rule, heading, codeBlock, mediaGroup, mediaSingle, decisionList, taskList, table, extension, blockCard, embedCard))]
27
+ });
@@ -0,0 +1,12 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const hardBreak = adfNode('hardBreak').define({
3
+ inline: true,
4
+ selectable: false,
5
+ attrs: {
6
+ text: {
7
+ type: 'string',
8
+ default: '\n',
9
+ optional: true
10
+ }
11
+ }
12
+ });
@@ -0,0 +1,22 @@
1
+ import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { inlineGroup } from '../groups/inlineGroup';
3
+ import { alignment } from '../marks/alignment';
4
+ import { indentation } from '../marks/indentation';
5
+ export const heading = adfNode('heading').define({
6
+ defining: true,
7
+ selectable: false,
8
+ attrs: {
9
+ level: {
10
+ type: 'number',
11
+ default: 1,
12
+ minimum: 1,
13
+ maximum: 6
14
+ }
15
+ },
16
+ content: [$zeroPlus($or(inlineGroup))]
17
+ }).variant('with_alignment', {
18
+ marks: [alignment]
19
+ }).variant('with_indentation', {
20
+ marks: [indentation]
21
+ });
22
+ export const headingWithMarks = heading;
@@ -0,0 +1,21 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { annotation } from '../marks/annotation';
3
+ export const inlineCard = adfNode('inlineCard').define({
4
+ inline: true,
5
+ selectable: true,
6
+ draggable: true,
7
+ attrs: {
8
+ url: {
9
+ type: 'string',
10
+ optional: true,
11
+ default: null
12
+ },
13
+ data: {
14
+ type: 'object',
15
+ optional: true,
16
+ default: null
17
+ }
18
+ }
19
+ }).variant('with_annotation', {
20
+ marks: [annotation]
21
+ });
@@ -0,0 +1,30 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ export const inlineExtension = adfNode('inlineExtension').define({
3
+ inline: true,
4
+ selectable: true,
5
+ attrs: {
6
+ extensionType: {
7
+ type: 'string',
8
+ default: ''
9
+ },
10
+ extensionKey: {
11
+ type: 'string',
12
+ default: ''
13
+ },
14
+ parameters: {
15
+ type: 'object',
16
+ optional: true,
17
+ default: null
18
+ },
19
+ text: {
20
+ type: 'string',
21
+ optional: true,
22
+ default: null
23
+ },
24
+ localId: {
25
+ type: 'string',
26
+ optional: true,
27
+ default: null
28
+ }
29
+ }
30
+ });
@@ -0,0 +1,15 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { blockGroup } from '../groups/blockGroup';
3
+ export const layoutColumn = adfNode('layoutColumn').define({
4
+ isolating: true,
5
+ selectable: false,
6
+ attrs: {
7
+ width: {
8
+ type: 'number',
9
+ minimum: 0,
10
+ maximum: 100,
11
+ default: undefined
12
+ }
13
+ },
14
+ content: [$onePlus($or(blockGroup))]
15
+ });
@@ -0,0 +1,8 @@
1
+ import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { layoutColumn } from './layoutColumn';
4
+ export const layoutSection = adfNode('layoutSection').define({
5
+ isolating: true,
6
+ content: [$range(1, 3, $or(layoutColumn))],
7
+ marks: [breakout]
8
+ });
@@ -0,0 +1,28 @@
1
+ import { $onePlus, $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { codeBlock } from './codeBlock';
3
+ import { mediaSingle } from './mediaSingle';
4
+ import { paragraph } from './paragraph';
5
+ import { taskList } from './task';
6
+ export const orderedList = adfNode('orderedList');
7
+ export const bulletList = adfNode('bulletList');
8
+ const listItem = adfNode('listItem');
9
+ orderedList.define({
10
+ selectable: false,
11
+ attrs: {
12
+ order: {
13
+ type: 'number',
14
+ minimum: 0,
15
+ default: 1
16
+ }
17
+ },
18
+ content: [$onePlus($or(listItem))]
19
+ });
20
+ bulletList.define({
21
+ selectable: false,
22
+ content: [$onePlus($or(listItem))]
23
+ });
24
+ listItem.define({
25
+ defining: true,
26
+ selectable: false,
27
+ content: [$or(paragraph, mediaSingle, codeBlock), $zeroPlus($or(paragraph, orderedList, bulletList, mediaSingle, codeBlock, taskList))]
28
+ });
@@ -0,0 +1,83 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { annotation } from '../marks/annotation';
3
+ import { border } from '../marks/border';
4
+ import { link } from '../marks/link';
5
+ export const media = adfNode('media').define({
6
+ selectable: true,
7
+ marks: [link, border, annotation],
8
+ attrs: {
9
+ type: {
10
+ type: 'enum',
11
+ values: ['file', 'link', 'external'],
12
+ default: 'file'
13
+ },
14
+ alt: {
15
+ type: 'string',
16
+ default: '',
17
+ optional: true
18
+ },
19
+ collection: {
20
+ type: 'string',
21
+ default: ''
22
+ },
23
+ id: {
24
+ type: 'string',
25
+ default: ''
26
+ },
27
+ height: {
28
+ type: 'number',
29
+ default: null,
30
+ optional: true
31
+ },
32
+ occurrenceKey: {
33
+ type: 'string',
34
+ default: null,
35
+ optional: true
36
+ },
37
+ url: {
38
+ type: 'string',
39
+ default: null,
40
+ optional: true
41
+ },
42
+ width: {
43
+ type: 'number',
44
+ default: null,
45
+ optional: true
46
+ },
47
+ __contextId: {
48
+ type: 'string',
49
+ default: null,
50
+ optional: true
51
+ },
52
+ __displayType: {
53
+ type: 'string',
54
+ default: null,
55
+ optional: true
56
+ },
57
+ __external: {
58
+ type: 'number',
59
+ default: null,
60
+ optional: true
61
+ },
62
+ __fileMimeType: {
63
+ type: 'string',
64
+ default: null,
65
+ optional: true
66
+ },
67
+ __fileName: {
68
+ type: 'string',
69
+ default: null,
70
+ optional: true
71
+ },
72
+ __fileSize: {
73
+ type: 'string',
74
+ default: null,
75
+ optional: true
76
+ },
77
+ __mediaTraceId: {
78
+ type: 'string',
79
+ default: null,
80
+ optional: true
81
+ }
82
+ }
83
+ });
@@ -0,0 +1,6 @@
1
+ import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { media } from './media';
3
+ export const mediaGroup = adfNode('mediaGroup').define({
4
+ selectable: false,
5
+ content: [$onePlus($or(media))]
6
+ });