@atlaskit/adf-schema 37.2.1 → 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 (361) hide show
  1. package/CHANGELOG.md +6 -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 +114 -114
  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/nodes/blockCard.js +1 -1
  8. package/dist/cjs/next-schema/nodes/blockquote.js +2 -2
  9. package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
  10. package/dist/cjs/next-schema/nodes/caption.js +1 -1
  11. package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
  12. package/dist/cjs/next-schema/nodes/decisionItem.js +1 -1
  13. package/dist/cjs/next-schema/nodes/decisionList.js +1 -1
  14. package/dist/cjs/next-schema/nodes/embedCard.js +1 -1
  15. package/dist/cjs/next-schema/nodes/expand.js +2 -2
  16. package/dist/cjs/next-schema/nodes/extension.js +2 -2
  17. package/dist/cjs/next-schema/nodes/extensionFrame.js +2 -2
  18. package/dist/cjs/next-schema/nodes/hardBreak.js +1 -1
  19. package/dist/cjs/next-schema/nodes/heading.js +3 -3
  20. package/dist/cjs/next-schema/nodes/inlineCard.js +2 -2
  21. package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
  22. package/dist/cjs/next-schema/nodes/layoutColumn.js +1 -1
  23. package/dist/cjs/next-schema/nodes/layoutSection.js +2 -2
  24. package/dist/cjs/next-schema/nodes/list.js +5 -5
  25. package/dist/cjs/next-schema/nodes/media.js +1 -1
  26. package/dist/cjs/next-schema/nodes/mediaGroup.js +1 -1
  27. package/dist/cjs/next-schema/nodes/mediaInline.js +1 -1
  28. package/dist/cjs/next-schema/nodes/mediaSingle.js +5 -5
  29. package/dist/cjs/next-schema/nodes/nestedExpand.js +2 -2
  30. package/dist/cjs/next-schema/nodes/panel.js +3 -3
  31. package/dist/cjs/next-schema/nodes/paragraph.js +4 -4
  32. package/dist/cjs/next-schema/nodes/placeholder.js +1 -1
  33. package/dist/cjs/next-schema/nodes/table.js +1 -1
  34. package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
  35. package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
  36. package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
  37. package/dist/cjs/next-schema/nodes/task.js +2 -2
  38. package/dist/cjs/next-schema/nodes/text.js +1 -1
  39. package/dist/cjs/schema/createPMSpecFactory.js +57 -0
  40. package/dist/cjs/schema/index.js +14 -1
  41. package/dist/cjs/schema/marks/alignment.js +3 -8
  42. package/dist/cjs/schema/marks/annotation.js +3 -13
  43. package/dist/cjs/schema/marks/background-color.js +3 -9
  44. package/dist/cjs/schema/marks/border.js +3 -7
  45. package/dist/cjs/schema/marks/breakout.js +3 -9
  46. package/dist/cjs/schema/marks/code.js +3 -5
  47. package/dist/cjs/schema/marks/confluence-inline-comment.js +3 -9
  48. package/dist/cjs/schema/marks/data-consumer.js +3 -7
  49. package/dist/cjs/schema/marks/em.js +3 -5
  50. package/dist/cjs/schema/marks/fragment.js +3 -12
  51. package/dist/cjs/schema/marks/indentation.js +3 -8
  52. package/dist/cjs/schema/marks/link.js +3 -13
  53. package/dist/cjs/schema/marks/strike.js +3 -5
  54. package/dist/cjs/schema/marks/strong.js +3 -5
  55. package/dist/cjs/schema/marks/subsup.js +3 -10
  56. package/dist/cjs/schema/marks/text-color.js +3 -8
  57. package/dist/cjs/schema/marks/type-ahead-query.js +3 -10
  58. package/dist/cjs/schema/marks/underline.js +3 -5
  59. package/dist/cjs/schema/marks/unsupported-mark.js +3 -6
  60. package/dist/cjs/schema/marks/unsupported-node-attributes.js +3 -6
  61. package/dist/cjs/schema/nodes/block-card.js +3 -23
  62. package/dist/cjs/schema/nodes/blockquote.js +17 -20
  63. package/dist/cjs/schema/nodes/bodied-extension.js +24 -54
  64. package/dist/cjs/schema/nodes/bullet-list.js +3 -6
  65. package/dist/cjs/schema/nodes/caption.js +3 -6
  66. package/dist/cjs/schema/nodes/code-block.js +3 -15
  67. package/dist/cjs/schema/nodes/confluence-jira-issue.js +3 -22
  68. package/dist/cjs/schema/nodes/confluence-unsupported-block.js +3 -8
  69. package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +3 -10
  70. package/dist/cjs/schema/nodes/date.js +3 -10
  71. package/dist/cjs/schema/nodes/decision-item.js +3 -13
  72. package/dist/cjs/schema/nodes/decision-list.js +3 -12
  73. package/dist/cjs/schema/nodes/doc.js +2 -4
  74. package/dist/cjs/schema/nodes/embed-card.js +3 -22
  75. package/dist/cjs/schema/nodes/emoji.js +3 -16
  76. package/dist/cjs/schema/nodes/expand.js +3 -16
  77. package/dist/cjs/schema/nodes/extension.js +20 -47
  78. package/dist/cjs/schema/nodes/hard-break.js +3 -5
  79. package/dist/cjs/schema/nodes/heading.js +3 -14
  80. package/dist/cjs/schema/nodes/image.js +3 -16
  81. package/dist/cjs/schema/nodes/inline-card.js +3 -14
  82. package/dist/cjs/schema/nodes/inline-extension.js +19 -42
  83. package/dist/cjs/schema/nodes/layout-column.js +4 -12
  84. package/dist/cjs/schema/nodes/layout-section.js +23 -11
  85. package/dist/cjs/schema/nodes/list-item.js +5 -12
  86. package/dist/cjs/schema/nodes/media-group.js +3 -8
  87. package/dist/cjs/schema/nodes/media-inline.js +2 -1
  88. package/dist/cjs/schema/nodes/media-single.js +35 -14
  89. package/dist/cjs/schema/nodes/media.js +35 -83
  90. package/dist/cjs/schema/nodes/mention.js +3 -22
  91. package/dist/cjs/schema/nodes/multi-bodied-extension.js +26 -64
  92. package/dist/cjs/schema/nodes/nested-expand.js +31 -48
  93. package/dist/cjs/schema/nodes/ordered-list.js +4 -16
  94. package/dist/cjs/schema/nodes/panel.js +5 -34
  95. package/dist/cjs/schema/nodes/paragraph.js +3 -11
  96. package/dist/cjs/schema/nodes/placeholder.js +3 -11
  97. package/dist/cjs/schema/nodes/rule.js +3 -3
  98. package/dist/cjs/schema/nodes/status.js +3 -19
  99. package/dist/cjs/schema/nodes/tableNodes.js +9 -52
  100. package/dist/cjs/schema/nodes/task-item.js +3 -14
  101. package/dist/cjs/schema/nodes/task-list.js +3 -12
  102. package/dist/cjs/schema/nodes/text.js +3 -4
  103. package/dist/cjs/schema/nodes/unsupported-block.js +3 -11
  104. package/dist/cjs/schema/nodes/unsupported-inline.js +3 -10
  105. package/dist/es2019/index.js +5 -1
  106. package/dist/es2019/next-schema/generated/markTypes.js +1 -1
  107. package/dist/es2019/next-schema/generated/nodeTypes.js +39 -39
  108. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  109. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  110. package/dist/es2019/next-schema/nodes/blockCard.js +1 -1
  111. package/dist/es2019/next-schema/nodes/blockquote.js +2 -2
  112. package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
  113. package/dist/es2019/next-schema/nodes/caption.js +1 -1
  114. package/dist/es2019/next-schema/nodes/codeBlock.js +2 -2
  115. package/dist/es2019/next-schema/nodes/decisionItem.js +1 -1
  116. package/dist/es2019/next-schema/nodes/decisionList.js +1 -1
  117. package/dist/es2019/next-schema/nodes/embedCard.js +1 -1
  118. package/dist/es2019/next-schema/nodes/expand.js +2 -2
  119. package/dist/es2019/next-schema/nodes/extension.js +2 -2
  120. package/dist/es2019/next-schema/nodes/extensionFrame.js +2 -2
  121. package/dist/es2019/next-schema/nodes/hardBreak.js +1 -1
  122. package/dist/es2019/next-schema/nodes/heading.js +3 -3
  123. package/dist/es2019/next-schema/nodes/inlineCard.js +2 -2
  124. package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
  125. package/dist/es2019/next-schema/nodes/layoutColumn.js +1 -1
  126. package/dist/es2019/next-schema/nodes/layoutSection.js +2 -2
  127. package/dist/es2019/next-schema/nodes/list.js +5 -5
  128. package/dist/es2019/next-schema/nodes/media.js +1 -1
  129. package/dist/es2019/next-schema/nodes/mediaGroup.js +1 -1
  130. package/dist/es2019/next-schema/nodes/mediaInline.js +1 -1
  131. package/dist/es2019/next-schema/nodes/mediaSingle.js +5 -5
  132. package/dist/es2019/next-schema/nodes/nestedExpand.js +2 -2
  133. package/dist/es2019/next-schema/nodes/panel.js +3 -3
  134. package/dist/es2019/next-schema/nodes/paragraph.js +4 -4
  135. package/dist/es2019/next-schema/nodes/placeholder.js +1 -1
  136. package/dist/es2019/next-schema/nodes/table.js +1 -1
  137. package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
  138. package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
  139. package/dist/es2019/next-schema/nodes/tableRow.js +1 -1
  140. package/dist/es2019/next-schema/nodes/task.js +2 -2
  141. package/dist/es2019/next-schema/nodes/text.js +1 -1
  142. package/dist/es2019/schema/createPMSpecFactory.js +55 -0
  143. package/dist/es2019/schema/index.js +5 -1
  144. package/dist/es2019/schema/marks/alignment.js +3 -8
  145. package/dist/es2019/schema/marks/annotation.js +4 -13
  146. package/dist/es2019/schema/marks/background-color.js +3 -9
  147. package/dist/es2019/schema/marks/border.js +3 -7
  148. package/dist/es2019/schema/marks/breakout.js +3 -9
  149. package/dist/es2019/schema/marks/code.js +3 -5
  150. package/dist/es2019/schema/marks/confluence-inline-comment.js +4 -9
  151. package/dist/es2019/schema/marks/data-consumer.js +3 -7
  152. package/dist/es2019/schema/marks/em.js +3 -5
  153. package/dist/es2019/schema/marks/fragment.js +3 -12
  154. package/dist/es2019/schema/marks/indentation.js +3 -8
  155. package/dist/es2019/schema/marks/link.js +3 -13
  156. package/dist/es2019/schema/marks/strike.js +3 -5
  157. package/dist/es2019/schema/marks/strong.js +3 -5
  158. package/dist/es2019/schema/marks/subsup.js +3 -10
  159. package/dist/es2019/schema/marks/text-color.js +3 -8
  160. package/dist/es2019/schema/marks/type-ahead-query.js +3 -10
  161. package/dist/es2019/schema/marks/underline.js +3 -5
  162. package/dist/es2019/schema/marks/unsupported-mark.js +3 -6
  163. package/dist/es2019/schema/marks/unsupported-node-attributes.js +3 -6
  164. package/dist/es2019/schema/nodes/block-card.js +4 -23
  165. package/dist/es2019/schema/nodes/blockquote.js +19 -20
  166. package/dist/es2019/schema/nodes/bodied-extension.js +23 -53
  167. package/dist/es2019/schema/nodes/bullet-list.js +3 -6
  168. package/dist/es2019/schema/nodes/caption.js +4 -6
  169. package/dist/es2019/schema/nodes/code-block.js +3 -15
  170. package/dist/es2019/schema/nodes/confluence-jira-issue.js +3 -22
  171. package/dist/es2019/schema/nodes/confluence-unsupported-block.js +3 -8
  172. package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +3 -10
  173. package/dist/es2019/schema/nodes/date.js +4 -10
  174. package/dist/es2019/schema/nodes/decision-item.js +3 -13
  175. package/dist/es2019/schema/nodes/decision-list.js +3 -12
  176. package/dist/es2019/schema/nodes/doc.js +3 -4
  177. package/dist/es2019/schema/nodes/embed-card.js +4 -22
  178. package/dist/es2019/schema/nodes/emoji.js +3 -16
  179. package/dist/es2019/schema/nodes/expand.js +4 -16
  180. package/dist/es2019/schema/nodes/extension.js +19 -46
  181. package/dist/es2019/schema/nodes/hard-break.js +4 -5
  182. package/dist/es2019/schema/nodes/heading.js +4 -14
  183. package/dist/es2019/schema/nodes/image.js +3 -16
  184. package/dist/es2019/schema/nodes/inline-card.js +4 -14
  185. package/dist/es2019/schema/nodes/inline-extension.js +18 -41
  186. package/dist/es2019/schema/nodes/layout-column.js +5 -12
  187. package/dist/es2019/schema/nodes/layout-section.js +24 -10
  188. package/dist/es2019/schema/nodes/list-item.js +6 -12
  189. package/dist/es2019/schema/nodes/media-group.js +4 -8
  190. package/dist/es2019/schema/nodes/media-inline.js +3 -2
  191. package/dist/es2019/schema/nodes/media-single.js +35 -15
  192. package/dist/es2019/schema/nodes/media.js +35 -78
  193. package/dist/es2019/schema/nodes/mention.js +3 -22
  194. package/dist/es2019/schema/nodes/multi-bodied-extension.js +26 -63
  195. package/dist/es2019/schema/nodes/nested-expand.js +32 -48
  196. package/dist/es2019/schema/nodes/ordered-list.js +5 -14
  197. package/dist/es2019/schema/nodes/panel.js +5 -34
  198. package/dist/es2019/schema/nodes/paragraph.js +4 -11
  199. package/dist/es2019/schema/nodes/placeholder.js +4 -11
  200. package/dist/es2019/schema/nodes/rule.js +4 -3
  201. package/dist/es2019/schema/nodes/status.js +3 -19
  202. package/dist/es2019/schema/nodes/tableNodes.js +40 -82
  203. package/dist/es2019/schema/nodes/task-item.js +3 -14
  204. package/dist/es2019/schema/nodes/task-list.js +3 -12
  205. package/dist/es2019/schema/nodes/text.js +4 -4
  206. package/dist/es2019/schema/nodes/unsupported-block.js +3 -11
  207. package/dist/es2019/schema/nodes/unsupported-inline.js +3 -10
  208. package/dist/esm/index.js +5 -1
  209. package/dist/esm/next-schema/generated/markTypes.js +1 -1
  210. package/dist/esm/next-schema/generated/nodeTypes.js +39 -39
  211. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  212. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  213. package/dist/esm/next-schema/nodes/blockCard.js +1 -1
  214. package/dist/esm/next-schema/nodes/blockquote.js +2 -2
  215. package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
  216. package/dist/esm/next-schema/nodes/caption.js +1 -1
  217. package/dist/esm/next-schema/nodes/codeBlock.js +2 -2
  218. package/dist/esm/next-schema/nodes/decisionItem.js +1 -1
  219. package/dist/esm/next-schema/nodes/decisionList.js +1 -1
  220. package/dist/esm/next-schema/nodes/embedCard.js +1 -1
  221. package/dist/esm/next-schema/nodes/expand.js +2 -2
  222. package/dist/esm/next-schema/nodes/extension.js +2 -2
  223. package/dist/esm/next-schema/nodes/extensionFrame.js +2 -2
  224. package/dist/esm/next-schema/nodes/hardBreak.js +1 -1
  225. package/dist/esm/next-schema/nodes/heading.js +3 -3
  226. package/dist/esm/next-schema/nodes/inlineCard.js +2 -2
  227. package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
  228. package/dist/esm/next-schema/nodes/layoutColumn.js +1 -1
  229. package/dist/esm/next-schema/nodes/layoutSection.js +2 -2
  230. package/dist/esm/next-schema/nodes/list.js +5 -5
  231. package/dist/esm/next-schema/nodes/media.js +1 -1
  232. package/dist/esm/next-schema/nodes/mediaGroup.js +1 -1
  233. package/dist/esm/next-schema/nodes/mediaInline.js +1 -1
  234. package/dist/esm/next-schema/nodes/mediaSingle.js +5 -5
  235. package/dist/esm/next-schema/nodes/nestedExpand.js +2 -2
  236. package/dist/esm/next-schema/nodes/panel.js +3 -3
  237. package/dist/esm/next-schema/nodes/paragraph.js +4 -4
  238. package/dist/esm/next-schema/nodes/placeholder.js +1 -1
  239. package/dist/esm/next-schema/nodes/table.js +1 -1
  240. package/dist/esm/next-schema/nodes/tableCell.js +1 -1
  241. package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
  242. package/dist/esm/next-schema/nodes/tableRow.js +1 -1
  243. package/dist/esm/next-schema/nodes/task.js +2 -2
  244. package/dist/esm/next-schema/nodes/text.js +1 -1
  245. package/dist/esm/schema/createPMSpecFactory.js +50 -0
  246. package/dist/esm/schema/index.js +5 -1
  247. package/dist/esm/schema/marks/alignment.js +3 -8
  248. package/dist/esm/schema/marks/annotation.js +4 -13
  249. package/dist/esm/schema/marks/background-color.js +3 -9
  250. package/dist/esm/schema/marks/border.js +3 -7
  251. package/dist/esm/schema/marks/breakout.js +3 -9
  252. package/dist/esm/schema/marks/code.js +3 -5
  253. package/dist/esm/schema/marks/confluence-inline-comment.js +4 -9
  254. package/dist/esm/schema/marks/data-consumer.js +3 -7
  255. package/dist/esm/schema/marks/em.js +3 -5
  256. package/dist/esm/schema/marks/fragment.js +3 -12
  257. package/dist/esm/schema/marks/indentation.js +3 -8
  258. package/dist/esm/schema/marks/link.js +3 -13
  259. package/dist/esm/schema/marks/strike.js +3 -5
  260. package/dist/esm/schema/marks/strong.js +3 -5
  261. package/dist/esm/schema/marks/subsup.js +3 -10
  262. package/dist/esm/schema/marks/text-color.js +3 -8
  263. package/dist/esm/schema/marks/type-ahead-query.js +3 -10
  264. package/dist/esm/schema/marks/underline.js +3 -5
  265. package/dist/esm/schema/marks/unsupported-mark.js +3 -6
  266. package/dist/esm/schema/marks/unsupported-node-attributes.js +3 -6
  267. package/dist/esm/schema/nodes/block-card.js +4 -23
  268. package/dist/esm/schema/nodes/blockquote.js +19 -20
  269. package/dist/esm/schema/nodes/bodied-extension.js +24 -54
  270. package/dist/esm/schema/nodes/bullet-list.js +3 -6
  271. package/dist/esm/schema/nodes/caption.js +4 -6
  272. package/dist/esm/schema/nodes/code-block.js +3 -15
  273. package/dist/esm/schema/nodes/confluence-jira-issue.js +3 -22
  274. package/dist/esm/schema/nodes/confluence-unsupported-block.js +3 -8
  275. package/dist/esm/schema/nodes/confluence-unsupported-inline.js +3 -10
  276. package/dist/esm/schema/nodes/date.js +4 -10
  277. package/dist/esm/schema/nodes/decision-item.js +3 -13
  278. package/dist/esm/schema/nodes/decision-list.js +3 -12
  279. package/dist/esm/schema/nodes/doc.js +3 -4
  280. package/dist/esm/schema/nodes/embed-card.js +4 -22
  281. package/dist/esm/schema/nodes/emoji.js +3 -16
  282. package/dist/esm/schema/nodes/expand.js +4 -16
  283. package/dist/esm/schema/nodes/extension.js +20 -47
  284. package/dist/esm/schema/nodes/hard-break.js +4 -5
  285. package/dist/esm/schema/nodes/heading.js +4 -14
  286. package/dist/esm/schema/nodes/image.js +3 -16
  287. package/dist/esm/schema/nodes/inline-card.js +4 -14
  288. package/dist/esm/schema/nodes/inline-extension.js +19 -42
  289. package/dist/esm/schema/nodes/layout-column.js +5 -12
  290. package/dist/esm/schema/nodes/layout-section.js +24 -10
  291. package/dist/esm/schema/nodes/list-item.js +6 -12
  292. package/dist/esm/schema/nodes/media-group.js +4 -8
  293. package/dist/esm/schema/nodes/media-inline.js +3 -2
  294. package/dist/esm/schema/nodes/media-single.js +35 -14
  295. package/dist/esm/schema/nodes/media.js +36 -82
  296. package/dist/esm/schema/nodes/mention.js +3 -22
  297. package/dist/esm/schema/nodes/multi-bodied-extension.js +27 -64
  298. package/dist/esm/schema/nodes/nested-expand.js +32 -48
  299. package/dist/esm/schema/nodes/ordered-list.js +4 -15
  300. package/dist/esm/schema/nodes/panel.js +5 -34
  301. package/dist/esm/schema/nodes/paragraph.js +4 -11
  302. package/dist/esm/schema/nodes/placeholder.js +4 -11
  303. package/dist/esm/schema/nodes/rule.js +4 -3
  304. package/dist/esm/schema/nodes/status.js +3 -19
  305. package/dist/esm/schema/nodes/tableNodes.js +12 -52
  306. package/dist/esm/schema/nodes/task-item.js +3 -14
  307. package/dist/esm/schema/nodes/task-list.js +3 -12
  308. package/dist/esm/schema/nodes/text.js +4 -4
  309. package/dist/esm/schema/nodes/unsupported-block.js +3 -11
  310. package/dist/esm/schema/nodes/unsupported-inline.js +3 -10
  311. package/dist/types/index.d.ts +2 -0
  312. package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
  313. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +1 -1
  314. package/dist/types/next-schema/generated/nodeTypes.d.ts +75 -75
  315. package/dist/types/schema/createPMSpecFactory.d.ts +33 -0
  316. package/dist/types/schema/index.d.ts +2 -0
  317. package/dist/types/schema/nodes/block-card.d.ts +1 -2
  318. package/dist/types/schema/nodes/blockquote.d.ts +2 -3
  319. package/dist/types/schema/nodes/bodied-extension.d.ts +1 -2
  320. package/dist/types/schema/nodes/bullet-list.d.ts +1 -2
  321. package/dist/types/schema/nodes/caption.d.ts +1 -2
  322. package/dist/types/schema/nodes/code-block.d.ts +2 -2
  323. package/dist/types/schema/nodes/confluence-jira-issue.d.ts +1 -2
  324. package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +1 -2
  325. package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +1 -2
  326. package/dist/types/schema/nodes/date.d.ts +1 -2
  327. package/dist/types/schema/nodes/decision-item.d.ts +1 -2
  328. package/dist/types/schema/nodes/decision-list.d.ts +1 -2
  329. package/dist/types/schema/nodes/doc.d.ts +1 -2
  330. package/dist/types/schema/nodes/embed-card.d.ts +1 -2
  331. package/dist/types/schema/nodes/emoji.d.ts +1 -2
  332. package/dist/types/schema/nodes/expand.d.ts +2 -2
  333. package/dist/types/schema/nodes/extension.d.ts +1 -2
  334. package/dist/types/schema/nodes/hard-break.d.ts +1 -2
  335. package/dist/types/schema/nodes/heading.d.ts +1 -2
  336. package/dist/types/schema/nodes/image.d.ts +1 -2
  337. package/dist/types/schema/nodes/inline-card.d.ts +1 -2
  338. package/dist/types/schema/nodes/inline-extension.d.ts +1 -2
  339. package/dist/types/schema/nodes/layout-column.d.ts +1 -2
  340. package/dist/types/schema/nodes/layout-section.d.ts +3 -3
  341. package/dist/types/schema/nodes/list-item.d.ts +2 -3
  342. package/dist/types/schema/nodes/media-group.d.ts +1 -2
  343. package/dist/types/schema/nodes/media.d.ts +3 -1
  344. package/dist/types/schema/nodes/mention.d.ts +2 -2
  345. package/dist/types/schema/nodes/multi-bodied-extension.d.ts +2 -3
  346. package/dist/types/schema/nodes/nested-expand.d.ts +1 -2
  347. package/dist/types/schema/nodes/ordered-list.d.ts +2 -3
  348. package/dist/types/schema/nodes/panel.d.ts +2 -3
  349. package/dist/types/schema/nodes/paragraph.d.ts +1 -2
  350. package/dist/types/schema/nodes/placeholder.d.ts +1 -2
  351. package/dist/types/schema/nodes/rule.d.ts +1 -2
  352. package/dist/types/schema/nodes/status.d.ts +1 -2
  353. package/dist/types/schema/nodes/tableNodes.d.ts +7 -7
  354. package/dist/types/schema/nodes/task-item.d.ts +1 -2
  355. package/dist/types/schema/nodes/task-list.d.ts +1 -2
  356. package/dist/types/schema/nodes/text.d.ts +1 -4
  357. package/dist/types/schema/nodes/unsupported-block.d.ts +1 -2
  358. package/dist/types/schema/nodes/unsupported-inline.d.ts +1 -2
  359. package/package.json +2 -2
  360. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -7
  361. package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +4 -4
