@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
|
@@ -14,6 +14,7 @@ export var confluenceUnsupportedBlock = confluenceUnsupportedBlockFactory({
|
|
|
14
14
|
tag: "div[data-node-type=\"".concat(name, "\"]"),
|
|
15
15
|
getAttrs: function 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 var confluenceUnsupportedInline = confluenceUnsupportedInlineFactory({
|
|
|
13
13
|
tag: "div[data-node-type=\"".concat(name, "\"]"),
|
|
14
14
|
getAttrs: function 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
|
}
|
|
@@ -10,6 +10,7 @@ export var date = dateFactory({
|
|
|
10
10
|
tag: 'span[data-node-type="date"]',
|
|
11
11
|
getAttrs: function getAttrs(dom) {
|
|
12
12
|
return {
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
timestamp: dom.getAttribute('data-timestamp')
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -27,6 +28,7 @@ export var dateWithLocalId = dateFactory({
|
|
|
27
28
|
tag: 'span[data-node-type="date"]',
|
|
28
29
|
getAttrs: function getAttrs(dom) {
|
|
29
30
|
return {
|
|
31
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
30
32
|
timestamp: dom.getAttribute('data-timestamp'),
|
|
31
33
|
localId: uuid.generate()
|
|
32
34
|
};
|
|
@@ -14,6 +14,7 @@ export var decisionItem = decisionItemFactory({
|
|
|
14
14
|
getAttrs: function getAttrs(dom) {
|
|
15
15
|
return {
|
|
16
16
|
localId: uuid.generate(),
|
|
17
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
17
18
|
state: dom.getAttribute('data-decision-state')
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -10,11 +10,18 @@ export var embedCard = embedCardFactory({
|
|
|
10
10
|
tag: 'div[data-embed-card]',
|
|
11
11
|
getAttrs: function getAttrs(dom) {
|
|
12
12
|
return {
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
url: dom.getAttribute('data-card-url'),
|
|
15
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
14
16
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
15
18
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
16
|
-
originalWidth:
|
|
17
|
-
|
|
19
|
+
originalWidth:
|
|
20
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
21
|
+
Number(dom.getAttribute('data-card-original-width')) || null,
|
|
22
|
+
originalHeight:
|
|
23
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
24
|
+
Number(dom.getAttribute('data-card-original-height')) || null
|
|
18
25
|
};
|
|
19
26
|
}
|
|
20
27
|
}],
|
|
@@ -41,11 +48,18 @@ export var embedCardWithLocalId = embedCardFactory({
|
|
|
41
48
|
tag: 'div[data-embed-card]',
|
|
42
49
|
getAttrs: function getAttrs(dom) {
|
|
43
50
|
return {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
44
52
|
url: dom.getAttribute('data-card-url'),
|
|
53
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
45
54
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
55
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
46
56
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
47
|
-
originalWidth:
|
|
48
|
-
|
|
57
|
+
originalWidth:
|
|
58
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
59
|
+
Number(dom.getAttribute('data-card-original-width')) || null,
|
|
60
|
+
originalHeight:
|
|
61
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
62
|
+
Number(dom.getAttribute('data-card-original-height')) || null,
|
|
49
63
|
localId: uuid.generate()
|
|
50
64
|
};
|
|
51
65
|
}
|
|
@@ -18,10 +18,14 @@ export var emoji = emojiFactory({
|
|
|
18
18
|
}, {
|
|
19
19
|
tag: 'span[data-emoji-short-name]',
|
|
20
20
|
getAttrs: function getAttrs(domNode) {
|
|
21
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
21
22
|
var dom = domNode;
|
|
22
23
|
return {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
25
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
27
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
29
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
26
30
|
};
|
|
27
31
|
}
|
|
@@ -29,6 +33,7 @@ export var emoji = emojiFactory({
|
|
|
29
33
|
// Handle copy/paste from old <ac:emoticon />
|
|
30
34
|
{
|
|
31
35
|
tag: 'img[data-emoticon-name]',
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
37
|
getAttrs: function getAttrs(dom) {
|
|
33
38
|
return acNameToEmoji(dom.getAttribute('data-emoticon-name'));
|
|
34
39
|
}
|
|
@@ -36,6 +41,7 @@ export var emoji = emojiFactory({
|
|
|
36
41
|
// Handle copy/paste from old <ac:hipchat-emoticons />
|
|
37
42
|
{
|
|
38
43
|
tag: 'img[data-hipchat-emoticon]',
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
39
45
|
getAttrs: function getAttrs(dom) {
|
|
40
46
|
return acShortcutToEmoji(dom.getAttribute('data-hipchat-emoticon'));
|
|
41
47
|
}
|
|
@@ -44,10 +50,14 @@ export var emoji = emojiFactory({
|
|
|
44
50
|
{
|
|
45
51
|
tag: 'img.emoji[data-emoji-short-name]',
|
|
46
52
|
getAttrs: function getAttrs(domNode) {
|
|
53
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
47
54
|
var dom = domNode;
|
|
48
55
|
return {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
49
57
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
50
59
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
51
61
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
52
62
|
};
|
|
53
63
|
}
|
|
@@ -75,10 +85,14 @@ export var emojiWithLocalId = emojiFactory({
|
|
|
75
85
|
}, {
|
|
76
86
|
tag: 'span[data-emoji-short-name]',
|
|
77
87
|
getAttrs: function getAttrs(domNode) {
|
|
88
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
78
89
|
var dom = domNode;
|
|
79
90
|
return {
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
80
92
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
81
94
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
82
96
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
83
97
|
localId: uuid.generate()
|
|
84
98
|
};
|
|
@@ -88,6 +102,7 @@ export var emojiWithLocalId = emojiFactory({
|
|
|
88
102
|
{
|
|
89
103
|
tag: 'img[data-emoticon-name]',
|
|
90
104
|
getAttrs: function getAttrs(dom) {
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
91
106
|
var attrs = acNameToEmoji(dom.getAttribute('data-emoticon-name'));
|
|
92
107
|
return _objectSpread(_objectSpread({}, attrs), {}, {
|
|
93
108
|
localId: uuid.generate()
|
|
@@ -98,6 +113,7 @@ export var emojiWithLocalId = emojiFactory({
|
|
|
98
113
|
{
|
|
99
114
|
tag: 'img[data-hipchat-emoticon]',
|
|
100
115
|
getAttrs: function getAttrs(dom) {
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
101
117
|
var attrs = acShortcutToEmoji(dom.getAttribute('data-hipchat-emoticon'));
|
|
102
118
|
return _objectSpread(_objectSpread({}, attrs), {}, {
|
|
103
119
|
localId: uuid.generate()
|
|
@@ -108,10 +124,14 @@ export var emojiWithLocalId = emojiFactory({
|
|
|
108
124
|
{
|
|
109
125
|
tag: 'img.emoji[data-emoji-short-name]',
|
|
110
126
|
getAttrs: function getAttrs(domNode) {
|
|
127
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
111
128
|
var dom = domNode;
|
|
112
129
|
return {
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
113
131
|
shortName: dom.getAttribute('data-emoji-short-name') || emoji.attrs.shortName.default,
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
114
133
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
115
135
|
text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
116
136
|
localId: uuid.generate()
|
|
117
137
|
};
|
|
@@ -12,6 +12,7 @@ import { extension as extensionFactory } from '../../next-schema/generated/nodeT
|
|
|
12
12
|
export var 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: function getAttrs(domNode) {
|
|
16
17
|
return getExtensionAttrs(domNode);
|
|
17
18
|
}
|
|
@@ -19,10 +19,11 @@ import { heading as headingFactory } from '../../next-schema/generated/nodeTypes
|
|
|
19
19
|
|
|
20
20
|
var getAttrs = function getAttrs(level) {
|
|
21
21
|
return function (domNode) {
|
|
22
|
-
var _heading$attrs, _heading$attrs$localI;
|
|
23
22
|
return {
|
|
24
23
|
level: level,
|
|
25
|
-
localId:
|
|
24
|
+
localId:
|
|
25
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
|
+
domNode.getAttribute('data-local-id') || null
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
};
|
|
@@ -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 var 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: function getAttrs(domNode) {
|
|
16
17
|
return getExtensionAttrs(domNode, true);
|
|
17
18
|
}
|
|
@@ -13,6 +13,7 @@ export var layoutColumn = layoutColumnFactory({
|
|
|
13
13
|
}, {
|
|
14
14
|
tag: 'div[data-layout-column]',
|
|
15
15
|
getAttrs: function getAttrs(domNode) {
|
|
16
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
16
17
|
var dom = domNode;
|
|
17
18
|
return {
|
|
18
19
|
width: Number(dom.getAttribute('data-column-width')) || undefined
|
|
@@ -45,6 +46,7 @@ export var layoutColumnWithLocalId = layoutColumnFactory({
|
|
|
45
46
|
}, {
|
|
46
47
|
tag: 'div[data-layout-column]',
|
|
47
48
|
getAttrs: function getAttrs(domNode) {
|
|
49
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
48
50
|
var dom = domNode;
|
|
49
51
|
return {
|
|
50
52
|
width: Number(dom.getAttribute('data-column-width')) || undefined,
|
|
@@ -55,9 +57,11 @@ export var layoutColumnWithLocalId = layoutColumnFactory({
|
|
|
55
57
|
toDOM: function toDOM(node) {
|
|
56
58
|
var _node$attrs;
|
|
57
59
|
var attrs = {
|
|
58
|
-
'data-layout-column': 'true'
|
|
59
|
-
'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
|
|
60
|
+
'data-layout-column': 'true'
|
|
60
61
|
};
|
|
62
|
+
if ((node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) !== undefined) {
|
|
63
|
+
attrs['data-local-id'] = node.attrs.localId;
|
|
64
|
+
}
|
|
61
65
|
var width = node.attrs.width;
|
|
62
66
|
if (width) {
|
|
63
67
|
attrs['style'] = "flex-basis: ".concat(width, "%");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { layoutSection as layoutSectionFactory, layoutSectionWithSingleColumnStage0 as layoutSectionWithSingleColumnStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
2
|
-
import { layoutSectionFull as layoutSectionFullFactory } from '../../next-schema/generated/nodeTypes';
|
|
1
|
+
import { layoutSection as layoutSectionFactory, layoutSectionWithSingleColumnStage0 as layoutSectionWithSingleColumnStage0Factory, layoutSectionFull as layoutSectionFullFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
2
|
import { uuid } from '../../utils/uuid';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -6,7 +6,7 @@ import { mediaGroup as mediaGroupFactory } from '../../next-schema/generated/nod
|
|
|
6
6
|
|
|
7
7
|
// Temporary due to an existing issue in validator below:
|
|
8
8
|
// https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-1429
|
|
9
|
-
// TODO: Remove border and link marks from white list
|
|
9
|
+
// TODO: ED-29537 - Remove border and link marks from white list
|
|
10
10
|
export var mediaGroup = mediaGroupFactory({
|
|
11
11
|
parseDOM: [{
|
|
12
12
|
tag: 'div[data-node-type="mediaGroup"]'
|
|
@@ -170,6 +170,7 @@ export var mediaSingleFullWithLocalId = mediaSingleSpec({
|
|
|
170
170
|
});
|
|
171
171
|
export var toJSON = function toJSON(node) {
|
|
172
172
|
return {
|
|
173
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
173
174
|
attrs: Object.keys(node.attrs).reduce(function (obj, key) {
|
|
174
175
|
if (node.attrs[key] !== null) {
|
|
175
176
|
obj[key] = node.attrs[key];
|
|
@@ -2,8 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { N30 } from '../../utils/colors';
|
|
5
|
-
import { media as mediaFactory } from '../../next-schema/generated/nodeTypes';
|
|
6
|
-
import { mediaInline as mediaInlineFactory } from '../../next-schema/generated/nodeTypes';
|
|
5
|
+
import { media as mediaFactory, mediaInline as mediaInlineFactory } from '../../next-schema/generated/nodeTypes';
|
|
7
6
|
import { uuid } from '../../utils/uuid';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -11,6 +10,22 @@ import { uuid } from '../../utils/uuid';
|
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
export var defaultAttrs = mediaFactory({}).attrs;
|
|
13
|
+
export var camelCaseToKebabCase = function camelCaseToKebabCase(str) {
|
|
14
|
+
return (
|
|
15
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
16
|
+
str.replace(/((?:[\0-@\[-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)([A-Z])/g, function (_, x, y) {
|
|
17
|
+
return "".concat(x, "-").concat(y.toLowerCase());
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export var copyPrivateAttributes = function copyPrivateAttributes(from, to, attributes, map) {
|
|
22
|
+
var attrs = attributes || {};
|
|
23
|
+
Object.keys(attrs).forEach(function (key) {
|
|
24
|
+
if (key[0] === '_' && key[1] === '_' && from[key]) {
|
|
25
|
+
to[map ? map(key) : key] = from[key];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
};
|
|
14
29
|
export var createMediaSpec = function createMediaSpec(attributes) {
|
|
15
30
|
var inline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
16
31
|
var generateLocalId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -22,7 +37,9 @@ export var createMediaSpec = function createMediaSpec(attributes) {
|
|
|
22
37
|
var attrs = {};
|
|
23
38
|
if (attributes) {
|
|
24
39
|
Object.keys(attributes).forEach(function (k) {
|
|
40
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
25
41
|
var key = camelCaseToKebabCase(k).replace(/^__/, '');
|
|
42
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
43
|
var value = dom.getAttribute("data-".concat(key)) || '';
|
|
27
44
|
if (value) {
|
|
28
45
|
attrs[k] = value;
|
|
@@ -73,7 +90,7 @@ export var createMediaSpec = function createMediaSpec(attributes) {
|
|
|
73
90
|
// rectangle that provides an affordance for media.
|
|
74
91
|
style: "display: inline-block; border-radius: 3px; background: ".concat(N30, "; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);")
|
|
75
92
|
};
|
|
76
|
-
copyPrivateAttributes(node.attrs, attrs, function (key) {
|
|
93
|
+
copyPrivateAttributes(node.attrs, attrs, attributes, function (key) {
|
|
77
94
|
return "data-".concat(camelCaseToKebabCase(key.slice(2)));
|
|
78
95
|
});
|
|
79
96
|
return ["".concat(domNodeType), attrs];
|
|
@@ -91,9 +108,12 @@ export var createMediaSpec = function createMediaSpec(attributes) {
|
|
|
91
108
|
// https://product-fabric.atlassian.net/browse/EDM-2996
|
|
92
109
|
tag: 'img:not(.smart-link-icon)',
|
|
93
110
|
getAttrs: function getAttrs(dom) {
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
112
|
var attrs = {
|
|
95
113
|
type: 'external',
|
|
114
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
96
115
|
url: dom.getAttribute('src') || '',
|
|
116
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
97
117
|
alt: dom.getAttribute('alt') || ''
|
|
98
118
|
};
|
|
99
119
|
if (generateLocalId) {
|
|
@@ -111,20 +131,6 @@ export var mediaWithLocalId = createMediaSpec(_objectSpread(_objectSpread({}, de
|
|
|
111
131
|
default: uuid.generate()
|
|
112
132
|
}
|
|
113
133
|
}), false, true);
|
|
114
|
-
export var camelCaseToKebabCase = function camelCaseToKebabCase(str) {
|
|
115
|
-
return str.replace(/([^A-Z]+)([A-Z])/g, function (_, x, y) {
|
|
116
|
-
return "".concat(x, "-").concat(y.toLowerCase());
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
export var copyPrivateAttributes = function copyPrivateAttributes(from, to, map) {
|
|
120
|
-
if (media.attrs) {
|
|
121
|
-
Object.keys(media.attrs).forEach(function (key) {
|
|
122
|
-
if (key[0] === '_' && key[1] === '_' && from[key]) {
|
|
123
|
-
to[map ? map(key) : key] = from[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
134
|
|
|
129
135
|
/**
|
|
130
136
|
* There's no concept of optional property in ProseMirror. It sets value as `null`
|
|
@@ -138,7 +144,9 @@ export var toJSON = function toJSON(node) {
|
|
|
138
144
|
// Strip private attributes e.g. __fileName, __fileSize, __fileMimeType, etc.
|
|
139
145
|
.filter(function (key) {
|
|
140
146
|
return !(key[0] === '_' && key[1] === '_');
|
|
141
|
-
})
|
|
147
|
+
})
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
149
|
+
.reduce(function (obj, key) {
|
|
142
150
|
if (node.attrs.type === 'external' && externalOnlyAttributes.indexOf(key) === -1) {
|
|
143
151
|
return obj;
|
|
144
152
|
}
|
|
@@ -18,10 +18,14 @@ export var mention = mentionFactory({
|
|
|
18
18
|
parseDOM: [{
|
|
19
19
|
tag: 'span[data-mention-id]',
|
|
20
20
|
getAttrs: function getAttrs(domNode) {
|
|
21
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
21
22
|
var dom = domNode;
|
|
22
23
|
var attrs = {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
25
|
id: dom.getAttribute('data-mention-id') || mention.attrs.id.default,
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
27
|
text: dom.textContent || mention.attrs.text.default,
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
25
29
|
accessLevel: dom.getAttribute('data-access-level') || mention.attrs.accessLevel.default,
|
|
26
30
|
localId: uuid.generate()
|
|
27
31
|
};
|
|
@@ -39,6 +43,7 @@ export var mention = mentionFactory({
|
|
|
39
43
|
text = _node$attrs.text,
|
|
40
44
|
userType = _node$attrs.userType,
|
|
41
45
|
localId = _node$attrs.localId;
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
47
|
var attrs = {
|
|
43
48
|
'data-mention-id': id,
|
|
44
49
|
'data-access-level': accessLevel,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getExtensionAttrs } from '../../utils/extensions';
|
|
2
|
-
import { multiBodiedExtensionStage0 as multiBodiedExtensionStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
-
import { extensionFrameStage0 as extensionFrameStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
2
|
+
import { multiBodiedExtensionStage0 as multiBodiedExtensionStage0Factory, extensionFrameStage0 as extensionFrameStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* @stage 0
|
|
@@ -20,6 +20,7 @@ import { uuid } from '../../utils/uuid';
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
function getExpandAttrs(domNode, generateLocalId) {
|
|
23
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
23
24
|
var dom = domNode;
|
|
24
25
|
return {
|
|
25
26
|
title: dom.getAttribute('data-title'),
|
|
@@ -64,7 +65,7 @@ var nestedExpandFactoryOptions = {
|
|
|
64
65
|
*/
|
|
65
66
|
export var nestedExpand = nestedExpandFactory(nestedExpandFactoryOptions);
|
|
66
67
|
export var nestedExpandWithLocalId = nestedExpandFactory(_objectSpread(_objectSpread({}, nestedExpandFactoryOptions), {}, {
|
|
67
|
-
parseDOM: [].concat(_toConsumableArray(nestedExpandFactoryOptions.parseDOM), [{
|
|
68
|
+
parseDOM: [].concat(_toConsumableArray(nestedExpandFactoryOptions.parseDOM || []), [{
|
|
68
69
|
context: 'nestedExpand//',
|
|
69
70
|
tag: '[data-node-type="nestedExpand"]',
|
|
70
71
|
getAttrs: function getAttrs(domNode) {
|
|
@@ -34,6 +34,7 @@ export var orderedListWithLocalId = orderedListFactory({
|
|
|
34
34
|
// resolve "start" to a safe, 0+ integer, otherwise return undefined
|
|
35
35
|
// Note: Any changes to this function should also be made to "resolveOrder"
|
|
36
36
|
// in packages/editor/editor-common/src/utils/list.ts
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
38
|
var resolveStart = function resolveStart(start) {
|
|
38
39
|
var num = Number(start);
|
|
39
40
|
if (Number.isNaN(num)) {
|
|
@@ -48,6 +49,7 @@ export var orderedListWithOrder = orderedListFactory({
|
|
|
48
49
|
parseDOM: [{
|
|
49
50
|
tag: 'ol',
|
|
50
51
|
getAttrs: function getAttrs(domNode) {
|
|
52
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
51
53
|
var dom = domNode;
|
|
52
54
|
var startDOMAttr = dom.getAttribute('start');
|
|
53
55
|
if (startDOMAttr) {
|
|
@@ -75,6 +77,7 @@ export var orderedListWithOrderAndLocalId = orderedListFactory({
|
|
|
75
77
|
parseDOM: [{
|
|
76
78
|
tag: 'ol',
|
|
77
79
|
getAttrs: function getAttrs(domNode) {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
78
81
|
var dom = domNode;
|
|
79
82
|
var startDOMAttr = dom.getAttribute('start');
|
|
80
83
|
var localId = uuid.generate();
|
|
@@ -18,6 +18,7 @@ export var PanelType = /*#__PURE__*/function (PanelType) {
|
|
|
18
18
|
* @name panel_node
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
22
|
var getDomAttrs = function getDomAttrs(nodeAttrs) {
|
|
22
23
|
var attrs = {
|
|
23
24
|
'data-panel-type': nodeAttrs.panelType,
|
|
@@ -31,6 +32,7 @@ var getDomAttrs = function getDomAttrs(nodeAttrs) {
|
|
|
31
32
|
};
|
|
32
33
|
var getParseDOMAttrs = function getParseDOMAttrs(allowCustomPanel, dom, generateLocalId) {
|
|
33
34
|
var parseDOMAttrs = {
|
|
35
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
34
36
|
panelType: dom.getAttribute('data-panel-type')
|
|
35
37
|
};
|
|
36
38
|
if (generateLocalId) {
|
|
@@ -38,9 +40,13 @@ var getParseDOMAttrs = function getParseDOMAttrs(allowCustomPanel, dom, generate
|
|
|
38
40
|
}
|
|
39
41
|
if (allowCustomPanel) {
|
|
40
42
|
parseDOMAttrs = _objectSpread(_objectSpread({}, parseDOMAttrs), {}, {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
41
44
|
panelIcon: dom.getAttribute('data-panel-icon'),
|
|
45
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
42
46
|
panelIconId: dom.getAttribute('data-panel-icon-id'),
|
|
47
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
43
48
|
panelIconText: dom.getAttribute('data-panel-icon-text'),
|
|
49
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
44
50
|
panelColor: dom.getAttribute('data-panel-color')
|
|
45
51
|
});
|
|
46
52
|
} else {
|
|
@@ -30,6 +30,7 @@ export var paragraph = paragraphFactory({
|
|
|
30
30
|
tag: 'p',
|
|
31
31
|
getAttrs: function getAttrs(domNode) {
|
|
32
32
|
var _paragraph$attrs, _paragraph$attrs$loca;
|
|
33
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
33
34
|
var dom = domNode;
|
|
34
35
|
var attrs = {
|
|
35
36
|
localId: dom.getAttribute('data-local-id') || ((_paragraph$attrs = paragraph.attrs) === null || _paragraph$attrs === void 0 ? void 0 : (_paragraph$attrs$loca = _paragraph$attrs.localId) === null || _paragraph$attrs$loca === void 0 ? void 0 : _paragraph$attrs$loca.default)
|
|
@@ -10,7 +10,9 @@ export var placeholder = placeholderFactory({
|
|
|
10
10
|
tag: 'span[data-placeholder]',
|
|
11
11
|
getAttrs: function getAttrs(dom) {
|
|
12
12
|
return {
|
|
13
|
-
text:
|
|
13
|
+
text:
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
15
|
+
dom.getAttribute('data-placeholder') || placeholder.attrs.text.default
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
}],
|
|
@@ -29,7 +31,9 @@ export var placeholderWithLocalId = placeholderFactory({
|
|
|
29
31
|
tag: 'span[data-placeholder]',
|
|
30
32
|
getAttrs: function getAttrs(dom) {
|
|
31
33
|
return {
|
|
32
|
-
text:
|
|
34
|
+
text:
|
|
35
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
36
|
+
dom.getAttribute('data-placeholder') || placeholder.attrs.text.default,
|
|
33
37
|
localId: uuid.generate()
|
|
34
38
|
};
|
|
35
39
|
}
|
|
@@ -9,8 +9,11 @@ export var status = statusFactory({
|
|
|
9
9
|
parseDOM: [{
|
|
10
10
|
tag: 'span[data-node-type="status"]',
|
|
11
11
|
getAttrs: function getAttrs(domNode) {
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
12
13
|
var dom = domNode;
|
|
13
14
|
return {
|
|
15
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
14
17
|
text: dom.textContent.replace(/\n/, '').trim(),
|
|
15
18
|
color: dom.getAttribute('data-color'),
|
|
16
19
|
localId: uuid.generate(),
|
|
@@ -11,6 +11,7 @@ export var syncBlock = syncBlockFactory({
|
|
|
11
11
|
parseDOM: [{
|
|
12
12
|
tag: 'div[data-sync-block]',
|
|
13
13
|
getAttrs: function getAttrs(domNode) {
|
|
14
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
14
15
|
var dom = domNode;
|
|
15
16
|
var attrs = {
|
|
16
17
|
localId: dom.getAttribute('data-local-id') || uuid.generate(),
|