@atlaskit/adf-schema 51.5.0 → 51.5.2

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 (583) hide show
  1. package/CHANGELOG.md +763 -424
  2. package/README.md +5 -0
  3. package/codemods/23.0.0-move-bitbucket-schema-to-own-entry-points.ts +1 -3
  4. package/codemods/23.0.0-move-confluence-schema-to-own-entry-points.ts +1 -3
  5. package/codemods/migrates/update-bitbucket-schema-entry-points.ts +5 -5
  6. package/codemods/migrates/update-confluence-schema-entry-points.ts +10 -10
  7. package/codemods/migrates/update-default-schema-entry-points.ts +15 -15
  8. package/codemods/migrates/update-jira-schema-entry-points.ts +60 -60
  9. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  10. package/dist/cjs/next-schema/marks/link.js +1 -1
  11. package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
  12. package/dist/cjs/schema/bitbucket-schema.js +1 -0
  13. package/dist/cjs/schema/confluence-schema.js +2 -0
  14. package/dist/cjs/schema/create-schema.js +0 -2
  15. package/dist/cjs/schema/createPMSpecFactory.js +2 -0
  16. package/dist/cjs/schema/inline-nodes.js +3 -0
  17. package/dist/cjs/schema/jira-schema.js +2 -0
  18. package/dist/cjs/schema/marks/annotation.js +6 -5
  19. package/dist/cjs/schema/marks/background-color.js +2 -0
  20. package/dist/cjs/schema/marks/border.js +1 -0
  21. package/dist/cjs/schema/marks/breakout.js +2 -0
  22. package/dist/cjs/schema/marks/indentation.js +1 -0
  23. package/dist/cjs/schema/marks/link.js +4 -0
  24. package/dist/cjs/schema/marks/strong.js +5 -1
  25. package/dist/cjs/schema/marks/text-color.js +2 -0
  26. package/dist/cjs/schema/nodes/block-card.js +4 -1
  27. package/dist/cjs/schema/nodes/bodied-extension.js +1 -0
  28. package/dist/cjs/schema/nodes/bodied-sync-block.js +1 -0
  29. package/dist/cjs/schema/nodes/caption.js +4 -2
  30. package/dist/cjs/schema/nodes/code-block.js +33 -8
  31. package/dist/cjs/schema/nodes/confluence-jira-issue.js +1 -0
  32. package/dist/cjs/schema/nodes/confluence-unsupported-block.js +1 -0
  33. package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +1 -0
  34. package/dist/cjs/schema/nodes/date.js +2 -0
  35. package/dist/cjs/schema/nodes/decision-item.js +1 -0
  36. package/dist/cjs/schema/nodes/embed-card.js +18 -4
  37. package/dist/cjs/schema/nodes/emoji.js +20 -0
  38. package/dist/cjs/schema/nodes/expand.js +1 -0
  39. package/dist/cjs/schema/nodes/extension.js +1 -0
  40. package/dist/cjs/schema/nodes/heading.js +3 -2
  41. package/dist/cjs/schema/nodes/image.js +1 -0
  42. package/dist/cjs/schema/nodes/inline-extension.js +1 -0
  43. package/dist/cjs/schema/nodes/layout-column.js +6 -2
  44. package/dist/cjs/schema/nodes/media-group.js +1 -1
  45. package/dist/cjs/schema/nodes/media-single.js +1 -0
  46. package/dist/cjs/schema/nodes/media.js +25 -16
  47. package/dist/cjs/schema/nodes/mention.js +5 -0
  48. package/dist/cjs/schema/nodes/nested-expand.js +2 -1
  49. package/dist/cjs/schema/nodes/ordered-list.js +3 -0
  50. package/dist/cjs/schema/nodes/panel.js +6 -0
  51. package/dist/cjs/schema/nodes/paragraph.js +1 -0
  52. package/dist/cjs/schema/nodes/placeholder.js +6 -2
  53. package/dist/cjs/schema/nodes/status.js +3 -0
  54. package/dist/cjs/schema/nodes/sync-block.js +1 -0
  55. package/dist/cjs/schema/nodes/tableNodes.js +32 -15
  56. package/dist/cjs/schema/nodes/task-item.js +2 -0
  57. package/dist/cjs/schema/nodes/unsupported-block.js +1 -0
  58. package/dist/cjs/schema/nodes/unsupported-inline.js +1 -0
  59. package/dist/cjs/schema/sanitizeNodes.js +11 -6
  60. package/dist/cjs/steps/analytics.js +1 -1
  61. package/dist/cjs/steps/batch-attrs-step.js +1 -1
  62. package/dist/cjs/utils/colors.js +21 -8
  63. package/dist/cjs/utils/editor-palette.js +7 -0
  64. package/dist/cjs/utils/lch-color-inversion.js +11 -5
  65. package/dist/cjs/utils/url.js +9 -6
  66. package/dist/cjs/utils/uuid.js +7 -7
  67. package/dist/cjs/validator-schema/generated/validatorSpec.js +1 -1
  68. package/dist/es2019/index.js +4 -1
  69. package/dist/es2019/json-schema/index.js +1 -0
  70. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  71. package/dist/es2019/next-schema/index.js +1 -0
  72. package/dist/es2019/next-schema/marks/alignmentAndIndentation.js +1 -2
  73. package/dist/es2019/next-schema/marks/color.js +1 -2
  74. package/dist/es2019/next-schema/marks/link.js +1 -1
  75. package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
  76. package/dist/es2019/schema/bitbucket-schema.js +1 -0
  77. package/dist/es2019/schema/confluence-schema.js +2 -0
  78. package/dist/es2019/schema/create-schema.js +0 -2
  79. package/dist/es2019/schema/createPMSpecFactory.js +2 -0
  80. package/dist/es2019/schema/index.js +4 -1
  81. package/dist/es2019/schema/inline-nodes.js +3 -0
  82. package/dist/es2019/schema/jira-schema.js +1 -0
  83. package/dist/es2019/schema/marks/annotation.js +7 -5
  84. package/dist/es2019/schema/marks/background-color.js +3 -1
  85. package/dist/es2019/schema/marks/border.js +1 -0
  86. package/dist/es2019/schema/marks/breakout.js +2 -0
  87. package/dist/es2019/schema/marks/indentation.js +1 -0
  88. package/dist/es2019/schema/marks/index.js +1 -0
  89. package/dist/es2019/schema/marks/link.js +4 -0
  90. package/dist/es2019/schema/marks/strong.js +5 -1
  91. package/dist/es2019/schema/marks/text-color.js +3 -1
  92. package/dist/es2019/schema/nodes/block-card.js +4 -1
  93. package/dist/es2019/schema/nodes/blockquote.js +1 -2
  94. package/dist/es2019/schema/nodes/bodied-extension.js +1 -0
  95. package/dist/es2019/schema/nodes/bodied-sync-block.js +1 -0
  96. package/dist/es2019/schema/nodes/caption.js +4 -2
  97. package/dist/es2019/schema/nodes/code-block.js +34 -9
  98. package/dist/es2019/schema/nodes/confluence-jira-issue.js +1 -0
  99. package/dist/es2019/schema/nodes/confluence-unsupported-block.js +1 -0
  100. package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +1 -0
  101. package/dist/es2019/schema/nodes/date.js +2 -0
  102. package/dist/es2019/schema/nodes/decision-item.js +1 -0
  103. package/dist/es2019/schema/nodes/embed-card.js +18 -4
  104. package/dist/es2019/schema/nodes/emoji.js +20 -0
  105. package/dist/es2019/schema/nodes/expand.js +1 -0
  106. package/dist/es2019/schema/nodes/extension.js +1 -0
  107. package/dist/es2019/schema/nodes/heading.js +6 -7
  108. package/dist/es2019/schema/nodes/image.js +1 -0
  109. package/dist/es2019/schema/nodes/index.js +1 -0
  110. package/dist/es2019/schema/nodes/inline-extension.js +1 -0
  111. package/dist/es2019/schema/nodes/layout-column.js +6 -2
  112. package/dist/es2019/schema/nodes/layout-section.js +1 -2
  113. package/dist/es2019/schema/nodes/media-group.js +1 -1
  114. package/dist/es2019/schema/nodes/media-single.js +1 -0
  115. package/dist/es2019/schema/nodes/media.js +22 -15
  116. package/dist/es2019/schema/nodes/mention.js +5 -0
  117. package/dist/es2019/schema/nodes/multi-bodied-extension.js +1 -2
  118. package/dist/es2019/schema/nodes/nested-expand.js +2 -1
  119. package/dist/es2019/schema/nodes/ordered-list.js +3 -0
  120. package/dist/es2019/schema/nodes/panel.js +6 -0
  121. package/dist/es2019/schema/nodes/paragraph.js +1 -0
  122. package/dist/es2019/schema/nodes/placeholder.js +6 -2
  123. package/dist/es2019/schema/nodes/status.js +4 -1
  124. package/dist/es2019/schema/nodes/sync-block.js +1 -0
  125. package/dist/es2019/schema/nodes/tableNodes.js +22 -8
  126. package/dist/es2019/schema/nodes/task-item.js +2 -0
  127. package/dist/es2019/schema/nodes/unsupported-block.js +1 -0
  128. package/dist/es2019/schema/nodes/unsupported-inline.js +1 -0
  129. package/dist/es2019/schema/sanitizeNodes.js +11 -6
  130. package/dist/es2019/steps/analytics.js +1 -1
  131. package/dist/es2019/steps/batch-attrs-step.js +1 -1
  132. package/dist/es2019/steps/set-attrs.js +5 -5
  133. package/dist/es2019/steps.js +1 -0
  134. package/dist/es2019/utils/colors.js +23 -9
  135. package/dist/es2019/utils/editor-palette.js +6 -0
  136. package/dist/es2019/utils/index.js +1 -0
  137. package/dist/es2019/utils/lch-color-inversion.js +8 -3
  138. package/dist/es2019/utils/url.js +9 -6
  139. package/dist/es2019/utils/uuid.js +3 -4
  140. package/dist/es2019/validator-schema/generated/validatorSpec.js +1 -1
  141. package/dist/esm/index.js +4 -1
  142. package/dist/esm/json-schema/index.js +1 -0
  143. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  144. package/dist/esm/next-schema/index.js +1 -0
  145. package/dist/esm/next-schema/marks/alignmentAndIndentation.js +1 -2
  146. package/dist/esm/next-schema/marks/color.js +1 -2
  147. package/dist/esm/next-schema/marks/link.js +1 -1
  148. package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
  149. package/dist/esm/schema/bitbucket-schema.js +1 -0
  150. package/dist/esm/schema/confluence-schema.js +2 -0
  151. package/dist/esm/schema/create-schema.js +0 -2
  152. package/dist/esm/schema/createPMSpecFactory.js +2 -0
  153. package/dist/esm/schema/index.js +4 -1
  154. package/dist/esm/schema/inline-nodes.js +3 -0
  155. package/dist/esm/schema/jira-schema.js +1 -0
  156. package/dist/esm/schema/marks/annotation.js +6 -5
  157. package/dist/esm/schema/marks/background-color.js +2 -0
  158. package/dist/esm/schema/marks/border.js +1 -0
  159. package/dist/esm/schema/marks/breakout.js +2 -0
  160. package/dist/esm/schema/marks/indentation.js +1 -0
  161. package/dist/esm/schema/marks/index.js +1 -0
  162. package/dist/esm/schema/marks/link.js +4 -0
  163. package/dist/esm/schema/marks/strong.js +5 -1
  164. package/dist/esm/schema/marks/text-color.js +2 -0
  165. package/dist/esm/schema/nodes/block-card.js +4 -1
  166. package/dist/esm/schema/nodes/blockquote.js +1 -2
  167. package/dist/esm/schema/nodes/bodied-extension.js +1 -0
  168. package/dist/esm/schema/nodes/bodied-sync-block.js +1 -0
  169. package/dist/esm/schema/nodes/caption.js +4 -2
  170. package/dist/esm/schema/nodes/code-block.js +33 -8
  171. package/dist/esm/schema/nodes/confluence-jira-issue.js +1 -0
  172. package/dist/esm/schema/nodes/confluence-unsupported-block.js +1 -0
  173. package/dist/esm/schema/nodes/confluence-unsupported-inline.js +1 -0
  174. package/dist/esm/schema/nodes/date.js +2 -0
  175. package/dist/esm/schema/nodes/decision-item.js +1 -0
  176. package/dist/esm/schema/nodes/embed-card.js +18 -4
  177. package/dist/esm/schema/nodes/emoji.js +20 -0
  178. package/dist/esm/schema/nodes/expand.js +1 -0
  179. package/dist/esm/schema/nodes/extension.js +1 -0
  180. package/dist/esm/schema/nodes/heading.js +3 -2
  181. package/dist/esm/schema/nodes/image.js +1 -0
  182. package/dist/esm/schema/nodes/index.js +1 -0
  183. package/dist/esm/schema/nodes/inline-extension.js +1 -0
  184. package/dist/esm/schema/nodes/layout-column.js +6 -2
  185. package/dist/esm/schema/nodes/layout-section.js +1 -2
  186. package/dist/esm/schema/nodes/media-group.js +1 -1
  187. package/dist/esm/schema/nodes/media-single.js +1 -0
  188. package/dist/esm/schema/nodes/media.js +26 -18
  189. package/dist/esm/schema/nodes/mention.js +5 -0
  190. package/dist/esm/schema/nodes/multi-bodied-extension.js +1 -2
  191. package/dist/esm/schema/nodes/nested-expand.js +2 -1
  192. package/dist/esm/schema/nodes/ordered-list.js +3 -0
  193. package/dist/esm/schema/nodes/panel.js +6 -0
  194. package/dist/esm/schema/nodes/paragraph.js +1 -0
  195. package/dist/esm/schema/nodes/placeholder.js +6 -2
  196. package/dist/esm/schema/nodes/status.js +3 -0
  197. package/dist/esm/schema/nodes/sync-block.js +1 -0
  198. package/dist/esm/schema/nodes/tableNodes.js +32 -15
  199. package/dist/esm/schema/nodes/task-item.js +2 -0
  200. package/dist/esm/schema/nodes/unsupported-block.js +1 -0
  201. package/dist/esm/schema/nodes/unsupported-inline.js +1 -0
  202. package/dist/esm/schema/sanitizeNodes.js +11 -6
  203. package/dist/esm/steps/analytics.js +1 -1
  204. package/dist/esm/steps/batch-attrs-step.js +1 -1
  205. package/dist/esm/steps.js +1 -0
  206. package/dist/esm/utils/colors.js +20 -8
  207. package/dist/esm/utils/editor-palette.js +6 -0
  208. package/dist/esm/utils/index.js +1 -0
  209. package/dist/esm/utils/lch-color-inversion.js +11 -5
  210. package/dist/esm/utils/url.js +9 -6
  211. package/dist/esm/utils/uuid.js +7 -7
  212. package/dist/esm/validator-schema/generated/validatorSpec.js +1 -1
  213. package/dist/types/next-schema/full-schema.adf.d.ts +1 -1
  214. package/dist/types/next-schema/generated/markTypes.d.ts +1 -1
  215. package/dist/types/next-schema/generated/nodeTypes.d.ts +4 -4
  216. package/dist/types/next-schema/groups/blockContentGroup.d.ts +1 -1
  217. package/dist/types/next-schema/groups/blockGroup.d.ts +1 -1
  218. package/dist/types/next-schema/groups/blockRootOnlyGroup.d.ts +1 -1
  219. package/dist/types/next-schema/groups/fontStyleGroup.d.ts +1 -1
  220. package/dist/types/next-schema/groups/inlineContentGroup.d.ts +1 -1
  221. package/dist/types/next-schema/groups/inlineGroup.d.ts +1 -1
  222. package/dist/types/next-schema/groups/linkMarkGroup.d.ts +1 -1
  223. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +6 -6
  224. package/dist/types/next-schema/groups/searchQueryMarkGroup.d.ts +1 -1
  225. package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +7 -67
  226. package/dist/types/next-schema/marks/alignmentAndIndentation.d.ts +2 -2
  227. package/dist/types/next-schema/marks/annotation.d.ts +2 -2
  228. package/dist/types/next-schema/marks/border.d.ts +1 -1
  229. package/dist/types/next-schema/marks/breakout.d.ts +1 -1
  230. package/dist/types/next-schema/marks/code.d.ts +1 -1
  231. package/dist/types/next-schema/marks/color.d.ts +3 -3
  232. package/dist/types/next-schema/marks/confluenceInlineComment.d.ts +1 -1
  233. package/dist/types/next-schema/marks/dataConsumer.d.ts +1 -1
  234. package/dist/types/next-schema/marks/em.d.ts +1 -1
  235. package/dist/types/next-schema/marks/fragment.d.ts +1 -1
  236. package/dist/types/next-schema/marks/link.d.ts +1 -1
  237. package/dist/types/next-schema/marks/strike.d.ts +1 -1
  238. package/dist/types/next-schema/marks/strong.d.ts +1 -1
  239. package/dist/types/next-schema/marks/subsup.d.ts +1 -1
  240. package/dist/types/next-schema/marks/typeAheadQuery.d.ts +1 -1
  241. package/dist/types/next-schema/marks/underline.d.ts +1 -1
  242. package/dist/types/next-schema/marks/unsupportedMark.d.ts +1 -1
  243. package/dist/types/next-schema/marks/unsupportedNodeAttribute.d.ts +1 -1
  244. package/dist/types/next-schema/nodes/blockCard.d.ts +1 -1
  245. package/dist/types/next-schema/nodes/blockquote.d.ts +3 -3
  246. package/dist/types/next-schema/nodes/bodiedExtension.d.ts +4 -4
  247. package/dist/types/next-schema/nodes/bodiedSyncBlock.d.ts +1 -1
  248. package/dist/types/next-schema/nodes/caption.d.ts +1 -1
  249. package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -2
  250. package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +1 -1
  251. package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +1 -1
  252. package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +1 -1
  253. package/dist/types/next-schema/nodes/date.d.ts +1 -1
  254. package/dist/types/next-schema/nodes/decisionItem.d.ts +1 -1
  255. package/dist/types/next-schema/nodes/decisionList.d.ts +1 -1
  256. package/dist/types/next-schema/nodes/embedCard.d.ts +1 -1
  257. package/dist/types/next-schema/nodes/emoji.d.ts +1 -1
  258. package/dist/types/next-schema/nodes/expand.d.ts +2 -2
  259. package/dist/types/next-schema/nodes/extension.d.ts +3 -3
  260. package/dist/types/next-schema/nodes/extensionFrame.d.ts +1 -1
  261. package/dist/types/next-schema/nodes/hardBreak.d.ts +1 -1
  262. package/dist/types/next-schema/nodes/heading.d.ts +20 -20
  263. package/dist/types/next-schema/nodes/image.d.ts +1 -1
  264. package/dist/types/next-schema/nodes/inlineCard.d.ts +2 -2
  265. package/dist/types/next-schema/nodes/inlineExtension.d.ts +2 -2
  266. package/dist/types/next-schema/nodes/layoutColumn.d.ts +1 -1
  267. package/dist/types/next-schema/nodes/layoutSection.d.ts +7 -7
  268. package/dist/types/next-schema/nodes/list.d.ts +2 -2
  269. package/dist/types/next-schema/nodes/media.d.ts +1 -1
  270. package/dist/types/next-schema/nodes/mediaGroup.d.ts +1 -1
  271. package/dist/types/next-schema/nodes/mediaInline.d.ts +1 -1
  272. package/dist/types/next-schema/nodes/mediaSingle.d.ts +10 -10
  273. package/dist/types/next-schema/nodes/mention.d.ts +1 -1
  274. package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -1
  275. package/dist/types/next-schema/nodes/nestedExpand.d.ts +3 -3
  276. package/dist/types/next-schema/nodes/panel.d.ts +1 -1
  277. package/dist/types/next-schema/nodes/paragraph.d.ts +13 -13
  278. package/dist/types/next-schema/nodes/placeholder.d.ts +1 -1
  279. package/dist/types/next-schema/nodes/rule.d.ts +1 -1
  280. package/dist/types/next-schema/nodes/status.d.ts +1 -1
  281. package/dist/types/next-schema/nodes/syncBlock.d.ts +1 -1
  282. package/dist/types/next-schema/nodes/tableCellContent.d.ts +1 -1
  283. package/dist/types/next-schema/nodes/tableNodes.d.ts +1 -1
  284. package/dist/types/next-schema/nodes/task.d.ts +3 -3
  285. package/dist/types/next-schema/nodes/text.d.ts +5 -5
  286. package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +1 -1
  287. package/dist/types/next-schema/nodes/unsupportedInline.d.ts +1 -1
  288. package/dist/types/schema/bitbucket-schema.d.ts +1 -1
  289. package/dist/types/schema/confluence-schema.d.ts +1 -1
  290. package/dist/types/schema/create-schema.d.ts +4 -3
  291. package/dist/types/schema/createPMSpecFactory.d.ts +3 -3
  292. package/dist/types/schema/default-schema.d.ts +1 -1
  293. package/dist/types/schema/index.d.ts +1 -1
  294. package/dist/types/schema/jira-schema.d.ts +8 -8
  295. package/dist/types/schema/marks/alignment.d.ts +2 -2
  296. package/dist/types/schema/marks/annotation.d.ts +5 -5
  297. package/dist/types/schema/marks/background-color.d.ts +3 -3
  298. package/dist/types/schema/marks/border.d.ts +6 -6
  299. package/dist/types/schema/marks/breakout.d.ts +2 -2
  300. package/dist/types/schema/marks/code.d.ts +1 -1
  301. package/dist/types/schema/marks/confluence-inline-comment.d.ts +2 -2
  302. package/dist/types/schema/marks/data-consumer.d.ts +2 -2
  303. package/dist/types/schema/marks/em.d.ts +1 -1
  304. package/dist/types/schema/marks/fragment.d.ts +2 -2
  305. package/dist/types/schema/marks/indentation.d.ts +2 -2
  306. package/dist/types/schema/marks/index.d.ts +3 -3
  307. package/dist/types/schema/marks/link.d.ts +12 -12
  308. package/dist/types/schema/marks/strike.d.ts +1 -1
  309. package/dist/types/schema/marks/strong.d.ts +1 -1
  310. package/dist/types/schema/marks/subsup.d.ts +2 -2
  311. package/dist/types/schema/marks/text-color.d.ts +2 -2
  312. package/dist/types/schema/marks/type-ahead-query.d.ts +1 -1
  313. package/dist/types/schema/marks/underline.d.ts +1 -1
  314. package/dist/types/schema/marks/unsupported-mark.d.ts +1 -1
  315. package/dist/types/schema/marks/unsupported-node-attributes.d.ts +1 -1
  316. package/dist/types/schema/nodes/block-card.d.ts +6 -6
  317. package/dist/types/schema/nodes/blockquote.d.ts +10 -11
  318. package/dist/types/schema/nodes/bodied-extension.d.ts +7 -7
  319. package/dist/types/schema/nodes/bodied-sync-block.d.ts +23 -24
  320. package/dist/types/schema/nodes/caption.d.ts +12 -12
  321. package/dist/types/schema/nodes/code-block.d.ts +7 -7
  322. package/dist/types/schema/nodes/date.d.ts +3 -3
  323. package/dist/types/schema/nodes/decision-item.d.ts +6 -6
  324. package/dist/types/schema/nodes/decision-list.d.ts +5 -5
  325. package/dist/types/schema/nodes/doc.d.ts +10 -10
  326. package/dist/types/schema/nodes/embed-card.d.ts +4 -4
  327. package/dist/types/schema/nodes/emoji.d.ts +3 -3
  328. package/dist/types/schema/nodes/expand.d.ts +7 -7
  329. package/dist/types/schema/nodes/extension.d.ts +5 -5
  330. package/dist/types/schema/nodes/heading.d.ts +9 -9
  331. package/dist/types/schema/nodes/index.d.ts +6 -6
  332. package/dist/types/schema/nodes/inline-card.d.ts +3 -3
  333. package/dist/types/schema/nodes/inline-extension.d.ts +5 -5
  334. package/dist/types/schema/nodes/layout-column.d.ts +3 -3
  335. package/dist/types/schema/nodes/layout-section.d.ts +9 -9
  336. package/dist/types/schema/nodes/media-group.d.ts +2 -2
  337. package/dist/types/schema/nodes/media-inline.d.ts +6 -6
  338. package/dist/types/schema/nodes/media-single.d.ts +10 -10
  339. package/dist/types/schema/nodes/media.d.ts +27 -27
  340. package/dist/types/schema/nodes/mention.d.ts +5 -5
  341. package/dist/types/schema/nodes/multi-bodied-extension.d.ts +21 -22
  342. package/dist/types/schema/nodes/nested-expand.d.ts +14 -14
  343. package/dist/types/schema/nodes/panel.d.ts +14 -15
  344. package/dist/types/schema/nodes/paragraph.d.ts +5 -5
  345. package/dist/types/schema/nodes/rule.d.ts +1 -1
  346. package/dist/types/schema/nodes/status.d.ts +6 -6
  347. package/dist/types/schema/nodes/sync-block.d.ts +7 -7
  348. package/dist/types/schema/nodes/tableNodes.d.ts +36 -37
  349. package/dist/types/schema/nodes/task-item.d.ts +13 -13
  350. package/dist/types/schema/nodes/task-list.d.ts +5 -5
  351. package/dist/types/schema/nodes/types/block-content.d.ts +17 -18
  352. package/dist/types/schema/nodes/types/inline-content.d.ts +12 -12
  353. package/dist/types/schema/nodes/types/list.d.ts +18 -18
  354. package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +15 -16
  355. package/dist/types/schema/nodes/unknown-block.d.ts +1 -1
  356. package/dist/types/schema/sanitizeNodes.d.ts +1 -1
  357. package/dist/types/steps/analytics.d.ts +4 -3
  358. package/dist/types/steps/batch-attrs-step.d.ts +4 -4
  359. package/dist/types/steps/link-meta-step.d.ts +7 -6
  360. package/dist/types/steps/override-document-step.d.ts +4 -4
  361. package/dist/types/steps/set-attrs.d.ts +4 -3
  362. package/dist/types/steps/type-ahead.d.ts +2 -2
  363. package/dist/types/utils/colors.d.ts +1 -1
  364. package/dist/types/utils/confluence/emoji.d.ts +1 -1
  365. package/dist/types/utils/extensions.d.ts +1 -1
  366. package/dist/types/utils/index.d.ts +1 -1
  367. package/dist/types/utils/url.d.ts +3 -3
  368. package/dist/types/validator-schema/generated/validatorSpec.d.ts +12 -12
  369. package/dist/types-ts4.5/index.d.ts +8 -0
  370. package/dist/types-ts4.5/next-schema/full-schema.adf.d.ts +4 -0
  371. package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +206 -0
  372. package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +10 -0
  373. package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +976 -0
  374. package/dist/types-ts4.5/next-schema/groups/blockContentGroup.d.ts +12 -0
  375. package/dist/types-ts4.5/next-schema/groups/blockGroup.d.ts +1 -0
  376. package/dist/types-ts4.5/next-schema/groups/blockRootOnlyGroup.d.ts +1 -0
  377. package/dist/types-ts4.5/next-schema/groups/fontStyleGroup.d.ts +1 -0
  378. package/dist/types-ts4.5/next-schema/groups/inlineContentGroup.d.ts +10 -0
  379. package/dist/types-ts4.5/next-schema/groups/inlineGroup.d.ts +1 -0
  380. package/dist/types-ts4.5/next-schema/groups/linkMarkGroup.d.ts +1 -0
  381. package/dist/types-ts4.5/next-schema/groups/nonNestableBlockContentGroup.d.ts +30 -0
  382. package/dist/types-ts4.5/next-schema/groups/searchQueryMarkGroup.d.ts +1 -0
  383. package/dist/types-ts4.5/next-schema/groups/tableCellContentPseudoGroup.d.ts +26 -0
  384. package/dist/types-ts4.5/next-schema/index.d.ts +3 -0
  385. package/dist/types-ts4.5/next-schema/marks/alignmentAndIndentation.d.ts +2 -0
  386. package/dist/types-ts4.5/next-schema/marks/annotation.d.ts +2 -0
  387. package/dist/types-ts4.5/next-schema/marks/border.d.ts +1 -0
  388. package/dist/types-ts4.5/next-schema/marks/breakout.d.ts +1 -0
  389. package/dist/types-ts4.5/next-schema/marks/code.d.ts +1 -0
  390. package/dist/types-ts4.5/next-schema/marks/color.d.ts +3 -0
  391. package/dist/types-ts4.5/next-schema/marks/confluenceInlineComment.d.ts +1 -0
  392. package/dist/types-ts4.5/next-schema/marks/dataConsumer.d.ts +1 -0
  393. package/dist/types-ts4.5/next-schema/marks/em.d.ts +1 -0
  394. package/dist/types-ts4.5/next-schema/marks/fragment.d.ts +1 -0
  395. package/dist/types-ts4.5/next-schema/marks/link.d.ts +1 -0
  396. package/dist/types-ts4.5/next-schema/marks/strike.d.ts +1 -0
  397. package/dist/types-ts4.5/next-schema/marks/strong.d.ts +1 -0
  398. package/dist/types-ts4.5/next-schema/marks/subsup.d.ts +1 -0
  399. package/dist/types-ts4.5/next-schema/marks/typeAheadQuery.d.ts +1 -0
  400. package/dist/types-ts4.5/next-schema/marks/underline.d.ts +1 -0
  401. package/dist/types-ts4.5/next-schema/marks/unsupportedMark.d.ts +1 -0
  402. package/dist/types-ts4.5/next-schema/marks/unsupportedNodeAttribute.d.ts +1 -0
  403. package/dist/types-ts4.5/next-schema/nodes/blockCard.d.ts +3 -0
  404. package/dist/types-ts4.5/next-schema/nodes/blockquote.d.ts +14 -0
  405. package/dist/types-ts4.5/next-schema/nodes/bodiedExtension.d.ts +8 -0
  406. package/dist/types-ts4.5/next-schema/nodes/bodiedSyncBlock.d.ts +3 -0
  407. package/dist/types-ts4.5/next-schema/nodes/caption.d.ts +3 -0
  408. package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +8 -0
  409. package/dist/types-ts4.5/next-schema/nodes/confluenceJiraIssue.d.ts +3 -0
  410. package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedBlock.d.ts +3 -0
  411. package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedInline.d.ts +3 -0
  412. package/dist/types-ts4.5/next-schema/nodes/date.d.ts +3 -0
  413. package/dist/types-ts4.5/next-schema/nodes/decisionItem.d.ts +3 -0
  414. package/dist/types-ts4.5/next-schema/nodes/decisionList.d.ts +3 -0
  415. package/dist/types-ts4.5/next-schema/nodes/embedCard.d.ts +3 -0
  416. package/dist/types-ts4.5/next-schema/nodes/emoji.d.ts +3 -0
  417. package/dist/types-ts4.5/next-schema/nodes/expand.d.ts +8 -0
  418. package/dist/types-ts4.5/next-schema/nodes/extension.d.ts +7 -0
  419. package/dist/types-ts4.5/next-schema/nodes/extensionFrame.d.ts +3 -0
  420. package/dist/types-ts4.5/next-schema/nodes/hardBreak.d.ts +3 -0
  421. package/dist/types-ts4.5/next-schema/nodes/heading.d.ts +38 -0
  422. package/dist/types-ts4.5/next-schema/nodes/image.d.ts +3 -0
  423. package/dist/types-ts4.5/next-schema/nodes/inlineCard.d.ts +6 -0
  424. package/dist/types-ts4.5/next-schema/nodes/inlineExtension.d.ts +6 -0
  425. package/dist/types-ts4.5/next-schema/nodes/layoutColumn.d.ts +3 -0
  426. package/dist/types-ts4.5/next-schema/nodes/layoutSection.d.ts +25 -0
  427. package/dist/types-ts4.5/next-schema/nodes/list.d.ts +6 -0
  428. package/dist/types-ts4.5/next-schema/nodes/media.d.ts +3 -0
  429. package/dist/types-ts4.5/next-schema/nodes/mediaGroup.d.ts +3 -0
  430. package/dist/types-ts4.5/next-schema/nodes/mediaInline.d.ts +3 -0
  431. package/dist/types-ts4.5/next-schema/nodes/mediaSingle.d.ts +57 -0
  432. package/dist/types-ts4.5/next-schema/nodes/mention.d.ts +3 -0
  433. package/dist/types-ts4.5/next-schema/nodes/multiBodiedExtension.d.ts +3 -0
  434. package/dist/types-ts4.5/next-schema/nodes/nestedExpand.d.ts +11 -0
  435. package/dist/types-ts4.5/next-schema/nodes/panel.d.ts +3 -0
  436. package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +24 -0
  437. package/dist/types-ts4.5/next-schema/nodes/placeholder.d.ts +3 -0
  438. package/dist/types-ts4.5/next-schema/nodes/rule.d.ts +3 -0
  439. package/dist/types-ts4.5/next-schema/nodes/status.d.ts +3 -0
  440. package/dist/types-ts4.5/next-schema/nodes/syncBlock.d.ts +3 -0
  441. package/dist/types-ts4.5/next-schema/nodes/tableCellContent.d.ts +3 -0
  442. package/dist/types-ts4.5/next-schema/nodes/tableNodes.d.ts +4 -0
  443. package/dist/types-ts4.5/next-schema/nodes/task.d.ts +9 -0
  444. package/dist/types-ts4.5/next-schema/nodes/text.d.ts +25 -0
  445. package/dist/types-ts4.5/next-schema/nodes/unsupportedBlock.d.ts +3 -0
  446. package/dist/types-ts4.5/next-schema/nodes/unsupportedInline.d.ts +3 -0
  447. package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +5 -0
  448. package/dist/types-ts4.5/schema/confluence-schema.d.ts +9 -0
  449. package/dist/types-ts4.5/schema/create-schema.d.ts +27 -0
  450. package/dist/types-ts4.5/schema/createPMSpecFactory.d.ts +33 -0
  451. package/dist/types-ts4.5/schema/default-schema.d.ts +7 -0
  452. package/dist/types-ts4.5/schema/groups.d.ts +6 -0
  453. package/dist/types-ts4.5/schema/index.d.ts +12 -0
  454. package/dist/types-ts4.5/schema/inline-nodes.d.ts +1 -0
  455. package/dist/types-ts4.5/schema/jira-schema.d.ts +65 -0
  456. package/dist/types-ts4.5/schema/marks/alignment.d.ts +16 -0
  457. package/dist/types-ts4.5/schema/marks/annotation.d.ts +32 -0
  458. package/dist/types-ts4.5/schema/marks/background-color.d.ts +20 -0
  459. package/dist/types-ts4.5/schema/marks/border.d.ts +23 -0
  460. package/dist/types-ts4.5/schema/marks/breakout.d.ts +12 -0
  461. package/dist/types-ts4.5/schema/marks/code.d.ts +8 -0
  462. package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +12 -0
  463. package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +46 -0
  464. package/dist/types-ts4.5/schema/marks/em.d.ts +8 -0
  465. package/dist/types-ts4.5/schema/marks/fragment.d.ts +29 -0
  466. package/dist/types-ts4.5/schema/marks/indentation.d.ts +16 -0
  467. package/dist/types-ts4.5/schema/marks/index.d.ts +36 -0
  468. package/dist/types-ts4.5/schema/marks/link.d.ts +39 -0
  469. package/dist/types-ts4.5/schema/marks/strike.d.ts +8 -0
  470. package/dist/types-ts4.5/schema/marks/strong.d.ts +8 -0
  471. package/dist/types-ts4.5/schema/marks/subsup.d.ts +15 -0
  472. package/dist/types-ts4.5/schema/marks/text-color.d.ts +26 -0
  473. package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +2 -0
  474. package/dist/types-ts4.5/schema/marks/underline.d.ts +8 -0
  475. package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +2 -0
  476. package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +2 -0
  477. package/dist/types-ts4.5/schema/nodes/block-card.d.ts +44 -0
  478. package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +27 -0
  479. package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +23 -0
  480. package/dist/types-ts4.5/schema/nodes/bodied-sync-block.d.ts +43 -0
  481. package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +3 -0
  482. package/dist/types-ts4.5/schema/nodes/caption.d.ts +24 -0
  483. package/dist/types-ts4.5/schema/nodes/code-block.d.ts +31 -0
  484. package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +1 -0
  485. package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +1 -0
  486. package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +1 -0
  487. package/dist/types-ts4.5/schema/nodes/date.d.ts +20 -0
  488. package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +16 -0
  489. package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +17 -0
  490. package/dist/types-ts4.5/schema/nodes/doc.d.ts +20 -0
  491. package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +19 -0
  492. package/dist/types-ts4.5/schema/nodes/emoji.d.ts +20 -0
  493. package/dist/types-ts4.5/schema/nodes/expand.d.ts +34 -0
  494. package/dist/types-ts4.5/schema/nodes/extension.d.ts +17 -0
  495. package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +10 -0
  496. package/dist/types-ts4.5/schema/nodes/heading.d.ts +39 -0
  497. package/dist/types-ts4.5/schema/nodes/image.d.ts +1 -0
  498. package/dist/types-ts4.5/schema/nodes/index.d.ts +98 -0
  499. package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +15 -0
  500. package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +17 -0
  501. package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +22 -0
  502. package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +49 -0
  503. package/dist/types-ts4.5/schema/nodes/list-item.d.ts +12 -0
  504. package/dist/types-ts4.5/schema/nodes/media-group.d.ts +13 -0
  505. package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +20 -0
  506. package/dist/types-ts4.5/schema/nodes/media-single.d.ts +69 -0
  507. package/dist/types-ts4.5/schema/nodes/media.d.ts +71 -0
  508. package/dist/types-ts4.5/schema/nodes/mention.d.ts +30 -0
  509. package/dist/types-ts4.5/schema/nodes/multi-bodied-extension.d.ts +50 -0
  510. package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +40 -0
  511. package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +5 -0
  512. package/dist/types-ts4.5/schema/nodes/panel.d.ts +50 -0
  513. package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +43 -0
  514. package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +12 -0
  515. package/dist/types-ts4.5/schema/nodes/rule.d.ts +11 -0
  516. package/dist/types-ts4.5/schema/nodes/status.d.ts +24 -0
  517. package/dist/types-ts4.5/schema/nodes/sync-block.d.ts +22 -0
  518. package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +159 -0
  519. package/dist/types-ts4.5/schema/nodes/task-item.d.ts +33 -0
  520. package/dist/types-ts4.5/schema/nodes/task-list.d.ts +20 -0
  521. package/dist/types-ts4.5/schema/nodes/text.d.ts +12 -0
  522. package/dist/types-ts4.5/schema/nodes/types/block-content.d.ts +21 -0
  523. package/dist/types-ts4.5/schema/nodes/types/extensions.d.ts +34 -0
  524. package/dist/types-ts4.5/schema/nodes/types/inline-content.d.ts +28 -0
  525. package/dist/types-ts4.5/schema/nodes/types/list.d.ts +51 -0
  526. package/dist/types-ts4.5/schema/nodes/types/mark.d.ts +15 -0
  527. package/dist/types-ts4.5/schema/nodes/types/non-nestable-block-content.d.ts +19 -0
  528. package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +37 -0
  529. package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +3 -0
  530. package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +1 -0
  531. package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +1 -0
  532. package/dist/types-ts4.5/schema/sanitizeNodes.d.ts +8 -0
  533. package/dist/types-ts4.5/schema/unsupported.d.ts +1 -0
  534. package/dist/types-ts4.5/steps/analytics.d.ts +60 -0
  535. package/dist/types-ts4.5/steps/batch-attrs-step.d.ts +74 -0
  536. package/dist/types-ts4.5/steps/link-meta-step.d.ts +50 -0
  537. package/dist/types-ts4.5/steps/override-document-step.d.ts +26 -0
  538. package/dist/types-ts4.5/steps/set-attrs.d.ts +24 -0
  539. package/dist/types-ts4.5/steps/type-ahead.d.ts +35 -0
  540. package/dist/types-ts4.5/steps/types.d.ts +96 -0
  541. package/dist/types-ts4.5/steps.d.ts +10 -0
  542. package/dist/types-ts4.5/utils/colors.d.ts +81 -0
  543. package/dist/types-ts4.5/utils/confluence/emoji.d.ts +50 -0
  544. package/dist/types-ts4.5/utils/editor-palette.d.ts +257 -0
  545. package/dist/types-ts4.5/utils/extensions.d.ts +3 -0
  546. package/dist/types-ts4.5/utils/index.d.ts +7 -0
  547. package/dist/types-ts4.5/utils/lch-color-inversion.d.ts +2 -0
  548. package/dist/types-ts4.5/utils/parseDOM.d.ts +1 -0
  549. package/dist/types-ts4.5/utils/url.d.ts +40 -0
  550. package/dist/types-ts4.5/utils/uuid.d.ts +5 -0
  551. package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +1981 -0
  552. package/eslint-plugin-warn-schema.js +2 -1
  553. package/eslint.config.js +12 -14
  554. package/json-schema/package.json +8 -1
  555. package/json-schema/v1/full.json +3 -0
  556. package/json-schema/v1/stage-0.json +6 -0
  557. package/package.json +90 -82
  558. package/schema/package.json +8 -1
  559. package/schema-bitbucket/package.json +8 -1
  560. package/schema-confluence/package.json +8 -1
  561. package/schema-default/package.json +8 -1
  562. package/schema-generators/__tests__/helpers/_utils.ts +73 -77
  563. package/schema-generators/__tests__/helpers/utils.unit.ts +53 -59
  564. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +79 -84
  565. package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +43 -40
  566. package/schema-generators/__tests__/unit/validator-schema.ts +3 -3
  567. package/schema-generators/helpers/writeToFile.ts +12 -11
  568. package/schema-generators/json-full-schema.ts +4 -4
  569. package/schema-generators/pm-full-schema.ts +7 -5
  570. package/schema-generators/validator-full-schema.ts +7 -9
  571. package/schema-jira/package.json +8 -1
  572. package/schema-next/package.json +9 -3
  573. package/schema-validator/package.json +9 -3
  574. package/steps/package.json +8 -1
  575. package/url/package.json +8 -1
  576. package/warn-schema-change.js +121 -136
  577. package/warn-schema-change.test.js +31 -30
  578. package/copy-dist-to-afe.js +0 -32
  579. package/dist/json-schema/package.json +0 -8
  580. package/dist/json-schema/v1/full.json +0 -2916
  581. package/dist/json-schema/v1/stage-0.json +0 -3211
  582. package/dist/types/json-schema/index.d.ts +0 -2
  583. package/sanitize-nodes/package.json +0 -8
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # ADF Schema
2
+
3
+ ## Publishing
4
+
5
+ Version bumps and publishing are managed through the changesets workflow.
@@ -1,8 +1,6 @@
1
1
  import { createTransformer } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForBitbucketSchema } from './migrates/update-bitbucket-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(
