@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.
- package/CHANGELOG.md +763 -424
- package/README.md +5 -0
- package/codemods/23.0.0-move-bitbucket-schema-to-own-entry-points.ts +1 -3
- package/codemods/23.0.0-move-confluence-schema-to-own-entry-points.ts +1 -3
- package/codemods/migrates/update-bitbucket-schema-entry-points.ts +5 -5
- package/codemods/migrates/update-confluence-schema-entry-points.ts +10 -10
- package/codemods/migrates/update-default-schema-entry-points.ts +15 -15
- package/codemods/migrates/update-jira-schema-entry-points.ts +60 -60
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/marks/link.js +1 -1
- package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/schema/bitbucket-schema.js +1 -0
- package/dist/cjs/schema/confluence-schema.js +2 -0
- package/dist/cjs/schema/create-schema.js +0 -2
- package/dist/cjs/schema/createPMSpecFactory.js +2 -0
- package/dist/cjs/schema/inline-nodes.js +3 -0
- package/dist/cjs/schema/jira-schema.js +2 -0
- package/dist/cjs/schema/marks/annotation.js +6 -5
- package/dist/cjs/schema/marks/background-color.js +2 -0
- package/dist/cjs/schema/marks/border.js +1 -0
- package/dist/cjs/schema/marks/breakout.js +2 -0
- package/dist/cjs/schema/marks/indentation.js +1 -0
- package/dist/cjs/schema/marks/link.js +4 -0
- package/dist/cjs/schema/marks/strong.js +5 -1
- package/dist/cjs/schema/marks/text-color.js +2 -0
- package/dist/cjs/schema/nodes/block-card.js +4 -1
- package/dist/cjs/schema/nodes/bodied-extension.js +1 -0
- package/dist/cjs/schema/nodes/bodied-sync-block.js +1 -0
- package/dist/cjs/schema/nodes/caption.js +4 -2
- package/dist/cjs/schema/nodes/code-block.js +33 -8
- package/dist/cjs/schema/nodes/confluence-jira-issue.js +1 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-block.js +1 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +1 -0
- package/dist/cjs/schema/nodes/date.js +2 -0
- package/dist/cjs/schema/nodes/decision-item.js +1 -0
- package/dist/cjs/schema/nodes/embed-card.js +18 -4
- package/dist/cjs/schema/nodes/emoji.js +20 -0
- package/dist/cjs/schema/nodes/expand.js +1 -0
- package/dist/cjs/schema/nodes/extension.js +1 -0
- package/dist/cjs/schema/nodes/heading.js +3 -2
- package/dist/cjs/schema/nodes/image.js +1 -0
- package/dist/cjs/schema/nodes/inline-extension.js +1 -0
- package/dist/cjs/schema/nodes/layout-column.js +6 -2
- package/dist/cjs/schema/nodes/media-group.js +1 -1
- package/dist/cjs/schema/nodes/media-single.js +1 -0
- package/dist/cjs/schema/nodes/media.js +25 -16
- package/dist/cjs/schema/nodes/mention.js +5 -0
- package/dist/cjs/schema/nodes/nested-expand.js +2 -1
- package/dist/cjs/schema/nodes/ordered-list.js +3 -0
- package/dist/cjs/schema/nodes/panel.js +6 -0
- package/dist/cjs/schema/nodes/paragraph.js +1 -0
- package/dist/cjs/schema/nodes/placeholder.js +6 -2
- package/dist/cjs/schema/nodes/status.js +3 -0
- package/dist/cjs/schema/nodes/sync-block.js +1 -0
- package/dist/cjs/schema/nodes/tableNodes.js +32 -15
- package/dist/cjs/schema/nodes/task-item.js +2 -0
- package/dist/cjs/schema/nodes/unsupported-block.js +1 -0
- package/dist/cjs/schema/nodes/unsupported-inline.js +1 -0
- package/dist/cjs/schema/sanitizeNodes.js +11 -6
- package/dist/cjs/steps/analytics.js +1 -1
- package/dist/cjs/steps/batch-attrs-step.js +1 -1
- package/dist/cjs/utils/colors.js +21 -8
- package/dist/cjs/utils/editor-palette.js +7 -0
- package/dist/cjs/utils/lch-color-inversion.js +11 -5
- package/dist/cjs/utils/url.js +9 -6
- package/dist/cjs/utils/uuid.js +7 -7
- package/dist/cjs/validator-schema/generated/validatorSpec.js +1 -1
- package/dist/es2019/index.js +4 -1
- package/dist/es2019/json-schema/index.js +1 -0
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/index.js +1 -0
- package/dist/es2019/next-schema/marks/alignmentAndIndentation.js +1 -2
- package/dist/es2019/next-schema/marks/color.js +1 -2
- package/dist/es2019/next-schema/marks/link.js +1 -1
- package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/schema/bitbucket-schema.js +1 -0
- package/dist/es2019/schema/confluence-schema.js +2 -0
- package/dist/es2019/schema/create-schema.js +0 -2
- package/dist/es2019/schema/createPMSpecFactory.js +2 -0
- package/dist/es2019/schema/index.js +4 -1
- package/dist/es2019/schema/inline-nodes.js +3 -0
- package/dist/es2019/schema/jira-schema.js +1 -0
- package/dist/es2019/schema/marks/annotation.js +7 -5
- package/dist/es2019/schema/marks/background-color.js +3 -1
- package/dist/es2019/schema/marks/border.js +1 -0
- package/dist/es2019/schema/marks/breakout.js +2 -0
- package/dist/es2019/schema/marks/indentation.js +1 -0
- package/dist/es2019/schema/marks/index.js +1 -0
- package/dist/es2019/schema/marks/link.js +4 -0
- package/dist/es2019/schema/marks/strong.js +5 -1
- package/dist/es2019/schema/marks/text-color.js +3 -1
- package/dist/es2019/schema/nodes/block-card.js +4 -1
- package/dist/es2019/schema/nodes/blockquote.js +1 -2
- package/dist/es2019/schema/nodes/bodied-extension.js +1 -0
- package/dist/es2019/schema/nodes/bodied-sync-block.js +1 -0
- package/dist/es2019/schema/nodes/caption.js +4 -2
- package/dist/es2019/schema/nodes/code-block.js +34 -9
- package/dist/es2019/schema/nodes/confluence-jira-issue.js +1 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-block.js +1 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +1 -0
- package/dist/es2019/schema/nodes/date.js +2 -0
- package/dist/es2019/schema/nodes/decision-item.js +1 -0
- package/dist/es2019/schema/nodes/embed-card.js +18 -4
- package/dist/es2019/schema/nodes/emoji.js +20 -0
- package/dist/es2019/schema/nodes/expand.js +1 -0
- package/dist/es2019/schema/nodes/extension.js +1 -0
- package/dist/es2019/schema/nodes/heading.js +6 -7
- package/dist/es2019/schema/nodes/image.js +1 -0
- package/dist/es2019/schema/nodes/index.js +1 -0
- package/dist/es2019/schema/nodes/inline-extension.js +1 -0
- package/dist/es2019/schema/nodes/layout-column.js +6 -2
- package/dist/es2019/schema/nodes/layout-section.js +1 -2
- package/dist/es2019/schema/nodes/media-group.js +1 -1
- package/dist/es2019/schema/nodes/media-single.js +1 -0
- package/dist/es2019/schema/nodes/media.js +22 -15
- package/dist/es2019/schema/nodes/mention.js +5 -0
- package/dist/es2019/schema/nodes/multi-bodied-extension.js +1 -2
- package/dist/es2019/schema/nodes/nested-expand.js +2 -1
- package/dist/es2019/schema/nodes/ordered-list.js +3 -0
- package/dist/es2019/schema/nodes/panel.js +6 -0
- package/dist/es2019/schema/nodes/paragraph.js +1 -0
- package/dist/es2019/schema/nodes/placeholder.js +6 -2
- package/dist/es2019/schema/nodes/status.js +4 -1
- package/dist/es2019/schema/nodes/sync-block.js +1 -0
- package/dist/es2019/schema/nodes/tableNodes.js +22 -8
- package/dist/es2019/schema/nodes/task-item.js +2 -0
- package/dist/es2019/schema/nodes/unsupported-block.js +1 -0
- package/dist/es2019/schema/nodes/unsupported-inline.js +1 -0
- package/dist/es2019/schema/sanitizeNodes.js +11 -6
- package/dist/es2019/steps/analytics.js +1 -1
- package/dist/es2019/steps/batch-attrs-step.js +1 -1
- package/dist/es2019/steps/set-attrs.js +5 -5
- package/dist/es2019/steps.js +1 -0
- package/dist/es2019/utils/colors.js +23 -9
- package/dist/es2019/utils/editor-palette.js +6 -0
- package/dist/es2019/utils/index.js +1 -0
- package/dist/es2019/utils/lch-color-inversion.js +8 -3
- package/dist/es2019/utils/url.js +9 -6
- package/dist/es2019/utils/uuid.js +3 -4
- package/dist/es2019/validator-schema/generated/validatorSpec.js +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/json-schema/index.js +1 -0
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/index.js +1 -0
- package/dist/esm/next-schema/marks/alignmentAndIndentation.js +1 -2
- package/dist/esm/next-schema/marks/color.js +1 -2
- package/dist/esm/next-schema/marks/link.js +1 -1
- package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/schema/bitbucket-schema.js +1 -0
- package/dist/esm/schema/confluence-schema.js +2 -0
- package/dist/esm/schema/create-schema.js +0 -2
- package/dist/esm/schema/createPMSpecFactory.js +2 -0
- package/dist/esm/schema/index.js +4 -1
- package/dist/esm/schema/inline-nodes.js +3 -0
- package/dist/esm/schema/jira-schema.js +1 -0
- package/dist/esm/schema/marks/annotation.js +6 -5
- package/dist/esm/schema/marks/background-color.js +2 -0
- package/dist/esm/schema/marks/border.js +1 -0
- package/dist/esm/schema/marks/breakout.js +2 -0
- package/dist/esm/schema/marks/indentation.js +1 -0
- package/dist/esm/schema/marks/index.js +1 -0
- package/dist/esm/schema/marks/link.js +4 -0
- package/dist/esm/schema/marks/strong.js +5 -1
- package/dist/esm/schema/marks/text-color.js +2 -0
- package/dist/esm/schema/nodes/block-card.js +4 -1
- package/dist/esm/schema/nodes/blockquote.js +1 -2
- package/dist/esm/schema/nodes/bodied-extension.js +1 -0
- package/dist/esm/schema/nodes/bodied-sync-block.js +1 -0
- package/dist/esm/schema/nodes/caption.js +4 -2
- package/dist/esm/schema/nodes/code-block.js +33 -8
- package/dist/esm/schema/nodes/confluence-jira-issue.js +1 -0
- package/dist/esm/schema/nodes/confluence-unsupported-block.js +1 -0
- package/dist/esm/schema/nodes/confluence-unsupported-inline.js +1 -0
- package/dist/esm/schema/nodes/date.js +2 -0
- package/dist/esm/schema/nodes/decision-item.js +1 -0
- package/dist/esm/schema/nodes/embed-card.js +18 -4
- package/dist/esm/schema/nodes/emoji.js +20 -0
- package/dist/esm/schema/nodes/expand.js +1 -0
- package/dist/esm/schema/nodes/extension.js +1 -0
- package/dist/esm/schema/nodes/heading.js +3 -2
- package/dist/esm/schema/nodes/image.js +1 -0
- package/dist/esm/schema/nodes/index.js +1 -0
- package/dist/esm/schema/nodes/inline-extension.js +1 -0
- package/dist/esm/schema/nodes/layout-column.js +6 -2
- package/dist/esm/schema/nodes/layout-section.js +1 -2
- package/dist/esm/schema/nodes/media-group.js +1 -1
- package/dist/esm/schema/nodes/media-single.js +1 -0
- package/dist/esm/schema/nodes/media.js +26 -18
- package/dist/esm/schema/nodes/mention.js +5 -0
- package/dist/esm/schema/nodes/multi-bodied-extension.js +1 -2
- package/dist/esm/schema/nodes/nested-expand.js +2 -1
- package/dist/esm/schema/nodes/ordered-list.js +3 -0
- package/dist/esm/schema/nodes/panel.js +6 -0
- package/dist/esm/schema/nodes/paragraph.js +1 -0
- package/dist/esm/schema/nodes/placeholder.js +6 -2
- package/dist/esm/schema/nodes/status.js +3 -0
- package/dist/esm/schema/nodes/sync-block.js +1 -0
- package/dist/esm/schema/nodes/tableNodes.js +32 -15
- package/dist/esm/schema/nodes/task-item.js +2 -0
- package/dist/esm/schema/nodes/unsupported-block.js +1 -0
- package/dist/esm/schema/nodes/unsupported-inline.js +1 -0
- package/dist/esm/schema/sanitizeNodes.js +11 -6
- package/dist/esm/steps/analytics.js +1 -1
- package/dist/esm/steps/batch-attrs-step.js +1 -1
- package/dist/esm/steps.js +1 -0
- package/dist/esm/utils/colors.js +20 -8
- package/dist/esm/utils/editor-palette.js +6 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/lch-color-inversion.js +11 -5
- package/dist/esm/utils/url.js +9 -6
- package/dist/esm/utils/uuid.js +7 -7
- package/dist/esm/validator-schema/generated/validatorSpec.js +1 -1
- package/dist/types/next-schema/full-schema.adf.d.ts +1 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +4 -4
- package/dist/types/next-schema/groups/blockContentGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/blockGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/blockRootOnlyGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/fontStyleGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/inlineContentGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/inlineGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/linkMarkGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +6 -6
- package/dist/types/next-schema/groups/searchQueryMarkGroup.d.ts +1 -1
- package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +7 -67
- package/dist/types/next-schema/marks/alignmentAndIndentation.d.ts +2 -2
- package/dist/types/next-schema/marks/annotation.d.ts +2 -2
- package/dist/types/next-schema/marks/border.d.ts +1 -1
- package/dist/types/next-schema/marks/breakout.d.ts +1 -1
- package/dist/types/next-schema/marks/code.d.ts +1 -1
- package/dist/types/next-schema/marks/color.d.ts +3 -3
- package/dist/types/next-schema/marks/confluenceInlineComment.d.ts +1 -1
- package/dist/types/next-schema/marks/dataConsumer.d.ts +1 -1
- package/dist/types/next-schema/marks/em.d.ts +1 -1
- package/dist/types/next-schema/marks/fragment.d.ts +1 -1
- package/dist/types/next-schema/marks/link.d.ts +1 -1
- package/dist/types/next-schema/marks/strike.d.ts +1 -1
- package/dist/types/next-schema/marks/strong.d.ts +1 -1
- package/dist/types/next-schema/marks/subsup.d.ts +1 -1
- package/dist/types/next-schema/marks/typeAheadQuery.d.ts +1 -1
- package/dist/types/next-schema/marks/underline.d.ts +1 -1
- package/dist/types/next-schema/marks/unsupportedMark.d.ts +1 -1
- package/dist/types/next-schema/marks/unsupportedNodeAttribute.d.ts +1 -1
- package/dist/types/next-schema/nodes/blockCard.d.ts +1 -1
- package/dist/types/next-schema/nodes/blockquote.d.ts +3 -3
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +4 -4
- package/dist/types/next-schema/nodes/bodiedSyncBlock.d.ts +1 -1
- package/dist/types/next-schema/nodes/caption.d.ts +1 -1
- package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -2
- package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +1 -1
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +1 -1
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +1 -1
- package/dist/types/next-schema/nodes/date.d.ts +1 -1
- package/dist/types/next-schema/nodes/decisionItem.d.ts +1 -1
- package/dist/types/next-schema/nodes/decisionList.d.ts +1 -1
- package/dist/types/next-schema/nodes/embedCard.d.ts +1 -1
- package/dist/types/next-schema/nodes/emoji.d.ts +1 -1
- package/dist/types/next-schema/nodes/expand.d.ts +2 -2
- package/dist/types/next-schema/nodes/extension.d.ts +3 -3
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +1 -1
- package/dist/types/next-schema/nodes/hardBreak.d.ts +1 -1
- package/dist/types/next-schema/nodes/heading.d.ts +20 -20
- package/dist/types/next-schema/nodes/image.d.ts +1 -1
- package/dist/types/next-schema/nodes/inlineCard.d.ts +2 -2
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +2 -2
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +1 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +7 -7
- package/dist/types/next-schema/nodes/list.d.ts +2 -2
- package/dist/types/next-schema/nodes/media.d.ts +1 -1
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +1 -1
- package/dist/types/next-schema/nodes/mediaInline.d.ts +1 -1
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +10 -10
- package/dist/types/next-schema/nodes/mention.d.ts +1 -1
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +3 -3
- package/dist/types/next-schema/nodes/panel.d.ts +1 -1
- package/dist/types/next-schema/nodes/paragraph.d.ts +13 -13
- package/dist/types/next-schema/nodes/placeholder.d.ts +1 -1
- package/dist/types/next-schema/nodes/rule.d.ts +1 -1
- package/dist/types/next-schema/nodes/status.d.ts +1 -1
- package/dist/types/next-schema/nodes/syncBlock.d.ts +1 -1
- package/dist/types/next-schema/nodes/tableCellContent.d.ts +1 -1
- package/dist/types/next-schema/nodes/tableNodes.d.ts +1 -1
- package/dist/types/next-schema/nodes/task.d.ts +3 -3
- package/dist/types/next-schema/nodes/text.d.ts +5 -5
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +1 -1
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +1 -1
- package/dist/types/schema/bitbucket-schema.d.ts +1 -1
- package/dist/types/schema/confluence-schema.d.ts +1 -1
- package/dist/types/schema/create-schema.d.ts +4 -3
- package/dist/types/schema/createPMSpecFactory.d.ts +3 -3
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/jira-schema.d.ts +8 -8
- package/dist/types/schema/marks/alignment.d.ts +2 -2
- package/dist/types/schema/marks/annotation.d.ts +5 -5
- package/dist/types/schema/marks/background-color.d.ts +3 -3
- package/dist/types/schema/marks/border.d.ts +6 -6
- package/dist/types/schema/marks/breakout.d.ts +2 -2
- package/dist/types/schema/marks/code.d.ts +1 -1
- package/dist/types/schema/marks/confluence-inline-comment.d.ts +2 -2
- package/dist/types/schema/marks/data-consumer.d.ts +2 -2
- package/dist/types/schema/marks/em.d.ts +1 -1
- package/dist/types/schema/marks/fragment.d.ts +2 -2
- package/dist/types/schema/marks/indentation.d.ts +2 -2
- package/dist/types/schema/marks/index.d.ts +3 -3
- package/dist/types/schema/marks/link.d.ts +12 -12
- package/dist/types/schema/marks/strike.d.ts +1 -1
- package/dist/types/schema/marks/strong.d.ts +1 -1
- package/dist/types/schema/marks/subsup.d.ts +2 -2
- package/dist/types/schema/marks/text-color.d.ts +2 -2
- package/dist/types/schema/marks/type-ahead-query.d.ts +1 -1
- package/dist/types/schema/marks/underline.d.ts +1 -1
- package/dist/types/schema/marks/unsupported-mark.d.ts +1 -1
- package/dist/types/schema/marks/unsupported-node-attributes.d.ts +1 -1
- package/dist/types/schema/nodes/block-card.d.ts +6 -6
- package/dist/types/schema/nodes/blockquote.d.ts +10 -11
- package/dist/types/schema/nodes/bodied-extension.d.ts +7 -7
- package/dist/types/schema/nodes/bodied-sync-block.d.ts +23 -24
- package/dist/types/schema/nodes/caption.d.ts +12 -12
- package/dist/types/schema/nodes/code-block.d.ts +7 -7
- package/dist/types/schema/nodes/date.d.ts +3 -3
- package/dist/types/schema/nodes/decision-item.d.ts +6 -6
- package/dist/types/schema/nodes/decision-list.d.ts +5 -5
- package/dist/types/schema/nodes/doc.d.ts +10 -10
- package/dist/types/schema/nodes/embed-card.d.ts +4 -4
- package/dist/types/schema/nodes/emoji.d.ts +3 -3
- package/dist/types/schema/nodes/expand.d.ts +7 -7
- package/dist/types/schema/nodes/extension.d.ts +5 -5
- package/dist/types/schema/nodes/heading.d.ts +9 -9
- package/dist/types/schema/nodes/index.d.ts +6 -6
- package/dist/types/schema/nodes/inline-card.d.ts +3 -3
- package/dist/types/schema/nodes/inline-extension.d.ts +5 -5
- package/dist/types/schema/nodes/layout-column.d.ts +3 -3
- package/dist/types/schema/nodes/layout-section.d.ts +9 -9
- package/dist/types/schema/nodes/media-group.d.ts +2 -2
- package/dist/types/schema/nodes/media-inline.d.ts +6 -6
- package/dist/types/schema/nodes/media-single.d.ts +10 -10
- package/dist/types/schema/nodes/media.d.ts +27 -27
- package/dist/types/schema/nodes/mention.d.ts +5 -5
- package/dist/types/schema/nodes/multi-bodied-extension.d.ts +21 -22
- package/dist/types/schema/nodes/nested-expand.d.ts +14 -14
- package/dist/types/schema/nodes/panel.d.ts +14 -15
- package/dist/types/schema/nodes/paragraph.d.ts +5 -5
- package/dist/types/schema/nodes/rule.d.ts +1 -1
- package/dist/types/schema/nodes/status.d.ts +6 -6
- package/dist/types/schema/nodes/sync-block.d.ts +7 -7
- package/dist/types/schema/nodes/tableNodes.d.ts +36 -37
- package/dist/types/schema/nodes/task-item.d.ts +13 -13
- package/dist/types/schema/nodes/task-list.d.ts +5 -5
- package/dist/types/schema/nodes/types/block-content.d.ts +17 -18
- package/dist/types/schema/nodes/types/inline-content.d.ts +12 -12
- package/dist/types/schema/nodes/types/list.d.ts +18 -18
- package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +15 -16
- package/dist/types/schema/nodes/unknown-block.d.ts +1 -1
- package/dist/types/schema/sanitizeNodes.d.ts +1 -1
- package/dist/types/steps/analytics.d.ts +4 -3
- package/dist/types/steps/batch-attrs-step.d.ts +4 -4
- package/dist/types/steps/link-meta-step.d.ts +7 -6
- package/dist/types/steps/override-document-step.d.ts +4 -4
- package/dist/types/steps/set-attrs.d.ts +4 -3
- package/dist/types/steps/type-ahead.d.ts +2 -2
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/confluence/emoji.d.ts +1 -1
- package/dist/types/utils/extensions.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/url.d.ts +3 -3
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +12 -12
- package/dist/types-ts4.5/index.d.ts +8 -0
- package/dist/types-ts4.5/next-schema/full-schema.adf.d.ts +4 -0
- package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +206 -0
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +10 -0
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +976 -0
- package/dist/types-ts4.5/next-schema/groups/blockContentGroup.d.ts +12 -0
- package/dist/types-ts4.5/next-schema/groups/blockGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/blockRootOnlyGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/fontStyleGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/inlineContentGroup.d.ts +10 -0
- package/dist/types-ts4.5/next-schema/groups/inlineGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/linkMarkGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/nonNestableBlockContentGroup.d.ts +30 -0
- package/dist/types-ts4.5/next-schema/groups/searchQueryMarkGroup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/groups/tableCellContentPseudoGroup.d.ts +26 -0
- package/dist/types-ts4.5/next-schema/index.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/marks/alignmentAndIndentation.d.ts +2 -0
- package/dist/types-ts4.5/next-schema/marks/annotation.d.ts +2 -0
- package/dist/types-ts4.5/next-schema/marks/border.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/breakout.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/code.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/color.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/marks/confluenceInlineComment.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/dataConsumer.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/em.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/fragment.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/link.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/strike.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/strong.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/subsup.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/typeAheadQuery.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/underline.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/unsupportedMark.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/marks/unsupportedNodeAttribute.d.ts +1 -0
- package/dist/types-ts4.5/next-schema/nodes/blockCard.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/blockquote.d.ts +14 -0
- package/dist/types-ts4.5/next-schema/nodes/bodiedExtension.d.ts +8 -0
- package/dist/types-ts4.5/next-schema/nodes/bodiedSyncBlock.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/caption.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +8 -0
- package/dist/types-ts4.5/next-schema/nodes/confluenceJiraIssue.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedBlock.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedInline.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/date.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/decisionItem.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/decisionList.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/embedCard.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/emoji.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/expand.d.ts +8 -0
- package/dist/types-ts4.5/next-schema/nodes/extension.d.ts +7 -0
- package/dist/types-ts4.5/next-schema/nodes/extensionFrame.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/hardBreak.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/heading.d.ts +38 -0
- package/dist/types-ts4.5/next-schema/nodes/image.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/inlineCard.d.ts +6 -0
- package/dist/types-ts4.5/next-schema/nodes/inlineExtension.d.ts +6 -0
- package/dist/types-ts4.5/next-schema/nodes/layoutColumn.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/layoutSection.d.ts +25 -0
- package/dist/types-ts4.5/next-schema/nodes/list.d.ts +6 -0
- package/dist/types-ts4.5/next-schema/nodes/media.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/mediaGroup.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/mediaInline.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/mediaSingle.d.ts +57 -0
- package/dist/types-ts4.5/next-schema/nodes/mention.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/multiBodiedExtension.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/nestedExpand.d.ts +11 -0
- package/dist/types-ts4.5/next-schema/nodes/panel.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +24 -0
- package/dist/types-ts4.5/next-schema/nodes/placeholder.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/rule.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/status.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/syncBlock.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/tableCellContent.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/tableNodes.d.ts +4 -0
- package/dist/types-ts4.5/next-schema/nodes/task.d.ts +9 -0
- package/dist/types-ts4.5/next-schema/nodes/text.d.ts +25 -0
- package/dist/types-ts4.5/next-schema/nodes/unsupportedBlock.d.ts +3 -0
- package/dist/types-ts4.5/next-schema/nodes/unsupportedInline.d.ts +3 -0
- package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +5 -0
- package/dist/types-ts4.5/schema/confluence-schema.d.ts +9 -0
- package/dist/types-ts4.5/schema/create-schema.d.ts +27 -0
- package/dist/types-ts4.5/schema/createPMSpecFactory.d.ts +33 -0
- package/dist/types-ts4.5/schema/default-schema.d.ts +7 -0
- package/dist/types-ts4.5/schema/groups.d.ts +6 -0
- package/dist/types-ts4.5/schema/index.d.ts +12 -0
- package/dist/types-ts4.5/schema/inline-nodes.d.ts +1 -0
- package/dist/types-ts4.5/schema/jira-schema.d.ts +65 -0
- package/dist/types-ts4.5/schema/marks/alignment.d.ts +16 -0
- package/dist/types-ts4.5/schema/marks/annotation.d.ts +32 -0
- package/dist/types-ts4.5/schema/marks/background-color.d.ts +20 -0
- package/dist/types-ts4.5/schema/marks/border.d.ts +23 -0
- package/dist/types-ts4.5/schema/marks/breakout.d.ts +12 -0
- package/dist/types-ts4.5/schema/marks/code.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +12 -0
- package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +46 -0
- package/dist/types-ts4.5/schema/marks/em.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/fragment.d.ts +29 -0
- package/dist/types-ts4.5/schema/marks/indentation.d.ts +16 -0
- package/dist/types-ts4.5/schema/marks/index.d.ts +36 -0
- package/dist/types-ts4.5/schema/marks/link.d.ts +39 -0
- package/dist/types-ts4.5/schema/marks/strike.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/strong.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/subsup.d.ts +15 -0
- package/dist/types-ts4.5/schema/marks/text-color.d.ts +26 -0
- package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +2 -0
- package/dist/types-ts4.5/schema/marks/underline.d.ts +8 -0
- package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +2 -0
- package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +44 -0
- package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +27 -0
- package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +23 -0
- package/dist/types-ts4.5/schema/nodes/bodied-sync-block.d.ts +43 -0
- package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +3 -0
- package/dist/types-ts4.5/schema/nodes/caption.d.ts +24 -0
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +31 -0
- package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/date.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +16 -0
- package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +17 -0
- package/dist/types-ts4.5/schema/nodes/doc.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +19 -0
- package/dist/types-ts4.5/schema/nodes/emoji.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/expand.d.ts +34 -0
- package/dist/types-ts4.5/schema/nodes/extension.d.ts +17 -0
- package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +10 -0
- package/dist/types-ts4.5/schema/nodes/heading.d.ts +39 -0
- package/dist/types-ts4.5/schema/nodes/image.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/index.d.ts +98 -0
- package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +15 -0
- package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +17 -0
- package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +22 -0
- package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +49 -0
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +12 -0
- package/dist/types-ts4.5/schema/nodes/media-group.d.ts +13 -0
- package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +69 -0
- package/dist/types-ts4.5/schema/nodes/media.d.ts +71 -0
- package/dist/types-ts4.5/schema/nodes/mention.d.ts +30 -0
- package/dist/types-ts4.5/schema/nodes/multi-bodied-extension.d.ts +50 -0
- package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +40 -0
- package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +5 -0
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +50 -0
- package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +43 -0
- package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +12 -0
- package/dist/types-ts4.5/schema/nodes/rule.d.ts +11 -0
- package/dist/types-ts4.5/schema/nodes/status.d.ts +24 -0
- package/dist/types-ts4.5/schema/nodes/sync-block.d.ts +22 -0
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +159 -0
- package/dist/types-ts4.5/schema/nodes/task-item.d.ts +33 -0
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +20 -0
- package/dist/types-ts4.5/schema/nodes/text.d.ts +12 -0
- package/dist/types-ts4.5/schema/nodes/types/block-content.d.ts +21 -0
- package/dist/types-ts4.5/schema/nodes/types/extensions.d.ts +34 -0
- package/dist/types-ts4.5/schema/nodes/types/inline-content.d.ts +28 -0
- package/dist/types-ts4.5/schema/nodes/types/list.d.ts +51 -0
- package/dist/types-ts4.5/schema/nodes/types/mark.d.ts +15 -0
- package/dist/types-ts4.5/schema/nodes/types/non-nestable-block-content.d.ts +19 -0
- package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +37 -0
- package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +3 -0
- package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +1 -0
- package/dist/types-ts4.5/schema/sanitizeNodes.d.ts +8 -0
- package/dist/types-ts4.5/schema/unsupported.d.ts +1 -0
- package/dist/types-ts4.5/steps/analytics.d.ts +60 -0
- package/dist/types-ts4.5/steps/batch-attrs-step.d.ts +74 -0
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +50 -0
- package/dist/types-ts4.5/steps/override-document-step.d.ts +26 -0
- package/dist/types-ts4.5/steps/set-attrs.d.ts +24 -0
- package/dist/types-ts4.5/steps/type-ahead.d.ts +35 -0
- package/dist/types-ts4.5/steps/types.d.ts +96 -0
- package/dist/types-ts4.5/steps.d.ts +10 -0
- package/dist/types-ts4.5/utils/colors.d.ts +81 -0
- package/dist/types-ts4.5/utils/confluence/emoji.d.ts +50 -0
- package/dist/types-ts4.5/utils/editor-palette.d.ts +257 -0
- package/dist/types-ts4.5/utils/extensions.d.ts +3 -0
- package/dist/types-ts4.5/utils/index.d.ts +7 -0
- package/dist/types-ts4.5/utils/lch-color-inversion.d.ts +2 -0
- package/dist/types-ts4.5/utils/parseDOM.d.ts +1 -0
- package/dist/types-ts4.5/utils/url.d.ts +40 -0
- package/dist/types-ts4.5/utils/uuid.d.ts +5 -0
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +1981 -0
- package/eslint-plugin-warn-schema.js +2 -1
- package/eslint.config.js +12 -14
- package/json-schema/package.json +8 -1
- package/json-schema/v1/full.json +3 -0
- package/json-schema/v1/stage-0.json +6 -0
- package/package.json +90 -82
- package/schema/package.json +8 -1
- package/schema-bitbucket/package.json +8 -1
- package/schema-confluence/package.json +8 -1
- package/schema-default/package.json +8 -1
- package/schema-generators/__tests__/helpers/_utils.ts +73 -77
- package/schema-generators/__tests__/helpers/utils.unit.ts +53 -59
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +79 -84
- package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +43 -40
- package/schema-generators/__tests__/unit/validator-schema.ts +3 -3
- package/schema-generators/helpers/writeToFile.ts +12 -11
- package/schema-generators/json-full-schema.ts +4 -4
- package/schema-generators/pm-full-schema.ts +7 -5
- package/schema-generators/validator-full-schema.ts +7 -9
- package/schema-jira/package.json +8 -1
- package/schema-next/package.json +9 -3
- package/schema-validator/package.json +9 -3
- package/steps/package.json +8 -1
- package/url/package.json +8 -1
- package/warn-schema-change.js +121 -136
- package/warn-schema-change.test.js +31 -30
- package/copy-dist-to-afe.js +0 -32
- package/dist/json-schema/package.json +0 -8
- package/dist/json-schema/v1/full.json +0 -2916
- package/dist/json-schema/v1/stage-0.json +0 -3211
- package/dist/types/json-schema/index.d.ts +0 -2
- package/sanitize-nodes/package.json +0 -8
package/README.md
ADDED
|
@@ -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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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];
|
|
@@ -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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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' ||
|
|
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 ?
|
|
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
|
});
|