@atlaskit/adf-schema 28.1.5 → 28.1.7

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 (514) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/index.ts +275 -0
  3. package/package.json +6 -23
  4. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-attrs.json +17 -0
  5. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-empty-content.json +10 -0
  6. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-marks.json +17 -0
  7. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-without-content.json +9 -0
  8. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockquote-with-list-inside.json +24 -0
  9. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-with-nested-bodiedExtension.json +28 -0
  10. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-content.json +13 -0
  11. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionKey.json +18 -0
  12. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionType.json +18 -0
  13. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-attrs.json +17 -0
  14. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-empty-content.json +10 -0
  15. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-marks.json +24 -0
  16. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-not-listItem-content.json +18 -0
  17. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-without-content.json +9 -0
  18. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-em.json +23 -0
  19. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strike.json +23 -0
  20. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strong.json +23 -0
  21. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-subsup.json +23 -0
  22. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-underline.json +23 -0
  23. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-with-attrs.json +21 -0
  24. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-non-text.json +14 -0
  25. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-strong.json +20 -0
  26. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unknown-attribute.json +13 -0
  27. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unsupported-marks.json +14 -0
  28. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decision-with-blockquote.json +31 -0
  29. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-empty-decision.json +23 -0
  30. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-no-decision.json +13 -0
  31. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-attrs.json +10 -0
  32. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-marks.json +10 -0
  33. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-content.json +4 -0
  34. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-version.json +4 -0
  35. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/em-with-attrs.json +21 -0
  36. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-as-top-level-node.json +12 -0
  37. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-content.json +23 -0
  38. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-empty-attrs.json +15 -0
  39. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-marks.json +18 -0
  40. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-unknown-attr.json +18 -0
  41. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-without-attrs.json +14 -0
  42. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-nested-with-marks.json +60 -0
  43. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-with-breakout-inside-of-layout.json +50 -0
  44. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-content.json +19 -0
  45. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-empty-local-id.json +16 -0
  46. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionKey.json +12 -0
  47. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionType.json +12 -0
  48. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-marks.json +18 -0
  49. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-wrong-text.json +17 -0
  50. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-invalid-level-attr.json +18 -0
  51. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-block.json +14 -0
  52. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-inline.json +18 -0
  53. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unknown-attrs.json +19 -0
  54. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unsupported-mark.json +23 -0
  55. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-without-attrs.json +10 -0
  56. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-with-content.json +24 -0
  57. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionKey.json +17 -0
  58. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionType.json +17 -0
  59. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-missing-layoutColumn.json +10 -0
  60. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-one-column.json +24 -0
  61. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-overflow-width.json +37 -0
  62. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-two-columns-and-breakout-code-block.json +38 -0
  63. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-empty-attrs.json +21 -0
  64. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-unknown-attr.json +21 -0
  65. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-without-attrs.json +20 -0
  66. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/list-with-blockquote.json +27 -0
  67. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-attrs.json +24 -0
  68. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-empty-content.json +15 -0
  69. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-list-as-first-child.json +30 -0
  70. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-marks.json +24 -0
  71. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-as-top-level-node.json +13 -0
  72. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-empty-attrs.json +15 -0
  73. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-alt-text.json +29 -0
  74. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-occurrence-key-attr.json +20 -0
  75. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-marks.json +19 -0
  76. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-unknown-attr.json +19 -0
  77. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-attrs.json +14 -0
  78. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-id-attr.json +17 -0
  79. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-type-attr.json +17 -0
  80. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-attrs.json +19 -0
  81. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-empty-content.json +10 -0
  82. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-marks.json +19 -0
  83. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-without-content.json +9 -0
  84. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaInline-with-subsup-mark.json +30 -0
  85. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-attrs.json +11 -0
  86. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-content.json +10 -0
  87. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-caption.json +46 -0
  88. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-layout-attr.json +38 -0
  89. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-negative-width.json +22 -0
  90. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-overflow-width.json +22 -0
  91. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-zero-width.json +22 -0
  92. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-extra-attrs.json +19 -0
  93. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-invalid-user-type.json +19 -0
  94. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-marks.json +19 -0
  95. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-without-attrs.json +14 -0
  96. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mono-with-attrs.json +21 -0
  97. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-extra-attrs.json +34 -0
  98. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-marks.json +34 -0
  99. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-without-content.json +15 -0
  100. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-blockquote.json +25 -0
  101. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-codeBlock.json +22 -0
  102. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-empty-attrs.json +19 -0
  103. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-marks.json +22 -0
  104. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-panel.json +25 -0
  105. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-unknown-attr.json +22 -0
  106. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-without-attrs.json +18 -0
  107. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-text-with-unknown-mark.json +20 -0
  108. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-top-level-content.json +14 -0
  109. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-unsupported-marks.json +20 -0
  110. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-content.json +23 -0
  111. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-empty-attrs.json +15 -0
  112. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-attrs.json +10 -0
  113. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-content.json +10 -0
  114. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-marks.json +10 -0
  115. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-with-extra-attr.json +24 -0
  116. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-attrs.json +18 -0
  117. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-color-attr.json +22 -0
  118. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-text-attr.json +22 -0
  119. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strike-with-attrs.json +21 -0
  120. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strong-with-attrs.json +21 -0
  121. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-extra-attrs.json +24 -0
  122. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-invalid-type-attr.json +23 -0
  123. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-attrs.json +20 -0
  124. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-type-attr.json +21 -0
  125. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-breakout-code-block.json +33 -0
  126. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-with-empty-local-id.json +41 -0
  127. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-without-local-id.json +40 -0
  128. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-nested-table.json +50 -0
  129. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-cells.json +15 -0
  130. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-rows.json +10 -0
  131. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-blockquote.json +31 -0
  132. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-invalid-state.json +27 -0
  133. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskItem-with-nested-taskItem.json +70 -0
  134. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-empty-task.json +23 -0
  135. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-no-task.json +13 -0
  136. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-taskList-as-first-child.json +48 -0
  137. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/text-empty.json +15 -0
  138. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-extra-attrs.json +24 -0
  139. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-invalid-color-attr.json +23 -0
  140. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-attrs.json +20 -0
  141. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-color-attr.json +21 -0
  142. package/src/__tests__/unit/json-schema/v1-reference/full/invalid/underline-with-attrs.json +21 -0
  143. package/src/__tests__/unit/json-schema/v1-reference/full/valid/annotation.json +28 -0
  144. package/src/__tests__/unit/json-schema/v1-reference/full/valid/blockQuote-with-content.json +16 -0
  145. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-Extension-with-rich-body.json +27 -0
  146. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-empty-content.json +19 -0
  147. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-media-link.json +41 -0
  148. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-nested-extension.json +33 -0
  149. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-parameters.json +30 -0
  150. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodiedExtension-with-data-consumer-mark.json +47 -0
  151. package/src/__tests__/unit/json-schema/v1-reference/full/valid/bulletList-with-content.json +23 -0
  152. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-attrs.json +11 -0
  153. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-content.json +10 -0
  154. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-breakout-mark.json +14 -0
  155. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-empty-marks.json +13 -0
  156. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-language.json +482 -0
  157. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-multiple-text.json +19 -0
  158. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-text.json +15 -0
  159. package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-unknown-language.json +13 -0
  160. package/src/__tests__/unit/json-schema/v1-reference/full/valid/decision-with-mention.json +34 -0
  161. package/src/__tests__/unit/json-schema/v1-reference/full/valid/decisionList-with-decision.json +27 -0
  162. package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-all-content.json +32 -0
  163. package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-content.json +9 -0
  164. package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-empty-content.json +5 -0
  165. package/src/__tests__/unit/json-schema/v1-reference/full/valid/embed-card.json +17 -0
  166. package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-fallback.json +19 -0
  167. package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-variation.json +18 -0
  168. package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji.json +17 -0
  169. package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-embed-card.json +34 -0
  170. package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-marks.json +26 -0
  171. package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-nestedExpand.json +136 -0
  172. package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand.json +18 -0
  173. package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-data-consumer-mark.json +23 -0
  174. package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-empty-marks.json +17 -0
  175. package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-local-id.json +16 -0
  176. package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-named-fragment-mark.json +25 -0
  177. package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-parameters.json +24 -0
  178. package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-empty-attrs.json +15 -0
  179. package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-with-text.json +17 -0
  180. package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak.json +14 -0
  181. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-code-text.json +23 -0
  182. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-content.json +78 -0
  183. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-em-text.json +23 -0
  184. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-content.json +78 -0
  185. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-marks.json +14 -0
  186. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-link-text.json +26 -0
  187. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strike-text.json +23 -0
  188. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strong-text.json +23 -0
  189. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-subsup-text.json +26 -0
  190. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-supported-mark.json +26 -0
  191. package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-underline-text.json +23 -0
  192. package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-data-consumer-mark.json +48 -0
  193. package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-fragment-mark.json +27 -0
  194. package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-parameters.json +29 -0
  195. package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-without-parameters.json +18 -0
  196. package/src/__tests__/unit/json-schema/v1-reference/full/valid/layout-with-embed.json +51 -0
  197. package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-three-columns.json +50 -0
  198. package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns-and-breakout.json +40 -0
  199. package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns.json +37 -0
  200. package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href-title.json +24 -0
  201. package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href.json +23 -0
  202. package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-bullet-list-and-media-single.json +47 -0
  203. package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-media-single-and-bullet-list.json +57 -0
  204. package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-ordered-list.json +37 -0
  205. package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-paragraph.json +23 -0
  206. package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-with-codeBlock.json +23 -0
  207. package/src/__tests__/unit/json-schema/v1-reference/full/valid/listItem-with-content.json +23 -0
  208. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-external-with-alt-text-value.json +26 -0
  209. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-layout-column.json +57 -0
  210. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-list-item.json +88 -0
  211. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-nested-expand.json +64 -0
  212. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-table.json +56 -0
  213. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-an-expand.json +44 -0
  214. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text-value.json +29 -0
  215. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text.json +29 -0
  216. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-link-mark.json +36 -0
  217. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-occurrence-key.json +20 -0
  218. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-type-link.json +19 -0
  219. package/src/__tests__/unit/json-schema/v1-reference/full/valid/media.json +19 -0
  220. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaGroup-with-multiple-media.json +27 -0
  221. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-file-type-attr.json +23 -0
  222. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-mark.json +30 -0
  223. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-type-attr.json +23 -0
  224. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline.json +22 -0
  225. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption-inside-list-item.json +38 -0
  226. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption.json +28 -0
  227. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-link-mark.json +32 -0
  228. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-parameters.json +86 -0
  229. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-width.json +74 -0
  230. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-without-parameters.json +19 -0
  231. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-attrs.json +18 -0
  232. package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-user-type.json +35 -0
  233. package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-with-data-consumer-mark.json +226 -0
  234. package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-without-mark.json +176 -0
  235. package/src/__tests__/unit/json-schema/v1-reference/full/valid/nestedExpand.json +128 -0
  236. package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-content.json +30 -0
  237. package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-order.json +33 -0
  238. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-info.json +21 -0
  239. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-note.json +21 -0
  240. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-tip.json +21 -0
  241. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-warning.json +21 -0
  242. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-blockCard.json +20 -0
  243. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-list.json +31 -0
  244. package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-paragraph.json +21 -0
  245. package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-content.json +15 -0
  246. package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-content.json +10 -0
  247. package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-marks.json +11 -0
  248. package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-supported-mark.json +23 -0
  249. package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-without-content.json +9 -0
  250. package/src/__tests__/unit/json-schema/v1-reference/full/valid/placeholder.json +17 -0
  251. package/src/__tests__/unit/json-schema/v1-reference/full/valid/rule.json +9 -0
  252. package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-nested-in-list.json +43 -0
  253. package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-all-attrs.json +23 -0
  254. package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-default-attrs.json +23 -0
  255. package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sub.json +23 -0
  256. package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sup.json +23 -0
  257. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-empty-cell.json +29 -0
  258. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-fragment-mark.json +41 -0
  259. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-header-row.json +34 -0
  260. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-layout.json +50 -0
  261. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-local-id.json +32 -0
  262. package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-nested-nodes.json +32 -0
  263. package/src/__tests__/unit/json-schema/v1-reference/full/valid/task-with-mention.json +34 -0
  264. package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-nested-taskLists.json +74 -0
  265. package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-tasks.json +40 -0
  266. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code-and-link.json +26 -0
  267. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code.json +20 -0
  268. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-em.json +20 -0
  269. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-link.json +23 -0
  270. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-strong.json +20 -0
  271. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-subsup.json +23 -0
  272. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-textColor.json +23 -0
  273. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-underline.json +20 -0
  274. package/src/__tests__/unit/json-schema/v1-reference/full/valid/text.json +15 -0
  275. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/.gitkeep +0 -0
  276. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-empty-attrs.json +10 -0
  277. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-empty-datasource.json +12 -0
  278. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-empty-views.json +21 -0
  279. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-id.json +32 -0
  280. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-layout.json +32 -0
  281. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-views-type.json +32 -0
  282. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-width.json +32 -0
  283. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/bodiedExtension-with-source-as-string-data-consumer-mark.json +46 -0
  284. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-invalid-local-id.json +16 -0
  285. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-nonsense-marks.json +21 -0
  286. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/inlineExtension-with-source-as-string-data-consumer-mark.json +48 -0
  287. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-percentage-width.json +23 -0
  288. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-pixel-width.json +24 -0
  289. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/nested-extensions-with-link-mark.json +216 -0
  290. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-empty-local-id.json +32 -0
  291. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-local-id.json +32 -0
  292. package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-width.json +32 -0
  293. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/.gitkeep +0 -0
  294. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-with-datasources.json +38 -0
  295. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-with-empty-datasource-parameters.json +29 -0
  296. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-without-optional-fields.json +23 -0
  297. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/layoutSection-with-one-column.json +24 -0
  298. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-percentage-width.json +24 -0
  299. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-pixel-width.json +24 -0
  300. package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/table-with-width.json +32 -0
  301. package/src/__tests__/unit/json-schema/v1.ts +53 -0
  302. package/src/__tests__/unit/schema/create-schema.ts +214 -0
  303. package/src/__tests__/unit/schema/default-schema.ts +192 -0
  304. package/src/__tests__/unit/schema/marks/annotation.ts +46 -0
  305. package/src/__tests__/unit/schema/marks/border.ts +76 -0
  306. package/src/__tests__/unit/schema/marks/breakout.ts +24 -0
  307. package/src/__tests__/unit/schema/marks/code.ts +44 -0
  308. package/src/__tests__/unit/schema/marks/confluence-inline-comment.ts +25 -0
  309. package/src/__tests__/unit/schema/marks/data-consumer.ts +52 -0
  310. package/src/__tests__/unit/schema/marks/em.ts +37 -0
  311. package/src/__tests__/unit/schema/marks/link.ts +188 -0
  312. package/src/__tests__/unit/schema/marks/strike.ts +37 -0
  313. package/src/__tests__/unit/schema/marks/strong.ts +43 -0
  314. package/src/__tests__/unit/schema/marks/subsup.ts +50 -0
  315. package/src/__tests__/unit/schema/marks/text-color.ts +61 -0
  316. package/src/__tests__/unit/schema/marks/underline.ts +36 -0
  317. package/src/__tests__/unit/schema/nodes/_consts.ts +964 -0
  318. package/src/__tests__/unit/schema/nodes/block-card.ts +184 -0
  319. package/src/__tests__/unit/schema/nodes/blockquote.ts +44 -0
  320. package/src/__tests__/unit/schema/nodes/bodied-extension.ts +101 -0
  321. package/src/__tests__/unit/schema/nodes/code-block.ts +221 -0
  322. package/src/__tests__/unit/schema/nodes/confluence-unsupported-block.ts +36 -0
  323. package/src/__tests__/unit/schema/nodes/confluence-unsupported-inline.ts +35 -0
  324. package/src/__tests__/unit/schema/nodes/date.ts +51 -0
  325. package/src/__tests__/unit/schema/nodes/decision-item.ts +46 -0
  326. package/src/__tests__/unit/schema/nodes/decision-list.ts +52 -0
  327. package/src/__tests__/unit/schema/nodes/embed-card.ts +60 -0
  328. package/src/__tests__/unit/schema/nodes/emoji.ts +71 -0
  329. package/src/__tests__/unit/schema/nodes/expand.ts +51 -0
  330. package/src/__tests__/unit/schema/nodes/extension.ts +101 -0
  331. package/src/__tests__/unit/schema/nodes/hard-break.ts +24 -0
  332. package/src/__tests__/unit/schema/nodes/heading.ts +56 -0
  333. package/src/__tests__/unit/schema/nodes/image.ts +32 -0
  334. package/src/__tests__/unit/schema/nodes/inline-card.ts +106 -0
  335. package/src/__tests__/unit/schema/nodes/inline-extension.ts +79 -0
  336. package/src/__tests__/unit/schema/nodes/layout-column.ts +54 -0
  337. package/src/__tests__/unit/schema/nodes/layout-section.ts +95 -0
  338. package/src/__tests__/unit/schema/nodes/list-item.ts +49 -0
  339. package/src/__tests__/unit/schema/nodes/media-group.ts +67 -0
  340. package/src/__tests__/unit/schema/nodes/media-single.ts +171 -0
  341. package/src/__tests__/unit/schema/nodes/media.ts +388 -0
  342. package/src/__tests__/unit/schema/nodes/mention.ts +115 -0
  343. package/src/__tests__/unit/schema/nodes/nestedExpand.ts +72 -0
  344. package/src/__tests__/unit/schema/nodes/ordered-list.ts +49 -0
  345. package/src/__tests__/unit/schema/nodes/panel.ts +180 -0
  346. package/src/__tests__/unit/schema/nodes/paragraph.ts +25 -0
  347. package/src/__tests__/unit/schema/nodes/placeholder.ts +46 -0
  348. package/src/__tests__/unit/schema/nodes/rule.ts +24 -0
  349. package/src/__tests__/unit/schema/nodes/status.ts +120 -0
  350. package/src/__tests__/unit/schema/nodes/tableNodes.ts +555 -0
  351. package/src/__tests__/unit/schema/nodes/task-item.ts +39 -0
  352. package/src/__tests__/unit/schema/nodes/task-list.ts +45 -0
  353. package/src/__tests__/unit/schema/nodes/unknown-block.ts +42 -0
  354. package/src/__tests__/unit/schema/nodes/unsupported-block.ts +42 -0
  355. package/src/__tests__/unit/schema/nodes/unsupported-inline.ts +38 -0
  356. package/src/__tests__/unit/utils/colors.ts +42 -0
  357. package/src/__tests__/unit/utils/url.ts +209 -0
  358. package/src/index.ts +297 -0
  359. package/src/json-schema/index.ts +2 -0
  360. package/src/schema/bitbucket-schema.ts +43 -0
  361. package/src/schema/confluence-schema.ts +76 -0
  362. package/src/schema/create-schema.ts +337 -0
  363. package/src/schema/default-schema.ts +180 -0
  364. package/src/schema/groups.ts +30 -0
  365. package/src/schema/index.ts +238 -0
  366. package/src/schema/inline-nodes.ts +9 -0
  367. package/src/schema/jira-schema.ts +158 -0
  368. package/src/schema/marks/__tests__/unit/annotation.ts +18 -0
  369. package/src/schema/marks/alignment.ts +48 -0
  370. package/src/schema/marks/annotation.ts +107 -0
  371. package/src/schema/marks/border.ts +74 -0
  372. package/src/schema/marks/breakout.ts +42 -0
  373. package/src/schema/marks/code.ts +45 -0
  374. package/src/schema/marks/confluence-inline-comment.ts +32 -0
  375. package/src/schema/marks/data-consumer.ts +100 -0
  376. package/src/schema/marks/em.ts +19 -0
  377. package/src/schema/marks/fragment.ts +77 -0
  378. package/src/schema/marks/indentation.ts +47 -0
  379. package/src/schema/marks/index.ts +61 -0
  380. package/src/schema/marks/link.ts +139 -0
  381. package/src/schema/marks/strike.ts +26 -0
  382. package/src/schema/marks/strong.ts +45 -0
  383. package/src/schema/marks/subsup.ts +53 -0
  384. package/src/schema/marks/text-color.ts +172 -0
  385. package/src/schema/marks/type-ahead-query.ts +22 -0
  386. package/src/schema/marks/underline.ts +24 -0
  387. package/src/schema/marks/unsupported-mark.ts +9 -0
  388. package/src/schema/marks/unsupported-node-attributes.ts +8 -0
  389. package/src/schema/nodes/block-card.ts +121 -0
  390. package/src/schema/nodes/blockquote.ts +25 -0
  391. package/src/schema/nodes/bodied-extension.ts +75 -0
  392. package/src/schema/nodes/bullet-list.ts +17 -0
  393. package/src/schema/nodes/caption.ts +51 -0
  394. package/src/schema/nodes/code-block.ts +176 -0
  395. package/src/schema/nodes/confluence-jira-issue.ts +43 -0
  396. package/src/schema/nodes/confluence-unsupported-block.ts +29 -0
  397. package/src/schema/nodes/confluence-unsupported-inline.ts +30 -0
  398. package/src/schema/nodes/date.ts +38 -0
  399. package/src/schema/nodes/decision-item.ts +50 -0
  400. package/src/schema/nodes/decision-list.ts +56 -0
  401. package/src/schema/nodes/doc.ts +30 -0
  402. package/src/schema/nodes/embed-card.ts +62 -0
  403. package/src/schema/nodes/emoji.ts +89 -0
  404. package/src/schema/nodes/expand.ts +101 -0
  405. package/src/schema/nodes/extension.ts +60 -0
  406. package/src/schema/nodes/hard-break.ts +21 -0
  407. package/src/schema/nodes/heading.ts +64 -0
  408. package/src/schema/nodes/image.ts +32 -0
  409. package/src/schema/nodes/index.ts +184 -0
  410. package/src/schema/nodes/inline-card.ts +70 -0
  411. package/src/schema/nodes/inline-extension.ts +57 -0
  412. package/src/schema/nodes/layout-column.ts +68 -0
  413. package/src/schema/nodes/layout-section.ts +93 -0
  414. package/src/schema/nodes/list-item.ts +13 -0
  415. package/src/schema/nodes/media-group.ts +44 -0
  416. package/src/schema/nodes/media-inline.ts +19 -0
  417. package/src/schema/nodes/media-single.ts +179 -0
  418. package/src/schema/nodes/media.ts +249 -0
  419. package/src/schema/nodes/mention.ts +86 -0
  420. package/src/schema/nodes/nested-expand.ts +77 -0
  421. package/src/schema/nodes/ordered-list.ts +62 -0
  422. package/src/schema/nodes/panel.ts +133 -0
  423. package/src/schema/nodes/paragraph.ts +79 -0
  424. package/src/schema/nodes/placeholder.ts +40 -0
  425. package/src/schema/nodes/rule.ts +17 -0
  426. package/src/schema/nodes/status.ts +58 -0
  427. package/src/schema/nodes/tableNodes.ts +480 -0
  428. package/src/schema/nodes/task-item.ts +51 -0
  429. package/src/schema/nodes/task-list.ts +61 -0
  430. package/src/schema/nodes/text.ts +19 -0
  431. package/src/schema/nodes/types/block-content.ts +51 -0
  432. package/src/schema/nodes/types/extensions.ts +36 -0
  433. package/src/schema/nodes/types/inline-content.ts +56 -0
  434. package/src/schema/nodes/types/list.ts +54 -0
  435. package/src/schema/nodes/types/mark.ts +16 -0
  436. package/src/schema/nodes/types/non-nestable-block-content.ts +39 -0
  437. package/src/schema/nodes/types/rich-media-common.ts +51 -0
  438. package/src/schema/nodes/unknown-block.ts +13 -0
  439. package/src/schema/nodes/unsupported-block.ts +28 -0
  440. package/src/schema/nodes/unsupported-inline.ts +27 -0
  441. package/src/schema/unsupported.ts +4 -0
  442. package/src/steps/__tests__/unit/analytics.ts +72 -0
  443. package/src/steps/__tests__/unit/link-meta-step.ts +64 -0
  444. package/src/steps/__tests__/unit/override-document-step.ts +174 -0
  445. package/src/steps/__tests__/unit/set-attrs.ts +71 -0
  446. package/src/steps/analytics.ts +189 -0
  447. package/src/steps/link-meta-step.ts +105 -0
  448. package/src/steps/override-document-step.ts +97 -0
  449. package/src/steps/set-attrs.tsx +74 -0
  450. package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-0.json +15 -0
  451. package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-1.json +15 -0
  452. package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-2.json +15 -0
  453. package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-3.json +15 -0
  454. package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-0.json +9 -0
  455. package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-1.json +9 -0
  456. package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-2.json +9 -0
  457. package/src/steps/table/__tests__/__fixtures__/basic/remove-table/remove-last-row-inverted.json +98 -0
  458. package/src/steps/table/__tests__/__fixtures__/basic/remove-table/remove-last-row.json +71 -0
  459. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-0-inverted.json +19 -0
  460. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-0.json +19 -0
  461. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-1-inverted.json +21 -0
  462. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-1.json +21 -0
  463. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-2-inverted.json +21 -0
  464. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-2.json +21 -0
  465. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-3-inverted.json +19 -0
  466. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-3.json +19 -0
  467. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-0-inverted.json +63 -0
  468. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-0.json +21 -0
  469. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-1-inverted.json +64 -0
  470. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-1.json +22 -0
  471. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-2-inverted.json +63 -0
  472. package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-2.json +21 -0
  473. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-0-inverted.json +19 -0
  474. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-0.json +19 -0
  475. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-1-inverted.json +19 -0
  476. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-1.json +19 -0
  477. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-2-inverted.json +19 -0
  478. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-2.json +19 -0
  479. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-3-inverted.json +19 -0
  480. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-3.json +19 -0
  481. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-0-inverted.json +52 -0
  482. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-0.json +38 -0
  483. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-1-inverted.json +52 -0
  484. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-1.json +38 -0
  485. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-2-inverted.json +25 -0
  486. package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-2.json +11 -0
  487. package/src/steps/table/__tests__/_utils.ts +103 -0
  488. package/src/steps/table/__tests__/add-column-merge-columns.ts +491 -0
  489. package/src/steps/table/__tests__/add-column-merge-rows.ts +450 -0
  490. package/src/steps/table/__tests__/add-column.ts +610 -0
  491. package/src/steps/table/add-column.ts +440 -0
  492. package/src/steps/table/constants.ts +4 -0
  493. package/src/steps/table/sort-column.ts +57 -0
  494. package/src/steps/table/types.ts +48 -0
  495. package/src/steps/table/utils/cell-step.ts +239 -0
  496. package/src/steps/table/utils/cells-at-column.ts +72 -0
  497. package/src/steps/table/utils/find-column.ts +90 -0
  498. package/src/steps/table/utils/get-table-rect-from-doc.ts +37 -0
  499. package/src/steps/table/utils/side-effects/rows.ts +327 -0
  500. package/src/steps/table/utils/side-effects/side-effects.ts +90 -0
  501. package/src/steps/table/utils/side-effects/table.ts +112 -0
  502. package/src/steps/table/utils/side-effects/types.ts +34 -0
  503. package/src/steps/table/utils/table-map.ts +28 -0
  504. package/src/steps/type-ahead.ts +100 -0
  505. package/src/steps.ts +16 -0
  506. package/src/utils/colors.ts +171 -0
  507. package/src/utils/confluence/emoji.ts +99 -0
  508. package/src/utils/extensions.ts +32 -0
  509. package/src/utils/index.ts +69 -0
  510. package/src/utils/parseDOM.ts +2 -0
  511. package/src/utils/url.ts +173 -0
  512. package/src/utils/uuid.ts +19 -0
  513. package/src/version.json +6 -0
  514. package/babel.config.js +0 -156