5
- updateImportEntryPointsForBitbucketSchema,
6
- );
4
+ const transformer = createTransformer(updateImportEntryPointsForBitbucketSchema);
7
5
 
8
6
  export default transformer;
@@ -1,8 +1,6 @@
1
1
  import { createTransformer } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForConfluenceSchema } from './migrates/update-confluence-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(
5
- updateImportEntryPointsForConfluenceSchema,
6
- );
4
+ const transformer = createTransformer(updateImportEntryPointsForConfluenceSchema);
7
5
 
8
6
  export default transformer;
@@ -1,9 +1,9 @@
1
1
  import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
2
2
 
3
3
  export const updateImportEntryPointsForBitbucketSchema = [
4
- changeImportEntryPoint(
5
- '@atlaskit/adf-schema',
6
- 'bitbucketSchema',
7
- '@atlaskit/adf-schema/schema-bitbucket',
8
- ),
4
+ changeImportEntryPoint(
5
+ '@atlaskit/adf-schema',
6
+ 'bitbucketSchema',
7
+ '@atlaskit/adf-schema/schema-bitbucket',
8
+ ),
9
9
  ];
@@ -1,14 +1,14 @@
1
1
  import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
2
2
 
3
3
  export const updateImportEntryPointsForConfluenceSchema = [
4
- changeImportEntryPoint(
5
- '@atlaskit/adf-schema',
6
- 'confluenceSchema',
7
- '@atlaskit/adf-schema/schema-confluence',
8
- ),
9
- changeImportEntryPoint(
10
- '@atlaskit/adf-schema',
11
- 'confluenceSchemaWithMediaSingle',
12
- '@atlaskit/adf-schema/schema-confluence',
13
- ),
4
+ changeImportEntryPoint(
5
+ '@atlaskit/adf-schema',
6
+ 'confluenceSchema',
7
+ '@atlaskit/adf-schema/schema-confluence',
8
+ ),
9
+ changeImportEntryPoint(
10
+ '@atlaskit/adf-schema',
11
+ 'confluenceSchemaWithMediaSingle',
12
+ '@atlaskit/adf-schema/schema-confluence',
13
+ ),
14
14
  ];
