@atlaskit/adf-schema 37.2.0 → 38.0.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 (430) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/index.js +12 -0
  3. package/dist/cjs/next-schema/generated/markTypes.js +21 -21
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +191 -110
  5. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  6. package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  7. package/dist/cjs/next-schema/index.js +32 -505
  8. package/dist/cjs/next-schema/nodes/blockCard.js +1 -1
  9. package/dist/cjs/next-schema/nodes/blockquote.js +2 -2
  10. package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
  11. package/dist/cjs/next-schema/nodes/caption.js +1 -1
  12. package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
  13. package/dist/cjs/next-schema/nodes/date.js +4 -1
  14. package/dist/cjs/next-schema/nodes/decisionItem.js +1 -1
  15. package/dist/cjs/next-schema/nodes/decisionList.js +1 -1
  16. package/dist/cjs/next-schema/nodes/embedCard.js +1 -1
  17. package/dist/cjs/next-schema/nodes/emoji.js +4 -1
  18. package/dist/cjs/next-schema/nodes/expand.js +2 -2
  19. package/dist/cjs/next-schema/nodes/extension.js +2 -2
  20. package/dist/cjs/next-schema/nodes/extensionFrame.js +3 -2
  21. package/dist/cjs/next-schema/nodes/hardBreak.js +1 -1
  22. package/dist/cjs/next-schema/nodes/heading.js +3 -3
  23. package/dist/cjs/next-schema/nodes/inlineCard.js +5 -2
  24. package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
  25. package/dist/cjs/next-schema/nodes/layoutColumn.js +1 -1
  26. package/dist/cjs/next-schema/nodes/layoutSection.js +3 -2
  27. package/dist/cjs/next-schema/nodes/list.js +5 -5
  28. package/dist/cjs/next-schema/nodes/media.js +1 -1
  29. package/dist/cjs/next-schema/nodes/mediaGroup.js +1 -1
  30. package/dist/cjs/next-schema/nodes/mediaInline.js +1 -1
  31. package/dist/cjs/next-schema/nodes/mediaSingle.js +5 -5
  32. package/dist/cjs/next-schema/nodes/mention.js +4 -1
  33. package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +1 -3
  34. package/dist/cjs/next-schema/nodes/nestedExpand.js +2 -2
  35. package/dist/cjs/next-schema/nodes/panel.js +3 -3
  36. package/dist/cjs/next-schema/nodes/paragraph.js +4 -4
  37. package/dist/cjs/next-schema/nodes/placeholder.js +1 -1
  38. package/dist/cjs/next-schema/nodes/status.js +4 -1
  39. package/dist/cjs/next-schema/nodes/table.js +1 -1
  40. package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
  41. package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
  42. package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
  43. package/dist/cjs/next-schema/nodes/task.js +2 -2
  44. package/dist/cjs/next-schema/nodes/text.js +1 -1
  45. package/dist/cjs/schema/createPMSpecFactory.js +57 -0
  46. package/dist/cjs/schema/index.js +14 -1
  47. package/dist/cjs/schema/marks/alignment.js +3 -8
  48. package/dist/cjs/schema/marks/annotation.js +3 -13
  49. package/dist/cjs/schema/marks/background-color.js +3 -9
  50. package/dist/cjs/schema/marks/border.js +3 -7
  51. package/dist/cjs/schema/marks/breakout.js +3 -9
  52. package/dist/cjs/schema/marks/code.js +3 -5
  53. package/dist/cjs/schema/marks/confluence-inline-comment.js +3 -9
  54. package/dist/cjs/schema/marks/data-consumer.js +3 -7
  55. package/dist/cjs/schema/marks/em.js +3 -5
  56. package/dist/cjs/schema/marks/fragment.js +3 -12
  57. package/dist/cjs/schema/marks/indentation.js +3 -8
  58. package/dist/cjs/schema/marks/link.js +3 -13
  59. package/dist/cjs/schema/marks/strike.js +3 -5
  60. package/dist/cjs/schema/marks/strong.js +3 -5
  61. package/dist/cjs/schema/marks/subsup.js +3 -10
  62. package/dist/cjs/schema/marks/text-color.js +3 -8
  63. package/dist/cjs/schema/marks/type-ahead-query.js +3 -10
  64. package/dist/cjs/schema/marks/underline.js +3 -5
  65. package/dist/cjs/schema/marks/unsupported-mark.js +3 -6
  66. package/dist/cjs/schema/marks/unsupported-node-attributes.js +3 -6
  67. package/dist/cjs/schema/nodes/block-card.js +3 -23
  68. package/dist/cjs/schema/nodes/blockquote.js +17 -20
  69. package/dist/cjs/schema/nodes/bodied-extension.js +24 -54
  70. package/dist/cjs/schema/nodes/bullet-list.js +3 -6
  71. package/dist/cjs/schema/nodes/caption.js +3 -6
  72. package/dist/cjs/schema/nodes/code-block.js +31 -16
  73. package/dist/cjs/schema/nodes/confluence-jira-issue.js +3 -22
  74. package/dist/cjs/schema/nodes/confluence-unsupported-block.js +3 -8
  75. package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +3 -10
  76. package/dist/cjs/schema/nodes/date.js +3 -10
  77. package/dist/cjs/schema/nodes/decision-item.js +3 -13
  78. package/dist/cjs/schema/nodes/decision-list.js +3 -12
  79. package/dist/cjs/schema/nodes/doc.js +2 -4
  80. package/dist/cjs/schema/nodes/embed-card.js +3 -22
  81. package/dist/cjs/schema/nodes/emoji.js +3 -16
  82. package/dist/cjs/schema/nodes/expand.js +3 -16
  83. package/dist/cjs/schema/nodes/extension.js +20 -47
  84. package/dist/cjs/schema/nodes/hard-break.js +3 -5
  85. package/dist/cjs/schema/nodes/heading.js +3 -14
  86. package/dist/cjs/schema/nodes/image.js +3 -16
  87. package/dist/cjs/schema/nodes/inline-card.js +3 -14
  88. package/dist/cjs/schema/nodes/inline-extension.js +19 -42
  89. package/dist/cjs/schema/nodes/layout-column.js +4 -12
  90. package/dist/cjs/schema/nodes/layout-section.js +23 -11
  91. package/dist/cjs/schema/nodes/list-item.js +5 -12
  92. package/dist/cjs/schema/nodes/media-group.js +3 -8
  93. package/dist/cjs/schema/nodes/media-inline.js +2 -1
  94. package/dist/cjs/schema/nodes/media-single.js +35 -14
  95. package/dist/cjs/schema/nodes/media.js +35 -83
  96. package/dist/cjs/schema/nodes/mention.js +3 -22
  97. package/dist/cjs/schema/nodes/multi-bodied-extension.js +26 -64
  98. package/dist/cjs/schema/nodes/nested-expand.js +31 -48
  99. package/dist/cjs/schema/nodes/ordered-list.js +4 -16
  100. package/dist/cjs/schema/nodes/panel.js +5 -34
  101. package/dist/cjs/schema/nodes/paragraph.js +3 -11
  102. package/dist/cjs/schema/nodes/placeholder.js +3 -11
  103. package/dist/cjs/schema/nodes/rule.js +3 -3
  104. package/dist/cjs/schema/nodes/status.js +3 -19
  105. package/dist/cjs/schema/nodes/tableNodes.js +9 -52
  106. package/dist/cjs/schema/nodes/task-item.js +3 -14
  107. package/dist/cjs/schema/nodes/task-list.js +3 -12
  108. package/dist/cjs/schema/nodes/text.js +3 -4
  109. package/dist/cjs/schema/nodes/unsupported-block.js +3 -11
  110. package/dist/cjs/schema/nodes/unsupported-inline.js +3 -10
  111. package/dist/es2019/index.js +5 -1
  112. package/dist/es2019/next-schema/generated/markTypes.js +1 -1
  113. package/dist/es2019/next-schema/generated/nodeTypes.js +123 -42
  114. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  115. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  116. package/dist/es2019/next-schema/index.js +3 -2
  117. package/dist/es2019/next-schema/nodes/blockCard.js +1 -1
  118. package/dist/es2019/next-schema/nodes/blockquote.js +2 -2
  119. package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
  120. package/dist/es2019/next-schema/nodes/caption.js +1 -1
  121. package/dist/es2019/next-schema/nodes/codeBlock.js +2 -2
  122. package/dist/es2019/next-schema/nodes/date.js +4 -1
  123. package/dist/es2019/next-schema/nodes/decisionItem.js +1 -1
  124. package/dist/es2019/next-schema/nodes/decisionList.js +1 -1
  125. package/dist/es2019/next-schema/nodes/embedCard.js +1 -1
  126. package/dist/es2019/next-schema/nodes/emoji.js +4 -1
  127. package/dist/es2019/next-schema/nodes/expand.js +2 -2
  128. package/dist/es2019/next-schema/nodes/extension.js +2 -2
  129. package/dist/es2019/next-schema/nodes/extensionFrame.js +3 -2
  130. package/dist/es2019/next-schema/nodes/hardBreak.js +1 -1
  131. package/dist/es2019/next-schema/nodes/heading.js +3 -3
  132. package/dist/es2019/next-schema/nodes/inlineCard.js +5 -2
  133. package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
  134. package/dist/es2019/next-schema/nodes/layoutColumn.js +1 -1
  135. package/dist/es2019/next-schema/nodes/layoutSection.js +3 -2
  136. package/dist/es2019/next-schema/nodes/list.js +5 -5
  137. package/dist/es2019/next-schema/nodes/media.js +1 -1
  138. package/dist/es2019/next-schema/nodes/mediaGroup.js +1 -1
  139. package/dist/es2019/next-schema/nodes/mediaInline.js +1 -1
  140. package/dist/es2019/next-schema/nodes/mediaSingle.js +5 -5
  141. package/dist/es2019/next-schema/nodes/mention.js +4 -1
  142. package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +1 -3
  143. package/dist/es2019/next-schema/nodes/nestedExpand.js +2 -2
  144. package/dist/es2019/next-schema/nodes/panel.js +3 -3
  145. package/dist/es2019/next-schema/nodes/paragraph.js +4 -4
  146. package/dist/es2019/next-schema/nodes/placeholder.js +1 -1
  147. package/dist/es2019/next-schema/nodes/status.js +4 -1
  148. package/dist/es2019/next-schema/nodes/table.js +1 -1
  149. package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
  150. package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
  151. package/dist/es2019/next-schema/nodes/tableRow.js +1 -1
  152. package/dist/es2019/next-schema/nodes/task.js +2 -2
  153. package/dist/es2019/next-schema/nodes/text.js +1 -1
  154. package/dist/es2019/schema/createPMSpecFactory.js +55 -0
  155. package/dist/es2019/schema/index.js +5 -1
  156. package/dist/es2019/schema/marks/alignment.js +3 -8
  157. package/dist/es2019/schema/marks/annotation.js +4 -13
  158. package/dist/es2019/schema/marks/background-color.js +3 -9
  159. package/dist/es2019/schema/marks/border.js +3 -7
  160. package/dist/es2019/schema/marks/breakout.js +3 -9
  161. package/dist/es2019/schema/marks/code.js +3 -5
  162. package/dist/es2019/schema/marks/confluence-inline-comment.js +4 -9
  163. package/dist/es2019/schema/marks/data-consumer.js +3 -7
  164. package/dist/es2019/schema/marks/em.js +3 -5
  165. package/dist/es2019/schema/marks/fragment.js +3 -12
  166. package/dist/es2019/schema/marks/indentation.js +3 -8
  167. package/dist/es2019/schema/marks/link.js +3 -13
  168. package/dist/es2019/schema/marks/strike.js +3 -5
  169. package/dist/es2019/schema/marks/strong.js +3 -5
  170. package/dist/es2019/schema/marks/subsup.js +3 -10
  171. package/dist/es2019/schema/marks/text-color.js +3 -8
  172. package/dist/es2019/schema/marks/type-ahead-query.js +3 -10
  173. package/dist/es2019/schema/marks/underline.js +3 -5
  174. package/dist/es2019/schema/marks/unsupported-mark.js +3 -6
  175. package/dist/es2019/schema/marks/unsupported-node-attributes.js +3 -6
  176. package/dist/es2019/schema/nodes/block-card.js +4 -23
  177. package/dist/es2019/schema/nodes/blockquote.js +19 -20
  178. package/dist/es2019/schema/nodes/bodied-extension.js +23 -53
  179. package/dist/es2019/schema/nodes/bullet-list.js +3 -6
  180. package/dist/es2019/schema/nodes/caption.js +4 -6
  181. package/dist/es2019/schema/nodes/code-block.js +31 -16
  182. package/dist/es2019/schema/nodes/confluence-jira-issue.js +3 -22
  183. package/dist/es2019/schema/nodes/confluence-unsupported-block.js +3 -8
  184. package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +3 -10
  185. package/dist/es2019/schema/nodes/date.js +4 -10
  186. package/dist/es2019/schema/nodes/decision-item.js +3 -13
  187. package/dist/es2019/schema/nodes/decision-list.js +3 -12
  188. package/dist/es2019/schema/nodes/doc.js +3 -4
  189. package/dist/es2019/schema/nodes/embed-card.js +4 -22
  190. package/dist/es2019/schema/nodes/emoji.js +3 -16
  191. package/dist/es2019/schema/nodes/expand.js +4 -16
  192. package/dist/es2019/schema/nodes/extension.js +19 -46
  193. package/dist/es2019/schema/nodes/hard-break.js +4 -5
  194. package/dist/es2019/schema/nodes/heading.js +4 -14
  195. package/dist/es2019/schema/nodes/image.js +3 -16
  196. package/dist/es2019/schema/nodes/inline-card.js +4 -14
  197. package/dist/es2019/schema/nodes/inline-extension.js +18 -41
  198. package/dist/es2019/schema/nodes/layout-column.js +5 -12
  199. package/dist/es2019/schema/nodes/layout-section.js +24 -10
  200. package/dist/es2019/schema/nodes/list-item.js +6 -12
  201. package/dist/es2019/schema/nodes/media-group.js +4 -8
  202. package/dist/es2019/schema/nodes/media-inline.js +3 -2
  203. package/dist/es2019/schema/nodes/media-single.js +35 -15
  204. package/dist/es2019/schema/nodes/media.js +35 -78
  205. package/dist/es2019/schema/nodes/mention.js +3 -22
  206. package/dist/es2019/schema/nodes/multi-bodied-extension.js +26 -63
  207. package/dist/es2019/schema/nodes/nested-expand.js +32 -48
  208. package/dist/es2019/schema/nodes/ordered-list.js +5 -14
  209. package/dist/es2019/schema/nodes/panel.js +5 -34
  210. package/dist/es2019/schema/nodes/paragraph.js +4 -11
  211. package/dist/es2019/schema/nodes/placeholder.js +4 -11
  212. package/dist/es2019/schema/nodes/rule.js +4 -3
  213. package/dist/es2019/schema/nodes/status.js +3 -19
  214. package/dist/es2019/schema/nodes/tableNodes.js +40 -82
  215. package/dist/es2019/schema/nodes/task-item.js +3 -14
  216. package/dist/es2019/schema/nodes/task-list.js +3 -12
  217. package/dist/es2019/schema/nodes/text.js +4 -4
  218. package/dist/es2019/schema/nodes/unsupported-block.js +3 -11
  219. package/dist/es2019/schema/nodes/unsupported-inline.js +3 -10
  220. package/dist/esm/index.js +5 -1
  221. package/dist/esm/next-schema/generated/markTypes.js +1 -1
  222. package/dist/esm/next-schema/generated/nodeTypes.js +123 -42
  223. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  224. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  225. package/dist/esm/next-schema/index.js +3 -2
  226. package/dist/esm/next-schema/nodes/blockCard.js +1 -1
  227. package/dist/esm/next-schema/nodes/blockquote.js +2 -2
  228. package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
  229. package/dist/esm/next-schema/nodes/caption.js +1 -1
  230. package/dist/esm/next-schema/nodes/codeBlock.js +2 -2
  231. package/dist/esm/next-schema/nodes/date.js +4 -1
  232. package/dist/esm/next-schema/nodes/decisionItem.js +1 -1
  233. package/dist/esm/next-schema/nodes/decisionList.js +1 -1
  234. package/dist/esm/next-schema/nodes/embedCard.js +1 -1
  235. package/dist/esm/next-schema/nodes/emoji.js +4 -1
  236. package/dist/esm/next-schema/nodes/expand.js +2 -2
  237. package/dist/esm/next-schema/nodes/extension.js +2 -2
  238. package/dist/esm/next-schema/nodes/extensionFrame.js +3 -2
  239. package/dist/esm/next-schema/nodes/hardBreak.js +1 -1
  240. package/dist/esm/next-schema/nodes/heading.js +3 -3
  241. package/dist/esm/next-schema/nodes/inlineCard.js +5 -2
  242. package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
  243. package/dist/esm/next-schema/nodes/layoutColumn.js +1 -1
  244. package/dist/esm/next-schema/nodes/layoutSection.js +3 -2
  245. package/dist/esm/next-schema/nodes/list.js +5 -5
  246. package/dist/esm/next-schema/nodes/media.js +1 -1
  247. package/dist/esm/next-schema/nodes/mediaGroup.js +1 -1
  248. package/dist/esm/next-schema/nodes/mediaInline.js +1 -1
  249. package/dist/esm/next-schema/nodes/mediaSingle.js +5 -5
  250. package/dist/esm/next-schema/nodes/mention.js +4 -1
  251. package/dist/esm/next-schema/nodes/multiBodiedExtension.js +1 -3
  252. package/dist/esm/next-schema/nodes/nestedExpand.js +2 -2
  253. package/dist/esm/next-schema/nodes/panel.js +3 -3
  254. package/dist/esm/next-schema/nodes/paragraph.js +4 -4
  255. package/dist/esm/next-schema/nodes/placeholder.js +1 -1
  256. package/dist/esm/next-schema/nodes/status.js +4 -1
  257. package/dist/esm/next-schema/nodes/table.js +1 -1
  258. package/dist/esm/next-schema/nodes/tableCell.js +1 -1
  259. package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
  260. package/dist/esm/next-schema/nodes/tableRow.js +1 -1
  261. package/dist/esm/next-schema/nodes/task.js +2 -2
  262. package/dist/esm/next-schema/nodes/text.js +1 -1
  263. package/dist/esm/schema/createPMSpecFactory.js +50 -0
  264. package/dist/esm/schema/index.js +5 -1
  265. package/dist/esm/schema/marks/alignment.js +3 -8
  266. package/dist/esm/schema/marks/annotation.js +4 -13
  267. package/dist/esm/schema/marks/background-color.js +3 -9
  268. package/dist/esm/schema/marks/border.js +3 -7
  269. package/dist/esm/schema/marks/breakout.js +3 -9
  270. package/dist/esm/schema/marks/code.js +3 -5
  271. package/dist/esm/schema/marks/confluence-inline-comment.js +4 -9
  272. package/dist/esm/schema/marks/data-consumer.js +3 -7
  273. package/dist/esm/schema/marks/em.js +3 -5
  274. package/dist/esm/schema/marks/fragment.js +3 -12
  275. package/dist/esm/schema/marks/indentation.js +3 -8
  276. package/dist/esm/schema/marks/link.js +3 -13
  277. package/dist/esm/schema/marks/strike.js +3 -5
  278. package/dist/esm/schema/marks/strong.js +3 -5
  279. package/dist/esm/schema/marks/subsup.js +3 -10
  280. package/dist/esm/schema/marks/text-color.js +3 -8
  281. package/dist/esm/schema/marks/type-ahead-query.js +3 -10
  282. package/dist/esm/schema/marks/underline.js +3 -5
  283. package/dist/esm/schema/marks/unsupported-mark.js +3 -6
  284. package/dist/esm/schema/marks/unsupported-node-attributes.js +3 -6
  285. package/dist/esm/schema/nodes/block-card.js +4 -23
  286. package/dist/esm/schema/nodes/blockquote.js +19 -20
  287. package/dist/esm/schema/nodes/bodied-extension.js +24 -54
  288. package/dist/esm/schema/nodes/bullet-list.js +3 -6
  289. package/dist/esm/schema/nodes/caption.js +4 -6
  290. package/dist/esm/schema/nodes/code-block.js +31 -16
  291. package/dist/esm/schema/nodes/confluence-jira-issue.js +3 -22
  292. package/dist/esm/schema/nodes/confluence-unsupported-block.js +3 -8
  293. package/dist/esm/schema/nodes/confluence-unsupported-inline.js +3 -10
  294. package/dist/esm/schema/nodes/date.js +4 -10
  295. package/dist/esm/schema/nodes/decision-item.js +3 -13
  296. package/dist/esm/schema/nodes/decision-list.js +3 -12
  297. package/dist/esm/schema/nodes/doc.js +3 -4
  298. package/dist/esm/schema/nodes/embed-card.js +4 -22
  299. package/dist/esm/schema/nodes/emoji.js +3 -16
  300. package/dist/esm/schema/nodes/expand.js +4 -16
  301. package/dist/esm/schema/nodes/extension.js +20 -47
  302. package/dist/esm/schema/nodes/hard-break.js +4 -5
  303. package/dist/esm/schema/nodes/heading.js +4 -14
  304. package/dist/esm/schema/nodes/image.js +3 -16
  305. package/dist/esm/schema/nodes/inline-card.js +4 -14
  306. package/dist/esm/schema/nodes/inline-extension.js +19 -42
  307. package/dist/esm/schema/nodes/layout-column.js +5 -12
  308. package/dist/esm/schema/nodes/layout-section.js +24 -10
  309. package/dist/esm/schema/nodes/list-item.js +6 -12
  310. package/dist/esm/schema/nodes/media-group.js +4 -8
  311. package/dist/esm/schema/nodes/media-inline.js +3 -2
  312. package/dist/esm/schema/nodes/media-single.js +35 -14
  313. package/dist/esm/schema/nodes/media.js +36 -82
  314. package/dist/esm/schema/nodes/mention.js +3 -22
  315. package/dist/esm/schema/nodes/multi-bodied-extension.js +27 -64
  316. package/dist/esm/schema/nodes/nested-expand.js +32 -48
  317. package/dist/esm/schema/nodes/ordered-list.js +4 -15
  318. package/dist/esm/schema/nodes/panel.js +5 -34
  319. package/dist/esm/schema/nodes/paragraph.js +4 -11
  320. package/dist/esm/schema/nodes/placeholder.js +4 -11
  321. package/dist/esm/schema/nodes/rule.js +4 -3
  322. package/dist/esm/schema/nodes/status.js +3 -19
  323. package/dist/esm/schema/nodes/tableNodes.js +12 -52
  324. package/dist/esm/schema/nodes/task-item.js +3 -14
  325. package/dist/esm/schema/nodes/task-list.js +3 -12
  326. package/dist/esm/schema/nodes/text.js +4 -4
  327. package/dist/esm/schema/nodes/unsupported-block.js +3 -11
  328. package/dist/esm/schema/nodes/unsupported-inline.js +3 -10
  329. package/dist/types/index.d.ts +2 -0
  330. package/dist/types/next-schema/full-schema.adf.d.ts +1 -30
  331. package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
  332. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -4
  333. package/dist/types/next-schema/generated/nodeTypes.d.ts +143 -85
  334. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +3 -119
  335. package/dist/types/next-schema/index.d.ts +3 -5
  336. package/dist/types/next-schema/nodes/blockCard.d.ts +1 -30
  337. package/dist/types/next-schema/nodes/blockquote.d.ts +1 -30
  338. package/dist/types/next-schema/nodes/bodiedExtension.d.ts +1 -30
  339. package/dist/types/next-schema/nodes/caption.d.ts +1 -30
  340. package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -60
  341. package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +1 -30
  342. package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +1 -30
  343. package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +1 -30
  344. package/dist/types/next-schema/nodes/date.d.ts +1 -30
  345. package/dist/types/next-schema/nodes/decisionItem.d.ts +1 -30
  346. package/dist/types/next-schema/nodes/decisionList.d.ts +1 -30
  347. package/dist/types/next-schema/nodes/embedCard.d.ts +1 -30
  348. package/dist/types/next-schema/nodes/emoji.d.ts +1 -30
  349. package/dist/types/next-schema/nodes/expand.d.ts +1 -30
  350. package/dist/types/next-schema/nodes/extension.d.ts +1 -30
  351. package/dist/types/next-schema/nodes/extensionFrame.d.ts +1 -30
  352. package/dist/types/next-schema/nodes/hardBreak.d.ts +1 -30
  353. package/dist/types/next-schema/nodes/heading.d.ts +2 -60
  354. package/dist/types/next-schema/nodes/image.d.ts +1 -30
  355. package/dist/types/next-schema/nodes/inlineCard.d.ts +1 -30
  356. package/dist/types/next-schema/nodes/inlineExtension.d.ts +1 -30
  357. package/dist/types/next-schema/nodes/layoutColumn.d.ts +1 -30
  358. package/dist/types/next-schema/nodes/layoutSection.d.ts +2 -30
  359. package/dist/types/next-schema/nodes/list.d.ts +2 -60
  360. package/dist/types/next-schema/nodes/media.d.ts +1 -30
  361. package/dist/types/next-schema/nodes/mediaGroup.d.ts +1 -30
  362. package/dist/types/next-schema/nodes/mediaInline.d.ts +1 -30
  363. package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -30
  364. package/dist/types/next-schema/nodes/mention.d.ts +1 -30
  365. package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -30
  366. package/dist/types/next-schema/nodes/nestedExpand.d.ts +1 -30
  367. package/dist/types/next-schema/nodes/panel.d.ts +1 -30
  368. package/dist/types/next-schema/nodes/paragraph.d.ts +1 -30
  369. package/dist/types/next-schema/nodes/placeholder.d.ts +1 -30
  370. package/dist/types/next-schema/nodes/rule.d.ts +1 -30
  371. package/dist/types/next-schema/nodes/status.d.ts +1 -30
  372. package/dist/types/next-schema/nodes/table.d.ts +1 -30
  373. package/dist/types/next-schema/nodes/tableCell.d.ts +1 -30
  374. package/dist/types/next-schema/nodes/tableCellContent.d.ts +1 -30
  375. package/dist/types/next-schema/nodes/tableHeader.d.ts +1 -30
  376. package/dist/types/next-schema/nodes/tableRow.d.ts +1 -30
  377. package/dist/types/next-schema/nodes/task.d.ts +2 -60
  378. package/dist/types/next-schema/nodes/text.d.ts +1 -30
  379. package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +1 -30
  380. package/dist/types/next-schema/nodes/unsupportedInline.d.ts +1 -30
  381. package/dist/types/schema/createPMSpecFactory.d.ts +33 -0
  382. package/dist/types/schema/index.d.ts +2 -0
  383. package/dist/types/schema/nodes/block-card.d.ts +1 -2
  384. package/dist/types/schema/nodes/blockquote.d.ts +2 -3
  385. package/dist/types/schema/nodes/bodied-extension.d.ts +1 -2
  386. package/dist/types/schema/nodes/bullet-list.d.ts +1 -2
  387. package/dist/types/schema/nodes/caption.d.ts +1 -2
  388. package/dist/types/schema/nodes/code-block.d.ts +2 -2
  389. package/dist/types/schema/nodes/confluence-jira-issue.d.ts +1 -2
  390. package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +1 -2
  391. package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +1 -2
  392. package/dist/types/schema/nodes/date.d.ts +1 -2
  393. package/dist/types/schema/nodes/decision-item.d.ts +1 -2
  394. package/dist/types/schema/nodes/decision-list.d.ts +1 -2
  395. package/dist/types/schema/nodes/doc.d.ts +1 -2
  396. package/dist/types/schema/nodes/embed-card.d.ts +1 -2
  397. package/dist/types/schema/nodes/emoji.d.ts +1 -2
  398. package/dist/types/schema/nodes/expand.d.ts +2 -2
  399. package/dist/types/schema/nodes/extension.d.ts +1 -2
  400. package/dist/types/schema/nodes/hard-break.d.ts +1 -2
  401. package/dist/types/schema/nodes/heading.d.ts +1 -2
  402. package/dist/types/schema/nodes/image.d.ts +1 -2
  403. package/dist/types/schema/nodes/inline-card.d.ts +1 -2
  404. package/dist/types/schema/nodes/inline-extension.d.ts +1 -2
  405. package/dist/types/schema/nodes/layout-column.d.ts +1 -2
  406. package/dist/types/schema/nodes/layout-section.d.ts +3 -3
  407. package/dist/types/schema/nodes/list-item.d.ts +2 -3
  408. package/dist/types/schema/nodes/media-group.d.ts +1 -2
  409. package/dist/types/schema/nodes/media.d.ts +3 -1
  410. package/dist/types/schema/nodes/mention.d.ts +2 -2
  411. package/dist/types/schema/nodes/multi-bodied-extension.d.ts +2 -3
  412. package/dist/types/schema/nodes/nested-expand.d.ts +1 -2
  413. package/dist/types/schema/nodes/ordered-list.d.ts +2 -3
  414. package/dist/types/schema/nodes/panel.d.ts +2 -3
  415. package/dist/types/schema/nodes/paragraph.d.ts +1 -2
  416. package/dist/types/schema/nodes/placeholder.d.ts +1 -2
  417. package/dist/types/schema/nodes/rule.d.ts +1 -2
  418. package/dist/types/schema/nodes/status.d.ts +1 -2
  419. package/dist/types/schema/nodes/tableNodes.d.ts +7 -7
  420. package/dist/types/schema/nodes/task-item.d.ts +1 -2
  421. package/dist/types/schema/nodes/task-list.d.ts +1 -2
  422. package/dist/types/schema/nodes/text.d.ts +1 -4
  423. package/dist/types/schema/nodes/unsupported-block.d.ts +1 -2
  424. package/dist/types/schema/nodes/unsupported-inline.d.ts +1 -2
  425. package/package.json +7 -4
  426. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -7
  427. package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +6 -4
  428. package/schema-generators/json-full-schema.ts +5 -4
  429. package/schema-generators/pm-full-schema.ts +3 -3
  430. package/schema-generators/validator-full-schema.ts +1 -1