@@ -1,4 +1,6 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+ import { multiBodiedExtensionStage0 as multiBodiedExtensionStage0Factory } from '../../next-schema/generated/nodeTypes';
3
+ import { extensionFrameStage0 as extensionFrameStage0Factory } from '../../next-schema/generated/nodeTypes';
2
4
 
3
5
  /**
4
6
  * @stage 0
@@ -9,14 +11,7 @@ import { getExtensionAttrs } from '../../utils/extensions';
9
11
  /**
10
12
  * @returns NodeSpec for ExtensionFrameDefinition
11
13
  */
12
- export const extensionFrame = {
13
- content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
14
- isolating: true,
15
- marks: 'dataConsumer fragment',
16
- definingAsContext: false,
17
- definingForContent: true,
18
- selectable: false,
19
- attrs: {},
14
+ export const extensionFrame = extensionFrameStage0Factory({
20
15
  parseDOM: [{
21
16
  context: 'extensionFrame//',
22
17
  tag: 'div[data-extension-frame]',
@@ -30,7 +25,7 @@ export const extensionFrame = {
30
25
  };
31
26
  return ['div', attrs, 0];
32
27
  }
33
- };
28
+ });
34
29
 
35
30
  /**
36
31
  * @stage 0
@@ -38,57 +33,25 @@ export const extensionFrame = {
38
33
  * @description Wraps multiple extensionFrame objects.
39
34
  */
40
35
 
41
- /**
42
- * @returns NodeSpec for MultiBodiedExtensionDefinition
43
- */
44
- const createMultiBodiedExtensionNodeSpec = () => {
45
- const nodeSpec = {
46
- inline: false,
47
- group: 'blockRootOnly',
48
- content: 'extensionFrame+',
49
- definingAsContext: true,
50
- selectable: true,
51
- attrs: {
52
- extensionKey: {
53
- default: ''
54
- },
55
- extensionType: {
56
- default: ''
57
- },
58
- parameters: {
59
- default: null
60
- },
61
- text: {
62
- default: null
63
- },
64
- layout: {
65
- default: 'default'
66
- },
67
- localId: {
68
- default: null
69
- }
70
- },
71
- parseDOM: [{
72
- context: 'multiBodiedExtension//',
73
- tag: '[data-node-type="multi-bodied-extension"]',
74
- skip: true
75
- }, {
76
- tag: '[data-node-type="multi-bodied-extension"]',
77
- getAttrs: domNode => getExtensionAttrs(domNode)
78
- }],
79
- toDOM(node) {
80
- const attrs = {
81
- 'data-node-type': 'multi-bodied-extension',
82
- 'data-extension-type': node.attrs.extensionType,
83
- 'data-extension-key': node.attrs.extensionKey,
84
- 'data-text': node.attrs.text,
85
- 'data-parameters': JSON.stringify(node.attrs.parameters),
86
- 'data-layout': node.attrs.layout,
87
- 'data-local-id:': node.attrs.localId
88
- };
89
- return ['div', attrs, 0];
90
- }
91
- };
92
- return nodeSpec;
93
- };
94
- export const multiBodiedExtension = createMultiBodiedExtensionNodeSpec();
36
+ export const multiBodiedExtension = multiBodiedExtensionStage0Factory({
37
+ parseDOM: [{
38
+ context: 'multiBodiedExtension//',
39
+ tag: '[data-node-type="multi-bodied-extension"]',
40
+ skip: true
41
+ }, {
42
+ tag: '[data-node-type="multi-bodied-extension"]',
43
+ getAttrs: domNode => getExtensionAttrs(domNode)
44
+ }],
45
+ toDOM(node) {
46
+ const attrs = {
47
+ 'data-node-type': 'multi-bodied-extension',
48
+ 'data-extension-type': node.attrs.extensionType,
49
+ 'data-extension-key': node.attrs.extensionKey,
50
+ 'data-text': node.attrs.text,
51
+ 'data-parameters': JSON.stringify(node.attrs.parameters),
52
+ 'data-layout': node.attrs.layout,
53
+ 'data-local-id:': node.attrs.localId
54
+ };
55
+ return ['div', attrs, 0];
56
+ }
57
+ });
@@ -1,3 +1,5 @@
1
+ import { nestedExpand as nestedExpandFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name nestedExpand_content
3
5
  * @minItems 1
@@ -12,55 +14,37 @@
12
14
  * @name nestedExpand_with_no_marks_node
13
15
  */
14
16
 
15
- const createNestedExpandSpec = () => {
16
- const nestedExpandSpec = {
17
- inline: false,
18
- marks: 'unsupportedMark unsupportedNodeAttribute',
19
- isolating: true,
20
- selectable: true,
21
- attrs: {
22
- title: {
23
- default: ''
24
- },
25
- __expanded: {
26
- default: true
27
- }
28
- },
29
- parseDOM: [{
30
- context: 'nestedExpand//',
31
- tag: '[data-node-type="nestedExpand"]',
32
- skip: true
33
- }, {
34
- tag: '[data-node-type="nestedExpand"] button',
35
- ignore: true
36
- }, {
37
- tag: '[data-node-type="expand"] button',
38
- ignore: true
39
- }, {
40
- tag: 'div[data-node-type="nestedExpand"]',
41
- getAttrs: domNode => {
42
- const dom = domNode;
43
- return {
44
- title: dom.getAttribute('data-title'),
45
- __expanded: true
46
- };
47
- }
48
- }],
49
- toDOM(node) {
50
- const attrs = {
51
- 'data-node-type': 'nestedExpand',
52
- 'data-title': node.attrs.title,
53
- 'data-expanded': node.attrs.__expanded
54
- };
55
- return ['div', attrs, 0];
56
- }
57
- };
58
- nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
59
- return nestedExpandSpec;
60
- };
61
-
62
17
  /**
63
18
  * @name nestedExpand
64
19
  * @description an expand that can be nested (eg. inside table, layout).
65
20
  */
66
- export const nestedExpand = createNestedExpandSpec();
21
+ export const nestedExpand = nestedExpandFactory({
22
+ parseDOM: [{
23
+ context: 'nestedExpand//',
24
+ tag: '[data-node-type="nestedExpand"]',
25
+ skip: true
26
+ }, {
27
+ tag: '[data-node-type="nestedExpand"] button',
28
+ ignore: true
29
+ }, {
30
+ tag: '[data-node-type="expand"] button',
31
+ ignore: true
32
+ }, {
33
+ tag: 'div[data-node-type="nestedExpand"]',
34
+ getAttrs: domNode => {
35
+ const dom = domNode;
36
+ return {
37
+ title: dom.getAttribute('data-title'),
38
+ __expanded: true
39
+ };
40
+ }
41
+ }],
42
+ toDOM(node) {
43
+ const attrs = {
44
+ 'data-node-type': 'nestedExpand',
45
+ 'data-title': node.attrs.title,
46
+ 'data-expanded': node.attrs.__expanded
47
+ };
48
+ return ['div', attrs, 0];
49
+ }
50
+ });
@@ -1,14 +1,6 @@
1
+ import { orderedList as orderedListFactory } from '../../next-schema/generated/nodeTypes';
1
2
  export const orderedListSelector = '.ak-ol';
2
- export const orderedList = {
3
- group: 'block',
4
- attrs: {
5
- order: {
6
- default: 1
7
- }
8
- },
9
- content: 'listItem+',
10
- marks: 'unsupportedMark unsupportedNodeAttribute',
11
- selectable: false,
3
+ export const orderedList = orderedListFactory({
12
4
  parseDOM: [{
13
5
  tag: 'ol'
14
6
  }],
@@ -18,7 +10,7 @@ export const orderedList = {
18
10
  };
19
11
  return ['ol', attrs, 0];
20
12
  }
21
- };
13
+ });
22
14
 
23
15
  // resolve "start" to a safe, 0+ integer, otherwise return undefined
24
16
  // Note: Any changes to this function should also be made to "resolveOrder"
@@ -33,8 +25,7 @@ const resolveStart = start => {
33
25
  }
34
26
  return Math.floor(Math.max(num, 0));
35
27
  };