@@ -1,19 +1,19 @@
1
1
  import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
2
2
 
3
3
  export const updateImportEntryPointsForDefaultSchema = [
4
- changeImportEntryPoint(
5
- '@atlaskit/adf-schema',
6
- 'defaultSchema',
7
- '@atlaskit/adf-schema/schema-default',
8
- ),
9
- changeImportEntryPoint(
10
- '@atlaskit/adf-schema',
11
- 'getSchemaBasedOnStage',
12
- '@atlaskit/adf-schema/schema-default',
13
- ),
14
- changeImportEntryPoint(
15
- '@atlaskit/adf-schema',
16
- 'defaultSchemaConfig',
17
- '@atlaskit/adf-schema/schema-default',
18
- ),
4
+ changeImportEntryPoint(
5
+ '@atlaskit/adf-schema',
6
+ 'defaultSchema',
7
+ '@atlaskit/adf-schema/schema-default',
8
+ ),
9
+ changeImportEntryPoint(
10
+ '@atlaskit/adf-schema',
11
+ 'getSchemaBasedOnStage',
12
+ '@atlaskit/adf-schema/schema-default',
13
+ ),
14
+ changeImportEntryPoint(
15
+ '@atlaskit/adf-schema',
16
+ 'defaultSchemaConfig',
17
+ '@atlaskit/adf-schema/schema-default',
18
+ ),
19
19
  ];
