@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
|
@@ -16,6 +16,7 @@ var syncBlock = exports.syncBlock = (0, _nodeTypes.syncBlock)({
|
|
|
16
16
|
parseDOM: [{
|
|
17
17
|
tag: 'div[data-sync-block]',
|
|
18
18
|
getAttrs: function getAttrs(domNode) {
|
|
19
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
19
20
|
var dom = domNode;
|
|
20
21
|
var attrs = {
|
|
21
22
|
localId: dom.getAttribute('data-local-id') || _utils.uuid.generate(),
|
|
@@ -23,7 +23,9 @@ var DEFAULT_TABLE_HEADER_CELL_BACKGROUND = _colors.N20.toLocaleLowerCase();
|
|
|
23
23
|
var getCellAttrs = exports.getCellAttrs = function getCellAttrs(dom) {
|
|
24
24
|
var defaultValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
25
25
|
var widthAttr = dom.getAttribute('data-colwidth');
|
|
26
|
-
var width =
|
|
26
|
+
var width =
|
|
27
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
28
|
+
widthAttr && /^[0-9]+(,[0-9]+)*$/.test(widthAttr) ? widthAttr.split(',').map(function (str) {
|
|
27
29
|
return Number(str);
|
|
28
30
|
}) : null;
|
|
29
31
|
var colspan = Number(dom.getAttribute('colspan') || 1);
|
|
@@ -84,7 +86,9 @@ var getGlobalTheme = function getGlobalTheme() {
|
|
|
84
86
|
colorMode: colorMode
|
|
85
87
|
};
|
|
86
88
|
};
|
|
87
|
-
|
|
89
|
+
|
|
90
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
91
|
+
var cssVariablePattern = /^var\(--(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*\)$/;
|
|
88
92
|
|
|
89
93
|
/**
|
|
90
94
|
* gets cell dom attributes based on node attributes
|
|
@@ -227,13 +231,14 @@ var tableNodeSpecOptions = {
|
|
|
227
231
|
tag: 'table',
|
|
228
232
|
getAttrs: function getAttrs(node) {
|
|
229
233
|
var _dom$parentElement;
|
|
234
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
230
235
|
var dom = node;
|
|
231
236
|
var breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
|
|
232
237
|
return {
|
|
233
238
|
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
|
|
234
239
|
layout:
|
|
235
240
|
// copying from editor
|
|
236
|
-
dom.getAttribute('data-layout') || (// copying from renderer
|
|
241
|
+
dom.getAttribute('data-layout') || ( // copying from renderer
|
|
237
242
|
breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
|
|
238
243
|
__autoSize: dom.getAttribute('data-autosize') === 'true',
|
|
239
244
|
localId: dom.getAttribute('data-table-local-id') || _uuid.uuid.generate(),
|
|
@@ -254,14 +259,15 @@ var tableNodeSpecOptions = {
|
|
|
254
259
|
return ['table', attrs, ['tbody', 0]];
|
|
255
260
|
}
|
|
256
261
|
};
|
|
257
|
-
// TODO: Fix any, potential issue.
|
|
262
|
+
// TODO: ED-5048 - Fix any, potential issue.
|
|
258
263
|
var createTableSpec = function createTableSpec() {
|
|
259
264
|
return (0, _nodeTypes.table)(tableNodeSpecOptions);
|
|
260
265
|
};
|
|
261
266
|
|
|
262
|
-
// TODO: assuming breaking changes aren't allowed, so retaining both exports
|
|
267
|
+
// TODO: ED-29537 - assuming breaking changes aren't allowed, so retaining both exports
|
|
263
268
|
/** Includes table width attribute */
|
|
264
269
|
var table = exports.table = createTableSpec();
|
|
270
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
265
271
|
/** @deprecated Do not use, instead use the regular `table` export */
|
|
266
272
|
var tableWithCustomWidth = exports.tableWithCustomWidth = createTableSpec();
|
|
267
273
|
var tableStage0 = exports.tableStage0 = createTableSpec();
|
|
@@ -312,6 +318,7 @@ var tableCellNodeSpecOptions = {
|
|
|
312
318
|
ignore: true
|
|
313
319
|
}, {
|
|
314
320
|
tag: 'td',
|
|
321
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
315
322
|
getAttrs: function getAttrs(dom) {
|
|
316
323
|
return getCellAttrs(dom);
|
|
317
324
|
}
|
|
@@ -323,6 +330,7 @@ var tableCellNodeSpecOptions = {
|
|
|
323
330
|
var tableCell = exports.tableCell = (0, _nodeTypes.tableCell)(tableCellNodeSpecOptions);
|
|
324
331
|
var toJSONTableCell = exports.toJSONTableCell = function toJSONTableCell(node) {
|
|
325
332
|
return {
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
326
334
|
attrs: Object.keys(node.attrs).reduce(function (obj, key) {
|
|
327
335
|
// Only process keys that are defined in cellAttrs
|
|
328
336
|
if (cellAttrs[key] && cellAttrs[key].default !== node.attrs[key]) {
|
|
@@ -336,9 +344,12 @@ var tableHeaderNodeSpecOptions = {
|
|
|
336
344
|
parseDOM: [{
|
|
337
345
|
tag: 'th',
|
|
338
346
|
getAttrs: function getAttrs(dom) {
|
|
339
|
-
return
|
|
340
|
-
|
|
341
|
-
|
|
347
|
+
return (
|
|
348
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
349
|
+
getCellAttrs(dom, {
|
|
350
|
+
background: DEFAULT_TABLE_HEADER_CELL_BACKGROUND
|
|
351
|
+
})
|
|
352
|
+
);
|
|
342
353
|
}
|
|
343
354
|
}],
|
|
344
355
|
toDOM: function toDOM(node) {
|
|
@@ -375,9 +386,12 @@ var tableCellNodeSpecOptionsWithLocalId = {
|
|
|
375
386
|
parseDOM: [{
|
|
376
387
|
tag: 'td',
|
|
377
388
|
getAttrs: function getAttrs(dom) {
|
|
378
|
-
return
|
|
379
|
-
|
|
380
|
-
|
|
389
|
+
return (
|
|
390
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
391
|
+
getCellAttrs(dom, {
|
|
392
|
+
localId: _uuid.uuid.generate()
|
|
393
|
+
})
|
|
394
|
+
);
|
|
381
395
|
}
|
|
382
396
|
}],
|
|
383
397
|
toDOM: function toDOM(node) {
|
|
@@ -389,10 +403,13 @@ var tableHeaderNodeSpecOptionsWithLocalId = {
|
|
|
389
403
|
parseDOM: [{
|
|
390
404
|
tag: 'th',
|
|
391
405
|
getAttrs: function getAttrs(dom) {
|
|
392
|
-
return
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
406
|
+
return (
|
|
407
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
408
|
+
getCellAttrs(dom, {
|
|
409
|
+
background: DEFAULT_TABLE_HEADER_CELL_BACKGROUND,
|
|
410
|
+
localId: _uuid.uuid.generate()
|
|
411
|
+
})
|
|
412
|
+
);
|
|
396
413
|
}
|
|
397
414
|
}],
|
|
398
415
|
toDOM: function toDOM(node) {
|
|
@@ -23,6 +23,7 @@ var taskItem = exports.taskItem = (0, _nodeTypes.taskItem)({
|
|
|
23
23
|
getAttrs: function getAttrs(dom) {
|
|
24
24
|
return {
|
|
25
25
|
localId: _uuid.uuid.generate(),
|
|
26
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
27
|
state: dom.getAttribute('data-task-state') || 'TODO'
|
|
27
28
|
};
|
|
28
29
|
}
|
|
@@ -47,6 +48,7 @@ var blockTaskItem = exports.blockTaskItem = (0, _nodeTypes.blockTaskItem)({
|
|
|
47
48
|
getAttrs: function getAttrs(dom) {
|
|
48
49
|
return {
|
|
49
50
|
localId: _uuid.uuid.generate(),
|
|
51
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
50
52
|
state: dom.getAttribute('data-task-state') || 'TODO'
|
|
51
53
|
};
|
|
52
54
|
}
|
|
@@ -10,6 +10,7 @@ var unsupportedBlock = exports.unsupportedBlock = (0, _nodeTypes.unsupportedBloc
|
|
|
10
10
|
tag: '[data-node-type="unsupportedBlock"]',
|
|
11
11
|
getAttrs: function getAttrs(dom) {
|
|
12
12
|
return {
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
originalValue: JSON.parse(dom.getAttribute('data-original-value') || '{}')
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -10,6 +10,7 @@ var unsupportedInline = exports.unsupportedInline = (0, _nodeTypes.unsupportedIn
|
|
|
10
10
|
tag: '[data-node-type="unsupportedInline"]',
|
|
11
11
|
getAttrs: function getAttrs(dom) {
|
|
12
12
|
return {
|
|
13
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
originalValue: JSON.parse(dom.getAttribute('data-original-value') || '{}')
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -25,7 +25,8 @@ function sanitizeNodes(nodes, supportedMarks) {
|
|
|
25
25
|
return nodes;
|
|
26
26
|
}
|
|
27
27
|
function sanitizeNodeSpecContent(nodes, rawContent) {
|
|
28
|
-
|
|
28
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
29
|
+
var content = rawContent.replace(/(?:[\0-\/:-@\[-\^`\{-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, ' ');
|
|
29
30
|
var contentKeys = content.split(' ');
|
|
30
31
|
var unsupportedContentKeys = contentKeys.filter(function (contentKey) {
|
|
31
32
|
return !isContentSupported(nodes, contentKey);
|
|
@@ -38,11 +39,13 @@ function sanitizedContent(content, invalidContent) {
|
|
|
38
39
|
if (!invalidContent.length) {
|
|
39
40
|
return content || '';
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
|
|
43
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
44
|
+
if (!content || !content.match(/[0-9A-Z_a-z]/)) {
|
|
42
45
|
return '';
|
|
43
46
|
}
|
|
44
47
|
var pattern = "(".concat(invalidContent, "((\\s)*\\|)+)|((\\|(\\s)*)+").concat(invalidContent, "(\\+|\\*)?)|(").concat(invalidContent, "$)|(").concat(invalidContent, "(\\+|\\*))");
|
|
45
|
-
return content.replace(new RegExp(pattern, '
|
|
48
|
+
return content.replace(new RegExp(pattern, 'gu'), '').replace(' ', ' ').trim();
|
|
46
49
|
}
|
|
47
50
|
function isContentSupported(nodes, contentKey) {
|
|
48
51
|
var nodeKeys = Object.keys(nodes);
|
|
@@ -54,9 +57,11 @@ function isContentSupported(nodes, contentKey) {
|
|
|
54
57
|
|
|
55
58
|
// content is with valid group
|
|
56
59
|
for (var supportedKey in nodes) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
if (nodes.hasOwnProperty(supportedKey)) {
|
|
61
|
+
var nodeSpec = nodes[supportedKey];
|
|
62
|
+
if (nodeSpec && nodeSpec.group === contentKey) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
}
|
|
62
67
|
return false;
|
|
@@ -12,8 +12,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
|
+
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
17
17
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
19
|
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; }
|
package/dist/cjs/utils/colors.js
CHANGED
|
@@ -15,6 +15,9 @@ exports.rgbToHex = rgbToHex;
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var namedColors = _interopRequireWildcard(require("css-color-names"));
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
// eslint-disable-next-line import/no-namespace
|
|
20
|
+
|
|
18
21
|
/**
|
|
19
22
|
* We're avoding importing these colors from @atlaskit/theme since we
|
|
20
23
|
* do not want to have react as a dependency of this package.
|
|
@@ -79,7 +82,7 @@ var T300 = exports.T300 = '#00B8D9';
|
|
|
79
82
|
var T500 = exports.T500 = '#008DA6';
|
|
80
83
|
|
|
81
84
|
/**
|
|
82
|
-
* @
|
|
85
|
+
* @returns String with HEX-coded color.
|
|
83
86
|
*/
|
|
84
87
|
function normalizeHexColor(color, defaultColor) {
|
|
85
88
|
if (!color) {
|
|
@@ -101,9 +104,16 @@ function normalizeHexColor(color, defaultColor) {
|
|
|
101
104
|
// http://dev.w3.org/csswg/css-color/#named-colors
|
|
102
105
|
if (color === 'default') {
|
|
103
106
|
return null;
|
|
104
|
-
} else if (
|
|
107
|
+
} else if (
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
109
|
+
namedColors.default &&
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
|
+
namedColors.default[color]) {
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
105
113
|
color = namedColors.default[color];
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
106
115
|
} else if (namedColors && namedColors[color]) {
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
117
|
color = namedColors[color];
|
|
108
118
|
} else {
|
|
109
119
|
return null;
|
|
@@ -130,7 +140,6 @@ function hexToRgb(color) {
|
|
|
130
140
|
colorBits = [colorBits[0], colorBits[0], colorBits[1], colorBits[1], colorBits[2], colorBits[2]];
|
|
131
141
|
}
|
|
132
142
|
var rgb = Number("0x".concat(colorBits.join('')));
|
|
133
|
-
// eslint-disable-next-line no-bitwise
|
|
134
143
|
return "rgb(".concat(rgb >> 16 & 255, ",").concat(rgb >> 8 & 255, ",").concat(rgb & 255, ")");
|
|
135
144
|
}
|
|
136
145
|
|
|
@@ -145,28 +154,32 @@ function hexToRgba(rawColor, alpha) {
|
|
|
145
154
|
return null;
|
|
146
155
|
}
|
|
147
156
|
var hex2rgb = function hex2rgb(color) {
|
|
148
|
-
|
|
157
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
159
|
+
return color.match(/[0-9a-z\u017F\u212A]{2}/gi).map(function (hex) {
|
|
149
160
|
return parseInt(hex, 16);
|
|
150
161
|
});
|
|
151
162
|
};
|
|
152
163
|
return "rgba(".concat(hex2rgb(color).concat(alpha).join(','), ")");
|
|
153
164
|
}
|
|
154
165
|
function rgbToHex(value) {
|
|
155
|
-
|
|
166
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
167
|
+
var matches = value.match(/(0?\.?[0-9]{1,3})%?\b/g);
|
|
156
168
|
if (matches && matches.length >= 3) {
|
|
157
169
|
var _matches$map = matches.map(Number),
|
|
158
170
|
_matches$map2 = (0, _slicedToArray2.default)(_matches$map, 3),
|
|
159
171
|
red = _matches$map2[0],
|
|
160
172
|
green = _matches$map2[1],
|
|
161
173
|
blue = _matches$map2[2];
|
|
162
|
-
return '#' + (blue | green << 8 | red << 16 | 1 << 24).toString(16).slice(1)
|
|
163
|
-
;
|
|
174
|
+
return '#' + (blue | green << 8 | red << 16 | 1 << 24).toString(16).slice(1);
|
|
164
175
|
}
|
|
165
176
|
return null;
|
|
166
177
|
}
|
|
167
178
|
function isRgb(color) {
|
|
179
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
168
180
|
return /rgba?\(/.test(color);
|
|
169
181
|
}
|
|
170
182
|
function isHex(color) {
|
|
171
|
-
|
|
183
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
184
|
+
return /^#([0-9A-Fa-f]{3}){1,2}$/.test(color);
|
|
172
185
|
}
|
|
@@ -11,6 +11,8 @@ exports.hexToEditorTextBackgroundPaletteColor = hexToEditorTextBackgroundPalette
|
|
|
11
11
|
exports.hexToEditorTextPaletteColor = hexToEditorTextPaletteColor;
|
|
12
12
|
exports.textBackgroundColorPalette = void 0;
|
|
13
13
|
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
|
+
// @ts-ignore TS2307: Cannot find module '@atlaskit/feature-gate-js-client' or its corresponding type declarations.
|
|
15
|
+
|
|
14
16
|
/**
|
|
15
17
|
* This takes an adf hex color and returns a matching border palette color.
|
|
16
18
|
*
|
|
@@ -31,6 +33,7 @@ var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gat
|
|
|
31
33
|
function hexToEditorBorderPaletteColor(hexColor) {
|
|
32
34
|
// Ts ignore was used to allow use of conditional return type
|
|
33
35
|
// (preferencing better type on consumption over safety in implementation)
|
|
36
|
+
// @ts-expect-error
|
|
34
37
|
return hexColor ? editorBorderPalette[hexColor.toUpperCase()] : undefined;
|
|
35
38
|
}
|
|
36
39
|
var editorBorderPalette = exports.editorBorderPalette = {
|
|
@@ -62,6 +65,7 @@ var editorBorderPalette = exports.editorBorderPalette = {
|
|
|
62
65
|
function hexToEditorTextPaletteColor(hexColor) {
|
|
63
66
|
// Ts ignore was used to allow use of conditional return type
|
|
64
67
|
// (preferencing better type on consumption over safety in implementation)
|
|
68
|
+
// @ts-expect-error
|
|
65
69
|
return hexColor ? editorTextPalette[hexColor.toUpperCase()] : undefined;
|
|
66
70
|
}
|
|
67
71
|
var editorTextPalette = exports.editorTextPalette = {
|
|
@@ -133,6 +137,7 @@ function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
|
|
133
137
|
|
|
134
138
|
// Ts ignore was used to allow use of conditional return type
|
|
135
139
|
// (preferring better type on consumption over safety in implementation)
|
|
140
|
+
// @ts-expect-error
|
|
136
141
|
return hexColor ? textBackgroundColorPalette[hexColor.toUpperCase()] : undefined;
|
|
137
142
|
}
|
|
138
143
|
var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
@@ -167,7 +172,9 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = {
|
|
|
167
172
|
function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
|
168
173
|
// Ts ignore was used to allow use of conditional return type
|
|
169
174
|
// (preferencing better type on consumption over safety in implementation)
|
|
175
|
+
// @ts-ignore
|
|
170
176
|
var tokenData = hexColor ? editorBackgroundPalette[hexColor.toUpperCase()] : undefined;
|
|
177
|
+
// @ts-expect-error
|
|
171
178
|
return tokenData ? tokenData.getValue(hexColor) : undefined;
|
|
172
179
|
}
|
|
173
180
|
/**
|
|
@@ -14,13 +14,17 @@ var clamp = function clamp(i, min, max) {
|
|
|
14
14
|
return Math.round(Math.min(Math.max(i, min), max));
|
|
15
15
|
};
|
|
16
16
|
var expandShorthandHex = function expandShorthandHex(input) {
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
return (
|
|
18
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
19
|
+
input.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i, function (m, r, g, b) {
|
|
20
|
+
return r + r + g + g + b + b;
|
|
21
|
+
})
|
|
22
|
+
);
|
|
20
23
|
};
|
|
21
24
|
var rgbFromHex = function rgbFromHex(input) {
|
|
22
25
|
var fullHex = expandShorthandHex(input);
|
|
23
|
-
|
|
26
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
27
|
+
var result = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(fullHex);
|
|
24
28
|
return result === null ? null : {
|
|
25
29
|
r: parseInt(result[1], 16),
|
|
26
30
|
g: parseInt(result[2], 16),
|
|
@@ -69,7 +73,9 @@ var labToLch = function labToLch(_ref3) {
|
|
|
69
73
|
b = _ref3.b;
|
|
70
74
|
var h = (Math.atan2(b, a) * (180 / Math.PI) + 360) % 360;
|
|
71
75
|
var c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
|
|
72
|
-
if (Math.round(c * 10000) === 0)
|
|
76
|
+
if (Math.round(c * 10000) === 0) {
|
|
77
|
+
h = Number.NaN;
|
|
78
|
+
}
|
|
73
79
|
return {
|
|
74
80
|
l: l,
|
|
75
81
|
c: c,
|
package/dist/cjs/utils/url.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.isRootRelative = isRootRelative;
|
|
|
10
10
|
exports.linkifyMatch = exports.linkify = exports.isSafeUrl = void 0;
|
|
11
11
|
exports.normalizeUrl = normalizeUrl;
|
|
12
12
|
var _linkifyIt = _interopRequireDefault(require("linkify-it"));
|
|
13
|
+
// @ts-nocheck
|
|
13
14
|
/**
|
|
14
15
|
* This file has been partially duplicated in packages/linking-platform/linking-common/src/url.ts
|
|
15
16
|
* Any changes made here should be mirrored there.
|
|
@@ -17,11 +18,11 @@ var _linkifyIt = _interopRequireDefault(require("linkify-it"));
|
|
|
17
18
|
* Ticket for fixing linkification of filename-like urls: https://product-fabric.atlassian.net/browse/EDM-7190
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
|
-
var whitelistedURLPatterns = [/^
|
|
21
|
+
var whitelistedURLPatterns = [/^http[s\u017F]?:\/\//im, /^ftp[s\u017F]?:\/\//im, /^gopher:\/\//im, /^integrity:\/\//im, /^file:\/\//im, /^[s\u017F]mb:\/\//im, /^dynamic[s\u017F]nav:\/\//im, /^jamf[s\u017F]elf[s\u017F]ervice:\/\//im, /^\//im, /^mailto:/im, /^[s\u017F][k\u212A]ype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^new[s\u017F]:/im, /^nntp:/im, /^feed:/im, /^cv[s\u017F]:/im, /^[s\u017F]vn:/im, /^mvn:/im, /^[s\u017F][s\u017F]h:/im, /^[s\u017F]cp:\/\//im, /^[s\u017F]ftp:\/\//im, /^itm[s\u017F]:/im,
|
|
21
22
|
// This is not a valid notes link, but we support this pattern for backwards compatibility
|
|
22
|
-
/^
|
|
23
|
+
/^note[s\u017F]:/im, /^note[s\u017F]:\/\//im, /^hipchat:\/\//im,
|
|
23
24
|
// This is not a valid sourcetree link, but we support this pattern for backwards compatibility
|
|
24
|
-
/^
|
|
25
|
+
/^[s\u017F]ourcetree:/im, /^[s\u017F]ourcetree:\/\//im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^what[s\u017F]app:/im, /^[s\u017F]lac[k\u212A]:/im, /^[s\u017F]ip[s\u017F]?:/im, /^magnet:/im, /^#/im];
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
|
|
@@ -39,7 +40,7 @@ var linkify = exports.linkify = (0, _linkifyIt.default)();
|
|
|
39
40
|
linkify.add('sourcetree:', 'http:');
|
|
40
41
|
linkify.add('jamfselfservice:', 'http:');
|
|
41
42
|
var urlWithoutSpacesValidator = {
|
|
42
|
-
validate: /[^\
|
|
43
|
+
validate: /(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
// `tel:` URI spec is https://datatracker.ietf.org/doc/html/rfc3966
|
|
@@ -56,7 +57,7 @@ linkify.tlds(tlds, false);
|
|
|
56
57
|
|
|
57
58
|
// linkify-it mishandles closing braces on long urls, so we preference using our own regex first:
|
|
58
59
|
// https://product-fabric.atlassian.net/browse/ED-13669
|
|
59
|
-
var LINK_REGEXP = exports.LINK_REGEXP = /(https?|ftp|jamfselfservice|gopher|dynamicsnav|integrity|file|smb):\/\/[^\
|
|
60
|
+
var LINK_REGEXP = exports.LINK_REGEXP = /(https?|ftp|jamfselfservice|gopher|dynamicsnav|integrity|file|smb):\/\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/;
|
|
60
61
|
|
|
61
62
|
/** Attempt to find a link match using a regex string defining a URL */
|
|
62
63
|
var linkifyMatch = exports.linkifyMatch = function linkifyMatch(text) {
|
|
@@ -66,7 +67,8 @@ var linkifyMatch = exports.linkifyMatch = function linkifyMatch(text) {
|
|
|
66
67
|
var matches = [];
|
|
67
68
|
var startpos = 0;
|
|
68
69
|
var substr;
|
|
69
|
-
|
|
70
|
+
substr = text.substr(startpos);
|
|
71
|
+
while (substr) {
|
|
70
72
|
var link = (substr.match(LINK_REGEXP) || [''])[0];
|
|
71
73
|
if (link) {
|
|
72
74
|
var index = substr.search(LINK_REGEXP);
|
|
@@ -81,6 +83,7 @@ var linkifyMatch = exports.linkifyMatch = function linkifyMatch(text) {
|
|
|
81
83
|
schema: ''
|
|
82
84
|
});
|
|
83
85
|
startpos += end;
|
|
86
|
+
substr = text.substr(startpos);
|
|
84
87
|
} else {
|
|
85
88
|
break;
|
|
86
89
|
}
|
package/dist/cjs/utils/uuid.js
CHANGED
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.uuid = exports.generateUuid = void 0;
|
|
7
|
-
/* eslint-disable no-bitwise */
|
|
8
7
|
var generateUuid = exports.generateUuid = function generateUuid() {
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
return (
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
11
|
+
var r = Math.random() * 16 | 0;
|
|
12
|
+
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
13
|
+
})
|
|
14
|
+
);
|
|
13
15
|
};
|
|
14
|
-
|
|
15
|
-
/* eslint-enable no-bitwise */
|
|
16
16
|
var staticValue = false;
|
|
17
17
|
var uuid = exports.uuid = {
|
|
18
18
|
setStatic: function setStatic(value) {
|
|
@@ -258,7 +258,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = {
|
|
|
258
258
|
},
|
|
259
259
|
content: {
|
|
260
260
|
type: 'array',
|
|
261
|
-
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
|
|
261
|
+
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'layoutSection_with_single_column', 'layoutSection_full', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
|
|
262
262
|
minItems: 1,
|
|
263
263
|
allowUnsupportedBlock: true
|
|
264
264
|
},
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
|
+
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
2
5
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
3
6
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
|
|
4
7
|
|
|
@@ -17,7 +17,7 @@ import { taskList } from '../nodes/task';
|
|
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
18
|
|
|
19
19
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
|
20
|
-
// TODO: make it an actual group
|
|
20
|
+
// TODO: ED-29537 - make it an actual group
|
|
21
21
|
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), decisionList, taskList, table,
|
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
23
|
table.use('with_nested_table'), blockCard, embedCard, extension.use('with_marks'), unsupportedBlock];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
|
2
|
-
import { adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
|
1
|
+
import { adfMark, adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
|
3
2
|
|
|
4
3
|
// These marks defined together because they form a cycle within the excludes.
|
|
5
4
|
export const alignment = adfMark('alignment');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { adfMark } from '@atlaskit/adf-schema-generator';
|
|
2
|
-
import { adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
|
1
|
+
import { adfMark, adfMarkGroup } from '@atlaskit/adf-schema-generator';
|
|
3
2
|
export const backgroundColor = adfMark('backgroundColor');
|
|
4
3
|
export const textColor = adfMark('textColor');
|
|
5
4
|
export const colorGroup = adfMarkGroup('color', [textColor, backgroundColor]);
|
|
@@ -34,7 +34,7 @@ export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
|
|
|
34
34
|
default: ''
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
37
|
+
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
38
38
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
39
39
|
table.use('with_nested_table'), taskList, unsupportedBlock))]
|
|
40
40
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSchema } from './create-schema';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
3
4
|
/**
|
|
4
5
|
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
|
5
6
|
**/
|
|
@@ -2,6 +2,7 @@ import { createSchema } from './create-schema';
|
|
|
2
2
|
const nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
|
|
3
3
|
const marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
|
|
4
4
|
|
|
5
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
6
|
/**
|
|
6
7
|
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
|
7
8
|
**/
|
|
@@ -9,6 +10,7 @@ export const confluenceSchema = createSchema({
|
|
|
9
10
|
nodes,
|
|
10
11
|
marks
|
|
11
12
|
});
|
|
13
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
12
14
|
/**
|
|
13
15
|
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
|
14
16
|
**/
|
|
@@ -273,7 +273,6 @@ export function getNodesAndMarksMap() {
|
|
|
273
273
|
name,
|
|
274
274
|
spec
|
|
275
275
|
}) => {
|
|
276
|
-
// @ts-expect-error - Type for SchemaBuiltInItem is not correct
|
|
277
276
|
acc[name] = spec;
|
|
278
277
|
return acc;
|
|
279
278
|
}, {});
|
|
@@ -281,7 +280,6 @@ export function getNodesAndMarksMap() {
|
|
|
281
280
|
name,
|
|
282
281
|
spec
|
|
283
282
|
}) => {
|
|
284
|
-
// @ts-expect-error - Type for SchemaBuiltInItem is not correct
|
|
285
283
|
acc[name] = spec;
|
|
286
284
|
return acc;
|
|
287
285
|
}, {});
|
|
@@ -12,6 +12,7 @@ export const createPMNodeSpecFactory = nodeSpec => ({
|
|
|
12
12
|
toDOM,
|
|
13
13
|
toDebugString
|
|
14
14
|
}) => {
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
return {
|
|
16
17
|
...nodeSpec,
|
|
17
18
|
...(parseDOM && {
|
|
@@ -40,6 +41,7 @@ export const createPMMarkSpecFactory = markSpec => ({
|
|
|
40
41
|
toDOM,
|
|
41
42
|
toDebugString
|
|
42
43
|
}) => {
|
|
44
|
+
// @ts-ignore
|
|
43
45
|
return {
|
|
44
46
|
...markSpec,
|
|
45
47
|
...(parseDOM && {
|