36
- export const orderedListWithOrder = {
37
- ...orderedList,
28
+ export const orderedListWithOrder = orderedListFactory({
38
29
  parseDOM: [{
39
30
  tag: 'ol',
40
31
  getAttrs: domNode => {
@@ -60,4 +51,4 @@ export const orderedListWithOrder = {
60
51
  };
61
52
  return ['ol', attrs, 0];
62
53
  }
63
- };
54
+ });
@@ -1,3 +1,4 @@
1
+ import { panel as panelFactory, panelLegacy as panelLegacyFactory } from '../../next-schema/generated/nodeTypes';
1
2
  export let PanelType = /*#__PURE__*/function (PanelType) {
2
3
  PanelType["INFO"] = "info";
3
4
  PanelType["NOTE"] = "note";
@@ -13,26 +14,6 @@ export let PanelType = /*#__PURE__*/function (PanelType) {
13
14
  * @name panel_node
14
15
  */
15
16
 
16
- const getDefaultAttrs = () => {
17
- const attrs = {
18
- panelType: {
19
- default: 'info'
20
- },
21
- panelIcon: {
22
- default: null
23
- },
24
- panelIconId: {
25
- default: null
26
- },
27
- panelIconText: {
28
- default: null
29
- },
30
- panelColor: {
31
- default: null
32
- }
33
- };
34
- return attrs;
35
- };
36
17
  const getDomAttrs = nodeAttrs => {
37
18
  const attrs = {
38
19
  'data-panel-type': nodeAttrs.panelType,
@@ -61,12 +42,7 @@ const getParseDOMAttrs = (allowCustomPanel, dom) => {
61
42
  return parseDOMAttrs;
62
43
  };
63
44
  export const panel = allowCustomPanel => {
64
- const panelNodeSpec = {
65
- group: 'block',
66
- content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
67
- marks: 'unsupportedMark unsupportedNodeAttribute',
68
- attrs: getDefaultAttrs(),
69
- selectable: true,
45
+ const panelNodeSpec = panelLegacyFactory({
70
46
  parseDOM: [{
71
47
  tag: 'div[data-panel-type]',
72
48
  getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
@@ -78,7 +54,7 @@ export const panel = allowCustomPanel => {
78
54
  };
79
55
  return ['div', attrs, ['div', contentAttrs, 0]];
80
56
  }
81
- };
57
+ });
82
58
  return panelNodeSpec;
83
59
  };
84
60
 
@@ -89,12 +65,7 @@ export const panel = allowCustomPanel => {
89
65
  * addition to content allowed inside panel
90
66
  */
91
67
  export const extendedPanel = allowCustomPanel => {
92
- const panelNodeSpec = {
93
- group: 'block',
94
- content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock)+',
95
- marks: 'unsupportedMark unsupportedNodeAttribute',
96
- attrs: getDefaultAttrs(),
97
- selectable: true,
68
+ const panelNodeSpec = panelFactory({
98
69
  parseDOM: [{
99
70
  tag: 'div[data-panel-type]',
100
71
  getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
@@ -106,6 +77,6 @@ export const extendedPanel = allowCustomPanel => {
106
77
  };
107
78
  return ['div', attrs, ['div', contentAttrs, 0]];
108
79
  }
109
- };
80
+ });
110
81
  return panelNodeSpec;
111
82
  };
@@ -1,3 +1,5 @@
1
+ import { paragraph as paragraphFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name paragraph_node
3
5
  */
@@ -23,16 +25,7 @@
23
25
  * @name paragraph_with_indentation_node
24
26
  */
25
27
 
26
- export const paragraph = {
27
- selectable: false,
28
- content: 'inline*',
29
- group: 'block',
30
- attrs: {
31
- localId: {
32
- default: null
33
- }
34
- },
35
- marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
28
+ export const paragraph = paragraphFactory({
36
29
  parseDOM: [{
37
30
  tag: 'p',
38
31
  getAttrs: domNode => {
@@ -54,4 +47,4 @@ export const paragraph = {
54
47
  }] : [];
55
48
  return [name, ...attrs, 0];
56
49
  }
57
- };
50
+ });
@@ -1,17 +1,10 @@
1
+ import { placeholder as placeholderFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name placeholder_node
3
5
  */
4
6
 
5
- export const placeholder = {
6
- inline: true,
7
- group: 'inline',
8
- selectable: false,
9
- marks: '',
10
- attrs: {
11
- text: {
12
- default: ''
13
- }
14
- },
7
+ export const placeholder = placeholderFactory({
15
8
  parseDOM: [{
16
9
  tag: 'span[data-placeholder]',
17
10
  getAttrs: dom => ({
@@ -29,4 +22,4 @@ export const placeholder = {
29
22
  };
30
23
  return ['span', attrs, text];
31
24
  }
32
- };
25
+ });
@@ -1,14 +1,15 @@
1
+ import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name rule_node
3
5
  */
4
6
 
5
7
  const hrDOM = ['hr'];
6
- export const rule = {
7
- group: 'block',
8
+ export const rule = ruleFactory({
8
9
  parseDOM: [{
9
10
  tag: 'hr'
10
11
  }],
11
12
  toDOM() {
12
13
  return hrDOM;
13
14
  }
14
- };
15
+ });
@@ -1,27 +1,11 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+ import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name status_node
5
6
  */
6
7
 
7
- export const status = {
8
- inline: true,
9
- group: 'inline',
10
- selectable: true,
11
- attrs: {
12
- text: {
13
- default: ''
14
- },
15
- color: {
16
- default: ''
17
- },
18
- localId: {
19
- default: uuid.generate()
20
- },
21
- style: {
22
- default: ''
23
- }
24
- },
8
+ export const status = statusFactory({
25
9
  parseDOM: [{
26
10
  tag: 'span[data-node-type="status"]',
27
11
  getAttrs: domNode => {
@@ -50,4 +34,4 @@ export const status = {
50
34
  };
51
35
  return ['span', attrs, text];
52
36
  }
53
- };
37
+ });
@@ -2,6 +2,10 @@ import { hexToEditorBackgroundPaletteRawValue } from '../../utils/editor-palette
2
2
  import { B100, B50, B75, G200, G50, G75, hexToRgba, isHex, isRgb, N0, N20, N60, N800, P100, P50, P75, R100, R50, R75, rgbToHex, T100, T50, T75, Y200, Y50, Y75 } from '../../utils/colors';
3
3
  import { uuid } from '../../utils/uuid';
4
4
  import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
5
+ import { table as tableFactory } from '../../next-schema/generated/nodeTypes';
6
+ import { tableCell as tableCellFactory } from '../../next-schema/generated/nodeTypes';
7
+ import { tableHeader as tableHeaderFactory } from '../../next-schema/generated/nodeTypes';
8
+ import { tableRow as tableRowFactory } from '../../next-schema/generated/nodeTypes';
5
9
  export const tablePrefixSelector = 'pm-table';
6
10
  export const tableCellSelector = `${tablePrefixSelector}-cell-content-wrap`;
7
11
  export const tableHeaderSelector = `${tablePrefixSelector}-header-content-wrap`;
@@ -189,68 +193,38 @@ export const tableBackgroundColorNames = new Map();
189
193
  */
190
194
 
191
195
  // TODO: Fix any, potential issue. ED-5048
192
- const createTableSpec = () => {
193
- const attrs = {
194
- isNumberColumnEnabled: {
195
- default: false
196
- },
197
- layout: {
198
- default: 'default'
199
- },
200
- __autoSize: {
201
- default: false
202
- },
203
- localId: {
204
- default: ''
205
- },
206
- width: {
207
- default: null
208
- },
209
- displayMode: {
210
- default: null
211
- }
212
- };
213
- const tableNodeSpec = {
214
- content: 'tableRow+',
215
- attrs: attrs,
216
- marks: 'unsupportedMark unsupportedNodeAttribute',
217
- tableRole: 'table',
218
- isolating: true,
219
- selectable: true,
220
- group: 'block',
221
- parseDOM: [{
222
- tag: 'table',
223
- getAttrs: node => {
224
- var _dom$parentElement;
225
- const dom = node;
226
- const breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
227
- return {
228
- isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
229
- layout:
230
- // copying from editor
231
- dom.getAttribute('data-layout') || ( // copying from renderer
232
- breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
233
- __autoSize: dom.getAttribute('data-autosize') === 'true',
234
- localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
235
- width: Number(dom.getAttribute('data-table-width')) || null,
236
- displayMode: dom.getAttribute('data-table-display-mode') || null
237
- };
238
- }
239
- }],
240
- toDOM(node) {
241
- const attrs = {
242
- 'data-number-column': node.attrs.isNumberColumnEnabled,
243
- 'data-layout': node.attrs.layout,
244
- 'data-autosize': node.attrs.__autoSize,
245
- 'data-table-local-id': node.attrs.localId,
246
- 'data-table-width': node.attrs.width,
247
- 'data-table-display-mode': node.attrs.displayMode
196
+ const createTableSpec = () => tableFactory({
197
+ parseDOM: [{
198
+ tag: 'table',
199
+ getAttrs: node => {
200
+ var _dom$parentElement;
201
+ const dom = node;
202
+ const breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
203
+ return {
204
+ isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
205
+ layout:
206
+ // copying from editor
207
+ dom.getAttribute('data-layout') || ( // copying from renderer
208
+ breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
209
+ __autoSize: dom.getAttribute('data-autosize') === 'true',
210
+ localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
211
+ width: Number(dom.getAttribute('data-table-width')) || null,
212
+ displayMode: dom.getAttribute('data-table-display-mode') || null
248
213
  };
249
- return ['table', attrs, ['tbody', 0]];
250
214
  }
251
- };
252
- return tableNodeSpec;
253
- };
215
+ }],
216
+ toDOM(node) {
217
+ const attrs = {
218
+ 'data-number-column': node.attrs.isNumberColumnEnabled,
219
+ 'data-layout': node.attrs.layout,
220
+ 'data-autosize': node.attrs.__autoSize,
221
+ 'data-table-local-id': node.attrs.localId,
222
+ 'data-table-width': node.attrs.width,
223
+ 'data-table-display-mode': node.attrs.displayMode
224
+ };
225
+ return ['table', attrs, ['tbody', 0]];
226
+ }
227
+ });
254
228
 
255
229
  // TODO: assuming breaking changes aren't allowed, so retaining both exports
256
230
  /** Includes table width attribute */
@@ -267,18 +241,14 @@ export const tableToJSON = node => ({
267
241
  };
268
242
  }, {})
269
243
  });
270
- export const tableRow = {
271
- selectable: false,
272
- content: '(tableCell | tableHeader)+',
273
- marks: 'unsupportedMark unsupportedNodeAttribute',
274
- tableRole: 'row',
244
+ export const tableRow = tableRowFactory({
275
245
  parseDOM: [{
276
246
  tag: 'tr'
277
247
  }],
278
248
  toDOM() {
279
249
  return ['tr', 0];
280
250
  }
281
- };
251
+ });
282
252
  const cellAttrs = {
283
253
  colspan: {
284
254
  default: 1
@@ -293,13 +263,7 @@ const cellAttrs = {
293
263
  default: null
294
264
  }
295
265
  };
296
- export const tableCell = {
297
- selectable: false,
298
- content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
299
- attrs: cellAttrs,
300
- tableRole: 'cell',
301
- marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
302
- isolating: true,
266
+ export const tableCell = tableCellFactory({
303
267
  parseDOM: [
304
268
  // Ignore number cell copied from renderer
305
269
  {
@@ -310,7 +274,7 @@ export const tableCell = {
310
274
  getAttrs: dom => getCellAttrs(dom)
311
275
  }],
312
276
  toDOM: node => ['td', getCellDomAttrs(node), 0]
313
- };
277
+ });
314
278
  export const toJSONTableCell = node => ({
315
279
  attrs: Object.keys(node.attrs).reduce((obj, key) => {
316
280
  if (cellAttrs[key].default !== node.attrs[key]) {
@@ -319,13 +283,7 @@ export const toJSONTableCell = node => ({
319
283
  return obj;
320
284
  }, {})
321
285
  });
322
- export const tableHeader = {
323
- selectable: false,
324
- content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
325
- attrs: cellAttrs,
326
- tableRole: 'header_cell',
327
- isolating: true,
328
- marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
286
+ export const tableHeader = tableHeaderFactory({
329
287
  parseDOM: [{
330
288
  tag: 'th',
331
289
  getAttrs: dom => getCellAttrs(dom, {
@@ -333,5 +291,5 @@ export const tableHeader = {
333
291
  })
334
292
  }],
335
293
  toDOM: node => ['th', getCellDomAttrs(node), 0]
336
- };
294
+ });
337
295
  export const toJSONTableHeader = toJSONTableCell;
@@ -1,22 +1,11 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+ import { taskItem as taskItemFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name taskItem_node
5
6
  */
6
7
 
7
- export const taskItem = {
8
- content: 'inline*',
9
- defining: true,
10
- selectable: false,
11
- marks: '_',
12
- attrs: {
13
- localId: {
14
- default: ''
15
- },
16
- state: {
17
- default: 'TODO'
18
- }
19
- },
8
+ export const taskItem = taskItemFactory({
20
9
  parseDOM: [{
21
10
  tag: 'div[data-task-local-id]',
22
11
  // Default priority is 50. We normally don't change this but since this node type is
@@ -38,4 +27,4 @@ export const taskItem = {
38
27
  };
39
28
  return ['div', attrs, 0];
40
29
  }
41
- };
30
+ });
@@ -1,4 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+ import { taskList as taskListFactory } from '../../next-schema/generated/nodeTypes';
2
3
 
3
4
  /**
4
5
  * @name taskList_node
@@ -6,17 +7,7 @@ import { uuid } from '../../utils/uuid';
6
7
 
7
8
  const name = 'actionList';
8
9
  export const taskListSelector = `[data-node-type="${name}"]`;
9
- export const taskList = {
10
- group: 'block',
11
- defining: true,
12
- selectable: false,
13
- content: '(taskItem|unsupportedBlock)+ (taskItem|taskList|unsupportedBlock)*',
14
- marks: 'unsupportedMark unsupportedNodeAttribute',
15
- attrs: {
16
- localId: {
17
- default: ''
18
- }
19
- },
10
+ export const taskList = taskListFactory({
20
11
  parseDOM: [{
21
12
  tag: `div${taskListSelector}`,
22
13
  // Default priority is 50. We normally don't change this but since this node type is
@@ -37,4 +28,4 @@ export const taskList = {
37
28
  };
38
29
  return ['div', attrs, 0];
39
30
  }
40
- };
31
+ });
@@ -1,9 +1,9 @@
1
+ import { text as textFactory } from '../../next-schema/generated/nodeTypes';
2
+
1
3
  /**
2
4
  * @name text_node
3
5
  */
4
6
 
5
- export const text = {
6
- group: 'inline',
7
- // TODO: toDebugString needs to be passed with createToPmFactory when migrate in https://product-fabric.atlassian.net/browse/ED-23606
7
+ export const text = textFactory({
8
8
  toDebugString: process.env.NODE_ENV !== 'production' ? undefined : () => 'text_node'
9
- };
9
+ });