@@ -1,64 +1,64 @@
1
1
  import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
2
2
 
3
3
  export const updateImportEntryPointsForJiraSchema = [
4
- changeImportEntryPoint(
5
- '@atlaskit/adf-schema',
6
- 'createJIRASchema',
7
- '@atlaskit/adf-schema/schema-jira',
8
- ),
9
- changeImportEntryPoint(
10
- '@atlaskit/adf-schema',
11
- 'isSchemaWithLists',
12
- '@atlaskit/adf-schema/schema-jira',
13
- ),
14
- changeImportEntryPoint(
15
- '@atlaskit/adf-schema',
16
- 'isSchemaWithMentions',
17
- '@atlaskit/adf-schema/schema-jira',
18
- ),
19
- changeImportEntryPoint(
20
- '@atlaskit/adf-schema',
21
- 'isSchemaWithEmojis',
22
- '@atlaskit/adf-schema/schema-jira',
23
- ),
24
- changeImportEntryPoint(
25
- '@atlaskit/adf-schema',
26
- 'isSchemaWithLinks',
27
- '@atlaskit/adf-schema/schema-jira',
28
- ),
29
- changeImportEntryPoint(
30
- '@atlaskit/adf-schema',
31
- 'isSchemaWithAdvancedTextFormattingMarks',
32
- '@atlaskit/adf-schema/schema-jira',
33
- ),
34
- changeImportEntryPoint(
35
- '@atlaskit/adf-schema',
36
- 'isSchemaWithCodeBlock',
37
- '@atlaskit/adf-schema/schema-jira',
38
- ),
39
- changeImportEntryPoint(
40
- '@atlaskit/adf-schema',
41
- 'isSchemaWithBlockQuotes',
42
- '@atlaskit/adf-schema/schema-jira',
43
- ),
44
- changeImportEntryPoint(
45
- '@atlaskit/adf-schema',
46
- 'isSchemaWithMedia',
47
- '@atlaskit/adf-schema/schema-jira',
48
- ),
49
- changeImportEntryPoint(
50
- '@atlaskit/adf-schema',
51
- 'isSchemaWithSubSupMark',
52
- '@atlaskit/adf-schema/schema-jira',
53
- ),
54
- changeImportEntryPoint(
55
- '@atlaskit/adf-schema',
56
- 'isSchemaWithTextColor',
57
- '@atlaskit/adf-schema/schema-jira',
58
- ),
59
- changeImportEntryPoint(
60
- '@atlaskit/adf-schema',
61
- 'isSchemaWithTables',
62
- '@atlaskit/adf-schema/schema-jira',
63
- ),
4
+ changeImportEntryPoint(
5
+ '@atlaskit/adf-schema',
6
+ 'createJIRASchema',
7
+ '@atlaskit/adf-schema/schema-jira',
8
+ ),
9
+ changeImportEntryPoint(
10
+ '@atlaskit/adf-schema',
11
+ 'isSchemaWithLists',
12
+ '@atlaskit/adf-schema/schema-jira',
13
+ ),
14
+ changeImportEntryPoint(
15
+ '@atlaskit/adf-schema',
16
+ 'isSchemaWithMentions',
17
+ '@atlaskit/adf-schema/schema-jira',
18
+ ),
19
+ changeImportEntryPoint(
20
+ '@atlaskit/adf-schema',
21
+ 'isSchemaWithEmojis',
22
+ '@atlaskit/adf-schema/schema-jira',
23
+ ),
24
+ changeImportEntryPoint(
25
+ '@atlaskit/adf-schema',
26
+ 'isSchemaWithLinks',
27
+ '@atlaskit/adf-schema/schema-jira',
28
+ ),
29
+ changeImportEntryPoint(
30
+ '@atlaskit/adf-schema',
31
+ 'isSchemaWithAdvancedTextFormattingMarks',
32
+ '@atlaskit/adf-schema/schema-jira',
33
+ ),
34
+ changeImportEntryPoint(
35
+ '@atlaskit/adf-schema',
36
+ 'isSchemaWithCodeBlock',
37
+ '@atlaskit/adf-schema/schema-jira',
38
+ ),
39
+ changeImportEntryPoint(
40
+ '@atlaskit/adf-schema',
41
+ 'isSchemaWithBlockQuotes',
42
+ '@atlaskit/adf-schema/schema-jira',
43
+ ),
44
+ changeImportEntryPoint(
45
+ '@atlaskit/adf-schema',
46
+ 'isSchemaWithMedia',
47
+ '@atlaskit/adf-schema/schema-jira',
48
+ ),
49
+ changeImportEntryPoint(
50
+ '@atlaskit/adf-schema',
51
+ 'isSchemaWithSubSupMark',
52
+ '@atlaskit/adf-schema/schema-jira',
53
+ ),
54
+ changeImportEntryPoint(
55
+ '@atlaskit/adf-schema',
56
+ 'isSchemaWithTextColor',
57
+ '@atlaskit/adf-schema/schema-jira',
58
+ ),
59
+ changeImportEntryPoint(
60
+ '@atlaskit/adf-schema',
61
+ 'isSchemaWithTables',
62
+ '@atlaskit/adf-schema/schema-jira',
63
+ ),
64
64
  ];