@@ -0,0 +1,480 @@
1
+ import { Node as PmNode, NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { CellAttributes } from '@atlaskit/editor-tables/types';
3
+ import { hexToEditorBackgroundPaletteRawValue } from '@atlaskit/editor-palette';
4
+ import {
5
+ B100,
6
+ B50,
7
+ B75,
8
+ G200,
9
+ G50,
10
+ G75,
11
+ hexToRgba,
12
+ isHex,
13
+ isRgb,
14
+ N0,
15
+ N20,
16
+ N60,
17
+ N800,
18
+ P100,
19
+ P50,
20
+ P75,
21
+ R100,
22
+ R50,
23
+ R75,
24
+ rgbToHex,
25
+ T100,
26
+ T50,
27
+ T75,
28
+ Y200,
29
+ Y50,
30
+ Y75,
31
+ } from '../../utils/colors';
32
+ import { PanelDefinition as Panel } from './panel';
33
+ import {
34
+ ParagraphDefinition as Paragraph,
35
+ ParagraphWithAlignmentDefinition as ParagraphWithMarks,
36
+ } from './paragraph';
37
+ import { BlockQuoteDefinition as Blockquote } from './blockquote';
38
+ import { OrderedListDefinition as OrderedList } from './types/list';
39
+ import { BulletListDefinition as BulletList } from './types/list';
40
+ import { RuleDefinition as Rule } from './rule';
41
+ import {
42
+ HeadingDefinition as Heading,
43
+ HeadingWithMarksDefinition as HeadingWithMarks,
44
+ } from './heading';
45
+ import { CodeBlockDefinition as CodeBlock } from './code-block';
46
+ import { MediaGroupDefinition as MediaGroup } from './media-group';
47
+ import { MediaSingleDefinition as MediaSingle } from './media-single';
48
+ import { DecisionListDefinition as DecisionList } from './decision-list';
49
+ import { TaskListDefinition as TaskList } from './task-list';
50
+ import { ExtensionDefinition as Extension } from './extension';
51
+ import { BlockCardDefinition as BlockCard } from './block-card';
52
+ import { EmbedCardDefinition as EmbedCard } from './embed-card';
53
+ import { NestedExpandDefinition as NestedExpand } from './nested-expand';
54
+ import { uuid } from '../../utils/uuid';
55
+ import { FragmentDefinition } from '../marks/fragment';
56
+
57
+ export type { CellAttributes };
58
+ export const tablePrefixSelector = 'pm-table';
59
+
60
+ export const tableCellSelector = `${tablePrefixSelector}-cell-content-wrap`;
61
+ export const tableHeaderSelector = `${tablePrefixSelector}-header-content-wrap`;
62
+ export const tableCellContentWrapperSelector = `${tablePrefixSelector}-cell-nodeview-wrapper`;
63
+ export const tableCellContentDomSelector = `${tablePrefixSelector}-cell-nodeview-content-dom`;
64
+
65
+ const DEFAULT_TABLE_HEADER_CELL_BACKGROUND = N20.toLocaleLowerCase();
66
+
67
+ export const getCellAttrs: (
68
+ dom: HTMLElement, defaultValues?: CellAttributes
69
+ ) => {
70
+ colspan: number;
71
+ rowspan: number;
72
+ colwidth: number[] | null;
73
+ background: string | null;
74
+ } = (
75
+ dom: HTMLElement,
76
+ defaultValues: CellAttributes = {},
77
+ ) => {
78
+ const widthAttr = dom.getAttribute('data-colwidth');
79
+ const width =
80
+ widthAttr && /^\d+(,\d+)*$/.test(widthAttr)
81
+ ? widthAttr.split(',').map((str) => Number(str))
82
+ : null;
83
+ const colspan = Number(dom.getAttribute('colspan') || 1);
84
+ let { backgroundColor } = dom.style;
85
+
86
+ /**
87
+ * We have pivoted to store background color information in
88
+ * data-cell-background.
89
+ * We will have original hex code (which we map to DST token)
90
+ * stored in data-cell-background, use that.
91
+ * More details at https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3472556903/Tokenising+tableCell+background+colors#Update-toDom-and-parseDom-to-store-and-read-background-color-from-data-cell-background-attribute.4
92
+ */
93
+ const dataCellBackground = dom.getAttribute('data-cell-background');
94
+ const dataCellBackgroundHexCode =
95
+ dataCellBackground && isHex(dataCellBackground)
96
+ ? dataCellBackground
97
+ : undefined;
98
+
99
+ // ignore setting background attr if ds neutral token is detected
100
+ if (backgroundColor.includes('--ds-background-neutral')) {
101
+ backgroundColor = '';
102
+ } else {
103
+ if (backgroundColor && isRgb(backgroundColor)) {
104
+ const result = rgbToHex(backgroundColor);
105
+ if (result !== null) {
106
+ backgroundColor = result;
107
+ }
108
+ }
109
+ }
110
+
111
+ const backgroundHexCode =
112
+ dataCellBackgroundHexCode ||
113
+ (backgroundColor && backgroundColor !== defaultValues['background']
114
+ ? backgroundColor
115
+ : null);
116
+
117
+ return {
118
+ colspan,
119
+ rowspan: Number(dom.getAttribute('rowspan') || 1),
120
+ colwidth: width && width.length === colspan ? width : null,
121
+ background: backgroundHexCode,
122
+ };
123
+ };
124
+
125
+ export type CellDomAttrs = {
126
+ colspan?: string;
127
+ rowspan?: string;
128
+ style?: string;
129
+ colorname?: string;
130
+ 'data-colwidth'?: string;
131
+ 'data-cell-background'?: string;
132
+ class?: string;
133
+ };
134
+
135
+ /**
136
+ * gets cell dom attributes based on node attributes
137
+ * @returns CellDomAttrs
138
+ */
139
+ export const getCellDomAttrs = (node: PmNode): CellDomAttrs => {
140
+ const attrs: CellDomAttrs = {};
141
+ const nodeType = node.type.name;
142
+
143
+ if (node.attrs.colspan !== 1) {
144
+ attrs.colspan = node.attrs.colspan;
145
+ }
146
+ if (node.attrs.rowspan !== 1) {
147
+ attrs.rowspan = node.attrs.rowspan;
148
+ }
149
+
150
+ if (node.attrs.colwidth) {
151
+ attrs['data-colwidth'] = node.attrs.colwidth.join(',');
152
+ }
153
+ if (node.attrs.background) {
154
+ const { background } = node.attrs;
155
+
156
+ // to ensure that we don't overwrite product's style:
157
+ // - it clears background color for <th> if its set to gray
158
+ // - it clears background color for <td> if its set to white
159
+ // - it clears background color for <th> if ds neutral token is detected
160
+ const ignored =
161
+ (nodeType === 'tableHeader' &&
162
+ background === tableBackgroundColorNames.get('light gray')) ||
163
+ (nodeType === 'tableCell' &&
164
+ background === tableBackgroundColorNames.get('white')) ||
165
+ (nodeType === 'tableHeader' &&
166
+ background.includes('--ds-background-neutral'));
167
+
168
+ if (ignored) {
169
+ attrs.style = '';
170
+ } else {
171
+ const color =
172
+ isRgb(background) && rgbToHex(background)
173
+ ? rgbToHex(background)
174
+ : background;
175
+ const tokenColor = hexToEditorBackgroundPaletteRawValue(color) || color;
176
+
177
+ attrs.style = `${attrs.style || ''}background-color: ${tokenColor};`;
178
+
179
+ /**
180
+ * Storing hex code in data-cell-background because
181
+ * we want to have DST token (css variable) or
182
+ * DST token value (value (hex code) of css variable) in
183
+ * inline style to correct render table cell background
184
+ * based on selected theme.
185
+ * Currently we rely on background color hex code stored in
186
+ * inline style.
187
+ * Because of that when we copy and paste table, we end up
188
+ * having DST token or DST token value in ADF instead of
189
+ * original hex code which we map to DST token.
190
+ * So, introducing data-cell-background.
191
+ * More details at https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3472556903/Tokenising+tableCell+background+colors#Update-toDom-and-parseDom-to-store-and-read-background-color-from-data-cell-background-attribute.4
192
+ */
193
+ if (color) {
194
+ attrs['data-cell-background'] = color;
195
+ }
196
+
197
+ attrs.colorname = tableBackgroundColorPalette.get(color);
198
+ }
199
+ }
200
+
201
+ if (nodeType === 'tableHeader') {
202
+ attrs.class = tableHeaderSelector;
203
+ } else {
204
+ attrs.class = tableCellSelector;
205
+ }
206
+
207
+ return attrs;
208
+ };
209
+
210
+ export const tableBackgroundColorPalette = new Map<string, string>();
211
+
212
+ export const tableBackgroundBorderColor = hexToRgba(N800, 0.12) || N0;
213
+ export const tableBackgroundColorNames = new Map<string, string>();
214
+
215
+ [
216
+ [N0, 'White'],
217
+ [B50, 'Light blue'],
218
+ [T50, 'Light teal'],
219
+ [G50, 'Light green'],
220
+ [Y50, 'Light yellow'],
221
+ [R50, 'Light red'],
222
+ [P50, 'Light purple'],
223
+
224
+ [N20, 'Light gray'],
225
+ [B75, 'Blue'],
226
+ [T75, 'Teal'],
227
+ [G75, 'Green'],
228
+ [Y75, 'Yellow'],
229
+ [R75, 'Red'],
230
+ [P75, 'Purple'],
231
+
232
+ [N60, 'Gray'],
233
+ [B100, 'Dark blue'],
234
+ [T100, 'Dark teal'],
235
+ [G200, 'Dark green'],
236
+ [Y200, 'Dark yellow'],
237
+ [R100, 'Dark red'],
238
+ [P100, 'Dark purple'],
239
+ ].forEach(([colorValue, colorName]) => {
240
+ tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
241
+ tableBackgroundColorNames.set(
242
+ colorName.toLowerCase(),
243
+ colorValue.toLowerCase(),
244
+ );
245
+ });
246
+
247
+ export type Layout = 'default' | 'full-width' | 'wide';
248
+
249
+ export interface TableAttributes {
250
+ isNumberColumnEnabled?: boolean;
251
+ layout?: Layout;
252
+ __autoSize?: boolean;
253
+ /**
254
+ * @minLength 1
255
+ */
256
+ localId?: string;
257
+ /**
258
+ * @stage 0
259
+ */
260
+ width?: number;
261
+ }
262
+
263
+ /**
264
+ * @name table_node
265
+ */
266
+ export interface TableDefinition {
267
+ type: 'table';
268
+ attrs?: TableAttributes;
269
+ /**
270
+ * @minItems 1
271
+ */
272
+ content: Array<TableRow>;
273
+ marks?: Array<FragmentDefinition>;
274
+ }
275
+
276
+ /**
277
+ * @name table_row_node
278
+ */
279
+ export interface TableRow {
280
+ type: 'tableRow';
281
+ content: Array<TableHeader | TableCell>;
282
+ }
283
+
284
+ /**
285
+ * @name table_cell_content
286
+ * @minItems 1
287
+ * @allowUnsupportedBlock true
288
+ */
289
+ export type TableCellContent = Array<
290
+ | Panel
291
+ | Paragraph
292
+ | ParagraphWithMarks
293
+ | Blockquote
294
+ | OrderedList
295
+ | BulletList
296
+ | Rule
297
+ | Heading
298
+ | HeadingWithMarks
299
+ | CodeBlock
300
+ | MediaGroup
301
+ | MediaSingle
302
+ | DecisionList
303
+ | TaskList
304
+ | Extension
305
+ | BlockCard
306
+ | NestedExpand
307
+ | EmbedCard
308
+ >;
309
+
310
+ /**
311
+ * @name table_cell_node
312
+ */
313
+ export interface TableCell {
314
+ type: 'tableCell';
315
+ attrs?: CellAttributes;
316
+ content: TableCellContent;
317
+ }
318
+
319
+ /**
320
+ * @name table_header_node
321
+ */
322
+ export interface TableHeader {
323
+ type: 'tableHeader';
324
+ attrs?: CellAttributes;
325
+ content: TableCellContent;
326
+ }
327
+
328
+ // TODO: Fix any, potential issue. ED-5048
329
+ const createTableSpec = (allowCustomWidth: boolean = false): NodeSpec => {
330
+ const attrs = {
331
+ isNumberColumnEnabled: { default: false },
332
+ layout: { default: 'default' },
333
+ __autoSize: { default: false },
334
+ localId: { default: '' },
335
+ };
336
+ const finalAttrs = allowCustomWidth
337
+ ? {
338
+ ...attrs,
339
+ width: { default: null },
340
+ }
341
+ : attrs;
342
+
343
+ const tableNodeSpec: NodeSpec = {
344
+ content: 'tableRow+',
345
+ attrs: finalAttrs,
346
+ marks: 'unsupportedMark unsupportedNodeAttribute',
347
+ tableRole: 'table',
348
+ isolating: true,
349
+ selectable: true,
350
+ group: 'block',
351
+ parseDOM: [
352
+ {
353
+ tag: 'table',
354
+ getAttrs: (node: string | Node) => {
355
+ const dom = node as HTMLElement;
356
+ const breakoutWrapper = dom.parentElement?.parentElement;
357
+
358
+ return {
359
+ isNumberColumnEnabled:
360
+ dom.getAttribute('data-number-column') === 'true',
361
+ layout:
362
+ // copying from editor
363
+ dom.getAttribute('data-layout') ||
364
+ // copying from renderer
365
+ breakoutWrapper?.getAttribute('data-layout') ||
366
+ 'default',
367
+ __autoSize: dom.getAttribute('data-autosize') === 'true',
368
+ localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
369
+ width: Number(dom.getAttribute('data-table-width')) || null,
370
+ };
371
+ },
372
+ },
373
+ ],
374
+ toDOM(node: PmNode) {
375
+ const attrs = {
376
+ 'data-number-column': node.attrs.isNumberColumnEnabled,
377
+ 'data-layout': node.attrs.layout,
378
+ 'data-autosize': node.attrs.__autoSize,
379
+ 'data-table-local-id': node.attrs.localId,
380
+ 'data-table-width': node.attrs.width,
381
+ };
382
+ return ['table', attrs, ['tbody', 0]];
383
+ },
384
+ };
385
+ return tableNodeSpec;
386
+ };
387
+
388
+ export const table = createTableSpec(false);
389
+ export const tableWithCustomWidth = createTableSpec(true);
390
+
391
+ const shouldIncludeAttribute = (key: string, value?: string) =>
392
+ !key.startsWith('__') && (key !== 'localId' || !!value);
393
+
394
+ export const tableToJSON = (node: PmNode) => ({
395
+ attrs: Object.keys(node.attrs)
396
+ .filter((key) => shouldIncludeAttribute(key, node.attrs[key]))
397
+ .reduce<typeof node.attrs>((obj, key) => {
398
+ return {
399
+ ...obj,
400
+ [key]: node.attrs[key],
401
+ };
402
+ }, {}),
403
+ });
404
+
405
+ export const tableRow: NodeSpec = {
406
+ selectable: false,
407
+ content: '(tableCell | tableHeader)+',
408
+ marks: 'unsupportedMark unsupportedNodeAttribute',
409
+ tableRole: 'row',
410
+ parseDOM: [{ tag: 'tr' }],
411
+ toDOM() {
412
+ return ['tr', 0];
413
+ },
414
+ };
415
+
416
+ const cellAttrs = {
417
+ colspan: { default: 1 },
418
+ rowspan: { default: 1 },
419
+ colwidth: { default: null },
420
+ background: { default: null },
421
+ };
422
+
423
+ export const tableCell: NodeSpec = {
424
+ selectable: false,
425
+ content:
426
+ '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
427
+ attrs: cellAttrs,
428
+ tableRole: 'cell',
429
+ marks:
430
+ 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
431
+ isolating: true,
432
+ parseDOM: [
433
+ // Ignore number cell copied from renderer
434
+ {
435
+ tag: '.ak-renderer-table-number-column',
436
+ ignore: true,
437
+ },
438
+ {
439
+ tag: 'td',
440
+ getAttrs: (dom: string | Node) => getCellAttrs(dom as HTMLElement),
441
+ },
442
+ ],
443
+ toDOM: (node: PmNode) => ['td', getCellDomAttrs(node), 0],
444
+ };
445
+
446
+ export const toJSONTableCell = (node: PmNode) => ({
447
+ attrs: (Object.keys(node.attrs) as Array<keyof CellAttributes>).reduce<
448
+ Record<string, any>
449
+ >((obj, key) => {
450
+ if (cellAttrs[key].default !== node.attrs[key]) {
451
+ obj[key] = node.attrs[key];
452
+ }
453
+
454
+ return obj;
455
+ }, {}),
456
+ });
457
+
458
+ export const tableHeader: NodeSpec = {
459
+ selectable: false,
460
+ content:
461
+ '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
462
+ attrs: cellAttrs,
463
+ tableRole: 'header_cell',
464
+ isolating: true,
465
+ marks:
466
+ 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
467
+ parseDOM: [
468
+ {
469
+ tag: 'th',
470
+ getAttrs: (dom: string | Node) =>
471
+ getCellAttrs(dom as HTMLElement, {
472
+ background: DEFAULT_TABLE_HEADER_CELL_BACKGROUND,
473
+ }),
474
+ },
475
+ ],
476
+
477
+ toDOM: (node: PmNode) => ['th', getCellDomAttrs(node), 0],
478
+ };
479
+
480
+ export const toJSONTableHeader = toJSONTableCell;
@@ -0,0 +1,51 @@
1
+ import { Node, NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { uuid } from '../../utils/uuid';
3
+ import { Inline } from './types/inline-content';
4
+
5
+ /**
6
+ * @name taskItem_node
7
+ */
8
+ export interface TaskItemDefinition {
9
+ type: 'taskItem';
10
+ /**
11
+ * @allowUnsupportedInline true
12
+ */
13
+ content?: Array<Inline>;
14
+ attrs: {
15
+ localId: string;
16
+ state: 'TODO' | 'DONE';
17
+ };
18
+ }
19
+
20
+ export const taskItem: NodeSpec = {
21
+ content: 'inline*',
22
+ defining: true,
23
+ selectable: false,
24
+ marks: '_',
25
+ attrs: {
26
+ localId: { default: '' },
27
+ state: { default: 'TODO' },
28
+ },
29
+ parseDOM: [
30
+ {
31
+ tag: 'div[data-task-local-id]',
32
+
33
+ // Default priority is 50. We normally don't change this but since this node type is
34
+ // also used by list-item we need to make sure that we run this parser first.
35
+ priority: 100,
36
+
37
+ getAttrs: (dom) => ({
38
+ localId: uuid.generate(),
39
+ state: (dom as HTMLElement).getAttribute('data-task-state') || 'TODO',
40
+ }),
41
+ },
42
+ ],
43
+ toDOM(node: Node) {
44
+ const { localId, state } = node.attrs;
45
+ const attrs = {
46
+ 'data-task-local-id': localId || 'local-task',
47
+ 'data-task-state': state || 'TODO',
48
+ };
49
+ return ['div', attrs, 0];
50
+ },
51
+ };
@@ -0,0 +1,61 @@
1
+ import { Node, NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+ import { TaskItemDefinition as TaskItemNode } from './task-item';
3
+ import { uuid } from '../../utils/uuid';
4
+
5
+ export interface TaskListContent
6
+ extends Array<TaskItemNode | TaskListDefinition> {
7
+ 0: TaskItemNode;
8
+ }
9
+
10
+ /**
11
+ * @name taskList_node
12
+ */
13
+ export interface TaskListDefinition {
14
+ type: 'taskList';
15
+ /**
16
+ * @minItems 1
17
+ * @allowUnsupportedBlock true
18
+ */
19
+ content: TaskListContent;
20
+ attrs: {
21
+ localId: string;
22
+ };
23
+ }
24
+
25
+ const name = 'actionList';
26
+
27
+ export const taskListSelector = `[data-node-type="${name}"]`;
28
+
29
+ export const taskList: NodeSpec = {
30
+ group: 'block',
31
+ defining: true,
32
+ selectable: false,
33
+ content: '(taskItem|unsupportedBlock)+ (taskItem|taskList|unsupportedBlock)*',
34
+ marks: 'unsupportedMark unsupportedNodeAttribute',
35
+ attrs: {
36
+ localId: { default: '' },
37
+ },
38
+ parseDOM: [
39
+ {
40
+ tag: `div${taskListSelector}`,
41
+
42
+ // Default priority is 50. We normally don't change this but since this node type is
43
+ // also used by ordered-list we need to make sure that we run this parser first.
44
+ priority: 100,
45
+
46
+ getAttrs: () => ({
47
+ localId: uuid.generate(),
48
+ }),
49
+ },
50
+ ],
51
+ toDOM(node: Node) {
52
+ const { localId } = node.attrs;
53
+ const attrs = {
54
+ 'data-node-type': name,
55
+ 'data-task-list-local-id': localId || 'local-task-list',
56
+ style: 'list-style: none; padding-left: 0',
57
+ };
58
+
59
+ return ['div', attrs, 0];
60
+ },
61
+ };
@@ -0,0 +1,19 @@
1
+ import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
+
3
+ /**
4
+ * @name text_node
5
+ */
6
+ export interface TextDefinition {
7
+ type: 'text';
8
+ /**
9
+ * @minLength 1
10
+ */
11
+ text: string;
12
+ marks?: Array<any>;
13
+ }
14
+
15
+ export const text: NodeSpec & { toDebugString?: () => string } = {
16
+ group: 'inline',
17
+ toDebugString:
18
+ process.env.NODE_ENV !== 'production' ? undefined : () => 'text_node',
19
+ };
@@ -0,0 +1,51 @@
1
+ import { ExpandDefinition as Expand } from '../expand';
2
+ import { BodiedExtensionDefinition as BodiedExtension } from '../bodied-extension';
3
+ import { PanelDefinition as Panel } from '../panel';
4
+ import {
5
+ ParagraphDefinition as Paragraph,
6
+ ParagraphWithMarksDefinition as ParagraphWithMarks,
7
+ } from '../paragraph';
8
+ import { BlockQuoteDefinition as Blockquote } from '../blockquote';
9
+ import { OrderedListDefinition as OrderedList } from '../types/list';
10
+ import { BulletListDefinition as BulletList } from '../types/list';
11
+ import { RuleDefinition as Rule } from '../rule';
12
+ import {
13
+ HeadingDefinition as Heading,
14
+ HeadingWithMarksDefinition as HeadingWithMarks,
15
+ } from '../heading';
16
+ import { CodeBlockDefinition as CodeBlock } from '../code-block';
17
+ import { MediaGroupDefinition as MediaGroup } from '../media-group';
18
+ import { MediaSingleDefinition as MediaSingle } from '../media-single';
19
+ import { DecisionListDefinition as DecisionList } from '../decision-list';
20
+ import { TaskListDefinition as TaskList } from '../task-list';
21
+ import { TableDefinition as Table } from '../tableNodes';
22
+ import { ExtensionDefinition as Extension } from '../extension';
23
+ import { BlockCardDefinition as BlockCard } from '../block-card';
24
+ import { EmbedCardDefinition as EmbedCard } from '../embed-card';
25
+
26
+ // NOTE: BlockContent is only being used by layoutColumn now.
27
+
28
+ /**
29
+ * @name block_content
30
+ */
31
+ export type BlockContent =
32
+ | Panel
33
+ | Paragraph
34
+ | ParagraphWithMarks
35
+ | Blockquote
36
+ | OrderedList
37
+ | BulletList
38
+ | Rule
39
+ | Heading
40
+ | HeadingWithMarks
41
+ | CodeBlock
42
+ | MediaGroup
43
+ | MediaSingle
44
+ | DecisionList
45
+ | TaskList
46
+ | Table
47
+ | Expand
48
+ | Extension
49
+ | BodiedExtension
50
+ | BlockCard
51
+ | EmbedCard;
@@ -0,0 +1,36 @@
1
+ export type Layout = 'default' | 'wide' | 'full-width';
2
+
3
+ export interface ExtensionAttributes {
4
+ /**
5
+ * @minLength 1
6
+ */
7
+ extensionKey: string;
8
+ /**
9
+ * @minLength 1
10
+ */
11
+ extensionType: string;
12
+ parameters?: object;
13
+ text?: string;
14
+ layout?: Layout;
15
+ /**
16
+ * @minLength 1
17
+ */
18
+ localId?: string;
19
+ }
20
+
21
+ export interface InlineExtensionAttributes {
22
+ /**
23
+ * @minLength 1
24
+ */
25
+ extensionKey: string;
26
+ /**
27
+ * @minLength 1
28
+ */
29
+ extensionType: string;
30
+ parameters?: object;
31
+ text?: string;
32
+ /**
33
+ * @minLength 1
34
+ */
35
+ localId?: string;
36
+ }