@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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
1
2
|
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
2
|
-
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
|
3
|
+
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
|
4
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
|
+
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
3
6
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext } from './marks';
|
|
4
7
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
|
5
8
|
export { inlineNodes } from './inline-nodes';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-namespace
|
|
1
2
|
import * as nodes from './nodes';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
5
|
const typedNodes = nodes;
|
|
3
6
|
export const inlineNodes = new Set(Object.keys(typedNodes).filter(key => typedNodes[key] && typedNodes[key].group === 'inline'));
|
|
@@ -36,6 +36,7 @@ export const annotation = annotationFactory({
|
|
|
36
36
|
tag: 'span[data-mark-type="annotation"]',
|
|
37
37
|
mark: 'annotation',
|
|
38
38
|
getAttrs: domNode => {
|
|
39
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
39
40
|
const dom = domNode;
|
|
40
41
|
const attrs = {
|
|
41
42
|
id: dom.getAttribute('data-id'),
|
|
@@ -46,11 +47,11 @@ export const annotation = annotationFactory({
|
|
|
46
47
|
}],
|
|
47
48
|
toDOM(node) {
|
|
48
49
|
/*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
Data attributes on the DOM node are a temporary means of
|
|
51
|
+
incrementally switching over to the Annotation mark. Once renderer
|
|
52
|
+
provides native support for inline comments the data attributes on the
|
|
53
|
+
DOM nodes will be removed.
|
|
54
|
+
*/
|
|
54
55
|
return ['span', {
|
|
55
56
|
// Prettier will remove the quotes around class. This would cause some browsers
|
|
56
57
|
// to not add this attribute properly, as its a reserved word.
|
|
@@ -60,6 +61,7 @@ export const annotation = annotationFactory({
|
|
|
60
61
|
id: node.attrs.id,
|
|
61
62
|
annotationType: node.attrs.annotationType
|
|
62
63
|
})
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
65
|
}, 0];
|
|
64
66
|
}
|
|
65
67
|
});
|
|
@@ -39,6 +39,7 @@ const colorArrayPaletteNext = [[Neutral300, 'Gray'],
|
|
|
39
39
|
|
|
40
40
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
41
41
|
// Remove this when cleaning up platform_editor_add_orange_highlight_color
|
|
42
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
42
43
|
/**
|
|
43
44
|
* @deprecated use backgroundColorPaletteNext instead, which in addition supports yellow highlight
|
|
44
45
|
*/
|
|
@@ -52,7 +53,8 @@ export const backgroundColor = backgroundColorFactory({
|
|
|
52
53
|
getAttrs: maybeValue => {
|
|
53
54
|
const value = maybeValue;
|
|
54
55
|
let hexColor;
|
|
55
|
-
|
|
56
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
57
|
+
if (value.match(/^rgb/iu)) {
|
|
56
58
|
hexColor = rgbToHex(value);
|
|
57
59
|
} else if (value[0] === '#') {
|
|
58
60
|
hexColor = value.toLowerCase();
|
|
@@ -15,6 +15,7 @@ export const border = borderFactory({
|
|
|
15
15
|
tag: '[data-mark-type="border"]',
|
|
16
16
|
getAttrs: domNode => {
|
|
17
17
|
var _dom$getAttribute, _dom$getAttribute2;
|
|
18
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
18
19
|
const dom = domNode;
|
|
19
20
|
const color = ((_dom$getAttribute = dom.getAttribute('data-color')) !== null && _dom$getAttribute !== void 0 ? _dom$getAttribute : '').toLowerCase();
|
|
20
21
|
const size = +((_dom$getAttribute2 = dom.getAttribute('data-size')) !== null && _dom$getAttribute2 !== void 0 ? _dom$getAttribute2 : '0');
|
|
@@ -9,7 +9,9 @@ export const breakout = breakoutFactory({
|
|
|
9
9
|
parseDOM: [{
|
|
10
10
|
tag: 'div.fabric-editor-breakout-mark',
|
|
11
11
|
getAttrs(dom) {
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
12
13
|
const mode = dom.getAttribute('data-mode');
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
15
|
const width = dom.getAttribute('data-width');
|
|
14
16
|
return {
|
|
15
17
|
mode: allowedTypes.indexOf(mode || '') === -1 ? 'wide' : mode,
|
|
@@ -8,6 +8,7 @@ export const indentation = indentationFactory({
|
|
|
8
8
|
parseDOM: [{
|
|
9
9
|
tag: 'div.fabric-editor-indentation-mark',
|
|
10
10
|
getAttrs(dom) {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
11
12
|
const level = +(dom.getAttribute('data-level') || '0');
|
|
12
13
|
return {
|
|
13
14
|
level: level > 6 ? 6 : level < 1 ? false : level
|
|
@@ -27,7 +27,9 @@ export const link = linkFactory({
|
|
|
27
27
|
getAttrs: getLinkAttrs('data-block-link'),
|
|
28
28
|
contentElement: node => {
|
|
29
29
|
const clone = node.cloneNode(true);
|
|
30
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
30
31
|
clone.removeAttribute('data-block-link');
|
|
32
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
31
33
|
clone.setAttribute('data-skip-paste', 'true');
|
|
32
34
|
const wrapper = document.createElement('div');
|
|
33
35
|
wrapper.appendChild(clone);
|
|
@@ -38,6 +40,7 @@ export const link = linkFactory({
|
|
|
38
40
|
getAttrs: getLinkAttrs('href')
|
|
39
41
|
}],
|
|
40
42
|
toDOM(node, isInline) {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
44
|
const attrs = Object.keys(node.attrs).reduce((attrs, key) => {
|
|
42
45
|
if (key === '__confluenceMetadata') {
|
|
43
46
|
if (node.attrs[key] !== null) {
|
|
@@ -46,6 +49,7 @@ export const link = linkFactory({
|
|
|
46
49
|
} else if (key === 'href') {
|
|
47
50
|
attrs[key] = isSafeUrl(node.attrs[key]) ? node.attrs[key] : undefined;
|
|
48
51
|
} else {
|
|
52
|
+
// @ts-ignore
|
|
49
53
|
attrs[key] = node.attrs[key];
|
|
50
54
|
}
|
|
51
55
|
return attrs;
|
|
@@ -15,17 +15,21 @@ export const strong = strongFactory({
|
|
|
15
15
|
{
|
|
16
16
|
tag: 'b',
|
|
17
17
|
getAttrs(node) {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
18
19
|
const element = node;
|
|
19
20
|
return element.style.fontWeight !== 'normal' && null;
|
|
20
21
|
}
|
|
21
22
|
}, {
|
|
22
23
|
tag: 'span',
|
|
23
24
|
getAttrs(node) {
|
|
25
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
24
26
|
const element = node;
|
|
25
27
|
const {
|
|
26
28
|
fontWeight
|
|
27
29
|
} = element.style;
|
|
28
|
-
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' ||
|
|
30
|
+
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' ||
|
|
31
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
32
|
+
/^(bold(er)?|[5-9]\d{2,})$/u.test(fontWeight)) && null;
|
|
29
33
|
}
|
|
30
34
|
}],
|
|
31
35
|
toDOM() {
|
|
@@ -54,6 +54,7 @@ const colorArrayPalette = [
|
|
|
54
54
|
|
|
55
55
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
56
56
|
export const colorPalette = new Map();
|
|
57
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
57
58
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
58
59
|
export const colorPaletteExtended = colorPalette;
|
|
59
60
|
colorArrayPalette.forEach(([color, label]) => colorPalette.set(color.toLowerCase(), label));
|
|
@@ -87,7 +88,8 @@ export const textColor = textColorFactory({
|
|
|
87
88
|
getAttrs: maybeValue => {
|
|
88
89
|
const value = maybeValue;
|
|
89
90
|
let hexColor;
|
|
90
|
-
|
|
91
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
92
|
+
if (value.match(/^rgb/iu)) {
|
|
91
93
|
hexColor = rgbToHex(value);
|
|
92
94
|
} else if (value[0] === '#') {
|
|
93
95
|
hexColor = value.toLowerCase();
|
|
@@ -11,7 +11,10 @@ const getCommonAttributesFromDom = dom => {
|
|
|
11
11
|
const datasource = anchor.getAttribute('data-datasource');
|
|
12
12
|
return {
|
|
13
13
|
data: data ? JSON.parse(data) : undefined,
|
|
14
|
-
layout: datasource ?
|
|
14
|
+
layout: datasource ?
|
|
15
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
16
|
+
dom.getAttribute('data-layout') || undefined : undefined,
|
|
17
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
15
18
|
width: Number(dom.getAttribute('data-width')) || undefined,
|
|
16
19
|
datasource: datasource ? JSON.parse(datasource) : undefined
|
|
17
20
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { blockquote as blockquoteFactory } from '../../next-schema/generated/nodeTypes';
|
|
2
|
-
import { blockquoteLegacy as blockquoteLegacyFactory } from '../../next-schema/generated/nodeTypes';
|
|
1
|
+
import { blockquote as blockquoteFactory, blockquoteLegacy as blockquoteLegacyFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
2
|
import { uuid } from '../../utils';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -11,6 +11,7 @@ export const bodiedSyncBlock = bodiedSyncBlockFactory({
|
|
|
11
11
|
parseDOM: [{
|
|
12
12
|
tag: 'div[data-bodied-sync-block]',
|
|
13
13
|
getAttrs: domNode => {
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
14
15
|
const dom = domNode;
|
|
15
16
|
const attrs = {
|
|
16
17
|
localId: dom.getAttribute('data-local-id') || uuid.generate(),
|
|
@@ -28,9 +28,11 @@ export const captionWithLocalId = captionFactory({
|
|
|
28
28
|
toDOM(node) {
|
|
29
29
|
var _node$attrs;
|
|
30
30
|
const attrs = {
|
|
31
|
-
'data-caption': 'true'
|
|
32
|
-
'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
|
|
31
|
+
'data-caption': 'true'
|
|
33
32
|
};
|
|
33
|
+
if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
|
|
34
|
+
attrs['data-local-id'] = node.attrs.localId;
|
|
35
|
+
}
|
|
34
36
|
return ['figcaption', attrs, 0];
|
|
35
37
|
}
|
|
36
38
|
});
|
|
@@ -32,7 +32,8 @@ const getLanguageFromCode = dom => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
const extractLanguageFromClass = className => {
|
|
35
|
-
|
|
35
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
36
|
+
const languageRegex = /(?:^|\s)language-([^\s]+)/u;
|
|
36
37
|
const result = languageRegex.exec(className);
|
|
37
38
|
if (result && result[1]) {
|
|
38
39
|
return result[1];
|
|
@@ -42,7 +43,9 @@ const extractLanguageFromClass = className => {
|
|
|
42
43
|
const removeLastNewLine = dom => {
|
|
43
44
|
const parent = dom && dom.parentElement;
|
|
44
45
|
if (parent && parent.classList.contains('codehilite')) {
|
|
45
|
-
|
|
46
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
+
dom.textContent = dom.textContent.replace(/\n$/u, '');
|
|
46
49
|
}
|
|
47
50
|
return dom;
|
|
48
51
|
};
|
|
@@ -74,8 +77,15 @@ export const codeBlock = codeBlockFactory({
|
|
|
74
77
|
tag: 'pre',
|
|
75
78
|
preserveWhitespace: 'full',
|
|
76
79
|
getAttrs: domNode => {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
77
81
|
let dom = domNode;
|
|
78
|
-
const language =
|
|
82
|
+
const language =
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
|
+
getLanguageFromBitbucketStyle(dom.parentElement) ||
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
86
|
+
getLanguageFromEditorStyle(dom.parentElement) || getLanguageFromCode(dom) ||
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
88
|
+
dom.getAttribute('data-language');
|
|
79
89
|
dom = removeLastNewLine(dom);
|
|
80
90
|
return {
|
|
81
91
|
language
|
|
@@ -88,6 +98,7 @@ export const codeBlock = codeBlockFactory({
|
|
|
88
98
|
tag: 'div[style]',
|
|
89
99
|
preserveWhitespace: 'full',
|
|
90
100
|
getAttrs: domNode => {
|
|
101
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
91
102
|
const dom = domNode;
|
|
92
103
|
if (dom.style.whiteSpace === 'pre' || dom.style.fontFamily && dom.style.fontFamily.toLowerCase().indexOf('monospace') > -1) {
|
|
93
104
|
return {};
|
|
@@ -104,6 +115,7 @@ export const codeBlock = codeBlockFactory({
|
|
|
104
115
|
tag: 'table[style]',
|
|
105
116
|
preserveWhitespace: 'full',
|
|
106
117
|
getAttrs: dom => {
|
|
118
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
107
119
|
if (dom.querySelector('td[class*="blob-code"]')) {
|
|
108
120
|
return {};
|
|
109
121
|
}
|
|
@@ -113,8 +125,9 @@ export const codeBlock = codeBlockFactory({
|
|
|
113
125
|
tag: 'div.code-block',
|
|
114
126
|
preserveWhitespace: 'full',
|
|
115
127
|
getAttrs: domNode => {
|
|
128
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
116
129
|
const dom = domNode;
|
|
117
|
-
// TODO: ED-5604 Fix it inside `react-syntax-highlighter`
|
|
130
|
+
// TODO: ED-5604 - Fix it inside `react-syntax-highlighter`
|
|
118
131
|
// Remove line numbers
|
|
119
132
|
const lineNumber = dom.querySelectorAll('.react-syntax-highlighter-line-number');
|
|
120
133
|
if (lineNumber.length > 0) {
|
|
@@ -132,6 +145,7 @@ export const codeBlock = codeBlockFactory({
|
|
|
132
145
|
}
|
|
133
146
|
});
|
|
134
147
|
export const toJSON = node => ({
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135
149
|
attrs: Object.keys(node.attrs).reduce((memo, key) => {
|
|
136
150
|
if (key === 'uniqueId') {
|
|
137
151
|
return memo;
|
|
@@ -148,8 +162,15 @@ export const codeBlockWithLocalId = codeBlockFactory({
|
|
|
148
162
|
tag: 'pre',
|
|
149
163
|
preserveWhitespace: 'full',
|
|
150
164
|
getAttrs: domNode => {
|
|
165
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
151
166
|
let dom = domNode;
|
|
152
|
-
const language =
|
|
167
|
+
const language =
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
169
|
+
getLanguageFromBitbucketStyle(dom.parentElement) ||
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
171
|
+
getLanguageFromEditorStyle(dom.parentElement) || getLanguageFromCode(dom) ||
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
173
|
+
dom.getAttribute('data-language');
|
|
153
174
|
dom = removeLastNewLine(dom);
|
|
154
175
|
return {
|
|
155
176
|
language,
|
|
@@ -163,6 +184,7 @@ export const codeBlockWithLocalId = codeBlockFactory({
|
|
|
163
184
|
tag: 'div[style]',
|
|
164
185
|
preserveWhitespace: 'full',
|
|
165
186
|
getAttrs: domNode => {
|
|
187
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
166
188
|
const dom = domNode;
|
|
167
189
|
if (dom.style.whiteSpace === 'pre' || dom.style.fontFamily && dom.style.fontFamily.toLowerCase().indexOf('monospace') > -1) {
|
|
168
190
|
return {};
|
|
@@ -179,6 +201,7 @@ export const codeBlockWithLocalId = codeBlockFactory({
|
|
|
179
201
|
tag: 'table[style]',
|
|
180
202
|
preserveWhitespace: 'full',
|
|
181
203
|
getAttrs: dom => {
|
|
204
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
182
205
|
if (dom.querySelector('td[class*="blob-code"]')) {
|
|
183
206
|
return {};
|
|
184
207
|
}
|
|
@@ -188,8 +211,9 @@ export const codeBlockWithLocalId = codeBlockFactory({
|
|
|
188
211
|
tag: 'div.code-block',
|
|
189
212
|
preserveWhitespace: 'full',
|
|
190
213
|
getAttrs: domNode => {
|
|
214
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
191
215
|
const dom = domNode;
|
|
192
|
-
// TODO: ED-5604 Fix it inside `react-syntax-highlighter`
|
|
216
|
+
// TODO: ED-5604 - Fix it inside `react-syntax-highlighter`
|
|
193
217
|
// Remove line numbers
|
|
194
218
|
const lineNumber = dom.querySelectorAll('.react-syntax-highlighter-line-number');
|
|
195
219
|
if (lineNumber.length > 0) {
|
|
@@ -202,9 +226,10 @@ export const codeBlockWithLocalId = codeBlockFactory({
|
|
|
202
226
|
}],
|
|
203
227
|
toDOM(node) {
|
|
204
228
|
var _node$attrs;
|
|
205
|
-
const attrs = {
|
|
206
|
-
|
|
207
|
-
|
|
229
|
+
const attrs = {};
|
|
230
|
+
if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
|
|
231
|
+
attrs['data-local-id'] = node.attrs.localId;
|
|
232
|
+
}
|
|
208
233
|
return ['pre', attrs, ['code', {
|
|
209
234
|
'data-language': node.attrs.language
|
|
210
235
|
}, 0]];
|
|
@@ -14,6 +14,7 @@ export const confluenceUnsupportedBlock = confluenceUnsupportedBlockFactory({
|
|
|
14
14
|
tag: `div[data-node-type="${name}"]`,
|
|
15
15
|
getAttrs(dom) {
|
|
16
16
|
return {
|
|
17
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
17
18
|
cxhtml: dom.getAttribute('data-confluence-unsupported-block-cxhtml')
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -13,6 +13,7 @@ export const confluenceUnsupportedInline = confluenceUnsupportedInlineFactory({
|
|
|
13
13
|
tag: `div[data-node-type="${name}"]`,
|
|
14
14
|
getAttrs(dom) {
|
|
15
15
|
return {
|
|
16
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
16
17
|
cxhtml: dom.getAttribute('data-confluence-unsupported-inline-cxhtml')
|
|
17
18
|
};
|
|
18
19
|
}
|
|
@@ -9,6 +9,7 @@ export const date = dateFactory({
|
|
|
9
9
|
parseDOM: [{
|
|
10
10
|
tag: 'span[data-node-type="date"]',
|
|
11
11
|
getAttrs: dom => ({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
12
13
|
timestamp: dom.getAttribute('data-timestamp')
|
|
13
14
|
})
|
|
14
15
|
}],
|
|
@@ -24,6 +25,7 @@ export const dateWithLocalId = dateFactory({
|
|
|
24
25
|
parseDOM: [{
|
|
25
26
|
tag: 'span[data-node-type="date"]',
|
|
26
27
|
getAttrs: dom => ({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
27
29
|
timestamp: dom.getAttribute('data-timestamp'),
|
|
28
30
|
localId: uuid.generate()
|
|
29
31
|
})
|
|
@@ -13,6 +13,7 @@ export const decisionItem = decisionItemFactory({
|
|
|
13
13
|
priority: 100,
|
|
14
14
|
getAttrs: dom => ({
|
|
15
15
|
localId: uuid.generate(),
|
|
16
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
16
17
|
state: dom.getAttribute('data-decision-state')
|
|
17
18
|
})
|
|
18
19
|
}],
|
|
@@ -9,11 +9,18 @@ export const embedCard = embedCardFactory({
|
|
|
9
9
|
parseDOM: [{
|
|
10
10
|
tag: 'div[data-embed-card]',
|
|
11
11
|
getAttrs: dom => ({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
12
13
|
url: dom.getAttribute('data-card-url'),
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
15
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
14
17
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
15
|
-
originalWidth:
|
|
16
|
-
|
|
18
|
+
originalWidth:
|
|
19
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
20
|
+
Number(dom.getAttribute('data-card-original-width')) || null,
|
|
21
|
+
originalHeight:
|
|
22
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
23
|
+
Number(dom.getAttribute('data-card-original-height')) || null
|
|
17
24
|
})
|
|
18
25
|
}],
|
|
19
26
|
toDOM(node) {
|
|
@@ -39,11 +46,18 @@ export const embedCardWithLocalId = embedCardFactory({
|
|
|
39
46
|
parseDOM: [{
|
|
40
47
|
tag: 'div[data-embed-card]',
|
|
41
48
|
getAttrs: dom => ({
|
|
49
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
42
50
|
url: dom.getAttribute('data-card-url'),
|
|
51
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
43
52
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
53
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
44
54
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
45
|
-
originalWidth:
|
|
46
|
-
|
|
55
|
+
originalWidth:
|
|
56
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
57
|
+
Number(dom.getAttribute('data-card-original-width')) || null,
|
|
58
|
+
originalHeight:
|
|
59
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
60
|
+
Number(dom.getAttribute('data-card-original-height')) || null,
|
|
47
61
|
localId: uuid.generate()
|
|
48
62
|
})
|
|
49
63
|
}],
|
|
@@ -15,10 +15,14 @@ export const emoji = emojiFactory({
|
|
|
15
15
|
}, {
|
|
16
16
|
tag: 'span[data-emoji-short-name]',
|
|
17
17
|
getAttrs: domNode => {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
18
19
|
const dom = domNode;
|
|
19
20
|
return {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
22
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
21
24
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
22
26
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
23
27
|
};
|
|
24
28
|
}
|
|
@@ -26,21 +30,27 @@ export const emoji = emojiFactory({
|
|
|
26
30
|
// Handle copy/paste from old <ac:emoticon />
|
|
27
31
|
{
|
|
28
32
|
tag: 'img[data-emoticon-name]',
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
34
|
getAttrs: dom => acNameToEmoji(dom.getAttribute('data-emoticon-name'))
|
|
30
35
|
},
|
|
31
36
|
// Handle copy/paste from old <ac:hipchat-emoticons />
|
|
32
37
|
{
|
|
33
38
|
tag: 'img[data-hipchat-emoticon]',
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
34
40
|
getAttrs: dom => acShortcutToEmoji(dom.getAttribute('data-hipchat-emoticon'))
|
|
35
41
|
},
|
|
36
42
|
// Handle copy/paste from bitbucket's <img class="emoji" />
|
|
37
43
|
{
|
|
38
44
|
tag: 'img.emoji[data-emoji-short-name]',
|
|
39
45
|
getAttrs: domNode => {
|
|
46
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
40
47
|
const dom = domNode;
|
|
41
48
|
return {
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
42
50
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
43
52
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
54
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
45
55
|
};
|
|
46
56
|
}
|
|
@@ -69,10 +79,14 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
69
79
|
}, {
|
|
70
80
|
tag: 'span[data-emoji-short-name]',
|
|
71
81
|
getAttrs: domNode => {
|
|
82
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
72
83
|
const dom = domNode;
|
|
73
84
|
return {
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
74
86
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
75
88
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
76
90
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
77
91
|
localId: uuid.generate()
|
|
78
92
|
};
|
|
@@ -82,6 +96,7 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
82
96
|
{
|
|
83
97
|
tag: 'img[data-emoticon-name]',
|
|
84
98
|
getAttrs: dom => {
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
100
|
const attrs = acNameToEmoji(dom.getAttribute('data-emoticon-name'));
|
|
86
101
|
return {
|
|
87
102
|
...attrs,
|
|
@@ -93,6 +108,7 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
93
108
|
{
|
|
94
109
|
tag: 'img[data-hipchat-emoticon]',
|
|
95
110
|
getAttrs: dom => {
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
96
112
|
const attrs = acShortcutToEmoji(dom.getAttribute('data-hipchat-emoticon'));
|
|
97
113
|
return {
|
|
98
114
|
...attrs,
|
|
@@ -104,10 +120,14 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
104
120
|
{
|
|
105
121
|
tag: 'img.emoji[data-emoji-short-name]',
|
|
106
122
|
getAttrs: domNode => {
|
|
123
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
107
124
|
const dom = domNode;
|
|
108
125
|
return {
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
109
127
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
110
129
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
111
131
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
112
132
|
localId: uuid.generate()
|
|
113
133
|
};
|
|
@@ -12,6 +12,7 @@ import { extension as extensionFactory } from '../../next-schema/generated/nodeT
|
|
|
12
12
|
export const extension = extensionFactory({
|
|
13
13
|
parseDOM: [{
|
|
14
14
|
tag: '[data-node-type="extension"]',
|
|
15
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
15
16
|
getAttrs: domNode => getExtensionAttrs(domNode)
|
|
16
17
|
}],
|
|
17
18
|
toDOM(node) {
|
|
@@ -17,13 +17,12 @@ import { heading as headingFactory } from '../../next-schema/generated/nodeTypes
|
|
|
17
17
|
* @name heading_with_indentation_node
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const getAttrs = level => domNode => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
const getAttrs = level => domNode => ({
|
|
21
|
+
level,
|
|
22
|
+
localId:
|
|
23
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
24
|
+
domNode.getAttribute('data-local-id') || null
|
|
25
|
+
});
|
|
27
26
|
export const heading = headingFactory({
|
|
28
27
|
parseDOM: [{
|
|
29
28
|
tag: 'h1',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
1
2
|
export { expandWithNestedExpand, expandWithNestedExpandLocalId, toJSON as expandToJSON } from './expand';
|
|
2
3
|
export { confluenceJiraIssue } from './confluence-jira-issue';
|
|
3
4
|
export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
|
|
@@ -12,6 +12,7 @@ import { inlineExtensionWithMarks as inlineExtensionWithMarksFactory } from '../
|
|
|
12
12
|
export const inlineExtension = inlineExtensionWithMarksFactory({
|
|
13
13
|
parseDOM: [{
|
|
14
14
|
tag: 'span[data-extension-type]',
|
|
15
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
15
16
|
getAttrs: domNode => getExtensionAttrs(domNode, true)
|
|
16
17
|
}],
|
|
17
18
|
toDOM(node) {
|