@@ -1,11 +1,6 @@
1
+ import { confluenceUnsupportedBlock as confluenceUnsupportedBlockFactory } from '../../next-schema/generated/nodeTypes';
1
2
  const name = 'confluenceUnsupportedBlock';
2
- export const confluenceUnsupportedBlock = {
3
- group: 'block',
4
- attrs: {
5
- cxhtml: {
6
- default: null
7
- }
8
- },
3
+ export const confluenceUnsupportedBlock = confluenceUnsupportedBlockFactory({
9
4
  toDOM(node) {
10
5
  // NOTE: This node cannot be "contenteditable: false". If it's the only node in a document, PM throws an error because there's nowhere to put the cursor.
11
6
  const attrs = {
@@ -23,4 +18,4 @@ export const confluenceUnsupportedBlock = {
23
18
  };
24
19
  }
25
20
  }]
26
- };
21
+ });
@@ -1,13 +1,6 @@
1
+ import { confluenceUnsupportedInline as confluenceUnsupportedInlineFactory } from '../../next-schema/generated/nodeTypes';
1
2
  const name = 'confluenceUnsupportedInline';
2
- export const confluenceUnsupportedInline = {
3
- group: 'inline',
4
- inline: true,
5
- atom: true,
6
- attrs: {
7
- cxhtml: {
8
- default: null
9
- }
10
- },
3
+ export const confluenceUnsupportedInline = confluenceUnsupportedInlineFactory({
11
4
  toDOM(node) {
12
5
  const attrs = {
13
6
  'data-node-type': name,
@@ -24,4 +17,4 @@ export const confluenceUnsupportedInline = {
24
17
  };
25
18
  }
26
19
  }]
27
- };
20
+ });
@@ -1,16 +1,10 @@
1
+ import { date as dateFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name date_node
3
5
  */
4
6
 
5
- export const date = {
6
- inline: true,
7
- group: 'inline',
8
- selectable: true,
9
- attrs: {
10
- timestamp: {
11
- default: ''
12
- }
13
- },
7
+ export const date = dateFactory({
14
8
  parseDOM: [{
15
9
  tag: 'span[data-node-type="date"]',
16
10
  getAttrs: dom => ({
@@ -24,4 +18,4 @@ export const date = {
24
18
  };
25
19
  return ['span', attrs];
26
20
  }
27
- };
21
+ });
@@ -1,21 +1,11 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+ import { decisionItem as decisionItemFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name decisionItem_node
5
6
  */
6
7
 
7
- export const decisionItem = {
8
- content: 'inline*',
9
- defining: true,
10
- marks: '_',
11
- attrs: {
12
- localId: {
13
- default: ''
14
- },
15
- state: {
16
- default: 'DECIDED'
17
- }
18
- },
8
+ export const decisionItem = decisionItemFactory({
19
9
  parseDOM: [{
20
10
  tag: 'li[data-decision-local-id]',
21
11
  // Default priority is 50. We normally don't change this but since this node type is
@@ -37,4 +27,4 @@ export const decisionItem = {
37
27
  };
38
28
  return ['li', attrs, 0];
39
29
  }
40
- };
30
+ });
@@ -1,4 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+ import { decisionList as decisionListFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name decisionList_node
@@ -6,17 +7,7 @@ import { uuid } from '../../utils/uuid';
6
7
 
7
8
  const name = 'decisionList';
8
9
  export const decisionListSelector = `[data-node-type="${name}"]`;
9
- export const decisionList = {
10
- group: 'block',
11
- defining: true,
12
- content: '(decisionItem|unsupportedBlock)+',
13
- marks: 'unsupportedMark unsupportedNodeAttribute',
14
- selectable: false,
15
- attrs: {
16
- localId: {
17
- default: ''
18
- }
19
- },
10
+ export const decisionList = decisionListFactory({
20
11
  parseDOM: [{
21
12
  tag: `ol${decisionListSelector}`,
22
13
  // Default priority is 50. We normally don't change this but since this node type is
@@ -37,4 +28,4 @@ export const decisionList = {
37
28
  };
38
29
  return ['ol', attrs, 0];
39
30
  }
40
- };
31
+ });
@@ -1,8 +1,7 @@
1
+ import { doc as docFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name doc_node
3
5
  */
4
6
 
5
- export const doc = {
6
- content: '(block|layoutSection|blockRootOnly)+',
7
- marks: 'alignment breakout dataConsumer fragment indentation unsupportedMark unsupportedNodeAttribute'
8
- };
7
+ export const doc = docFactory({});
@@ -1,28 +1,10 @@
1
+ import { embedCard as embedCardFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name embedCard_node
3
5
  */
4
6
 
5
- export const embedCard = {
6
- inline: false,
7
- group: 'block',
8
- selectable: true,
9
- attrs: {
10
- url: {
11
- default: ''
12
- },
13
- layout: {
14
- default: 'center'
15
- },
16
- width: {
17
- default: 100
18
- },
19
- originalWidth: {
20
- default: null
21
- },
22
- originalHeight: {
23
- default: null
24
- }
25
- },
7
+ export const embedCard = embedCardFactory({
26
8
  parseDOM: [{
27
9
  tag: 'div[data-embed-card]',
28
10
  getAttrs: dom => ({
@@ -51,4 +33,4 @@ export const embedCard = {
51
33
  };
52
34
  return ['div', attrs];
53
35
  }
54
- };
36
+ });
@@ -1,24 +1,11 @@
1
1
  import { acNameToEmoji, acShortcutToEmoji } from '../../utils/confluence/emoji';
2
+ import { emoji as emojiFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name emoji_node
5
6
  */
6
7
 
7
- export const emoji = {
8
- inline: true,
9
- group: 'inline',
10
- selectable: true,
11
- attrs: {
12
- shortName: {
13
- default: ''
14
- },
15
- id: {
16
- default: ''
17
- },
18
- text: {
19
- default: ''
20
- }
21
- },
8
+ export const emoji = emojiFactory({
22
9
  parseDOM: [
23
10
  // Handle copy/paste beautiful panel from renderer />
24
11
  {
@@ -71,4 +58,4 @@ export const emoji = {
71
58
  };
72
59
  return ['span', attrs, text];
73
60
  }
74
- };
61
+ });
@@ -1,3 +1,5 @@
1
+ import { expand as expandFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name expand_node
3
5
  */
@@ -17,21 +19,7 @@ function getExpandAttrs(domNode) {
17
19
  __expanded: true
18
20
  };
19
21
  }
20
- export const expand = {
21
- inline: false,
22
- group: 'block',
23
- marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
24
- content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
25
- isolating: true,
26
- selectable: true,
27
- attrs: {
28
- title: {
29
- default: ''
30
- },
31
- __expanded: {
32
- default: true
33
- }
34
- },
22
+ export const expand = expandFactory({
35
23
  parseDOM: [{
36
24
  context: 'table//',
37
25
  tag: 'div[data-node-type="expand"]',
@@ -62,7 +50,7 @@ export const expand = {
62
50
  };
63
51
  return ['div', attrs, 0];
64
52
  }
65
- };
53
+ });
66
54
  export const toJSON = node => ({
67
55
  attrs: Object.keys(node.attrs).filter(key => !key.startsWith('__')).reduce((obj, key) => {
68
56
  return {
@@ -1,4 +1,5 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+ import { extension as extensionFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name extension_node
@@ -8,49 +9,21 @@ import { getExtensionAttrs } from '../../utils/extensions';
8
9
  * @name extension_with_marks_node
9
10
  */
10
11
 
11
- const createExtensionNodeSpec = () => {
12
- const nodeSpec = {
13
- inline: false,
14
- group: 'block',
15
- atom: true,
16
- selectable: true,
17
- attrs: {
18
- extensionType: {
19
- default: ''
20
- },
21
- extensionKey: {
22
- default: ''
23
- },
24
- parameters: {
25
- default: null
26
- },
27
- text: {
28
- default: null
29
- },
30
- layout: {
31
- default: 'default'
32
- },
33
- localId: {
34
- default: null
35
- }
36
- },
37
- parseDOM: [{
38
- tag: '[data-node-type="extension"]',
39
- getAttrs: domNode => getExtensionAttrs(domNode)
40
- }],
41
- toDOM(node) {
42
- const attrs = {
43
- 'data-node-type': 'extension',
44
- 'data-extension-type': node.attrs.extensionType,
45
- 'data-extension-key': node.attrs.extensionKey,
46
- 'data-text': node.attrs.text,
47
- 'data-parameters': JSON.stringify(node.attrs.parameters),
48
- 'data-layout': node.attrs.layout,
49
- 'data-local-id:': node.attrs.localId
50
- };
51
- return ['div', attrs];
52
- }
53
- };
54
- return nodeSpec;
55
- };
56
- export const extension = createExtensionNodeSpec();
12
+ export const extension = extensionFactory({
13
+ parseDOM: [{
14
+ tag: '[data-node-type="extension"]',
15
+ getAttrs: domNode => getExtensionAttrs(domNode)
16
+ }],
17
+ toDOM(node) {
18
+ const attrs = {
19
+ 'data-node-type': 'extension',
20
+ 'data-extension-type': node.attrs.extensionType,
21
+ 'data-extension-key': node.attrs.extensionKey,
22
+ 'data-text': node.attrs.text,
23
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
24
+ 'data-layout': node.attrs.layout,
25
+ 'data-local-id:': node.attrs.localId
26
+ };
27
+ return ['div', attrs];
28
+ }
29
+ });
@@ -1,15 +1,14 @@
1
+ import { hardBreak as hardBreakFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name hardBreak_node
3
5
  */
4
6
 
5
- export const hardBreak = {
6
- inline: true,
7
- group: 'inline',
8
- selectable: false,
7
+ export const hardBreak = hardBreakFactory({
9
8
  parseDOM: [{
10
9
  tag: 'br'
11
10
  }],
12
11
  toDOM() {
13
12
  return ['br'];
14
13
  }
15
- };
14
+ });
@@ -1,3 +1,5 @@
1
+ import { heading as headingFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name heading_node
3
5
  */
@@ -22,19 +24,7 @@ const getAttrs = level => domNode => {
22
24
  localId: domNode.getAttribute('data-local-id') || ((_heading$attrs = heading.attrs) === null || _heading$attrs === void 0 ? void 0 : (_heading$attrs$localI = _heading$attrs.localId) === null || _heading$attrs$localI === void 0 ? void 0 : _heading$attrs$localI.default)
23
25
  };
24
26
  };
25
- export const heading = {
26
- attrs: {
27
- level: {
28
- default: 1
29
- },
30
- localId: {
31
- default: null
32
- }
33
- },
34
- content: `inline*`,
35
- group: 'block',
36
- defining: true,
37
- selectable: false,
27
+ export const heading = headingFactory({
38
28
  parseDOM: [{
39
29
  tag: 'h1',
40
30
  getAttrs: getAttrs(1)
@@ -65,4 +55,4 @@ export const heading = {
65
55
  }] : [];
66
56
  return [name, ...attrs, 0];
67
57
  }
68
- };
58
+ });
@@ -1,18 +1,5 @@
1
- export const image = {
2
- group: 'inline',
3
- inline: true,
4
- attrs: {
5
- src: {
6
- default: ''
7
- },
8
- alt: {
9
- default: ''
10
- },
11
- title: {
12
- default: null
13
- }
14
- },
15
- draggable: true,
1
+ import { image as imageFactory } from '../../next-schema/generated/nodeTypes';
2
+ export const image = imageFactory({
16
3
  parseDOM: [{
17
4
  tag: 'img[src^="data:image/"]',
18
5
  ignore: true
@@ -30,4 +17,4 @@ export const image = {
30
17
  toDOM(node) {
31
18
  return ['img', node.attrs];
32
19
  }
33
- };
20
+ });
@@ -1,20 +1,10 @@
1
+ import { inlineCard as inlineCardFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name inlineCard_node
3
5
  */
4
6
 
5
- export const inlineCard = {
6
- inline: true,
7
- group: 'inline',
8
- selectable: true,
9
- draggable: true,
10
- attrs: {
11
- url: {
12
- default: null
13
- },
14
- data: {
15
- default: null
16
- }
17
- },
7
+ export const inlineCard = inlineCardFactory({
18
8
  parseDOM: [{
19
9
  tag: 'a[data-inline-card], span[data-inline-card]',
20
10
  // bump priority higher than hyperlink
@@ -54,4 +44,4 @@ export const inlineCard = {
54
44
  return ['a', attrs];
55
45
  }
56
46
  }
57
- };
47
+ });
@@ -1,4 +1,5 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+ import { inlineExtensionWithMarks as inlineExtensionWithMarksFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name inlineExtension_node
@@ -8,44 +9,20 @@ import { getExtensionAttrs } from '../../utils/extensions';
8
9
  * @name inlineExtension_with_marks_node
9
10
  */
10
11
 
11
- const createInlineExtensionNodeSpec = () => {
12
- const nodeSpec = {
13
- inline: true,
14
- group: 'inline',
15
- selectable: true,
16
- attrs: {
17
- extensionType: {
18
- default: ''
19
- },
20
- extensionKey: {
21
- default: ''
22
- },
23
- parameters: {
24
- default: null
25
- },
26
- text: {
27
- default: null
28
- },
29
- localId: {
30
- default: null
31
- }
32
- },
33
- parseDOM: [{
34
- tag: 'span[data-extension-type]',
35
- getAttrs: domNode => getExtensionAttrs(domNode, true)
36
- }],
37
- toDOM(node) {
38
- const attrs = {
39
- 'data-extension-type': node.attrs.extensionType,
40
- 'data-extension-key': node.attrs.extensionKey,
41
- 'data-text': node.attrs.text,
42
- 'data-parameters': JSON.stringify(node.attrs.parameters),
43
- 'data-local-id:': node.attrs.localId,
44
- contenteditable: 'false'
45
- };
46
- return ['span', attrs];
47
- }
48
- };
49
- return nodeSpec;
50
- };
51
- export const inlineExtension = createInlineExtensionNodeSpec();
12
+ export const inlineExtension = inlineExtensionWithMarksFactory({
13
+ parseDOM: [{
14
+ tag: 'span[data-extension-type]',
15
+ getAttrs: domNode => getExtensionAttrs(domNode, true)
16
+ }],
17
+ toDOM(node) {
18
+ const attrs = {
19
+ 'data-extension-type': node.attrs.extensionType,
20
+ 'data-extension-key': node.attrs.extensionKey,
21
+ 'data-text': node.attrs.text,
22
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
23
+ 'data-local-id:': node.attrs.localId,
24
+ contenteditable: 'false'
25
+ };
26
+ return ['span', attrs];
27
+ }
28
+ });
@@ -1,17 +1,10 @@
1
+ import { layoutColumn as layoutColumnFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name layoutColumn_node
3
5
  */
4
6
 
5
- export const layoutColumn = {
6
- content: '(block|unsupportedBlock)+',
7
- isolating: true,
8
- marks: 'alignment indentation dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
9
- selectable: false,
10
- attrs: {
11
- width: {
12
- default: undefined
13
- }
14
- },
7
+ export const layoutColumn = layoutColumnFactory({
15
8
  parseDOM: [{
16
9
  context: 'layoutColumn//',
17
10
  tag: 'div[data-layout-column]',
@@ -34,7 +27,7 @@ export const layoutColumn = {
34
27
  } = node.attrs;
35
28
  if (width) {
36
29
  attrs['style'] = `flex-basis: ${width}%`;
37
- attrs['data-column-width'] = width;
30
+ attrs['data-column-width'] = `${width}`;
38
31
  }
39
32
 
40
33
  // We need to apply a attribute to the inner most child to help
@@ -44,4 +37,4 @@ export const layoutColumn = {
44
37
  };
45
38
  return ['div', attrs, ['div', contentAttrs, 0]];
46
39
  }
47
- };
40
+ });
@@ -1,3 +1,6 @@
1
+ import { layoutSection as layoutSectionFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { layoutSectionFull as layoutSectionFullFactory } from '../../next-schema/generated/nodeTypes';
3
+
1
4
  /**
2
5
  * @name layoutSection_node
3
6
  */
@@ -15,10 +18,7 @@
15
18
  * @name layoutSection_with_single_column_node
16
19
  */
17
20
 
18
- export const layoutSection = {
19
- content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
20
- marks: 'unsupportedMark unsupportedNodeAttribute',
21
- isolating: true,
21
+ export const layoutSection = layoutSectionFactory({
22
22
  parseDOM: [{
23
23
  context: 'layoutSection//|layoutColumn//',
24
24
  tag: 'div[data-layout-section]',
@@ -32,11 +32,25 @@ export const layoutSection = {
32
32
  };
33
33
  return ['div', attrs, 0];
34
34
  }
35
- };
36
- export const layoutSectionWithSingleColumn = {
37
- content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
38
- marks: 'unsupportedMark unsupportedNodeAttribute',
39
- isolating: true,
35
+ });
36
+ export const layoutSectionFull = layoutSectionFullFactory({
37
+ parseDOM: [{
38
+ context: 'layoutSection//|layoutColumn//',
39
+ tag: 'div[data-layout-section]',
40
+ skip: true
41
+ }, {
42
+ tag: 'div[data-layout-section]'
43
+ }],
44
+ toDOM() {
45
+ const attrs = {
46
+ 'data-layout-section': 'true'
47
+ };
48
+ return ['div', attrs, 0];
49
+ }
50
+ });
51
+
52
+ // it's same as layoutSection
53
+ export const layoutSectionWithSingleColumn = layoutSectionFactory({
40
54
  parseDOM: [{
41
55
  context: 'layoutSection//|layoutColumn//',
42
56
  tag: 'div[data-layout-section]',
@@ -50,4 +64,4 @@ export const layoutSectionWithSingleColumn = {
50
64
  };
51
65
  return ['div', attrs, 0];
52
66
  }
53
- };
67
+ });
@@ -1,29 +1,23 @@
1
- export const listItem = {
2
- content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock) (paragraph | bulletList | orderedList | mediaSingle | codeBlock | unsupportedBlock)*',
3
- marks: 'unsupportedMark unsupportedNodeAttribute',
4
- defining: true,
5
- selectable: false,
1
+ import { listItem as listItemFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { listItemLegacy as listItemLegacyFactory } from '../../next-schema/generated/nodeTypes';
3
+ export const listItem = listItemLegacyFactory({
6
4
  parseDOM: [{
7
5
  tag: 'li'
8
6
  }],
9
7
  toDOM() {
10
8
  return ['li', 0];
11
9
  }
12
- };
10
+ });
13
11
 
14
12
  /**
15
13
  * @name list_item_with_task
16
14
  * @description this node allows task-list to be nested inside list-item
17
15
  */
18
- export const listItemWithTask = {
19
- content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock)*',
20
- marks: 'unsupportedMark unsupportedNodeAttribute',
21
- defining: true,
22
- selectable: false,
16
+ export const listItemWithTask = listItemFactory({
23
17
  parseDOM: [{
24
18
  tag: 'li'
25
19
  }],
26
20
  toDOM() {
27
21
  return ['li', 0];
28
22
  }
29
- };
23
+ });
@@ -1,3 +1,5 @@
1
+ import { mediaGroup as mediaGroupFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name mediaGroup_node
3
5
  */
@@ -5,13 +7,7 @@
5
7
  // Temporary due to an existing issue in validator below:
6
8
  // https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-1429
7
9
  // TODO: Remove border and link marks from white list
8
- export const mediaGroup = {
9
- inline: false,
10
- group: 'block',
11
- content: '(media|unsupportedBlock)+',
12
- attrs: {},
13
- marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
14
- selectable: false,
10
+ export const mediaGroup = mediaGroupFactory({
15
11
  parseDOM: [{
16
12
  tag: 'div[data-node-type="mediaGroup"]'
17
13
  }, {
@@ -22,4 +18,4 @@ export const mediaGroup = {
22
18
  'data-node-type': 'mediaGroup'
23
19
  }, 0];
24
20
  }
25
- };
21
+ });
@@ -1,7 +1,8 @@
1
- import { createMediaSpec, defaultAttrs } from './media';
1
+ import { createMediaSpec } from './media';
2
+ import { mediaInline as mediaInlineFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name mediaInline_node
5
6
  */
6
7
 
7
- export const mediaInline = createMediaSpec(defaultAttrs, true);
8
+ export const mediaInline = createMediaSpec(mediaInlineFactory({}).attrs, true);