@atlaskit/adf-schema 51.5.16 → 51.5.18
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 +17 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +12 -1
- package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -0
- package/dist/cjs/next-schema/groups/inlineContentGroup.js +1 -0
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +2 -0
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -0
- package/dist/cjs/next-schema/nodes/list.js +6 -2
- package/dist/cjs/next-schema/nodes/task.js +5 -0
- package/dist/cjs/schema/default-schema.js +5 -1
- package/dist/cjs/schema/marks/data-consumer.js +1 -0
- package/dist/cjs/schema/nodes/embed-card.js +8 -8
- package/dist/cjs/schema/nodes/emoji.js +36 -12
- package/dist/cjs/schema/nodes/layout-section.js +1 -0
- package/dist/cjs/schema/nodes/list-item.js +11 -1
- package/dist/cjs/schema/nodes/media-single.js +3 -0
- package/dist/cjs/schema/nodes/mention.js +3 -1
- package/dist/cjs/schema/nodes/multi-bodied-extension.js +2 -0
- package/dist/cjs/schema/nodes/nested-expand.js +2 -0
- package/dist/cjs/schema/nodes/placeholder.js +6 -2
- package/dist/cjs/schema/nodes/tableNodes.js +2 -1
- package/dist/cjs/schema/nodes/unsupported-block.js +2 -1
- package/dist/cjs/schema/nodes/unsupported-inline.js +2 -1
- package/dist/cjs/validator-schema/generated/validatorSpec.js +13 -3
- package/dist/es2019/next-schema/generated/nodeTypes.js +11 -0
- package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -0
- package/dist/es2019/next-schema/groups/inlineContentGroup.js +1 -0
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +2 -0
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +2 -0
- package/dist/es2019/next-schema/nodes/list.js +6 -2
- package/dist/es2019/next-schema/nodes/task.js +5 -0
- package/dist/es2019/schema/default-schema.js +5 -1
- package/dist/es2019/schema/marks/data-consumer.js +1 -0
- package/dist/es2019/schema/nodes/embed-card.js +8 -8
- package/dist/es2019/schema/nodes/emoji.js +36 -12
- package/dist/es2019/schema/nodes/layout-section.js +1 -0
- package/dist/es2019/schema/nodes/list-item.js +8 -2
- package/dist/es2019/schema/nodes/media-single.js +3 -0
- package/dist/es2019/schema/nodes/mention.js +3 -1
- package/dist/es2019/schema/nodes/multi-bodied-extension.js +2 -0
- package/dist/es2019/schema/nodes/nested-expand.js +2 -0
- package/dist/es2019/schema/nodes/placeholder.js +6 -2
- package/dist/es2019/schema/nodes/tableNodes.js +2 -1
- package/dist/es2019/schema/nodes/unsupported-block.js +2 -1
- package/dist/es2019/schema/nodes/unsupported-inline.js +2 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +12 -2
- package/dist/esm/next-schema/generated/nodeTypes.js +11 -0
- package/dist/esm/next-schema/groups/blockContentGroup.js +1 -0
- package/dist/esm/next-schema/groups/inlineContentGroup.js +1 -0
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +2 -0
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +2 -0
- package/dist/esm/next-schema/nodes/list.js +6 -2
- package/dist/esm/next-schema/nodes/task.js +5 -0
- package/dist/esm/schema/default-schema.js +5 -1
- package/dist/esm/schema/marks/data-consumer.js +1 -0
- package/dist/esm/schema/nodes/embed-card.js +8 -8
- package/dist/esm/schema/nodes/emoji.js +36 -12
- package/dist/esm/schema/nodes/layout-section.js +1 -0
- package/dist/esm/schema/nodes/list-item.js +10 -2
- package/dist/esm/schema/nodes/media-single.js +3 -0
- package/dist/esm/schema/nodes/mention.js +3 -1
- package/dist/esm/schema/nodes/multi-bodied-extension.js +2 -0
- package/dist/esm/schema/nodes/nested-expand.js +2 -0
- package/dist/esm/schema/nodes/placeholder.js +6 -2
- package/dist/esm/schema/nodes/tableNodes.js +2 -1
- package/dist/esm/schema/nodes/unsupported-block.js +2 -1
- package/dist/esm/schema/nodes/unsupported-inline.js +2 -1
- package/dist/esm/validator-schema/generated/validatorSpec.js +12 -2
- package/dist/json-schema/v1/stage-0.json +57 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +2 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +12 -2
- package/dist/types/next-schema/groups/blockContentGroup.d.ts +3 -1
- package/dist/types/next-schema/groups/blockGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/blockRootOnlyGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/fontStyleGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/inlineContentGroup.d.ts +3 -1
- package/dist/types/next-schema/groups/inlineGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/linkMarkGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +4 -16
- package/dist/types/next-schema/groups/searchQueryMarkGroup.d.ts +2 -1
- package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +4 -17
- package/dist/types/next-schema/marks/alignmentAndIndentation.d.ts +3 -2
- package/dist/types/next-schema/marks/annotation.d.ts +3 -2
- package/dist/types/next-schema/marks/border.d.ts +2 -1
- package/dist/types/next-schema/marks/breakout.d.ts +2 -1
- package/dist/types/next-schema/marks/code.d.ts +2 -1
- package/dist/types/next-schema/marks/color.d.ts +4 -3
- package/dist/types/next-schema/marks/confluenceInlineComment.d.ts +2 -1
- package/dist/types/next-schema/marks/dataConsumer.d.ts +2 -1
- package/dist/types/next-schema/marks/em.d.ts +2 -1
- package/dist/types/next-schema/marks/fragment.d.ts +2 -1
- package/dist/types/next-schema/marks/link.d.ts +2 -1
- package/dist/types/next-schema/marks/strike.d.ts +2 -1
- package/dist/types/next-schema/marks/strong.d.ts +2 -1
- package/dist/types/next-schema/marks/subsup.d.ts +2 -1
- package/dist/types/next-schema/marks/typeAheadQuery.d.ts +2 -1
- package/dist/types/next-schema/marks/underline.d.ts +2 -1
- package/dist/types/next-schema/marks/unsupportedMark.d.ts +2 -1
- package/dist/types/next-schema/marks/unsupportedNodeAttribute.d.ts +2 -1
- package/dist/types/next-schema/nodes/blockCard.d.ts +2 -1
- package/dist/types/next-schema/nodes/blockquote.d.ts +8 -4
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +6 -2
- package/dist/types/next-schema/nodes/bodiedSyncBlock.d.ts +2 -1
- package/dist/types/next-schema/nodes/caption.d.ts +2 -1
- package/dist/types/next-schema/nodes/codeBlock.d.ts +7 -3
- package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +2 -1
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +2 -1
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +2 -1
- package/dist/types/next-schema/nodes/date.d.ts +2 -1
- package/dist/types/next-schema/nodes/decisionItem.d.ts +2 -1
- package/dist/types/next-schema/nodes/decisionList.d.ts +2 -1
- package/dist/types/next-schema/nodes/embedCard.d.ts +2 -1
- package/dist/types/next-schema/nodes/emoji.d.ts +2 -1
- package/dist/types/next-schema/nodes/expand.d.ts +7 -3
- package/dist/types/next-schema/nodes/extension.d.ts +6 -2
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +2 -1
- package/dist/types/next-schema/nodes/hardBreak.d.ts +2 -1
- package/dist/types/next-schema/nodes/heading.d.ts +19 -8
- package/dist/types/next-schema/nodes/image.d.ts +2 -1
- package/dist/types/next-schema/nodes/inlineCard.d.ts +6 -2
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +6 -2
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +2 -1
- package/dist/types/next-schema/nodes/layoutSection.d.ts +14 -9
- package/dist/types/next-schema/nodes/list.d.ts +3 -2
- package/dist/types/next-schema/nodes/media.d.ts +2 -1
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +2 -1
- package/dist/types/next-schema/nodes/mediaInline.d.ts +2 -1
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +7 -52
- package/dist/types/next-schema/nodes/mention.d.ts +2 -1
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +2 -1
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +3 -2
- package/dist/types/next-schema/nodes/panel.d.ts +2 -1
- package/dist/types/next-schema/nodes/paragraph.d.ts +12 -5
- package/dist/types/next-schema/nodes/placeholder.d.ts +2 -1
- package/dist/types/next-schema/nodes/rule.d.ts +2 -1
- package/dist/types/next-schema/nodes/status.d.ts +2 -1
- package/dist/types/next-schema/nodes/syncBlock.d.ts +2 -1
- package/dist/types/next-schema/nodes/tableCellContent.d.ts +2 -1
- package/dist/types/next-schema/nodes/tableNodes.d.ts +2 -1
- package/dist/types/next-schema/nodes/task.d.ts +4 -3
- package/dist/types/next-schema/nodes/text.d.ts +13 -6
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +2 -1
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +2 -1
- package/dist/types/schema/create-schema.d.ts +1 -1
- package/dist/types/schema/default-schema.d.ts +4 -2
- package/dist/types/schema/marks/border.d.ts +3 -0
- package/dist/types/schema/marks/data-consumer.d.ts +4 -2
- package/dist/types/schema/marks/fragment.d.ts +3 -2
- package/dist/types/schema/marks/link.d.ts +2 -1
- package/dist/types/schema/marks/text-color.d.ts +1 -0
- package/dist/types/schema/nodes/block-card.d.ts +7 -2
- package/dist/types/schema/nodes/blockquote.d.ts +6 -3
- package/dist/types/schema/nodes/bodied-extension.d.ts +4 -1
- package/dist/types/schema/nodes/bodied-sync-block.d.ts +4 -1
- package/dist/types/schema/nodes/bullet-list.d.ts +3 -2
- package/dist/types/schema/nodes/caption.d.ts +5 -2
- package/dist/types/schema/nodes/code-block.d.ts +4 -3
- package/dist/types/schema/nodes/confluence-jira-issue.d.ts +2 -1
- package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +2 -1
- package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +2 -1
- package/dist/types/schema/nodes/date.d.ts +5 -2
- package/dist/types/schema/nodes/decision-item.d.ts +3 -1
- package/dist/types/schema/nodes/decision-list.d.ts +5 -2
- package/dist/types/schema/nodes/doc.d.ts +3 -1
- package/dist/types/schema/nodes/embed-card.d.ts +3 -5
- package/dist/types/schema/nodes/emoji.d.ts +4 -2
- package/dist/types/schema/nodes/expand.d.ts +6 -4
- package/dist/types/schema/nodes/extension.d.ts +2 -1
- package/dist/types/schema/nodes/hard-break.d.ts +3 -2
- package/dist/types/schema/nodes/heading.d.ts +5 -1
- package/dist/types/schema/nodes/image.d.ts +2 -1
- package/dist/types/schema/nodes/inline-card.d.ts +4 -2
- package/dist/types/schema/nodes/inline-extension.d.ts +2 -1
- package/dist/types/schema/nodes/layout-column.d.ts +7 -2
- package/dist/types/schema/nodes/layout-section.d.ts +17 -9
- package/dist/types/schema/nodes/list-item.d.ts +32 -8
- package/dist/types/schema/nodes/media-group.d.ts +4 -1
- package/dist/types/schema/nodes/media-single.d.ts +9 -0
- package/dist/types/schema/nodes/media.d.ts +2 -2
- package/dist/types/schema/nodes/mention.d.ts +4 -3
- package/dist/types/schema/nodes/multi-bodied-extension.d.ts +7 -2
- package/dist/types/schema/nodes/nested-expand.d.ts +5 -2
- package/dist/types/schema/nodes/ordered-list.d.ts +5 -4
- package/dist/types/schema/nodes/panel.d.ts +5 -2
- package/dist/types/schema/nodes/paragraph.d.ts +3 -1
- package/dist/types/schema/nodes/placeholder.d.ts +5 -4
- package/dist/types/schema/nodes/rule.d.ts +3 -2
- package/dist/types/schema/nodes/status.d.ts +4 -1
- package/dist/types/schema/nodes/sync-block.d.ts +2 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +27 -22
- package/dist/types/schema/nodes/task-item.d.ts +5 -2
- package/dist/types/schema/nodes/task-list.d.ts +5 -2
- package/dist/types/schema/nodes/text.d.ts +5 -3
- package/dist/types/schema/nodes/unsupported-block.d.ts +2 -1
- package/dist/types/schema/nodes/unsupported-inline.d.ts +2 -1
- package/dist/types/steps/batch-attrs-step.d.ts +1 -1
- package/dist/types/steps/set-attrs.d.ts +2 -2
- package/dist/types/utils/confluence/emoji.d.ts +16 -16
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +10 -0
- package/dist/types-ts4.5/next-schema/full-schema.adf.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +12 -2
- package/dist/types-ts4.5/next-schema/groups/blockContentGroup.d.ts +3 -1
- package/dist/types-ts4.5/next-schema/groups/blockGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/blockRootOnlyGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/fontStyleGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/inlineContentGroup.d.ts +3 -1
- package/dist/types-ts4.5/next-schema/groups/inlineGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/linkMarkGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/nonNestableBlockContentGroup.d.ts +4 -25
- package/dist/types-ts4.5/next-schema/groups/searchQueryMarkGroup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/groups/tableCellContentPseudoGroup.d.ts +4 -26
- package/dist/types-ts4.5/next-schema/marks/alignmentAndIndentation.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/marks/annotation.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/marks/border.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/breakout.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/code.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/color.d.ts +4 -3
- package/dist/types-ts4.5/next-schema/marks/confluenceInlineComment.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/dataConsumer.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/em.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/fragment.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/link.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/strike.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/strong.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/subsup.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/typeAheadQuery.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/underline.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/unsupportedMark.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/marks/unsupportedNodeAttribute.d.ts +2 -1
- package/dist/types-ts4.5/next-schema/nodes/blockCard.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/blockquote.d.ts +7 -6
- package/dist/types-ts4.5/next-schema/nodes/bodiedExtension.d.ts +5 -4
- package/dist/types-ts4.5/next-schema/nodes/bodiedSyncBlock.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/caption.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +6 -5
- package/dist/types-ts4.5/next-schema/nodes/confluenceJiraIssue.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedBlock.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedInline.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/date.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/decisionItem.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/decisionList.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/embedCard.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/emoji.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/expand.d.ts +6 -5
- package/dist/types-ts4.5/next-schema/nodes/extension.d.ts +5 -4
- package/dist/types-ts4.5/next-schema/nodes/extensionFrame.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/hardBreak.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/heading.d.ts +17 -16
- package/dist/types-ts4.5/next-schema/nodes/image.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/inlineCard.d.ts +5 -4
- package/dist/types-ts4.5/next-schema/nodes/inlineExtension.d.ts +5 -4
- package/dist/types-ts4.5/next-schema/nodes/layoutColumn.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/layoutSection.d.ts +13 -12
- package/dist/types-ts4.5/next-schema/nodes/list.d.ts +5 -4
- package/dist/types-ts4.5/next-schema/nodes/media.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/mediaGroup.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/mediaInline.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/mediaSingle.d.ts +6 -56
- package/dist/types-ts4.5/next-schema/nodes/mention.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/multiBodiedExtension.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/nestedExpand.d.ts +4 -3
- package/dist/types-ts4.5/next-schema/nodes/panel.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +11 -10
- package/dist/types-ts4.5/next-schema/nodes/placeholder.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/rule.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/status.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/syncBlock.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/tableCellContent.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/tableNodes.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/task.d.ts +7 -6
- package/dist/types-ts4.5/next-schema/nodes/text.d.ts +12 -11
- package/dist/types-ts4.5/next-schema/nodes/unsupportedBlock.d.ts +3 -2
- package/dist/types-ts4.5/next-schema/nodes/unsupportedInline.d.ts +3 -2
- package/dist/types-ts4.5/schema/create-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/default-schema.d.ts +4 -2
- package/dist/types-ts4.5/schema/marks/border.d.ts +3 -0
- package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +4 -2
- package/dist/types-ts4.5/schema/marks/fragment.d.ts +3 -2
- package/dist/types-ts4.5/schema/marks/link.d.ts +2 -1
- package/dist/types-ts4.5/schema/marks/text-color.d.ts +1 -0
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +7 -2
- package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +6 -3
- package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +4 -1
- package/dist/types-ts4.5/schema/nodes/bodied-sync-block.d.ts +4 -1
- package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +3 -2
- package/dist/types-ts4.5/schema/nodes/caption.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +4 -3
- package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/date.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +3 -1
- package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/doc.d.ts +3 -1
- package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +3 -5
- package/dist/types-ts4.5/schema/nodes/emoji.d.ts +4 -2
- package/dist/types-ts4.5/schema/nodes/expand.d.ts +6 -4
- package/dist/types-ts4.5/schema/nodes/extension.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +3 -2
- package/dist/types-ts4.5/schema/nodes/heading.d.ts +5 -1
- package/dist/types-ts4.5/schema/nodes/image.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +4 -2
- package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +7 -2
- package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +17 -9
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +32 -8
- package/dist/types-ts4.5/schema/nodes/media-group.d.ts +4 -1
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +9 -0
- package/dist/types-ts4.5/schema/nodes/media.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/mention.d.ts +4 -3
- package/dist/types-ts4.5/schema/nodes/multi-bodied-extension.d.ts +7 -2
- package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +5 -4
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +3 -1
- package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +5 -4
- package/dist/types-ts4.5/schema/nodes/rule.d.ts +3 -2
- package/dist/types-ts4.5/schema/nodes/status.d.ts +4 -1
- package/dist/types-ts4.5/schema/nodes/sync-block.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +27 -22
- package/dist/types-ts4.5/schema/nodes/task-item.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +5 -2
- package/dist/types-ts4.5/schema/nodes/text.d.ts +5 -3
- package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +2 -1
- package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +2 -1
- package/dist/types-ts4.5/steps/batch-attrs-step.d.ts +1 -1
- package/dist/types-ts4.5/steps/set-attrs.d.ts +2 -2
- package/dist/types-ts4.5/utils/confluence/emoji.d.ts +16 -16
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +10 -0
- package/json-schema/v1/stage-0.json +57 -0
- package/package.json +2 -2
|
@@ -50,4 +50,9 @@ taskList.define({
|
|
|
50
50
|
},
|
|
51
51
|
contentMinItems: 1,
|
|
52
52
|
content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
|
|
53
|
+
});
|
|
54
|
+
taskList.variant('flexible_first_child', {
|
|
55
|
+
contentMinItems: 1,
|
|
56
|
+
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
|
|
57
|
+
stage0: true
|
|
53
58
|
});
|
|
@@ -11,7 +11,11 @@ const getDefaultSchemaConfig = () => {
|
|
|
11
11
|
return defaultSchemaConfig;
|
|
12
12
|
};
|
|
13
13
|
export const defaultSchemaConfig = getDefaultSchemaConfig();
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
export const getSchemaBasedOnStage = memoizeOne(
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
(stage = 'final') => {
|
|
15
19
|
const defaultSchemaConfig = getDefaultSchemaConfig();
|
|
16
20
|
if (stage === 'stage0') {
|
|
17
21
|
defaultSchemaConfig.customNodeSpecs = {
|
|
@@ -15,12 +15,12 @@ export const embedCard = embedCardFactory({
|
|
|
15
15
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
16
16
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
17
17
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
18
|
-
originalWidth:
|
|
18
|
+
originalWidth: Number(
|
|
19
19
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
20
|
-
|
|
21
|
-
originalHeight:
|
|
20
|
+
dom.getAttribute('data-card-original-width')) || null,
|
|
21
|
+
originalHeight: Number(
|
|
22
22
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
23
|
-
|
|
23
|
+
dom.getAttribute('data-card-original-height')) || null
|
|
24
24
|
})
|
|
25
25
|
}],
|
|
26
26
|
toDOM(node) {
|
|
@@ -52,12 +52,12 @@ export const embedCardWithLocalId = embedCardFactory({
|
|
|
52
52
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
53
53
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
54
54
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
55
|
-
originalWidth:
|
|
55
|
+
originalWidth: Number(
|
|
56
56
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
57
|
-
|
|
58
|
-
originalHeight:
|
|
57
|
+
dom.getAttribute('data-card-original-width')) || null,
|
|
58
|
+
originalHeight: Number(
|
|
59
59
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
60
|
-
|
|
60
|
+
dom.getAttribute('data-card-original-height')) || null,
|
|
61
61
|
localId: uuid.generate()
|
|
62
62
|
})
|
|
63
63
|
}],
|
|
@@ -19,11 +19,15 @@ export const emoji = emojiFactory({
|
|
|
19
19
|
const dom = domNode;
|
|
20
20
|
return {
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
22
|
-
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
22
|
+
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
|
+
emoji.attrs.shortName.default,
|
|
23
25
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
26
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
25
27
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
-
text:
|
|
28
|
+
text:
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
30
|
+
dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
27
31
|
};
|
|
28
32
|
}
|
|
29
33
|
},
|
|
@@ -31,13 +35,17 @@ export const emoji = emojiFactory({
|
|
|
31
35
|
{
|
|
32
36
|
tag: 'img[data-emoticon-name]',
|
|
33
37
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
-
getAttrs: dom => acNameToEmoji(
|
|
38
|
+
getAttrs: dom => acNameToEmoji(
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
dom.getAttribute('data-emoticon-name'))
|
|
35
41
|
},
|
|
36
42
|
// Handle copy/paste from old <ac:hipchat-emoticons />
|
|
37
43
|
{
|
|
38
44
|
tag: 'img[data-hipchat-emoticon]',
|
|
39
45
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
40
|
-
getAttrs: dom => acShortcutToEmoji(
|
|
46
|
+
getAttrs: dom => acShortcutToEmoji(
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
+
dom.getAttribute('data-hipchat-emoticon'))
|
|
41
49
|
},
|
|
42
50
|
// Handle copy/paste from bitbucket's <img class="emoji" />
|
|
43
51
|
{
|
|
@@ -47,11 +55,15 @@ export const emoji = emojiFactory({
|
|
|
47
55
|
const dom = domNode;
|
|
48
56
|
return {
|
|
49
57
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
50
|
-
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
58
|
+
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
60
|
+
emoji.attrs.shortName.default,
|
|
51
61
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
52
62
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
53
63
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
54
|
-
text:
|
|
64
|
+
text:
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
66
|
+
dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
|
|
55
67
|
};
|
|
56
68
|
}
|
|
57
69
|
}],
|
|
@@ -83,11 +95,15 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
83
95
|
const dom = domNode;
|
|
84
96
|
return {
|
|
85
97
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
86
|
-
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
98
|
+
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
100
|
+
emoji.attrs.shortName.default,
|
|
87
101
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
88
102
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
89
103
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
90
|
-
text:
|
|
104
|
+
text:
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
106
|
+
dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
91
107
|
localId: uuid.generate()
|
|
92
108
|
};
|
|
93
109
|
}
|
|
@@ -97,7 +113,9 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
97
113
|
tag: 'img[data-emoticon-name]',
|
|
98
114
|
getAttrs: dom => {
|
|
99
115
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
-
const attrs = acNameToEmoji(
|
|
116
|
+
const attrs = acNameToEmoji(
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
118
|
+
dom.getAttribute('data-emoticon-name'));
|
|
101
119
|
return {
|
|
102
120
|
...attrs,
|
|
103
121
|
localId: uuid.generate()
|
|
@@ -109,7 +127,9 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
109
127
|
tag: 'img[data-hipchat-emoticon]',
|
|
110
128
|
getAttrs: dom => {
|
|
111
129
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
112
|
-
const attrs = acShortcutToEmoji(
|
|
130
|
+
const attrs = acShortcutToEmoji(
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
132
|
+
dom.getAttribute('data-hipchat-emoticon'));
|
|
113
133
|
return {
|
|
114
134
|
...attrs,
|
|
115
135
|
localId: uuid.generate()
|
|
@@ -124,11 +144,15 @@ export const emojiWithLocalId = emojiFactory({
|
|
|
124
144
|
const dom = domNode;
|
|
125
145
|
return {
|
|
126
146
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
127
|
-
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
147
|
+
shortName: dom.getAttribute('data-emoji-short-name') ||
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
149
|
+
emoji.attrs.shortName.default,
|
|
128
150
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
129
151
|
id: dom.getAttribute('data-emoji-id') || emoji.attrs.id.default,
|
|
130
152
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
131
|
-
text:
|
|
153
|
+
text:
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
155
|
+
dom.getAttribute('data-emoji-text') || emoji.attrs.text.default,
|
|
132
156
|
localId: uuid.generate()
|
|
133
157
|
};
|
|
134
158
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { uuid } from '../../utils';
|
|
2
2
|
import { listItem as listItemFactory, listItemWithNestedDecisionStage0 as listItemWithNestedDecisionStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* @name list_item
|
|
6
5
|
* @description this node allows task-list to be nested inside list-item
|
|
@@ -32,7 +31,7 @@ export const listItemWithLocalId = listItemFactory({
|
|
|
32
31
|
* @name list_item_with_decision_stage0
|
|
33
32
|
* @description this node allows decisions to be nested inside list-item
|
|
34
33
|
*/
|
|
35
|
-
|
|
34
|
+
const listItemWithDecisionStage0Spec = listItemWithNestedDecisionStage0Factory({
|
|
36
35
|
parseDOM: [{
|
|
37
36
|
tag: 'li'
|
|
38
37
|
}],
|
|
@@ -40,6 +39,13 @@ export const listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factor
|
|
|
40
39
|
return ['li', 0];
|
|
41
40
|
}
|
|
42
41
|
});
|
|
42
|
+
|
|
43
|
+
// Allow list-first content while preserving decisionList support in stage0.
|
|
44
|
+
const listItemStage0Content = '((paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*) | ((paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+)';
|
|
45
|
+
export const listItemWithDecisionStage0 = {
|
|
46
|
+
...listItemWithDecisionStage0Spec,
|
|
47
|
+
content: listItemStage0Content
|
|
48
|
+
};
|
|
43
49
|
export const listItemWithNestedDecisionAndLocalIdStage0 = listItemWithNestedDecisionStage0Factory({
|
|
44
50
|
parseDOM: [{
|
|
45
51
|
tag: 'li',
|
|
@@ -5,10 +5,12 @@ import { uuid } from '../../utils/uuid';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @name mediaSingle_node
|
|
8
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
8
9
|
* @additionalProperties true
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
/**
|
|
13
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
12
14
|
* @additionalProperties true
|
|
13
15
|
*/
|
|
14
16
|
|
|
@@ -17,6 +19,7 @@ import { uuid } from '../../utils/uuid';
|
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
21
|
/**
|
|
22
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
20
23
|
* @additionalProperties true
|
|
21
24
|
*/
|
|
22
25
|
|
|
@@ -23,7 +23,9 @@ export const mention = mentionFactory({
|
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
24
|
text: dom.textContent || mention.attrs.text.default,
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
-
accessLevel: dom.getAttribute('data-access-level') ||
|
|
26
|
+
accessLevel: dom.getAttribute('data-access-level') ||
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
|
+
mention.attrs.accessLevel.default,
|
|
27
29
|
localId: uuid.generate()
|
|
28
30
|
};
|
|
29
31
|
const userType = dom.getAttribute('data-user-type');
|
|
@@ -2,6 +2,7 @@ import { getExtensionAttrs } from '../../utils/extensions';
|
|
|
2
2
|
import { multiBodiedExtensionStage0 as multiBodiedExtensionStage0Factory, extensionFrameStage0 as extensionFrameStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
5
6
|
* @stage 0
|
|
6
7
|
* @name extensionFrame_node
|
|
7
8
|
* @description Wraps the block content
|
|
@@ -27,6 +28,7 @@ export const extensionFrame = extensionFrameStage0Factory({
|
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
/**
|
|
31
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
30
32
|
* @stage 0
|
|
31
33
|
* @name multiBodiedExtension_node
|
|
32
34
|
* @description Wraps multiple extensionFrame objects.
|
|
@@ -3,7 +3,9 @@ import { uuid } from '../../utils/uuid';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @name nestedExpand_content
|
|
6
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
6
7
|
* @minItems 1
|
|
8
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
7
9
|
* @allowUnsupportedBlock true
|
|
8
10
|
*/
|
|
9
11
|
|
|
@@ -11,7 +11,9 @@ export const placeholder = placeholderFactory({
|
|
|
11
11
|
getAttrs: dom => ({
|
|
12
12
|
text:
|
|
13
13
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
14
|
-
dom.getAttribute('data-placeholder') ||
|
|
14
|
+
dom.getAttribute('data-placeholder') ||
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
16
|
+
placeholder.attrs.text.default
|
|
15
17
|
})
|
|
16
18
|
}],
|
|
17
19
|
toDOM(node) {
|
|
@@ -32,7 +34,9 @@ export const placeholderWithLocalId = placeholderFactory({
|
|
|
32
34
|
getAttrs: dom => ({
|
|
33
35
|
text:
|
|
34
36
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting, @typescript-eslint/no-non-null-assertion
|
|
35
|
-
dom.getAttribute('data-placeholder') ||
|
|
37
|
+
dom.getAttribute('data-placeholder') ||
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
39
|
+
placeholder.attrs.text.default,
|
|
36
40
|
localId: uuid.generate()
|
|
37
41
|
})
|
|
38
42
|
}],
|
|
@@ -200,7 +200,9 @@ export const tableBackgroundColorNames = new Map();
|
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* @name table_cell_content
|
|
203
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
203
204
|
* @minItems 1
|
|
205
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
204
206
|
* @allowUnsupportedBlock true
|
|
205
207
|
*/
|
|
206
208
|
|
|
@@ -308,7 +310,6 @@ const tableCellNodeSpecOptions = {
|
|
|
308
310
|
};
|
|
309
311
|
export const tableCell = tableCellFactory(tableCellNodeSpecOptions);
|
|
310
312
|
export const toJSONTableCell = node => ({
|
|
311
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
312
313
|
attrs: Object.keys(node.attrs).reduce((obj, key) => {
|
|
313
314
|
// Only process keys that are defined in cellAttrs
|
|
314
315
|
if (cellAttrs[key] && cellAttrs[key].default !== node.attrs[key]) {
|
|
@@ -3,8 +3,9 @@ export const unsupportedBlock = unsupportedBlockFactory({
|
|
|
3
3
|
parseDOM: [{
|
|
4
4
|
tag: '[data-node-type="unsupportedBlock"]',
|
|
5
5
|
getAttrs: dom => ({
|
|
6
|
+
originalValue: JSON.parse(
|
|
6
7
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
7
|
-
|
|
8
|
+
dom.getAttribute('data-original-value') || '{}')
|
|
8
9
|
})
|
|
9
10
|
}],
|
|
10
11
|
toDOM(node) {
|
|
@@ -3,8 +3,9 @@ export const unsupportedInline = unsupportedInlineFactory({
|
|
|
3
3
|
parseDOM: [{
|
|
4
4
|
tag: '[data-node-type="unsupportedInline"]',
|
|
5
5
|
getAttrs: dom => ({
|
|
6
|
+
originalValue: JSON.parse(
|
|
6
7
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
7
|
-
|
|
8
|
+
dom.getAttribute('data-original-value') || '{}')
|
|
8
9
|
})
|
|
9
10
|
}],
|
|
10
11
|
toDOM(node) {
|
|
@@ -321,7 +321,7 @@ export const bulletList = {
|
|
|
321
321
|
},
|
|
322
322
|
content: {
|
|
323
323
|
type: 'array',
|
|
324
|
-
items: [['listItem', 'listItem_with_nested_decision']],
|
|
324
|
+
items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
|
|
325
325
|
minItems: 1
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -1063,6 +1063,16 @@ export const listItem = {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
};
|
|
1066
|
+
export const listItem_flexible_first_child = ['listItem', {
|
|
1067
|
+
props: {
|
|
1068
|
+
content: {
|
|
1069
|
+
type: 'array',
|
|
1070
|
+
items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1071
|
+
minItems: 1,
|
|
1072
|
+
allowUnsupportedBlock: true
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}];
|
|
1066
1076
|
export const listItem_with_nested_decision = ['listItem', {
|
|
1067
1077
|
props: {
|
|
1068
1078
|
content: {
|
|
@@ -1456,7 +1466,7 @@ export const orderedList = {
|
|
|
1456
1466
|
},
|
|
1457
1467
|
content: {
|
|
1458
1468
|
type: 'array',
|
|
1459
|
-
items: [['listItem', 'listItem_with_nested_decision']],
|
|
1469
|
+
items: [['listItem', 'listItem_with_nested_decision', 'listItem_flexible_first_child']],
|
|
1460
1470
|
minItems: 1
|
|
1461
1471
|
}
|
|
1462
1472
|
}
|
|
@@ -665,6 +665,17 @@ export var listItem = createPMNodeSpecFactory({
|
|
|
665
665
|
selectable: false,
|
|
666
666
|
defining: true
|
|
667
667
|
});
|
|
668
|
+
export var listItemFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
669
|
+
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
670
|
+
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
671
|
+
attrs: {
|
|
672
|
+
localId: {
|
|
673
|
+
default: null
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
selectable: false,
|
|
677
|
+
defining: true
|
|
678
|
+
});
|
|
668
679
|
export var listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
|
|
669
680
|
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList | extension)*',
|
|
670
681
|
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
@@ -20,6 +20,7 @@ import { taskList } from '../nodes/task';
|
|
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
23
24
|
* @DSLCompatibilityException
|
|
24
25
|
*
|
|
25
26
|
* Pseudo group used to match existing validator and json schema specs.
|
|
@@ -15,6 +15,7 @@ import { image } from '../nodes/image';
|
|
|
15
15
|
import { confluenceJiraIssue } from '../nodes/confluenceJiraIssue';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
18
19
|
* @DSLCompatibilityException
|
|
19
20
|
*
|
|
20
21
|
* Pseudo group used to match existing validator and json schema specs.
|
|
@@ -18,11 +18,13 @@ 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
20
|
// TODO: ED-29537 - make it an actual group
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
22
|
export var 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
23
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
24
|
table.use('with_nested_table'), blockCard, embedCard, extension.use('with_marks'), unsupportedBlock];
|
|
24
25
|
|
|
25
26
|
/**
|
|
27
|
+
// eslint-disable-next-line eslint-plugin-jsdoc/check-tag-names
|
|
26
28
|
* @DSLCompatibilityException
|
|
27
29
|
*
|
|
28
30
|
* Pseudo group used to match existing validator and json schema specs.
|
|
@@ -15,6 +15,8 @@ import { paragraph } from '../nodes/paragraph';
|
|
|
15
15
|
import { rule } from '../nodes/rule';
|
|
16
16
|
import { taskList } from '../nodes/task';
|
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
20
|
export var tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
19
21
|
|
|
20
22
|
// This is not an actual group, but a collection of nodes
|
|
@@ -27,6 +27,10 @@ var listItem = adfNode('listItem').define({
|
|
|
27
27
|
content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, decisionList, extension.use('with_marks')))],
|
|
28
28
|
noExtend: true,
|
|
29
29
|
stage0: true
|
|
30
|
+
}).variant('flexible_first_child', {
|
|
31
|
+
content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
32
|
+
noExtend: true,
|
|
33
|
+
stage0: true
|
|
30
34
|
});
|
|
31
35
|
orderedList.define({
|
|
32
36
|
selectable: false,
|
|
@@ -44,12 +48,12 @@ orderedList.define({
|
|
|
44
48
|
optional: true
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
|
-
content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))]
|
|
51
|
+
content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))]
|
|
48
52
|
});
|
|
49
53
|
bulletList.define({
|
|
50
54
|
selectable: false,
|
|
51
55
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
52
|
-
content: [$onePlus($or(listItem, listItem.use('with_nested_decision')))],
|
|
56
|
+
content: [$onePlus($or(listItem, listItem.use('with_nested_decision'), listItem.use('flexible_first_child')))],
|
|
53
57
|
attrs: {
|
|
54
58
|
localId: {
|
|
55
59
|
type: 'string',
|
|
@@ -51,4 +51,9 @@ taskList.define({
|
|
|
51
51
|
},
|
|
52
52
|
contentMinItems: 1,
|
|
53
53
|
content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
|
|
54
|
+
});
|
|
55
|
+
taskList.variant('flexible_first_child', {
|
|
56
|
+
contentMinItems: 1,
|
|
57
|
+
content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
|
|
58
|
+
stage0: true
|
|
54
59
|
});
|
|
@@ -11,7 +11,11 @@ var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
|
11
11
|
return defaultSchemaConfig;
|
|
12
12
|
};
|
|
13
13
|
export var defaultSchemaConfig = getDefaultSchemaConfig();
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
export var getSchemaBasedOnStage = memoizeOne(
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
function () {
|
|
15
19
|
var stage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'final';
|
|
16
20
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
|
17
21
|
if (stage === 'stage0') {
|
|
@@ -16,12 +16,12 @@ export var embedCard = embedCardFactory({
|
|
|
16
16
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
17
17
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
18
18
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
19
|
-
originalWidth:
|
|
19
|
+
originalWidth: Number(
|
|
20
20
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
21
|
-
|
|
22
|
-
originalHeight:
|
|
21
|
+
dom.getAttribute('data-card-original-width')) || null,
|
|
22
|
+
originalHeight: Number(
|
|
23
23
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
24
|
-
|
|
24
|
+
dom.getAttribute('data-card-original-height')) || null
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
}],
|
|
@@ -54,12 +54,12 @@ export var embedCardWithLocalId = embedCardFactory({
|
|
|
54
54
|
layout: dom.getAttribute('data-layout') || 'center',
|
|
55
55
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
56
56
|
width: Number(dom.getAttribute('data-width')) || null,
|
|
57
|
-
originalWidth:
|
|
57
|
+
originalWidth: Number(
|
|
58
58
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
59
|
-
|
|
60
|
-
originalHeight:
|
|
59
|
+
dom.getAttribute('data-card-original-width')) || null,
|
|
60
|
+
originalHeight: Number(
|
|
61
61
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
62
|
-
|
|
62
|
+
dom.getAttribute('data-card-original-height')) || null,
|
|
63
63
|
localId: uuid.generate()
|
|
64
64
|
};
|
|
65
65
|
}
|