@atlaskit/adf-schema 37.2.1 → 39.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 +12 -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 +114 -114
- 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/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/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/expand.js +2 -2
- package/dist/cjs/next-schema/nodes/extension.js +2 -2
- package/dist/cjs/next-schema/nodes/extensionFrame.js +2 -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 +2 -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 +2 -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/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/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 +3 -15
- 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 +39 -39
- 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/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/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/expand.js +2 -2
- package/dist/es2019/next-schema/nodes/extension.js +2 -2
- package/dist/es2019/next-schema/nodes/extensionFrame.js +2 -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 +2 -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 +2 -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/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/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 +3 -15
- 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 +39 -39
- 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/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/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/expand.js +2 -2
- package/dist/esm/next-schema/nodes/extension.js +2 -2
- package/dist/esm/next-schema/nodes/extensionFrame.js +2 -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 +2 -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 +2 -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/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/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 +3 -15
- 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/json-schema/v1/full.json +1297 -1732
- package/dist/json-schema/v1/stage-0.json +1350 -1808
- package/dist/types/index.d.ts +2 -0
- package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +75 -75
- 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/json-schema/v1/full.json +1297 -1732
- package/json-schema/v1/stage-0.json +1350 -1808
- package/package.json +9 -12
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -7
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +4 -4
- package/schema-generators/helpers/writeToFile.ts +24 -0
- package/schema-generators/json-full-schema.ts +8 -4
- package/schema-generators/pm-full-schema.ts +8 -4
- package/schema-generators/validator-full-schema.ts +6 -5
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
4
|
import { uuid } from '../../utils';
|
5
|
+
import { mention as mentionFactory } from '../../next-schema/generated/nodeTypes';
|
5
6
|
export var USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
6
7
|
USER_TYPES["DEFAULT"] = "DEFAULT";
|
7
8
|
USER_TYPES["SPECIAL"] = "SPECIAL";
|
@@ -13,27 +14,7 @@ export var USER_TYPES = /*#__PURE__*/function (USER_TYPES) {
|
|
13
14
|
* @name mention_node
|
14
15
|
*/
|
15
16
|
|
16
|
-
export var mention = {
|
17
|
-
inline: true,
|
18
|
-
group: 'inline',
|
19
|
-
selectable: true,
|
20
|
-
attrs: {
|
21
|
-
id: {
|
22
|
-
default: ''
|
23
|
-
},
|
24
|
-
text: {
|
25
|
-
default: ''
|
26
|
-
},
|
27
|
-
accessLevel: {
|
28
|
-
default: ''
|
29
|
-
},
|
30
|
-
userType: {
|
31
|
-
default: null
|
32
|
-
},
|
33
|
-
localId: {
|
34
|
-
default: null
|
35
|
-
}
|
36
|
-
},
|
17
|
+
export var mention = mentionFactory({
|
37
18
|
parseDOM: [{
|
38
19
|
tag: 'span[data-mention-id]',
|
39
20
|
getAttrs: function getAttrs(domNode) {
|
@@ -71,7 +52,7 @@ export var mention = {
|
|
71
52
|
}
|
72
53
|
return ['span', attrs, text];
|
73
54
|
}
|
74
|
-
};
|
55
|
+
});
|
75
56
|
var isOptional = function isOptional(key) {
|
76
57
|
return ['userType', 'localId'].indexOf(key) > -1;
|
77
58
|
};
|
@@ -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 var 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 var extensionFrame = extensionFrameStage0Factory({
|
20
15
|
parseDOM: [{
|
21
16
|
context: 'extensionFrame//',
|
22
17
|
tag: 'div[data-extension-frame]',
|
@@ -30,7 +25,7 @@ export var extensionFrame = {
|
|
30
25
|
};
|
31
26
|
return ['div', attrs, 0];
|
32
27
|
}
|
33
|
-
};
|
28
|
+
});
|
34
29
|
|
35
30
|
/**
|
36
31
|
* @stage 0
|
@@ -38,59 +33,27 @@ export var extensionFrame = {
|
|
38
33
|
* @description Wraps multiple extensionFrame objects.
|
39
34
|
*/
|
40
35
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
selectable: true,
|
51
|
-
attrs: {
|
52
|
-
extensionKey: {
|
53
|
-
default: ''
|
54
|
-
},
|
55
|
-
extensionType: {
|
56
|
-
default: ''
|
57
|
-
},
|
58
|
-
parameters: {
|
59
|
-
default: null
|
60
|
-
},
|
61
|
-
text: {
|
62
|
-
default: null
|
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: function getAttrs(domNode) {
|
78
|
-
return getExtensionAttrs(domNode);
|
79
|
-
}
|
80
|
-
}],
|
81
|
-
toDOM: function toDOM(node) {
|
82
|
-
var attrs = {
|
83
|
-
'data-node-type': 'multi-bodied-extension',
|
84
|
-
'data-extension-type': node.attrs.extensionType,
|
85
|
-
'data-extension-key': node.attrs.extensionKey,
|
86
|
-
'data-text': node.attrs.text,
|
87
|
-
'data-parameters': JSON.stringify(node.attrs.parameters),
|
88
|
-
'data-layout': node.attrs.layout,
|
89
|
-
'data-local-id:': node.attrs.localId
|
90
|
-
};
|
91
|
-
return ['div', attrs, 0];
|
36
|
+
export var 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: function getAttrs(domNode) {
|
44
|
+
return getExtensionAttrs(domNode);
|
92
45
|
}
|
93
|
-
}
|
94
|
-
|
95
|
-
|
96
|
-
|
46
|
+
}],
|
47
|
+
toDOM: function toDOM(node) {
|
48
|
+
var attrs = {
|
49
|
+
'data-node-type': 'multi-bodied-extension',
|
50
|
+
'data-extension-type': node.attrs.extensionType,
|
51
|
+
'data-extension-key': node.attrs.extensionKey,
|
52
|
+
'data-text': node.attrs.text,
|
53
|
+
'data-parameters': JSON.stringify(node.attrs.parameters),
|
54
|
+
'data-layout': node.attrs.layout,
|
55
|
+
'data-local-id:': node.attrs.localId
|
56
|
+
};
|
57
|
+
return ['div', attrs, 0];
|
58
|
+
}
|
59
|
+
});
|
@@ -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
|
-
var createNestedExpandSpec = function createNestedExpandSpec() {
|
16
|
-
var 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: function getAttrs(domNode) {
|
42
|
-
var dom = domNode;
|
43
|
-
return {
|
44
|
-
title: dom.getAttribute('data-title'),
|
45
|
-
__expanded: true
|
46
|
-
};
|
47
|
-
}
|
48
|
-
}],
|
49
|
-
toDOM: function toDOM(node) {
|
50
|
-
var 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 var nestedExpand =
|
21
|
+
export var 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: function getAttrs(domNode) {
|
35
|
+
var dom = domNode;
|
36
|
+
return {
|
37
|
+
title: dom.getAttribute('data-title'),
|
38
|
+
__expanded: true
|
39
|
+
};
|
40
|
+
}
|
41
|
+
}],
|
42
|
+
toDOM: function toDOM(node) {
|
43
|
+
var 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,17 +1,6 @@
|
|
1
|
-
import
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
1
|
+
import { orderedList as orderedListFactory } from '../../next-schema/generated/nodeTypes';
|
4
2
|
export var orderedListSelector = '.ak-ol';
|
5
|
-
export var orderedList = {
|
6
|
-
group: 'block',
|
7
|
-
attrs: {
|
8
|
-
order: {
|
9
|
-
default: 1
|
10
|
-
}
|
11
|
-
},
|
12
|
-
content: 'listItem+',
|
13
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
14
|
-
selectable: false,
|
3
|
+
export var orderedList = orderedListFactory({
|
15
4
|
parseDOM: [{
|
16
5
|
tag: 'ol'
|
17
6
|
}],
|
@@ -21,7 +10,7 @@ export var orderedList = {
|
|
21
10
|
};
|
22
11
|
return ['ol', attrs, 0];
|
23
12
|
}
|
24
|
-
};
|
13
|
+
});
|
25
14
|
|
26
15
|
// resolve "start" to a safe, 0+ integer, otherwise return undefined
|
27
16
|
// Note: Any changes to this function should also be made to "resolveOrder"
|
@@ -36,7 +25,7 @@ var resolveStart = function resolveStart(start) {
|
|
36
25
|
}
|
37
26
|
return Math.floor(Math.max(num, 0));
|
38
27
|
};
|
39
|
-
export var orderedListWithOrder =
|
28
|
+
export var orderedListWithOrder = orderedListFactory({
|
40
29
|
parseDOM: [{
|
41
30
|
tag: 'ol',
|
42
31
|
getAttrs: function getAttrs(domNode) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
|
+
import { panel as panelFactory, panelLegacy as panelLegacyFactory } from '../../next-schema/generated/nodeTypes';
|
4
5
|
export var PanelType = /*#__PURE__*/function (PanelType) {
|
5
6
|
PanelType["INFO"] = "info";
|
6
7
|
PanelType["NOTE"] = "note";
|
@@ -16,26 +17,6 @@ export var PanelType = /*#__PURE__*/function (PanelType) {
|
|
16
17
|
* @name panel_node
|
17
18
|
*/
|
18
19
|
|
19
|
-
var getDefaultAttrs = function getDefaultAttrs() {
|
20
|
-
var attrs = {
|
21
|
-
panelType: {
|
22
|
-
default: 'info'
|
23
|
-
},
|
24
|
-
panelIcon: {
|
25
|
-
default: null
|
26
|
-
},
|
27
|
-
panelIconId: {
|
28
|
-
default: null
|
29
|
-
},
|
30
|
-
panelIconText: {
|
31
|
-
default: null
|
32
|
-
},
|
33
|
-
panelColor: {
|
34
|
-
default: null
|
35
|
-
}
|
36
|
-
};
|
37
|
-
return attrs;
|
38
|
-
};
|
39
20
|
var getDomAttrs = function getDomAttrs(nodeAttrs) {
|
40
21
|
var attrs = {
|
41
22
|
'data-panel-type': nodeAttrs.panelType,
|
@@ -63,12 +44,7 @@ var getParseDOMAttrs = function getParseDOMAttrs(allowCustomPanel, dom) {
|
|
63
44
|
return parseDOMAttrs;
|
64
45
|
};
|
65
46
|
export var panel = function panel(allowCustomPanel) {
|
66
|
-
var panelNodeSpec = {
|
67
|
-
group: 'block',
|
68
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
|
69
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
70
|
-
attrs: getDefaultAttrs(),
|
71
|
-
selectable: true,
|
47
|
+
var panelNodeSpec = panelLegacyFactory({
|
72
48
|
parseDOM: [{
|
73
49
|
tag: 'div[data-panel-type]',
|
74
50
|
getAttrs: function getAttrs(dom) {
|
@@ -82,7 +58,7 @@ export var panel = function panel(allowCustomPanel) {
|
|
82
58
|
};
|
83
59
|
return ['div', attrs, ['div', contentAttrs, 0]];
|
84
60
|
}
|
85
|
-
};
|
61
|
+
});
|
86
62
|
return panelNodeSpec;
|
87
63
|
};
|
88
64
|
|
@@ -93,12 +69,7 @@ export var panel = function panel(allowCustomPanel) {
|
|
93
69
|
* addition to content allowed inside panel
|
94
70
|
*/
|
95
71
|
export var extendedPanel = function extendedPanel(allowCustomPanel) {
|
96
|
-
var panelNodeSpec = {
|
97
|
-
group: 'block',
|
98
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock)+',
|
99
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
100
|
-
attrs: getDefaultAttrs(),
|
101
|
-
selectable: true,
|
72
|
+
var panelNodeSpec = panelFactory({
|
102
73
|
parseDOM: [{
|
103
74
|
tag: 'div[data-panel-type]',
|
104
75
|
getAttrs: function getAttrs(dom) {
|
@@ -112,6 +83,6 @@ export var extendedPanel = function extendedPanel(allowCustomPanel) {
|
|
112
83
|
};
|
113
84
|
return ['div', attrs, ['div', contentAttrs, 0]];
|
114
85
|
}
|
115
|
-
};
|
86
|
+
});
|
116
87
|
return panelNodeSpec;
|
117
88
|
};
|
@@ -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 var 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 var paragraph = paragraphFactory({
|
36
29
|
parseDOM: [{
|
37
30
|
tag: 'p',
|
38
31
|
getAttrs: function getAttrs(domNode) {
|
@@ -52,4 +45,4 @@ export var paragraph = {
|
|
52
45
|
}] : [];
|
53
46
|
return [name].concat(attrs, [0]);
|
54
47
|
}
|
55
|
-
};
|
48
|
+
});
|
@@ -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 var placeholder = {
|
6
|
-
inline: true,
|
7
|
-
group: 'inline',
|
8
|
-
selectable: false,
|
9
|
-
marks: '',
|
10
|
-
attrs: {
|
11
|
-
text: {
|
12
|
-
default: ''
|
13
|
-
}
|
14
|
-
},
|
7
|
+
export var placeholder = placeholderFactory({
|
15
8
|
parseDOM: [{
|
16
9
|
tag: 'span[data-placeholder]',
|
17
10
|
getAttrs: function getAttrs(dom) {
|
@@ -29,4 +22,4 @@ export var 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
|
var hrDOM = ['hr'];
|
6
|
-
export var rule = {
|
7
|
-
group: 'block',
|
8
|
+
export var rule = ruleFactory({
|
8
9
|
parseDOM: [{
|
9
10
|
tag: 'hr'
|
10
11
|
}],
|
11
12
|
toDOM: function 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 var 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 var status = statusFactory({
|
25
9
|
parseDOM: [{
|
26
10
|
tag: 'span[data-node-type="status"]',
|
27
11
|
getAttrs: function getAttrs(domNode) {
|
@@ -49,4 +33,4 @@ export var status = {
|
|
49
33
|
};
|
50
34
|
return ['span', attrs, text];
|
51
35
|
}
|
52
|
-
};
|
36
|
+
});
|
@@ -6,6 +6,10 @@ import { hexToEditorBackgroundPaletteRawValue } from '../../utils/editor-palette
|
|
6
6
|
import { B100, B50, B75, G200, G50, G75, hexToRgba, isHex, isRgb, N0, N20, N60, N800, P100, P50, P75, R100, R50, R75, rgbToHex, T100, T50, T75, Y200, Y50, Y75 } from '../../utils/colors';
|
7
7
|
import { uuid } from '../../utils/uuid';
|
8
8
|
import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
9
|
+
import { table as tableFactory } from '../../next-schema/generated/nodeTypes';
|
10
|
+
import { tableCell as tableCellFactory } from '../../next-schema/generated/nodeTypes';
|
11
|
+
import { tableHeader as tableHeaderFactory } from '../../next-schema/generated/nodeTypes';
|
12
|
+
import { tableRow as tableRowFactory } from '../../next-schema/generated/nodeTypes';
|
9
13
|
export var tablePrefixSelector = 'pm-table';
|
10
14
|
export var tableCellSelector = "".concat(tablePrefixSelector, "-cell-content-wrap");
|
11
15
|
export var tableHeaderSelector = "".concat(tablePrefixSelector, "-header-content-wrap");
|
@@ -196,34 +200,7 @@ export var tableBackgroundColorNames = new Map();
|
|
196
200
|
|
197
201
|
// TODO: Fix any, potential issue. ED-5048
|
198
202
|
var createTableSpec = function createTableSpec() {
|
199
|
-
|
200
|
-
isNumberColumnEnabled: {
|
201
|
-
default: false
|
202
|
-
},
|
203
|
-
layout: {
|
204
|
-
default: 'default'
|
205
|
-
},
|
206
|
-
__autoSize: {
|
207
|
-
default: false
|
208
|
-
},
|
209
|
-
localId: {
|
210
|
-
default: ''
|
211
|
-
},
|
212
|
-
width: {
|
213
|
-
default: null
|
214
|
-
},
|
215
|
-
displayMode: {
|
216
|
-
default: null
|
217
|
-
}
|
218
|
-
};
|
219
|
-
var tableNodeSpec = {
|
220
|
-
content: 'tableRow+',
|
221
|
-
attrs: attrs,
|
222
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
223
|
-
tableRole: 'table',
|
224
|
-
isolating: true,
|
225
|
-
selectable: true,
|
226
|
-
group: 'block',
|
203
|
+
return tableFactory({
|
227
204
|
parseDOM: [{
|
228
205
|
tag: 'table',
|
229
206
|
getAttrs: function getAttrs(node) {
|
@@ -254,8 +231,7 @@ var createTableSpec = function createTableSpec() {
|
|
254
231
|
};
|
255
232
|
return ['table', attrs, ['tbody', 0]];
|
256
233
|
}
|
257
|
-
};
|
258
|
-
return tableNodeSpec;
|
234
|
+
});
|
259
235
|
};
|
260
236
|
|
261
237
|
// TODO: assuming breaking changes aren't allowed, so retaining both exports
|
@@ -276,18 +252,14 @@ export var tableToJSON = function tableToJSON(node) {
|
|
276
252
|
}, {})
|
277
253
|
};
|
278
254
|
};
|
279
|
-
export var tableRow = {
|
280
|
-
selectable: false,
|
281
|
-
content: '(tableCell | tableHeader)+',
|
282
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
283
|
-
tableRole: 'row',
|
255
|
+
export var tableRow = tableRowFactory({
|
284
256
|
parseDOM: [{
|
285
257
|
tag: 'tr'
|
286
258
|
}],
|
287
259
|
toDOM: function toDOM() {
|
288
260
|
return ['tr', 0];
|
289
261
|
}
|
290
|
-
};
|
262
|
+
});
|
291
263
|
var cellAttrs = {
|
292
264
|
colspan: {
|
293
265
|
default: 1
|
@@ -302,13 +274,7 @@ var cellAttrs = {
|
|
302
274
|
default: null
|
303
275
|
}
|
304
276
|
};
|
305
|
-
export var tableCell = {
|
306
|
-
selectable: false,
|
307
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
|
308
|
-
attrs: cellAttrs,
|
309
|
-
tableRole: 'cell',
|
310
|
-
marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
311
|
-
isolating: true,
|
277
|
+
export var tableCell = tableCellFactory({
|
312
278
|
parseDOM: [
|
313
279
|
// Ignore number cell copied from renderer
|
314
280
|
{
|
@@ -323,7 +289,7 @@ export var tableCell = {
|
|
323
289
|
toDOM: function toDOM(node) {
|
324
290
|
return ['td', getCellDomAttrs(node), 0];
|
325
291
|
}
|
326
|
-
};
|
292
|
+
});
|
327
293
|
export var toJSONTableCell = function toJSONTableCell(node) {
|
328
294
|
return {
|
329
295
|
attrs: Object.keys(node.attrs).reduce(function (obj, key) {
|
@@ -334,13 +300,7 @@ export var toJSONTableCell = function toJSONTableCell(node) {
|
|
334
300
|
}, {})
|
335
301
|
};
|
336
302
|
};
|
337
|
-
export var tableHeader = {
|
338
|
-
selectable: false,
|
339
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
|
340
|
-
attrs: cellAttrs,
|
341
|
-
tableRole: 'header_cell',
|
342
|
-
isolating: true,
|
343
|
-
marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
303
|
+
export var tableHeader = tableHeaderFactory({
|
344
304
|
parseDOM: [{
|
345
305
|
tag: 'th',
|
346
306
|
getAttrs: function getAttrs(dom) {
|
@@ -352,5 +312,5 @@ export var tableHeader = {
|
|
352
312
|
toDOM: function toDOM(node) {
|
353
313
|
return ['th', getCellDomAttrs(node), 0];
|
354
314
|
}
|
355
|
-
};
|
315
|
+
});
|
356
316
|
export var toJSONTableHeader = toJSONTableCell;
|
@@ -1,22 +1,11 @@
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
2
|
+
import { taskItem as taskItemFactory } from '../../next-schema/generated/nodeTypes';
|
2
3
|
|
3
4
|
/**
|
4
5
|
* @name taskItem_node
|
5
6
|
*/
|
6
7
|
|
7
|
-
export var taskItem = {
|
8
|
-
content: 'inline*',
|
9
|
-
defining: true,
|
10
|
-
selectable: false,
|
11
|
-
marks: '_',
|
12
|
-
attrs: {
|
13
|
-
localId: {
|
14
|
-
default: ''
|
15
|
-
},
|
16
|
-
state: {
|
17
|
-
default: 'TODO'
|
18
|
-
}
|
19
|
-
},
|
8
|
+
export var taskItem = taskItemFactory({
|
20
9
|
parseDOM: [{
|
21
10
|
tag: 'div[data-task-local-id]',
|
22
11
|
// Default priority is 50. We normally don't change this but since this node type is
|
@@ -39,4 +28,4 @@ export var taskItem = {
|
|
39
28
|
};
|
40
29
|
return ['div', attrs, 0];
|
41
30
|
}
|
42
|
-
};
|
31
|
+
});
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
2
|
+
import { taskList as taskListFactory } from '../../next-schema/generated/nodeTypes';
|
2
3
|
|
3
4
|
/**
|
4
5
|
* @name taskList_node
|
@@ -6,17 +7,7 @@ import { uuid } from '../../utils/uuid';
|
|
6
7
|
|
7
8
|
var name = 'actionList';
|
8
9
|
export var taskListSelector = "[data-node-type=\"".concat(name, "\"]");
|
9
|
-
export var taskList = {
|
10
|
-
group: 'block',
|
11
|
-
defining: true,
|
12
|
-
selectable: false,
|
13
|
-
content: '(taskItem|unsupportedBlock)+ (taskItem|taskList|unsupportedBlock)*',
|
14
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
15
|
-
attrs: {
|
16
|
-
localId: {
|
17
|
-
default: ''
|
18
|
-
}
|
19
|
-
},
|
10
|
+
export var taskList = taskListFactory({
|
20
11
|
parseDOM: [{
|
21
12
|
tag: "div".concat(taskListSelector),
|
22
13
|
// Default priority is 50. We normally don't change this but since this node type is
|
@@ -37,4 +28,4 @@ export var taskList = {
|
|
37
28
|
};
|
38
29
|
return ['div', attrs, 0];
|
39
30
|
}
|
40
|
-
};
|
31
|
+
});
|
@@ -1,11 +1,11 @@
|
|
1
|
+
import { text as textFactory } from '../../next-schema/generated/nodeTypes';
|
2
|
+
|
1
3
|
/**
|
2
4
|
* @name text_node
|
3
5
|
*/
|
4
6
|
|
5
|
-
export var text = {
|
6
|
-
group: 'inline',
|
7
|
-
// TODO: toDebugString needs to be passed with createToPmFactory when migrate in https://product-fabric.atlassian.net/browse/ED-23606
|
7
|
+
export var text = textFactory({
|
8
8
|
toDebugString: process.env.NODE_ENV !== 'production' ? undefined : function () {
|
9
9
|
return 'text_node';
|
10
10
|
}
|
11
|
-
};
|
11
|
+
});
|