@atlaskit/adf-schema 37.2.0 → 38.0.0
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 +13 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/next-schema/generated/markTypes.js +21 -21
- package/dist/cjs/next-schema/generated/nodeTypes.js +191 -110
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/index.js +32 -505
- package/dist/cjs/next-schema/nodes/blockCard.js +1 -1
- package/dist/cjs/next-schema/nodes/blockquote.js +2 -2
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/caption.js +1 -1
- package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
- package/dist/cjs/next-schema/nodes/date.js +4 -1
- package/dist/cjs/next-schema/nodes/decisionItem.js +1 -1
- package/dist/cjs/next-schema/nodes/decisionList.js +1 -1
- package/dist/cjs/next-schema/nodes/embedCard.js +1 -1
- package/dist/cjs/next-schema/nodes/emoji.js +4 -1
- package/dist/cjs/next-schema/nodes/expand.js +2 -2
- package/dist/cjs/next-schema/nodes/extension.js +2 -2
- package/dist/cjs/next-schema/nodes/extensionFrame.js +3 -2
- package/dist/cjs/next-schema/nodes/hardBreak.js +1 -1
- package/dist/cjs/next-schema/nodes/heading.js +3 -3
- package/dist/cjs/next-schema/nodes/inlineCard.js +5 -2
- package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/layoutColumn.js +1 -1
- package/dist/cjs/next-schema/nodes/layoutSection.js +3 -2
- package/dist/cjs/next-schema/nodes/list.js +5 -5
- package/dist/cjs/next-schema/nodes/media.js +1 -1
- package/dist/cjs/next-schema/nodes/mediaGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/mediaInline.js +1 -1
- package/dist/cjs/next-schema/nodes/mediaSingle.js +5 -5
- package/dist/cjs/next-schema/nodes/mention.js +4 -1
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +1 -3
- package/dist/cjs/next-schema/nodes/nestedExpand.js +2 -2
- package/dist/cjs/next-schema/nodes/panel.js +3 -3
- package/dist/cjs/next-schema/nodes/paragraph.js +4 -4
- package/dist/cjs/next-schema/nodes/placeholder.js +1 -1
- package/dist/cjs/next-schema/nodes/status.js +4 -1
- package/dist/cjs/next-schema/nodes/table.js +1 -1
- package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
- package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
- package/dist/cjs/next-schema/nodes/task.js +2 -2
- package/dist/cjs/next-schema/nodes/text.js +1 -1
- package/dist/cjs/schema/createPMSpecFactory.js +57 -0
- package/dist/cjs/schema/index.js +14 -1
- package/dist/cjs/schema/marks/alignment.js +3 -8
- package/dist/cjs/schema/marks/annotation.js +3 -13
- package/dist/cjs/schema/marks/background-color.js +3 -9
- package/dist/cjs/schema/marks/border.js +3 -7
- package/dist/cjs/schema/marks/breakout.js +3 -9
- package/dist/cjs/schema/marks/code.js +3 -5
- package/dist/cjs/schema/marks/confluence-inline-comment.js +3 -9
- package/dist/cjs/schema/marks/data-consumer.js +3 -7
- package/dist/cjs/schema/marks/em.js +3 -5
- package/dist/cjs/schema/marks/fragment.js +3 -12
- package/dist/cjs/schema/marks/indentation.js +3 -8
- package/dist/cjs/schema/marks/link.js +3 -13
- package/dist/cjs/schema/marks/strike.js +3 -5
- package/dist/cjs/schema/marks/strong.js +3 -5
- package/dist/cjs/schema/marks/subsup.js +3 -10
- package/dist/cjs/schema/marks/text-color.js +3 -8
- package/dist/cjs/schema/marks/type-ahead-query.js +3 -10
- package/dist/cjs/schema/marks/underline.js +3 -5
- package/dist/cjs/schema/marks/unsupported-mark.js +3 -6
- package/dist/cjs/schema/marks/unsupported-node-attributes.js +3 -6
- package/dist/cjs/schema/nodes/block-card.js +3 -23
- package/dist/cjs/schema/nodes/blockquote.js +17 -20
- package/dist/cjs/schema/nodes/bodied-extension.js +24 -54
- package/dist/cjs/schema/nodes/bullet-list.js +3 -6
- package/dist/cjs/schema/nodes/caption.js +3 -6
- package/dist/cjs/schema/nodes/code-block.js +31 -16
- package/dist/cjs/schema/nodes/confluence-jira-issue.js +3 -22
- package/dist/cjs/schema/nodes/confluence-unsupported-block.js +3 -8
- package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +3 -10
- package/dist/cjs/schema/nodes/date.js +3 -10
- package/dist/cjs/schema/nodes/decision-item.js +3 -13
- package/dist/cjs/schema/nodes/decision-list.js +3 -12
- package/dist/cjs/schema/nodes/doc.js +2 -4
- package/dist/cjs/schema/nodes/embed-card.js +3 -22
- package/dist/cjs/schema/nodes/emoji.js +3 -16
- package/dist/cjs/schema/nodes/expand.js +3 -16
- package/dist/cjs/schema/nodes/extension.js +20 -47
- package/dist/cjs/schema/nodes/hard-break.js +3 -5
- package/dist/cjs/schema/nodes/heading.js +3 -14
- package/dist/cjs/schema/nodes/image.js +3 -16
- package/dist/cjs/schema/nodes/inline-card.js +3 -14
- package/dist/cjs/schema/nodes/inline-extension.js +19 -42
- package/dist/cjs/schema/nodes/layout-column.js +4 -12
- package/dist/cjs/schema/nodes/layout-section.js +23 -11
- package/dist/cjs/schema/nodes/list-item.js +5 -12
- package/dist/cjs/schema/nodes/media-group.js +3 -8
- package/dist/cjs/schema/nodes/media-inline.js +2 -1
- package/dist/cjs/schema/nodes/media-single.js +35 -14
- package/dist/cjs/schema/nodes/media.js +35 -83
- package/dist/cjs/schema/nodes/mention.js +3 -22
- package/dist/cjs/schema/nodes/multi-bodied-extension.js +26 -64
- package/dist/cjs/schema/nodes/nested-expand.js +31 -48
- package/dist/cjs/schema/nodes/ordered-list.js +4 -16
- package/dist/cjs/schema/nodes/panel.js +5 -34
- package/dist/cjs/schema/nodes/paragraph.js +3 -11
- package/dist/cjs/schema/nodes/placeholder.js +3 -11
- package/dist/cjs/schema/nodes/rule.js +3 -3
- package/dist/cjs/schema/nodes/status.js +3 -19
- package/dist/cjs/schema/nodes/tableNodes.js +9 -52
- package/dist/cjs/schema/nodes/task-item.js +3 -14
- package/dist/cjs/schema/nodes/task-list.js +3 -12
- package/dist/cjs/schema/nodes/text.js +3 -4
- package/dist/cjs/schema/nodes/unsupported-block.js +3 -11
- package/dist/cjs/schema/nodes/unsupported-inline.js +3 -10
- package/dist/es2019/index.js +5 -1
- package/dist/es2019/next-schema/generated/markTypes.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +123 -42
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/index.js +3 -2
- package/dist/es2019/next-schema/nodes/blockCard.js +1 -1
- package/dist/es2019/next-schema/nodes/blockquote.js +2 -2
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/caption.js +1 -1
- package/dist/es2019/next-schema/nodes/codeBlock.js +2 -2
- package/dist/es2019/next-schema/nodes/date.js +4 -1
- package/dist/es2019/next-schema/nodes/decisionItem.js +1 -1
- package/dist/es2019/next-schema/nodes/decisionList.js +1 -1
- package/dist/es2019/next-schema/nodes/embedCard.js +1 -1
- package/dist/es2019/next-schema/nodes/emoji.js +4 -1
- package/dist/es2019/next-schema/nodes/expand.js +2 -2
- package/dist/es2019/next-schema/nodes/extension.js +2 -2
- package/dist/es2019/next-schema/nodes/extensionFrame.js +3 -2
- package/dist/es2019/next-schema/nodes/hardBreak.js +1 -1
- package/dist/es2019/next-schema/nodes/heading.js +3 -3
- package/dist/es2019/next-schema/nodes/inlineCard.js +5 -2
- package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/layoutColumn.js +1 -1
- package/dist/es2019/next-schema/nodes/layoutSection.js +3 -2
- package/dist/es2019/next-schema/nodes/list.js +5 -5
- package/dist/es2019/next-schema/nodes/media.js +1 -1
- package/dist/es2019/next-schema/nodes/mediaGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/mediaInline.js +1 -1
- package/dist/es2019/next-schema/nodes/mediaSingle.js +5 -5
- package/dist/es2019/next-schema/nodes/mention.js +4 -1
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +1 -3
- package/dist/es2019/next-schema/nodes/nestedExpand.js +2 -2
- package/dist/es2019/next-schema/nodes/panel.js +3 -3
- package/dist/es2019/next-schema/nodes/paragraph.js +4 -4
- package/dist/es2019/next-schema/nodes/placeholder.js +1 -1
- package/dist/es2019/next-schema/nodes/status.js +4 -1
- package/dist/es2019/next-schema/nodes/table.js +1 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
- package/dist/es2019/next-schema/nodes/tableRow.js +1 -1
- package/dist/es2019/next-schema/nodes/task.js +2 -2
- package/dist/es2019/next-schema/nodes/text.js +1 -1
- package/dist/es2019/schema/createPMSpecFactory.js +55 -0
- package/dist/es2019/schema/index.js +5 -1
- package/dist/es2019/schema/marks/alignment.js +3 -8
- package/dist/es2019/schema/marks/annotation.js +4 -13
- package/dist/es2019/schema/marks/background-color.js +3 -9
- package/dist/es2019/schema/marks/border.js +3 -7
- package/dist/es2019/schema/marks/breakout.js +3 -9
- package/dist/es2019/schema/marks/code.js +3 -5
- package/dist/es2019/schema/marks/confluence-inline-comment.js +4 -9
- package/dist/es2019/schema/marks/data-consumer.js +3 -7
- package/dist/es2019/schema/marks/em.js +3 -5
- package/dist/es2019/schema/marks/fragment.js +3 -12
- package/dist/es2019/schema/marks/indentation.js +3 -8
- package/dist/es2019/schema/marks/link.js +3 -13
- package/dist/es2019/schema/marks/strike.js +3 -5
- package/dist/es2019/schema/marks/strong.js +3 -5
- package/dist/es2019/schema/marks/subsup.js +3 -10
- package/dist/es2019/schema/marks/text-color.js +3 -8
- package/dist/es2019/schema/marks/type-ahead-query.js +3 -10
- package/dist/es2019/schema/marks/underline.js +3 -5
- package/dist/es2019/schema/marks/unsupported-mark.js +3 -6
- package/dist/es2019/schema/marks/unsupported-node-attributes.js +3 -6
- package/dist/es2019/schema/nodes/block-card.js +4 -23
- package/dist/es2019/schema/nodes/blockquote.js +19 -20
- package/dist/es2019/schema/nodes/bodied-extension.js +23 -53
- package/dist/es2019/schema/nodes/bullet-list.js +3 -6
- package/dist/es2019/schema/nodes/caption.js +4 -6
- package/dist/es2019/schema/nodes/code-block.js +31 -16
- package/dist/es2019/schema/nodes/confluence-jira-issue.js +3 -22
- package/dist/es2019/schema/nodes/confluence-unsupported-block.js +3 -8
- package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +3 -10
- package/dist/es2019/schema/nodes/date.js +4 -10
- package/dist/es2019/schema/nodes/decision-item.js +3 -13
- package/dist/es2019/schema/nodes/decision-list.js +3 -12
- package/dist/es2019/schema/nodes/doc.js +3 -4
- package/dist/es2019/schema/nodes/embed-card.js +4 -22
- package/dist/es2019/schema/nodes/emoji.js +3 -16
- package/dist/es2019/schema/nodes/expand.js +4 -16
- package/dist/es2019/schema/nodes/extension.js +19 -46
- package/dist/es2019/schema/nodes/hard-break.js +4 -5
- package/dist/es2019/schema/nodes/heading.js +4 -14
- package/dist/es2019/schema/nodes/image.js +3 -16
- package/dist/es2019/schema/nodes/inline-card.js +4 -14
- package/dist/es2019/schema/nodes/inline-extension.js +18 -41
- package/dist/es2019/schema/nodes/layout-column.js +5 -12
- package/dist/es2019/schema/nodes/layout-section.js +24 -10
- package/dist/es2019/schema/nodes/list-item.js +6 -12
- package/dist/es2019/schema/nodes/media-group.js +4 -8
- package/dist/es2019/schema/nodes/media-inline.js +3 -2
- package/dist/es2019/schema/nodes/media-single.js +35 -15
- package/dist/es2019/schema/nodes/media.js +35 -78
- package/dist/es2019/schema/nodes/mention.js +3 -22
- package/dist/es2019/schema/nodes/multi-bodied-extension.js +26 -63
- package/dist/es2019/schema/nodes/nested-expand.js +32 -48
- package/dist/es2019/schema/nodes/ordered-list.js +5 -14
- package/dist/es2019/schema/nodes/panel.js +5 -34
- package/dist/es2019/schema/nodes/paragraph.js +4 -11
- package/dist/es2019/schema/nodes/placeholder.js +4 -11
- package/dist/es2019/schema/nodes/rule.js +4 -3
- package/dist/es2019/schema/nodes/status.js +3 -19
- package/dist/es2019/schema/nodes/tableNodes.js +40 -82
- package/dist/es2019/schema/nodes/task-item.js +3 -14
- package/dist/es2019/schema/nodes/task-list.js +3 -12
- package/dist/es2019/schema/nodes/text.js +4 -4
- package/dist/es2019/schema/nodes/unsupported-block.js +3 -11
- package/dist/es2019/schema/nodes/unsupported-inline.js +3 -10
- package/dist/esm/index.js +5 -1
- package/dist/esm/next-schema/generated/markTypes.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +123 -42
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/index.js +3 -2
- package/dist/esm/next-schema/nodes/blockCard.js +1 -1
- package/dist/esm/next-schema/nodes/blockquote.js +2 -2
- package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/esm/next-schema/nodes/caption.js +1 -1
- package/dist/esm/next-schema/nodes/codeBlock.js +2 -2
- package/dist/esm/next-schema/nodes/date.js +4 -1
- package/dist/esm/next-schema/nodes/decisionItem.js +1 -1
- package/dist/esm/next-schema/nodes/decisionList.js +1 -1
- package/dist/esm/next-schema/nodes/embedCard.js +1 -1
- package/dist/esm/next-schema/nodes/emoji.js +4 -1
- package/dist/esm/next-schema/nodes/expand.js +2 -2
- package/dist/esm/next-schema/nodes/extension.js +2 -2
- package/dist/esm/next-schema/nodes/extensionFrame.js +3 -2
- package/dist/esm/next-schema/nodes/hardBreak.js +1 -1
- package/dist/esm/next-schema/nodes/heading.js +3 -3
- package/dist/esm/next-schema/nodes/inlineCard.js +5 -2
- package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/esm/next-schema/nodes/layoutColumn.js +1 -1
- package/dist/esm/next-schema/nodes/layoutSection.js +3 -2
- package/dist/esm/next-schema/nodes/list.js +5 -5
- package/dist/esm/next-schema/nodes/media.js +1 -1
- package/dist/esm/next-schema/nodes/mediaGroup.js +1 -1
- package/dist/esm/next-schema/nodes/mediaInline.js +1 -1
- package/dist/esm/next-schema/nodes/mediaSingle.js +5 -5
- package/dist/esm/next-schema/nodes/mention.js +4 -1
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +1 -3
- package/dist/esm/next-schema/nodes/nestedExpand.js +2 -2
- package/dist/esm/next-schema/nodes/panel.js +3 -3
- package/dist/esm/next-schema/nodes/paragraph.js +4 -4
- package/dist/esm/next-schema/nodes/placeholder.js +1 -1
- package/dist/esm/next-schema/nodes/status.js +4 -1
- package/dist/esm/next-schema/nodes/table.js +1 -1
- package/dist/esm/next-schema/nodes/tableCell.js +1 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
- package/dist/esm/next-schema/nodes/tableRow.js +1 -1
- package/dist/esm/next-schema/nodes/task.js +2 -2
- package/dist/esm/next-schema/nodes/text.js +1 -1
- package/dist/esm/schema/createPMSpecFactory.js +50 -0
- package/dist/esm/schema/index.js +5 -1
- package/dist/esm/schema/marks/alignment.js +3 -8
- package/dist/esm/schema/marks/annotation.js +4 -13
- package/dist/esm/schema/marks/background-color.js +3 -9
- package/dist/esm/schema/marks/border.js +3 -7
- package/dist/esm/schema/marks/breakout.js +3 -9
- package/dist/esm/schema/marks/code.js +3 -5
- package/dist/esm/schema/marks/confluence-inline-comment.js +4 -9
- package/dist/esm/schema/marks/data-consumer.js +3 -7
- package/dist/esm/schema/marks/em.js +3 -5
- package/dist/esm/schema/marks/fragment.js +3 -12
- package/dist/esm/schema/marks/indentation.js +3 -8
- package/dist/esm/schema/marks/link.js +3 -13
- package/dist/esm/schema/marks/strike.js +3 -5
- package/dist/esm/schema/marks/strong.js +3 -5
- package/dist/esm/schema/marks/subsup.js +3 -10
- package/dist/esm/schema/marks/text-color.js +3 -8
- package/dist/esm/schema/marks/type-ahead-query.js +3 -10
- package/dist/esm/schema/marks/underline.js +3 -5
- package/dist/esm/schema/marks/unsupported-mark.js +3 -6
- package/dist/esm/schema/marks/unsupported-node-attributes.js +3 -6
- package/dist/esm/schema/nodes/block-card.js +4 -23
- package/dist/esm/schema/nodes/blockquote.js +19 -20
- package/dist/esm/schema/nodes/bodied-extension.js +24 -54
- package/dist/esm/schema/nodes/bullet-list.js +3 -6
- package/dist/esm/schema/nodes/caption.js +4 -6
- package/dist/esm/schema/nodes/code-block.js +31 -16
- package/dist/esm/schema/nodes/confluence-jira-issue.js +3 -22
- package/dist/esm/schema/nodes/confluence-unsupported-block.js +3 -8
- package/dist/esm/schema/nodes/confluence-unsupported-inline.js +3 -10
- package/dist/esm/schema/nodes/date.js +4 -10
- package/dist/esm/schema/nodes/decision-item.js +3 -13
- package/dist/esm/schema/nodes/decision-list.js +3 -12
- package/dist/esm/schema/nodes/doc.js +3 -4
- package/dist/esm/schema/nodes/embed-card.js +4 -22
- package/dist/esm/schema/nodes/emoji.js +3 -16
- package/dist/esm/schema/nodes/expand.js +4 -16
- package/dist/esm/schema/nodes/extension.js +20 -47
- package/dist/esm/schema/nodes/hard-break.js +4 -5
- package/dist/esm/schema/nodes/heading.js +4 -14
- package/dist/esm/schema/nodes/image.js +3 -16
- package/dist/esm/schema/nodes/inline-card.js +4 -14
- package/dist/esm/schema/nodes/inline-extension.js +19 -42
- package/dist/esm/schema/nodes/layout-column.js +5 -12
- package/dist/esm/schema/nodes/layout-section.js +24 -10
- package/dist/esm/schema/nodes/list-item.js +6 -12
- package/dist/esm/schema/nodes/media-group.js +4 -8
- package/dist/esm/schema/nodes/media-inline.js +3 -2
- package/dist/esm/schema/nodes/media-single.js +35 -14
- package/dist/esm/schema/nodes/media.js +36 -82
- package/dist/esm/schema/nodes/mention.js +3 -22
- package/dist/esm/schema/nodes/multi-bodied-extension.js +27 -64
- package/dist/esm/schema/nodes/nested-expand.js +32 -48
- package/dist/esm/schema/nodes/ordered-list.js +4 -15
- package/dist/esm/schema/nodes/panel.js +5 -34
- package/dist/esm/schema/nodes/paragraph.js +4 -11
- package/dist/esm/schema/nodes/placeholder.js +4 -11
- package/dist/esm/schema/nodes/rule.js +4 -3
- package/dist/esm/schema/nodes/status.js +3 -19
- package/dist/esm/schema/nodes/tableNodes.js +12 -52
- package/dist/esm/schema/nodes/task-item.js +3 -14
- package/dist/esm/schema/nodes/task-list.js +3 -12
- package/dist/esm/schema/nodes/text.js +4 -4
- package/dist/esm/schema/nodes/unsupported-block.js +3 -11
- package/dist/esm/schema/nodes/unsupported-inline.js +3 -10
- package/dist/types/index.d.ts +2 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +1 -30
- package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -4
- package/dist/types/next-schema/generated/nodeTypes.d.ts +143 -85
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +3 -119
- package/dist/types/next-schema/index.d.ts +3 -5
- package/dist/types/next-schema/nodes/blockCard.d.ts +1 -30
- package/dist/types/next-schema/nodes/blockquote.d.ts +1 -30
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +1 -30
- package/dist/types/next-schema/nodes/caption.d.ts +1 -30
- package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -60
- package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +1 -30
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +1 -30
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +1 -30
- package/dist/types/next-schema/nodes/date.d.ts +1 -30
- package/dist/types/next-schema/nodes/decisionItem.d.ts +1 -30
- package/dist/types/next-schema/nodes/decisionList.d.ts +1 -30
- package/dist/types/next-schema/nodes/embedCard.d.ts +1 -30
- package/dist/types/next-schema/nodes/emoji.d.ts +1 -30
- package/dist/types/next-schema/nodes/expand.d.ts +1 -30
- package/dist/types/next-schema/nodes/extension.d.ts +1 -30
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +1 -30
- package/dist/types/next-schema/nodes/hardBreak.d.ts +1 -30
- package/dist/types/next-schema/nodes/heading.d.ts +2 -60
- package/dist/types/next-schema/nodes/image.d.ts +1 -30
- package/dist/types/next-schema/nodes/inlineCard.d.ts +1 -30
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +1 -30
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +1 -30
- package/dist/types/next-schema/nodes/layoutSection.d.ts +2 -30
- package/dist/types/next-schema/nodes/list.d.ts +2 -60
- package/dist/types/next-schema/nodes/media.d.ts +1 -30
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +1 -30
- package/dist/types/next-schema/nodes/mediaInline.d.ts +1 -30
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -30
- package/dist/types/next-schema/nodes/mention.d.ts +1 -30
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -30
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +1 -30
- package/dist/types/next-schema/nodes/panel.d.ts +1 -30
- package/dist/types/next-schema/nodes/paragraph.d.ts +1 -30
- package/dist/types/next-schema/nodes/placeholder.d.ts +1 -30
- package/dist/types/next-schema/nodes/rule.d.ts +1 -30
- package/dist/types/next-schema/nodes/status.d.ts +1 -30
- package/dist/types/next-schema/nodes/table.d.ts +1 -30
- package/dist/types/next-schema/nodes/tableCell.d.ts +1 -30
- package/dist/types/next-schema/nodes/tableCellContent.d.ts +1 -30
- package/dist/types/next-schema/nodes/tableHeader.d.ts +1 -30
- package/dist/types/next-schema/nodes/tableRow.d.ts +1 -30
- package/dist/types/next-schema/nodes/task.d.ts +2 -60
- package/dist/types/next-schema/nodes/text.d.ts +1 -30
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +1 -30
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +1 -30
- package/dist/types/schema/createPMSpecFactory.d.ts +33 -0
- package/dist/types/schema/index.d.ts +2 -0
- package/dist/types/schema/nodes/block-card.d.ts +1 -2
- package/dist/types/schema/nodes/blockquote.d.ts +2 -3
- package/dist/types/schema/nodes/bodied-extension.d.ts +1 -2
- package/dist/types/schema/nodes/bullet-list.d.ts +1 -2
- package/dist/types/schema/nodes/caption.d.ts +1 -2
- package/dist/types/schema/nodes/code-block.d.ts +2 -2
- package/dist/types/schema/nodes/confluence-jira-issue.d.ts +1 -2
- package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +1 -2
- package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +1 -2
- package/dist/types/schema/nodes/date.d.ts +1 -2
- package/dist/types/schema/nodes/decision-item.d.ts +1 -2
- package/dist/types/schema/nodes/decision-list.d.ts +1 -2
- package/dist/types/schema/nodes/doc.d.ts +1 -2
- package/dist/types/schema/nodes/embed-card.d.ts +1 -2
- package/dist/types/schema/nodes/emoji.d.ts +1 -2
- package/dist/types/schema/nodes/expand.d.ts +2 -2
- package/dist/types/schema/nodes/extension.d.ts +1 -2
- package/dist/types/schema/nodes/hard-break.d.ts +1 -2
- package/dist/types/schema/nodes/heading.d.ts +1 -2
- package/dist/types/schema/nodes/image.d.ts +1 -2
- package/dist/types/schema/nodes/inline-card.d.ts +1 -2
- package/dist/types/schema/nodes/inline-extension.d.ts +1 -2
- package/dist/types/schema/nodes/layout-column.d.ts +1 -2
- package/dist/types/schema/nodes/layout-section.d.ts +3 -3
- package/dist/types/schema/nodes/list-item.d.ts +2 -3
- package/dist/types/schema/nodes/media-group.d.ts +1 -2
- package/dist/types/schema/nodes/media.d.ts +3 -1
- package/dist/types/schema/nodes/mention.d.ts +2 -2
- package/dist/types/schema/nodes/multi-bodied-extension.d.ts +2 -3
- package/dist/types/schema/nodes/nested-expand.d.ts +1 -2
- package/dist/types/schema/nodes/ordered-list.d.ts +2 -3
- package/dist/types/schema/nodes/panel.d.ts +2 -3
- package/dist/types/schema/nodes/paragraph.d.ts +1 -2
- package/dist/types/schema/nodes/placeholder.d.ts +1 -2
- package/dist/types/schema/nodes/rule.d.ts +1 -2
- package/dist/types/schema/nodes/status.d.ts +1 -2
- package/dist/types/schema/nodes/tableNodes.d.ts +7 -7
- package/dist/types/schema/nodes/task-item.d.ts +1 -2
- package/dist/types/schema/nodes/task-list.d.ts +1 -2
- package/dist/types/schema/nodes/text.d.ts +1 -4
- package/dist/types/schema/nodes/unsupported-block.d.ts +1 -2
- package/dist/types/schema/nodes/unsupported-inline.d.ts +1 -2
- package/package.json +7 -4
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -7
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +6 -4
- package/schema-generators/json-full-schema.ts +5 -4
- package/schema-generators/pm-full-schema.ts +3 -3
- package/schema-generators/validator-full-schema.ts +1 -1
@@ -1,5 +1,6 @@
|
|
1
1
|
import { WidthType } from './types/rich-media-common';
|
2
2
|
import { isDOMElement } from '../../utils/parseDOM';
|
3
|
+
import { mediaSingle as mediaSingleFactory, mediaSingleCaption as mediaSingleCaptionFactory, mediaSingleFull as mediaSingleFullFactory, mediaSingleWidthType as mediaSingleWidthTypeFactory } from '../../next-schema/generated/nodeTypes';
|
3
4
|
|
4
5
|
/**
|
5
6
|
* @name mediaSingle_node
|
@@ -35,8 +36,6 @@ export const mediaSingleSpec = ({
|
|
35
36
|
withCaption = false,
|
36
37
|
withExtendedWidthTypes = false
|
37
38
|
}) => {
|
38
|
-
const content = withCaption ? 'media|unsupportedBlock+|media (caption|unsupportedBlock) unsupportedBlock*' : 'media|unsupportedBlock+|media unsupportedBlock+';
|
39
|
-
const atom = !withCaption;
|
40
39
|
const getAttrs = dom => {
|
41
40
|
if (!isDOMElement(dom)) {
|
42
41
|
// this should never happen
|
@@ -90,19 +89,40 @@ export const mediaSingleSpec = ({
|
|
90
89
|
}
|
91
90
|
return attrs;
|
92
91
|
};
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
widthType: {
|
102
|
-
default: null
|
92
|
+
if (withExtendedWidthTypes && withCaption) {
|
93
|
+
return mediaSingleFullFactory({
|
94
|
+
parseDOM: [{
|
95
|
+
tag: 'div[data-node-type="mediaSingle"]',
|
96
|
+
getAttrs
|
97
|
+
}],
|
98
|
+
toDOM(node) {
|
99
|
+
return ['div', getAttrsFromNode(node), 0];
|
103
100
|
}
|
104
|
-
}
|
105
|
-
|
101
|
+
});
|
102
|
+
}
|
103
|
+
if (withExtendedWidthTypes && !withCaption) {
|
104
|
+
return mediaSingleWidthTypeFactory({
|
105
|
+
parseDOM: [{
|
106
|
+
tag: 'div[data-node-type="mediaSingle"]',
|
107
|
+
getAttrs
|
108
|
+
}],
|
109
|
+
toDOM(node) {
|
110
|
+
return ['div', getAttrsFromNode(node), 0];
|
111
|
+
}
|
112
|
+
});
|
113
|
+
}
|
114
|
+
if (!withExtendedWidthTypes && withCaption) {
|
115
|
+
return mediaSingleCaptionFactory({
|
116
|
+
parseDOM: [{
|
117
|
+
tag: 'div[data-node-type="mediaSingle"]',
|
118
|
+
getAttrs
|
119
|
+
}],
|
120
|
+
toDOM(node) {
|
121
|
+
return ['div', getAttrsFromNode(node), 0];
|
122
|
+
}
|
123
|
+
});
|
124
|
+
}
|
125
|
+
return mediaSingleFactory({
|
106
126
|
parseDOM: [{
|
107
127
|
tag: 'div[data-node-type="mediaSingle"]',
|
108
128
|
getAttrs
|
@@ -110,7 +130,7 @@ export const mediaSingleSpec = ({
|
|
110
130
|
toDOM(node) {
|
111
131
|
return ['div', getAttrsFromNode(node), 0];
|
112
132
|
}
|
113
|
-
};
|
133
|
+
});
|
114
134
|
};
|
115
135
|
export const mediaSingle = mediaSingleSpec({
|
116
136
|
withCaption: false,
|
@@ -1,56 +1,12 @@
|
|
1
1
|
import { N30 } from '../../utils/colors';
|
2
|
+
import { media as mediaFactory } from '../../next-schema/generated/nodeTypes';
|
3
|
+
import { mediaInline as mediaInlineFactory } from '../../next-schema/generated/nodeTypes';
|
2
4
|
|
3
5
|
/**
|
4
6
|
* @name media_node
|
5
7
|
*/
|
6
8
|
|
7
|
-
export const defaultAttrs = {
|
8
|
-
id: {
|
9
|
-
default: ''
|
10
|
-
},
|
11
|
-
type: {
|
12
|
-
default: 'file'
|
13
|
-
},
|
14
|
-
collection: {
|
15
|
-
default: ''
|
16
|
-
},
|
17
|
-
occurrenceKey: {
|
18
|
-
default: null
|
19
|
-
},
|
20
|
-
alt: {
|
21
|
-
default: ''
|
22
|
-
},
|
23
|
-
width: {
|
24
|
-
default: null
|
25
|
-
},
|
26
|
-
height: {
|
27
|
-
default: null
|
28
|
-
},
|
29
|
-
url: {
|
30
|
-
default: null
|
31
|
-
},
|
32
|
-
__fileName: {
|
33
|
-
default: null
|
34
|
-
},
|
35
|
-
__fileSize: {
|
36
|
-
default: null
|
37
|
-
},
|
38
|
-
__fileMimeType: {
|
39
|
-
default: null
|
40
|
-
},
|
41
|
-
__displayType: {
|
42
|
-
default: null
|
43
|
-
},
|
44
|
-
__contextId: {
|
45
|
-
default: null
|
46
|
-
},
|
47
|
-
__mediaTraceId: {
|
48
|
-
default: null
|
49
|
-
},
|
50
|
-
__external: {
|
51
|
-
default: false
|
52
|
-
}
|
53
|
-
};
|
9
|
+
export const defaultAttrs = mediaFactory({}).attrs;
|
54
10
|
export const createMediaSpec = (attributes, inline = false) => {
|
55
11
|
const domNodeType = inline ? 'span' : 'div';
|
56
12
|
const nodeName = inline ? 'mediaInline' : 'media';
|
@@ -104,39 +60,40 @@ export const createMediaSpec = (attributes, inline = false) => {
|
|
104
60
|
}
|
105
61
|
});
|
106
62
|
}
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
// node view being used for editing).
|
129
|
-
title: 'Attachment',
|
130
|
-
// Manually kept in sync with the style of media cards. The goal is to render a plain gray
|
131
|
-
// rectangle that provides an affordance for media.
|
132
|
-
style: `display: inline-block; border-radius: 3px; background: ${N30}; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);`
|
133
|
-
};
|
134
|
-
copyPrivateAttributes(node.attrs, attrs, key => `data-${camelCaseToKebabCase(key.slice(2))}`);
|
135
|
-
return [`${domNodeType}`, attrs];
|
136
|
-
}
|
63
|
+
const toDOM = node => {
|
64
|
+
const attrs = {
|
65
|
+
'data-id': node.attrs.id,
|
66
|
+
'data-node-type': `${nodeName}`,
|
67
|
+
'data-type': node.attrs.type,
|
68
|
+
'data-collection': node.attrs.collection,
|
69
|
+
'data-occurrence-key': node.attrs.occurrenceKey,
|
70
|
+
'data-width': node.attrs.width,
|
71
|
+
'data-height': node.attrs.height,
|
72
|
+
'data-url': node.attrs.url,
|
73
|
+
'data-alt': node.attrs.alt,
|
74
|
+
// toDOM is used for static rendering as well as editor rendering. This comes into play for
|
75
|
+
// emails, copy/paste, etc, so the title and styling here *is* useful (despite a React-based
|
76
|
+
// node view being used for editing).
|
77
|
+
title: 'Attachment',
|
78
|
+
// Manually kept in sync with the style of media cards. The goal is to render a plain gray
|
79
|
+
// rectangle that provides an affordance for media.
|
80
|
+
style: `display: inline-block; border-radius: 3px; background: ${N30}; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);`
|
81
|
+
};
|
82
|
+
copyPrivateAttributes(node.attrs, attrs, key => `data-${camelCaseToKebabCase(key.slice(2))}`);
|
83
|
+
return [`${domNodeType}`, attrs];
|
137
84
|
};
|
85
|
+
if (inline) {
|
86
|
+
return mediaInlineFactory({
|
87
|
+
parseDOM,
|
88
|
+
toDOM
|
89
|
+
});
|
90
|
+
}
|
91
|
+
return mediaFactory({
|
92
|
+
parseDOM,
|
93
|
+
toDOM
|
94
|
+
});
|
138
95
|
};
|
139
|
-
export const media = createMediaSpec(defaultAttrs);
|
96
|
+
export const media = createMediaSpec(defaultAttrs, false);
|
140
97
|
export const camelCaseToKebabCase = str => str.replace(/([^A-Z]+)([A-Z])/g, (_, x, y) => `${x}-${y.toLowerCase()}`);
|
141
98
|
export const copyPrivateAttributes = (from, to, map) => {
|
142
99
|
if (media.attrs) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { uuid } from '../../utils';
|
2
|
+
import { mention as mentionFactory } from '../../next-schema/generated/nodeTypes';
|
2
3
|
export let USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
3
4
|
USER_TYPES["DEFAULT"] = "DEFAULT";
|
4
5
|
USER_TYPES["SPECIAL"] = "SPECIAL";
|
@@ -10,27 +11,7 @@ export let USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
|
10
11
|
* @name mention_node
|
11
12
|
*/
|
12
13
|
|
13
|
-
export const mention = {
|
14
|
-
inline: true,
|
15
|
-
group: 'inline',
|
16
|
-
selectable: true,
|
17
|
-
attrs: {
|
18
|
-
id: {
|
19
|
-
default: ''
|
20
|
-
},
|
21
|
-
text: {
|
22
|
-
default: ''
|
23
|
-
},
|
24
|
-
accessLevel: {
|
25
|
-
default: ''
|
26
|
-
},
|
27
|
-
userType: {
|
28
|
-
default: null
|
29
|
-
},
|
30
|
-
localId: {
|
31
|
-
default: null
|
32
|
-
}
|
33
|
-
},
|
14
|
+
export const mention = mentionFactory({
|
34
15
|
parseDOM: [{
|
35
16
|
tag: 'span[data-mention-id]',
|
36
17
|
getAttrs: domNode => {
|
@@ -69,7 +50,7 @@ export const mention = {
|
|
69
50
|
}
|
70
51
|
return ['span', attrs, text];
|
71
52
|
}
|
72
|
-
};
|
53
|
+
});
|
73
54
|
const isOptional = key => {
|
74
55
|
return ['userType', 'localId'].indexOf(key) > -1;
|
75
56
|
};
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { getExtensionAttrs } from '../../utils/extensions';
|
2
|
+
import { multiBodiedExtensionStage0 as multiBodiedExtensionStage0Factory } from '../../next-schema/generated/nodeTypes';
|
3
|
+
import { extensionFrameStage0 as extensionFrameStage0Factory } from '../../next-schema/generated/nodeTypes';
|
2
4
|
|
3
5
|
/**
|
4
6
|
* @stage 0
|
@@ -9,14 +11,7 @@ import { getExtensionAttrs } from '../../utils/extensions';
|
|
9
11
|
/**
|
10
12
|
* @returns NodeSpec for ExtensionFrameDefinition
|
11
13
|
*/
|
12
|
-
export const extensionFrame = {
|
13
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | extension | bodiedExtension | unsupportedBlock | blockCard | embedCard)+',
|
14
|
-
isolating: true,
|
15
|
-
marks: 'dataConsumer fragment',
|
16
|
-
definingAsContext: false,
|
17
|
-
definingForContent: true,
|
18
|
-
selectable: false,
|
19
|
-
attrs: {},
|
14
|
+
export const extensionFrame = extensionFrameStage0Factory({
|
20
15
|
parseDOM: [{
|
21
16
|
context: 'extensionFrame//',
|
22
17
|
tag: 'div[data-extension-frame]',
|
@@ -30,7 +25,7 @@ export const extensionFrame = {
|
|
30
25
|
};
|
31
26
|
return ['div', attrs, 0];
|
32
27
|
}
|
33
|
-
};
|
28
|
+
});
|
34
29
|
|
35
30
|
/**
|
36
31
|
* @stage 0
|
@@ -38,57 +33,25 @@ export const extensionFrame = {
|
|
38
33
|
* @description Wraps multiple extensionFrame objects.
|
39
34
|
*/
|
40
35
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
attrs
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
},
|
64
|
-
layout: {
|
65
|
-
default: 'default'
|
66
|
-
},
|
67
|
-
localId: {
|
68
|
-
default: null
|
69
|
-
}
|
70
|
-
},
|
71
|
-
parseDOM: [{
|
72
|
-
context: 'multiBodiedExtension//',
|
73
|
-
tag: '[data-node-type="multi-bodied-extension"]',
|
74
|
-
skip: true
|
75
|
-
}, {
|
76
|
-
tag: '[data-node-type="multi-bodied-extension"]',
|
77
|
-
getAttrs: domNode => getExtensionAttrs(domNode)
|
78
|
-
}],
|
79
|
-
toDOM(node) {
|
80
|
-
const attrs = {
|
81
|
-
'data-node-type': 'multi-bodied-extension',
|
82
|
-
'data-extension-type': node.attrs.extensionType,
|
83
|
-
'data-extension-key': node.attrs.extensionKey,
|
84
|
-
'data-text': node.attrs.text,
|
85
|
-
'data-parameters': JSON.stringify(node.attrs.parameters),
|
86
|
-
'data-layout': node.attrs.layout,
|
87
|
-
'data-local-id:': node.attrs.localId
|
88
|
-
};
|
89
|
-
return ['div', attrs, 0];
|
90
|
-
}
|
91
|
-
};
|
92
|
-
return nodeSpec;
|
93
|
-
};
|
94
|
-
export const multiBodiedExtension = createMultiBodiedExtensionNodeSpec();
|
36
|
+
export const multiBodiedExtension = multiBodiedExtensionStage0Factory({
|
37
|
+
parseDOM: [{
|
38
|
+
context: 'multiBodiedExtension//',
|
39
|
+
tag: '[data-node-type="multi-bodied-extension"]',
|
40
|
+
skip: true
|
41
|
+
}, {
|
42
|
+
tag: '[data-node-type="multi-bodied-extension"]',
|
43
|
+
getAttrs: domNode => getExtensionAttrs(domNode)
|
44
|
+
}],
|
45
|
+
toDOM(node) {
|
46
|
+
const attrs = {
|
47
|
+
'data-node-type': 'multi-bodied-extension',
|
48
|
+
'data-extension-type': node.attrs.extensionType,
|
49
|
+
'data-extension-key': node.attrs.extensionKey,
|
50
|
+
'data-text': node.attrs.text,
|
51
|
+
'data-parameters': JSON.stringify(node.attrs.parameters),
|
52
|
+
'data-layout': node.attrs.layout,
|
53
|
+
'data-local-id:': node.attrs.localId
|
54
|
+
};
|
55
|
+
return ['div', attrs, 0];
|
56
|
+
}
|
57
|
+
});
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { nestedExpand as nestedExpandFactory } from '../../next-schema/generated/nodeTypes';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* @name nestedExpand_content
|
3
5
|
* @minItems 1
|
@@ -12,55 +14,37 @@
|
|
12
14
|
* @name nestedExpand_with_no_marks_node
|
13
15
|
*/
|
14
16
|
|
15
|
-
const createNestedExpandSpec = () => {
|
16
|
-
const nestedExpandSpec = {
|
17
|
-
inline: false,
|
18
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
19
|
-
isolating: true,
|
20
|
-
selectable: true,
|
21
|
-
attrs: {
|
22
|
-
title: {
|
23
|
-
default: ''
|
24
|
-
},
|
25
|
-
__expanded: {
|
26
|
-
default: true
|
27
|
-
}
|
28
|
-
},
|
29
|
-
parseDOM: [{
|
30
|
-
context: 'nestedExpand//',
|
31
|
-
tag: '[data-node-type="nestedExpand"]',
|
32
|
-
skip: true
|
33
|
-
}, {
|
34
|
-
tag: '[data-node-type="nestedExpand"] button',
|
35
|
-
ignore: true
|
36
|
-
}, {
|
37
|
-
tag: '[data-node-type="expand"] button',
|
38
|
-
ignore: true
|
39
|
-
}, {
|
40
|
-
tag: 'div[data-node-type="nestedExpand"]',
|
41
|
-
getAttrs: domNode => {
|
42
|
-
const dom = domNode;
|
43
|
-
return {
|
44
|
-
title: dom.getAttribute('data-title'),
|
45
|
-
__expanded: true
|
46
|
-
};
|
47
|
-
}
|
48
|
-
}],
|
49
|
-
toDOM(node) {
|
50
|
-
const attrs = {
|
51
|
-
'data-node-type': 'nestedExpand',
|
52
|
-
'data-title': node.attrs.title,
|
53
|
-
'data-expanded': node.attrs.__expanded
|
54
|
-
};
|
55
|
-
return ['div', attrs, 0];
|
56
|
-
}
|
57
|
-
};
|
58
|
-
nestedExpandSpec.content = '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+';
|
59
|
-
return nestedExpandSpec;
|
60
|
-
};
|
61
|
-
|
62
17
|
/**
|
63
18
|
* @name nestedExpand
|
64
19
|
* @description an expand that can be nested (eg. inside table, layout).
|
65
20
|
*/
|
66
|
-
export const nestedExpand =
|
21
|
+
export const nestedExpand = nestedExpandFactory({
|
22
|
+
parseDOM: [{
|
23
|
+
context: 'nestedExpand//',
|
24
|
+
tag: '[data-node-type="nestedExpand"]',
|
25
|
+
skip: true
|
26
|
+
}, {
|
27
|
+
tag: '[data-node-type="nestedExpand"] button',
|
28
|
+
ignore: true
|
29
|
+
}, {
|
30
|
+
tag: '[data-node-type="expand"] button',
|
31
|
+
ignore: true
|
32
|
+
}, {
|
33
|
+
tag: 'div[data-node-type="nestedExpand"]',
|
34
|
+
getAttrs: domNode => {
|
35
|
+
const dom = domNode;
|
36
|
+
return {
|
37
|
+
title: dom.getAttribute('data-title'),
|
38
|
+
__expanded: true
|
39
|
+
};
|
40
|
+
}
|
41
|
+
}],
|
42
|
+
toDOM(node) {
|
43
|
+
const attrs = {
|
44
|
+
'data-node-type': 'nestedExpand',
|
45
|
+
'data-title': node.attrs.title,
|
46
|
+
'data-expanded': node.attrs.__expanded
|
47
|
+
};
|
48
|
+
return ['div', attrs, 0];
|
49
|
+
}
|
50
|
+
});
|
@@ -1,14 +1,6 @@
|
|
1
|
+
import { orderedList as orderedListFactory } from '../../next-schema/generated/nodeTypes';
|
1
2
|
export const orderedListSelector = '.ak-ol';
|
2
|
-
export const orderedList = {
|
3
|
-
group: 'block',
|
4
|
-
attrs: {
|
5
|
-
order: {
|
6
|
-
default: 1
|
7
|
-
}
|
8
|
-
},
|
9
|
-
content: 'listItem+',
|
10
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
11
|
-
selectable: false,
|
3
|
+
export const orderedList = orderedListFactory({
|
12
4
|
parseDOM: [{
|
13
5
|
tag: 'ol'
|
14
6
|
}],
|
@@ -18,7 +10,7 @@ export const orderedList = {
|
|
18
10
|
};
|
19
11
|
return ['ol', attrs, 0];
|
20
12
|
}
|
21
|
-
};
|
13
|
+
});
|
22
14
|
|
23
15
|
// resolve "start" to a safe, 0+ integer, otherwise return undefined
|
24
16
|
// Note: Any changes to this function should also be made to "resolveOrder"
|
@@ -33,8 +25,7 @@ const resolveStart = start => {
|
|
33
25
|
}
|
34
26
|
return Math.floor(Math.max(num, 0));
|
35
27
|
};
|
36
|
-
export const orderedListWithOrder = {
|
37
|
-
...orderedList,
|
28
|
+
export const orderedListWithOrder = orderedListFactory({
|
38
29
|
parseDOM: [{
|
39
30
|
tag: 'ol',
|
40
31
|
getAttrs: domNode => {
|
@@ -60,4 +51,4 @@ export const orderedListWithOrder = {
|
|
60
51
|
};
|
61
52
|
return ['ol', attrs, 0];
|
62
53
|
}
|
63
|
-
};
|
54
|
+
});
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { panel as panelFactory, panelLegacy as panelLegacyFactory } from '../../next-schema/generated/nodeTypes';
|
1
2
|
export let PanelType = /*#__PURE__*/function (PanelType) {
|
2
3
|
PanelType["INFO"] = "info";
|
3
4
|
PanelType["NOTE"] = "note";
|
@@ -13,26 +14,6 @@ export let PanelType = /*#__PURE__*/function (PanelType) {
|
|
13
14
|
* @name panel_node
|
14
15
|
*/
|
15
16
|
|
16
|
-
const getDefaultAttrs = () => {
|
17
|
-
const attrs = {
|
18
|
-
panelType: {
|
19
|
-
default: 'info'
|
20
|
-
},
|
21
|
-
panelIcon: {
|
22
|
-
default: null
|
23
|
-
},
|
24
|
-
panelIconId: {
|
25
|
-
default: null
|
26
|
-
},
|
27
|
-
panelIconText: {
|
28
|
-
default: null
|
29
|
-
},
|
30
|
-
panelColor: {
|
31
|
-
default: null
|
32
|
-
}
|
33
|
-
};
|
34
|
-
return attrs;
|
35
|
-
};
|
36
17
|
const getDomAttrs = nodeAttrs => {
|
37
18
|
const attrs = {
|
38
19
|
'data-panel-type': nodeAttrs.panelType,
|
@@ -61,12 +42,7 @@ const getParseDOMAttrs = (allowCustomPanel, dom) => {
|
|
61
42
|
return parseDOMAttrs;
|
62
43
|
};
|
63
44
|
export const panel = allowCustomPanel => {
|
64
|
-
const panelNodeSpec = {
|
65
|
-
group: 'block',
|
66
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
|
67
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
68
|
-
attrs: getDefaultAttrs(),
|
69
|
-
selectable: true,
|
45
|
+
const panelNodeSpec = panelLegacyFactory({
|
70
46
|
parseDOM: [{
|
71
47
|
tag: 'div[data-panel-type]',
|
72
48
|
getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
|
@@ -78,7 +54,7 @@ export const panel = allowCustomPanel => {
|
|
78
54
|
};
|
79
55
|
return ['div', attrs, ['div', contentAttrs, 0]];
|
80
56
|
}
|
81
|
-
};
|
57
|
+
});
|
82
58
|
return panelNodeSpec;
|
83
59
|
};
|
84
60
|
|
@@ -89,12 +65,7 @@ export const panel = allowCustomPanel => {
|
|
89
65
|
* addition to content allowed inside panel
|
90
66
|
*/
|
91
67
|
export const extendedPanel = allowCustomPanel => {
|
92
|
-
const panelNodeSpec = {
|
93
|
-
group: 'block',
|
94
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock)+',
|
95
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
96
|
-
attrs: getDefaultAttrs(),
|
97
|
-
selectable: true,
|
68
|
+
const panelNodeSpec = panelFactory({
|
98
69
|
parseDOM: [{
|
99
70
|
tag: 'div[data-panel-type]',
|
100
71
|
getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
|
@@ -106,6 +77,6 @@ export const extendedPanel = allowCustomPanel => {
|
|
106
77
|
};
|
107
78
|
return ['div', attrs, ['div', contentAttrs, 0]];
|
108
79
|
}
|
109
|
-
};
|
80
|
+
});
|
110
81
|
return panelNodeSpec;
|
111
82
|
};
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { paragraph as paragraphFactory } from '../../next-schema/generated/nodeTypes';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* @name paragraph_node
|
3
5
|
*/
|
@@ -23,16 +25,7 @@
|
|
23
25
|
* @name paragraph_with_indentation_node
|
24
26
|
*/
|
25
27
|
|
26
|
-
export const paragraph = {
|
27
|
-
selectable: false,
|
28
|
-
content: 'inline*',
|
29
|
-
group: 'block',
|
30
|
-
attrs: {
|
31
|
-
localId: {
|
32
|
-
default: null
|
33
|
-
}
|
34
|
-
},
|
35
|
-
marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
28
|
+
export const paragraph = paragraphFactory({
|
36
29
|
parseDOM: [{
|
37
30
|
tag: 'p',
|
38
31
|
getAttrs: domNode => {
|
@@ -54,4 +47,4 @@ export const paragraph = {
|
|
54
47
|
}] : [];
|
55
48
|
return [name, ...attrs, 0];
|
56
49
|
}
|
57
|
-
};
|
50
|
+
});
|
@@ -1,17 +1,10 @@
|
|
1
|
+
import { placeholder as placeholderFactory } from '../../next-schema/generated/nodeTypes';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* @name placeholder_node
|
3
5
|
*/
|
4
6
|
|
5
|
-
export const placeholder = {
|
6
|
-
inline: true,
|
7
|
-
group: 'inline',
|
8
|
-
selectable: false,
|
9
|
-
marks: '',
|
10
|
-
attrs: {
|
11
|
-
text: {
|
12
|
-
default: ''
|
13
|
-
}
|
14
|
-
},
|
7
|
+
export const placeholder = placeholderFactory({
|
15
8
|
parseDOM: [{
|
16
9
|
tag: 'span[data-placeholder]',
|
17
10
|
getAttrs: dom => ({
|
@@ -29,4 +22,4 @@ export const placeholder = {
|
|
29
22
|
};
|
30
23
|
return ['span', attrs, text];
|
31
24
|
}
|
32
|
-
};
|
25
|
+
});
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* @name rule_node
|
3
5
|
*/
|
4
6
|
|
5
7
|
const hrDOM = ['hr'];
|
6
|
-
export const rule = {
|
7
|
-
group: 'block',
|
8
|
+
export const rule = ruleFactory({
|
8
9
|
parseDOM: [{
|
9
10
|
tag: 'hr'
|
10
11
|
}],
|
11
12
|
toDOM() {
|
12
13
|
return hrDOM;
|
13
14
|
}
|
14
|
-
};
|
15
|
+
});
|
@@ -1,27 +1,11 @@
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
2
|
+
import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
|
2
3
|
|
3
4
|
/**
|
4
5
|
* @name status_node
|
5
6
|
*/
|
6
7
|
|
7
|
-
export const status = {
|
8
|
-
inline: true,
|
9
|
-
group: 'inline',
|
10
|
-
selectable: true,
|
11
|
-
attrs: {
|
12
|
-
text: {
|
13
|
-
default: ''
|
14
|
-
},
|
15
|
-
color: {
|
16
|
-
default: ''
|
17
|
-
},
|
18
|
-
localId: {
|
19
|
-
default: uuid.generate()
|
20
|
-
},
|
21
|
-
style: {
|
22
|
-
default: ''
|
23
|
-
}
|
24
|
-
},
|
8
|
+
export const status = statusFactory({
|
25
9
|
parseDOM: [{
|
26
10
|
tag: 'span[data-node-type="status"]',
|
27
11
|
getAttrs: domNode => {
|
@@ -50,4 +34,4 @@ export const status = {
|
|
50
34
|
};
|
51
35
|
return ['span', attrs, text];
|
52
36
|
}
|
53
|
-
};
|
37
|
+
});
|