@@ -22,7 +22,7 @@ var _tableNodes = require("../nodes/tableNodes");
22
22
  var _task = require("../nodes/task");
23
23
  var _unsupportedBlock = require("../nodes/unsupportedBlock");
24
24
  // Not an actual group, but a collection of nodes that can't be nested inside each other
25
- // TODO: make it an actual group
25
+ // TODO: ED-29537 - make it an actual group
26
26
  var nonNestableBlockContent = exports.nonNestableBlockContent = [_paragraph.paragraph.use('with_no_marks'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _decisionList.decisionList, _task.taskList, _tableNodes.table,
27
27
  // @ts-expect-error - types don't deal well with circular references for the variant
28
28
  _tableNodes.table.use('with_nested_table'), _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _unsupportedBlock.unsupportedBlock];
@@ -34,7 +34,7 @@ link.define({
34
34
  type: 'string',
35
35
  optional: true
36
36
  },
37
- // TODO: expand object
37
+ // TODO: ED-29537 - expand object
38
38
  // packages/adf-schema/src/schema/marks/link.ts
39
39
  __confluenceMetadata: {
40
40
  type: 'object',
@@ -40,7 +40,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _adfSchemaGenerator.adfNode)
40
40
  default: ''
41
41
  }
42
42
  },
43
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _rule.rule, _tableNodes.table,
43
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _rule.rule, _tableNodes.table,
44
44
  // @ts-expect-error - types don't deal well with circular references for the variant
45
45
  _tableNodes.table.use('with_nested_table'), _task.taskList, _unsupportedBlock.unsupportedBlock))]
46
46
  });
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.bitbucketSchema = void 0;
7
7
  var _createSchema = require("./create-schema");
8
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
8
9
  /**
9
10
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
10
11
  **/
@@ -8,6 +8,7 @@ var _createSchema = require("./create-schema");
8
8
  var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
9
9
  var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
10
10
 
11
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
11
12
  /**
12
13
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
13
14
  **/
@@ -15,6 +16,7 @@ var confluenceSchema = exports.confluenceSchema = (0, _createSchema.createSchema
15
16
  nodes: nodes,
16
17
  marks: marks
17
18
  });
19
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
18
20
  /**
19
21
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
20
22
  **/
@@ -282,14 +282,12 @@ function getNodesAndMarksMap() {
282
282
  var nodes = nodesInOrder.reduce(function (acc, _ref2) {
283
283
  var name = _ref2.name,
284
284
  spec = _ref2.spec;
285
- // @ts-expect-error - Type for SchemaBuiltInItem is not correct
286
285
  acc[name] = spec;
287
286
  return acc;
288
287
  }, {});
289
288
  var marks = marksInOrder.reduce(function (acc, _ref3) {
290
289
  var name = _ref3.name,
291
290
  spec = _ref3.spec;
292
- // @ts-expect-error - Type for SchemaBuiltInItem is not correct
293
291
  acc[name] = spec;
294
292
  return acc;
295
293
  }, {});
@@ -22,6 +22,7 @@ var createPMNodeSpecFactory = exports.createPMNodeSpecFactory = function createP
22
22
  var parseDOM = _ref.parseDOM,
23
23
  toDOM = _ref.toDOM,
24
24
  toDebugString = _ref.toDebugString;
25
+ // @ts-ignore
25
26
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, nodeSpec), parseDOM && {
26
27
  parseDOM: parseDOM
27
28
  }), toDOM && {
@@ -46,6 +47,7 @@ var createPMMarkSpecFactory = exports.createPMMarkSpecFactory = function createP
46
47
  var parseDOM = _ref2.parseDOM,
47
48
  toDOM = _ref2.toDOM,
48
49
  toDebugString = _ref2.toDebugString;
50
+ // @ts-ignore
49
51
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, markSpec), parseDOM && {
50
52
  parseDOM: parseDOM
51
53
  }), toDOM && {
@@ -7,6 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.inlineNodes = void 0;
8
8
  var nodes = _interopRequireWildcard(require("./nodes"));
9
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
10
+ // eslint-disable-next-line import/no-namespace
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
13
  var typedNodes = nodes;
11
14
  var inlineNodes = exports.inlineNodes = new Set(Object.keys(typedNodes).filter(function (key) {
12
15
  return typedNodes[key] && typedNodes[key].group === 'inline';
@@ -16,6 +16,8 @@ exports.isSchemaWithSubSupMark = isSchemaWithSubSupMark;
16
16
  exports.isSchemaWithTables = isSchemaWithTables;
17
17
  exports.isSchemaWithTextColor = isSchemaWithTextColor;
18
18
  var _createSchema = require("./create-schema");
19
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
20
+
19
21
  /**
20
22
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
21
23
  **/
@@ -43,6 +43,7 @@ var annotation = exports.annotation = (0, _markTypes.annotation)({
43
43
  tag: 'span[data-mark-type="annotation"]',
44
44
  mark: 'annotation',
45
45
  getAttrs: function getAttrs(domNode) {
46
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
46
47
  var dom = domNode;
47
48
  var attrs = {
48
49
  id: dom.getAttribute('data-id'),
@@ -53,11 +54,11 @@ var annotation = exports.annotation = (0, _markTypes.annotation)({
53
54
  }],
54
55
  toDOM: function toDOM(node) {
55
56
  /*
56
- Data attributes on the DOM node are a temporary means of
57
- incrementally switching over to the Annotation mark. Once renderer
58
- provides native support for inline comments the data attributes on the
59
- DOM nodes will be removed.
60
- */
57
+ Data attributes on the DOM node are a temporary means of
58
+ incrementally switching over to the Annotation mark. Once renderer
59
+ provides native support for inline comments the data attributes on the
60
+ DOM nodes will be removed.
61
+ */
61
62
  return ['span', _objectSpread({
62
63
  // Prettier will remove the quotes around class. This would cause some browsers
63
64
  // to not add this attribute properly, as its a reserved word.
@@ -47,6 +47,7 @@ var colorArrayPaletteNext = [[_colors.Neutral300, 'Gray'],
47
47
 
48
48
  // @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
49
49
  // Remove this when cleaning up platform_editor_add_orange_highlight_color
50
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
50
51
  /**
51
52
  * @deprecated use backgroundColorPaletteNext instead, which in addition supports yellow highlight
52
53
  */
@@ -70,6 +71,7 @@ var backgroundColor = exports.backgroundColor = (0, _markTypes.backgroundColor)(
70
71
  getAttrs: function getAttrs(maybeValue) {
71
72
  var value = maybeValue;
72
73
  var hexColor;
74
+ // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
73
75
  if (value.match(/^rgb/i)) {
74
76
  hexColor = (0, _colors.rgbToHex)(value);
75
77
  } else if (value[0] === '#') {
@@ -27,6 +27,7 @@ var border = exports.border = (0, _markTypes.border)({
27
27
  tag: '[data-mark-type="border"]',
28
28
  getAttrs: function getAttrs(domNode) {
29
29
  var _dom$getAttribute, _dom$getAttribute2;
30
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
30
31
  var dom = domNode;
31
32
  var color = ((_dom$getAttribute = dom.getAttribute('data-color')) !== null && _dom$getAttribute !== void 0 ? _dom$getAttribute : '').toLowerCase();
32
33
  var size = +((_dom$getAttribute2 = dom.getAttribute('data-size')) !== null && _dom$getAttribute2 !== void 0 ? _dom$getAttribute2 : '0');
@@ -15,7 +15,9 @@ var breakout = exports.breakout = (0, _markTypes.breakout)({
15
15
  parseDOM: [{
16
16
  tag: 'div.fabric-editor-breakout-mark',
17
17
  getAttrs: function getAttrs(dom) {
18
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
18
19
  var mode = dom.getAttribute('data-mode');
20
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
19
21
  var width = dom.getAttribute('data-width');
20
22
  return {
21
23
  mode: allowedTypes.indexOf(mode || '') === -1 ? 'wide' : mode,
@@ -13,6 +13,7 @@ var indentation = exports.indentation = (0, _markTypes.indentation)({
13
13
  parseDOM: [{
14
14
  tag: 'div.fabric-editor-indentation-mark',
15
15
  getAttrs: function getAttrs(dom) {
16
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
16
17
  var level = +(dom.getAttribute('data-level') || '0');
17
18
  return {
18
19
  level: level > 6 ? 6 : level < 1 ? false : level
@@ -38,7 +38,9 @@ var link = exports.link = (0, _markTypes.link)({
38
38
  getAttrs: getLinkAttrs('data-block-link'),
39
39
  contentElement: function contentElement(node) {
40
40
  var clone = node.cloneNode(true);
41
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
41
42
  clone.removeAttribute('data-block-link');
43
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
42
44
  clone.setAttribute('data-skip-paste', 'true');
43
45
  var wrapper = document.createElement('div');
44
46
  wrapper.appendChild(clone);
@@ -49,6 +51,7 @@ var link = exports.link = (0, _markTypes.link)({
49
51
  getAttrs: getLinkAttrs('href')
50
52
  }],
51
53
  toDOM: function toDOM(node, isInline) {
54
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
55
  var attrs = Object.keys(node.attrs).reduce(function (attrs, key) {
53
56
  if (key === '__confluenceMetadata') {
54
57
  if (node.attrs[key] !== null) {
@@ -57,6 +60,7 @@ var link = exports.link = (0, _markTypes.link)({
57
60
  } else if (key === 'href') {
58
61
  attrs[key] = (0, _url.isSafeUrl)(node.attrs[key]) ? node.attrs[key] : undefined;
59
62
  } else {
63
+ // @ts-ignore
60
64
  attrs[key] = node.attrs[key];
61
65
  }
62
66
  return attrs;
@@ -20,15 +20,19 @@ var strong = exports.strong = (0, _markTypes.strong)({
20
20
  {
21
21
  tag: 'b',
22
22
  getAttrs: function getAttrs(node) {
23
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
23
24
  var element = node;
24
25
  return element.style.fontWeight !== 'normal' && null;
25
26
  }
26
27
  }, {
27
28
  tag: 'span',
28
29
  getAttrs: function getAttrs(node) {
30
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
29
31
  var element = node;
30
32
  var fontWeight = element.style.fontWeight;
31
- return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' || /^(bold(er)?|[5-9]\d{2,})$/.test(fontWeight)) && null;
33
+ return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' ||
34
+ // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
35
+ /^(bold(er)?|[5-9][0-9]{2,})$/.test(fontWeight)) && null;
32
36
  }
33
37
  }],
34
38
  toDOM: function toDOM() {
@@ -62,6 +62,7 @@ var colorArrayPalette = [
62
62
 
63
63
  // @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
64
64
  var colorPalette = exports.colorPalette = new Map();
65
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
65
66
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
66
67
  var colorPaletteExtended = exports.colorPaletteExtended = colorPalette;
67
68
  colorArrayPalette.forEach(function (_ref) {
@@ -100,6 +101,7 @@ var textColor = exports.textColor = (0, _markTypes.textColor)({
100
101
  getAttrs: function getAttrs(maybeValue) {
101
102
  var value = maybeValue;
102
103
  var hexColor;
104
+ // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
103
105
  if (value.match(/^rgb/i)) {
104
106
  hexColor = (0, _colors.rgbToHex)(value);
105
107
  } else if (value[0] === '#') {
@@ -20,7 +20,10 @@ var getCommonAttributesFromDom = function getCommonAttributesFromDom(dom) {
20
20
  var datasource = anchor.getAttribute('data-datasource');
21
21
  return {
22
22
  data: data ? JSON.parse(data) : undefined,
23
- layout: datasource ? dom.getAttribute('data-layout') || undefined : undefined,
23
+ layout: datasource ?
24
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
25
+ dom.getAttribute('data-layout') || undefined : undefined,
26
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
24
27
  width: Number(dom.getAttribute('data-width')) || undefined,
25
28
  datasource: datasource ? JSON.parse(datasource) : undefined
26
29
  };
@@ -21,6 +21,7 @@ var bodiedExtension = exports.bodiedExtension = (0, _nodeTypes.bodiedExtension)(
21
21
  skip: true
22
22
  }, {
23
23
  tag: '[data-node-type="bodied-extension"]',
24
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
24
25
  getAttrs: function getAttrs(domNode) {
25
26
  return (0, _extensions.getExtensionAttrs)(domNode);
26
27
  }
@@ -16,6 +16,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _nodeTypes.bodiedSyncBlock)(
16
16
  parseDOM: [{
17
17
  tag: 'div[data-bodied-sync-block]',
18
18
  getAttrs: function getAttrs(domNode) {
19
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
19
20
  var dom = domNode;
20
21
  var attrs = {
21
22
  localId: dom.getAttribute('data-local-id') || _utils.uuid.generate(),
@@ -33,9 +33,11 @@ var captionWithLocalId = exports.captionWithLocalId = (0, _nodeTypes.caption)({
33
33
  toDOM: function toDOM(node) {
34
34
  var _node$attrs;
35
35
  var attrs = {
36
- 'data-caption': 'true',
37
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
36
+ 'data-caption': 'true'
38
37
  };
38
+ if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
39
+ attrs['data-local-id'] = node.attrs.localId;
40
+ }
39
41
  return ['figcaption', attrs, 0];
40
42
  }
41
43
  });