@atlaskit/adf-schema 28.1.6 → 28.1.7
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 +6 -0
- package/index.ts +275 -0
- package/package.json +5 -5
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-attrs.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-marks.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-without-content.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockquote-with-list-inside.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-with-nested-bodiedExtension.json +28 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-content.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionKey.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionType.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-attrs.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-marks.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-not-listItem-content.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-without-content.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-em.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strike.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strong.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-subsup.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-underline.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-non-text.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-strong.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unknown-attribute.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unsupported-marks.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decision-with-blockquote.json +31 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-empty-decision.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-no-decision.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-attrs.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-marks.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-content.json +4 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-version.json +4 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/em-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-as-top-level-node.json +12 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-content.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-empty-attrs.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-marks.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-unknown-attr.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-without-attrs.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-nested-with-marks.json +60 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-with-breakout-inside-of-layout.json +50 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-content.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-empty-local-id.json +16 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionKey.json +12 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionType.json +12 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-marks.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-wrong-text.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-invalid-level-attr.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-block.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-inline.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unknown-attrs.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unsupported-mark.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-without-attrs.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-with-content.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionKey.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionType.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-missing-layoutColumn.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-one-column.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-overflow-width.json +37 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-two-columns-and-breakout-code-block.json +38 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-empty-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-unknown-attr.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-without-attrs.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/list-with-blockquote.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-attrs.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-empty-content.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-list-as-first-child.json +30 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-marks.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-as-top-level-node.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-empty-attrs.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-alt-text.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-occurrence-key-attr.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-marks.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-unknown-attr.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-attrs.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-id-attr.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-type-attr.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-attrs.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-marks.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-without-content.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaInline-with-subsup-mark.json +30 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-attrs.json +11 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-caption.json +46 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-layout-attr.json +38 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-negative-width.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-overflow-width.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-zero-width.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-extra-attrs.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-invalid-user-type.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-marks.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-without-attrs.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mono-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-extra-attrs.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-marks.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-without-content.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-blockquote.json +25 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-codeBlock.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-empty-attrs.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-marks.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-panel.json +25 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-unknown-attr.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-without-attrs.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-text-with-unknown-mark.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-top-level-content.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-unsupported-marks.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-content.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-empty-attrs.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-attrs.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-marks.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-with-extra-attr.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-attrs.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-color-attr.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-text-attr.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strike-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strong-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-extra-attrs.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-invalid-type-attr.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-attrs.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-type-attr.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-breakout-code-block.json +33 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-with-empty-local-id.json +41 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-without-local-id.json +40 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-nested-table.json +50 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-cells.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-rows.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-blockquote.json +31 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-invalid-state.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskItem-with-nested-taskItem.json +70 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-empty-task.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-no-task.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-taskList-as-first-child.json +48 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/text-empty.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-extra-attrs.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-invalid-color-attr.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-attrs.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-color-attr.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/underline-with-attrs.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/annotation.json +28 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/blockQuote-with-content.json +16 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-Extension-with-rich-body.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-empty-content.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-media-link.json +41 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-nested-extension.json +33 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-parameters.json +30 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodiedExtension-with-data-consumer-mark.json +47 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bulletList-with-content.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-attrs.json +11 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-breakout-mark.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-empty-marks.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-language.json +482 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-multiple-text.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-text.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-unknown-language.json +13 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/decision-with-mention.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/decisionList-with-decision.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-all-content.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-content.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-empty-content.json +5 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/embed-card.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-fallback.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-variation.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-embed-card.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-marks.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-nestedExpand.json +136 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-data-consumer-mark.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-empty-marks.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-local-id.json +16 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-named-fragment-mark.json +25 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-parameters.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-empty-attrs.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-with-text.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-code-text.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-content.json +78 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-em-text.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-content.json +78 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-marks.json +14 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-link-text.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strike-text.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strong-text.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-subsup-text.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-supported-mark.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-underline-text.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-data-consumer-mark.json +48 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-fragment-mark.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-parameters.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-without-parameters.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layout-with-embed.json +51 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-three-columns.json +50 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns-and-breakout.json +40 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns.json +37 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href-title.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-bullet-list-and-media-single.json +47 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-media-single-and-bullet-list.json +57 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-ordered-list.json +37 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-paragraph.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-with-codeBlock.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/listItem-with-content.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-external-with-alt-text-value.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-layout-column.json +57 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-list-item.json +88 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-nested-expand.json +64 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-table.json +56 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-an-expand.json +44 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text-value.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-link-mark.json +36 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-occurrence-key.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-type-link.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaGroup-with-multiple-media.json +27 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-file-type-attr.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-mark.json +30 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-type-attr.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline.json +22 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption-inside-list-item.json +38 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption.json +28 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-link-mark.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-parameters.json +86 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-width.json +74 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-without-parameters.json +19 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-attrs.json +18 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-user-type.json +35 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-with-data-consumer-mark.json +226 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-without-mark.json +176 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nestedExpand.json +128 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-content.json +30 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-order.json +33 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-info.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-note.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-tip.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-warning.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-blockCard.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-list.json +31 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-paragraph.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-content.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-content.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-marks.json +11 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-supported-mark.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-without-content.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/placeholder.json +17 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/rule.json +9 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-nested-in-list.json +43 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-all-attrs.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-default-attrs.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sub.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sup.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-empty-cell.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-fragment-mark.json +41 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-header-row.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-layout.json +50 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-local-id.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-nested-nodes.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/task-with-mention.json +34 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-nested-taskLists.json +74 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-tasks.json +40 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code-and-link.json +26 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-em.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-link.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-strong.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-subsup.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-textColor.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-underline.json +20 -0
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text.json +15 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/.gitkeep +0 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-empty-attrs.json +10 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-empty-datasource.json +12 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-empty-views.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-id.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-layout.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-views-type.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-width.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/bodiedExtension-with-source-as-string-data-consumer-mark.json +46 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-invalid-local-id.json +16 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-nonsense-marks.json +21 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/inlineExtension-with-source-as-string-data-consumer-mark.json +48 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-percentage-width.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-pixel-width.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/nested-extensions-with-link-mark.json +216 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-empty-local-id.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-local-id.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-width.json +32 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/.gitkeep +0 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-with-datasources.json +38 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-with-empty-datasource-parameters.json +29 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-without-optional-fields.json +23 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/layoutSection-with-one-column.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-percentage-width.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-pixel-width.json +24 -0
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/table-with-width.json +32 -0
- package/src/__tests__/unit/json-schema/v1.ts +53 -0
- package/src/__tests__/unit/schema/create-schema.ts +214 -0
- package/src/__tests__/unit/schema/default-schema.ts +192 -0
- package/src/__tests__/unit/schema/marks/annotation.ts +46 -0
- package/src/__tests__/unit/schema/marks/border.ts +76 -0
- package/src/__tests__/unit/schema/marks/breakout.ts +24 -0
- package/src/__tests__/unit/schema/marks/code.ts +44 -0
- package/src/__tests__/unit/schema/marks/confluence-inline-comment.ts +25 -0
- package/src/__tests__/unit/schema/marks/data-consumer.ts +52 -0
- package/src/__tests__/unit/schema/marks/em.ts +37 -0
- package/src/__tests__/unit/schema/marks/link.ts +188 -0
- package/src/__tests__/unit/schema/marks/strike.ts +37 -0
- package/src/__tests__/unit/schema/marks/strong.ts +43 -0
- package/src/__tests__/unit/schema/marks/subsup.ts +50 -0
- package/src/__tests__/unit/schema/marks/text-color.ts +61 -0
- package/src/__tests__/unit/schema/marks/underline.ts +36 -0
- package/src/__tests__/unit/schema/nodes/_consts.ts +964 -0
- package/src/__tests__/unit/schema/nodes/block-card.ts +184 -0
- package/src/__tests__/unit/schema/nodes/blockquote.ts +44 -0
- package/src/__tests__/unit/schema/nodes/bodied-extension.ts +101 -0
- package/src/__tests__/unit/schema/nodes/code-block.ts +221 -0
- package/src/__tests__/unit/schema/nodes/confluence-unsupported-block.ts +36 -0
- package/src/__tests__/unit/schema/nodes/confluence-unsupported-inline.ts +35 -0
- package/src/__tests__/unit/schema/nodes/date.ts +51 -0
- package/src/__tests__/unit/schema/nodes/decision-item.ts +46 -0
- package/src/__tests__/unit/schema/nodes/decision-list.ts +52 -0
- package/src/__tests__/unit/schema/nodes/embed-card.ts +60 -0
- package/src/__tests__/unit/schema/nodes/emoji.ts +71 -0
- package/src/__tests__/unit/schema/nodes/expand.ts +51 -0
- package/src/__tests__/unit/schema/nodes/extension.ts +101 -0
- package/src/__tests__/unit/schema/nodes/hard-break.ts +24 -0
- package/src/__tests__/unit/schema/nodes/heading.ts +56 -0
- package/src/__tests__/unit/schema/nodes/image.ts +32 -0
- package/src/__tests__/unit/schema/nodes/inline-card.ts +106 -0
- package/src/__tests__/unit/schema/nodes/inline-extension.ts +79 -0
- package/src/__tests__/unit/schema/nodes/layout-column.ts +54 -0
- package/src/__tests__/unit/schema/nodes/layout-section.ts +95 -0
- package/src/__tests__/unit/schema/nodes/list-item.ts +49 -0
- package/src/__tests__/unit/schema/nodes/media-group.ts +67 -0
- package/src/__tests__/unit/schema/nodes/media-single.ts +171 -0
- package/src/__tests__/unit/schema/nodes/media.ts +388 -0
- package/src/__tests__/unit/schema/nodes/mention.ts +115 -0
- package/src/__tests__/unit/schema/nodes/nestedExpand.ts +72 -0
- package/src/__tests__/unit/schema/nodes/ordered-list.ts +49 -0
- package/src/__tests__/unit/schema/nodes/panel.ts +180 -0
- package/src/__tests__/unit/schema/nodes/paragraph.ts +25 -0
- package/src/__tests__/unit/schema/nodes/placeholder.ts +46 -0
- package/src/__tests__/unit/schema/nodes/rule.ts +24 -0
- package/src/__tests__/unit/schema/nodes/status.ts +120 -0
- package/src/__tests__/unit/schema/nodes/tableNodes.ts +555 -0
- package/src/__tests__/unit/schema/nodes/task-item.ts +39 -0
- package/src/__tests__/unit/schema/nodes/task-list.ts +45 -0
- package/src/__tests__/unit/schema/nodes/unknown-block.ts +42 -0
- package/src/__tests__/unit/schema/nodes/unsupported-block.ts +42 -0
- package/src/__tests__/unit/schema/nodes/unsupported-inline.ts +38 -0
- package/src/__tests__/unit/utils/colors.ts +42 -0
- package/src/__tests__/unit/utils/url.ts +209 -0
- package/src/index.ts +297 -0
- package/src/json-schema/index.ts +2 -0
- package/src/schema/bitbucket-schema.ts +43 -0
- package/src/schema/confluence-schema.ts +76 -0
- package/src/schema/create-schema.ts +337 -0
- package/src/schema/default-schema.ts +180 -0
- package/src/schema/groups.ts +30 -0
- package/src/schema/index.ts +238 -0
- package/src/schema/inline-nodes.ts +9 -0
- package/src/schema/jira-schema.ts +158 -0
- package/src/schema/marks/__tests__/unit/annotation.ts +18 -0
- package/src/schema/marks/alignment.ts +48 -0
- package/src/schema/marks/annotation.ts +107 -0
- package/src/schema/marks/border.ts +74 -0
- package/src/schema/marks/breakout.ts +42 -0
- package/src/schema/marks/code.ts +45 -0
- package/src/schema/marks/confluence-inline-comment.ts +32 -0
- package/src/schema/marks/data-consumer.ts +100 -0
- package/src/schema/marks/em.ts +19 -0
- package/src/schema/marks/fragment.ts +77 -0
- package/src/schema/marks/indentation.ts +47 -0
- package/src/schema/marks/index.ts +61 -0
- package/src/schema/marks/link.ts +139 -0
- package/src/schema/marks/strike.ts +26 -0
- package/src/schema/marks/strong.ts +45 -0
- package/src/schema/marks/subsup.ts +53 -0
- package/src/schema/marks/text-color.ts +172 -0
- package/src/schema/marks/type-ahead-query.ts +22 -0
- package/src/schema/marks/underline.ts +24 -0
- package/src/schema/marks/unsupported-mark.ts +9 -0
- package/src/schema/marks/unsupported-node-attributes.ts +8 -0
- package/src/schema/nodes/block-card.ts +121 -0
- package/src/schema/nodes/blockquote.ts +25 -0
- package/src/schema/nodes/bodied-extension.ts +75 -0
- package/src/schema/nodes/bullet-list.ts +17 -0
- package/src/schema/nodes/caption.ts +51 -0
- package/src/schema/nodes/code-block.ts +176 -0
- package/src/schema/nodes/confluence-jira-issue.ts +43 -0
- package/src/schema/nodes/confluence-unsupported-block.ts +29 -0
- package/src/schema/nodes/confluence-unsupported-inline.ts +30 -0
- package/src/schema/nodes/date.ts +38 -0
- package/src/schema/nodes/decision-item.ts +50 -0
- package/src/schema/nodes/decision-list.ts +56 -0
- package/src/schema/nodes/doc.ts +30 -0
- package/src/schema/nodes/embed-card.ts +62 -0
- package/src/schema/nodes/emoji.ts +89 -0
- package/src/schema/nodes/expand.ts +101 -0
- package/src/schema/nodes/extension.ts +60 -0
- package/src/schema/nodes/hard-break.ts +21 -0
- package/src/schema/nodes/heading.ts +64 -0
- package/src/schema/nodes/image.ts +32 -0
- package/src/schema/nodes/index.ts +184 -0
- package/src/schema/nodes/inline-card.ts +70 -0
- package/src/schema/nodes/inline-extension.ts +57 -0
- package/src/schema/nodes/layout-column.ts +68 -0
- package/src/schema/nodes/layout-section.ts +93 -0
- package/src/schema/nodes/list-item.ts +13 -0
- package/src/schema/nodes/media-group.ts +44 -0
- package/src/schema/nodes/media-inline.ts +19 -0
- package/src/schema/nodes/media-single.ts +179 -0
- package/src/schema/nodes/media.ts +249 -0
- package/src/schema/nodes/mention.ts +86 -0
- package/src/schema/nodes/nested-expand.ts +77 -0
- package/src/schema/nodes/ordered-list.ts +62 -0
- package/src/schema/nodes/panel.ts +133 -0
- package/src/schema/nodes/paragraph.ts +79 -0
- package/src/schema/nodes/placeholder.ts +40 -0
- package/src/schema/nodes/rule.ts +17 -0
- package/src/schema/nodes/status.ts +58 -0
- package/src/schema/nodes/tableNodes.ts +480 -0
- package/src/schema/nodes/task-item.ts +51 -0
- package/src/schema/nodes/task-list.ts +61 -0
- package/src/schema/nodes/text.ts +19 -0
- package/src/schema/nodes/types/block-content.ts +51 -0
- package/src/schema/nodes/types/extensions.ts +36 -0
- package/src/schema/nodes/types/inline-content.ts +56 -0
- package/src/schema/nodes/types/list.ts +54 -0
- package/src/schema/nodes/types/mark.ts +16 -0
- package/src/schema/nodes/types/non-nestable-block-content.ts +39 -0
- package/src/schema/nodes/types/rich-media-common.ts +51 -0
- package/src/schema/nodes/unknown-block.ts +13 -0
- package/src/schema/nodes/unsupported-block.ts +28 -0
- package/src/schema/nodes/unsupported-inline.ts +27 -0
- package/src/schema/unsupported.ts +4 -0
- package/src/steps/__tests__/unit/analytics.ts +72 -0
- package/src/steps/__tests__/unit/link-meta-step.ts +64 -0
- package/src/steps/__tests__/unit/override-document-step.ts +174 -0
- package/src/steps/__tests__/unit/set-attrs.ts +71 -0
- package/src/steps/analytics.ts +189 -0
- package/src/steps/link-meta-step.ts +105 -0
- package/src/steps/override-document-step.ts +97 -0
- package/src/steps/set-attrs.tsx +74 -0
- package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-0.json +15 -0
- package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-1.json +15 -0
- package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-2.json +15 -0
- package/src/steps/table/__tests__/__fixtures__/basic/add-column-at-3.json +15 -0
- package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-0.json +9 -0
- package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-1.json +9 -0
- package/src/steps/table/__tests__/__fixtures__/basic/remove-column-at-2.json +9 -0
- package/src/steps/table/__tests__/__fixtures__/basic/remove-table/remove-last-row-inverted.json +98 -0
- package/src/steps/table/__tests__/__fixtures__/basic/remove-table/remove-last-row.json +71 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-0-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-0.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-1-inverted.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-1.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-2-inverted.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-2.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-3-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/add-column-at-3.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-0-inverted.json +63 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-0.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-1-inverted.json +64 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-1.json +22 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-2-inverted.json +63 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/columns/remove-column-at-2.json +21 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-0-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-0.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-1-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-1.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-2-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-2.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-3-inverted.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/add-column-at-3.json +19 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-0-inverted.json +52 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-0.json +38 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-1-inverted.json +52 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-1.json +38 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-2-inverted.json +25 -0
- package/src/steps/table/__tests__/__fixtures__/merge-cells/rows/remove-column-at-2.json +11 -0
- package/src/steps/table/__tests__/_utils.ts +103 -0
- package/src/steps/table/__tests__/add-column-merge-columns.ts +491 -0
- package/src/steps/table/__tests__/add-column-merge-rows.ts +450 -0
- package/src/steps/table/__tests__/add-column.ts +610 -0
- package/src/steps/table/add-column.ts +440 -0
- package/src/steps/table/constants.ts +4 -0
- package/src/steps/table/sort-column.ts +57 -0
- package/src/steps/table/types.ts +48 -0
- package/src/steps/table/utils/cell-step.ts +239 -0
- package/src/steps/table/utils/cells-at-column.ts +72 -0
- package/src/steps/table/utils/find-column.ts +90 -0
- package/src/steps/table/utils/get-table-rect-from-doc.ts +37 -0
- package/src/steps/table/utils/side-effects/rows.ts +327 -0
- package/src/steps/table/utils/side-effects/side-effects.ts +90 -0
- package/src/steps/table/utils/side-effects/table.ts +112 -0
- package/src/steps/table/utils/side-effects/types.ts +34 -0
- package/src/steps/table/utils/table-map.ts +28 -0
- package/src/steps/type-ahead.ts +100 -0
- package/src/steps.ts +16 -0
- package/src/utils/colors.ts +171 -0
- package/src/utils/confluence/emoji.ts +99 -0
- package/src/utils/extensions.ts +32 -0
- package/src/utils/index.ts +69 -0
- package/src/utils/parseDOM.ts +2 -0
- package/src/utils/url.ts +173 -0
- package/src/utils/uuid.ts +19 -0
- package/src/version.json +6 -0
- package/babel.config.js +0 -156
@@ -0,0 +1,76 @@
|
|
1
|
+
import { createSchema } from './create-schema';
|
2
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
3
|
+
|
4
|
+
const nodes = [
|
5
|
+
'doc',
|
6
|
+
'paragraph',
|
7
|
+
'blockquote',
|
8
|
+
'codeBlock',
|
9
|
+
'panel',
|
10
|
+
'hardBreak',
|
11
|
+
'orderedList',
|
12
|
+
'bulletList',
|
13
|
+
'heading',
|
14
|
+
'mediaInline',
|
15
|
+
'mediaGroup',
|
16
|
+
'mediaSingle',
|
17
|
+
'media',
|
18
|
+
'caption',
|
19
|
+
'confluenceUnsupportedBlock',
|
20
|
+
'confluenceJiraIssue',
|
21
|
+
'expand',
|
22
|
+
'nestedExpand',
|
23
|
+
'extension',
|
24
|
+
'inlineExtension',
|
25
|
+
'bodiedExtension',
|
26
|
+
'listItem',
|
27
|
+
'mention',
|
28
|
+
'text',
|
29
|
+
'confluenceUnsupportedInline',
|
30
|
+
'media',
|
31
|
+
'rule',
|
32
|
+
'table',
|
33
|
+
'tableCell',
|
34
|
+
'tableHeader',
|
35
|
+
'tableRow',
|
36
|
+
'emoji',
|
37
|
+
'taskList',
|
38
|
+
'taskItem',
|
39
|
+
'date',
|
40
|
+
'placeholder',
|
41
|
+
'decisionList',
|
42
|
+
'decisionItem',
|
43
|
+
'layoutSection',
|
44
|
+
'layoutColumn',
|
45
|
+
'inlineCard',
|
46
|
+
'unsupportedBlock',
|
47
|
+
'unsupportedInline',
|
48
|
+
];
|
49
|
+
|
50
|
+
const marks = [
|
51
|
+
'link',
|
52
|
+
'em',
|
53
|
+
'strong',
|
54
|
+
'strike',
|
55
|
+
'subsup',
|
56
|
+
'underline',
|
57
|
+
'mentionQuery',
|
58
|
+
'code',
|
59
|
+
'textColor',
|
60
|
+
'confluenceInlineComment',
|
61
|
+
'annotation',
|
62
|
+
'unsupportedMark',
|
63
|
+
'unsupportedNodeAttribute',
|
64
|
+
];
|
65
|
+
|
66
|
+
/**
|
67
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
68
|
+
**/
|
69
|
+
export const confluenceSchema: Schema = createSchema({ nodes, marks });
|
70
|
+
/**
|
71
|
+
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
72
|
+
**/
|
73
|
+
export const confluenceSchemaWithMediaSingle: Schema = createSchema({
|
74
|
+
nodes: nodes.concat('mediaSingle'),
|
75
|
+
marks,
|
76
|
+
});
|
@@ -0,0 +1,337 @@
|
|
1
|
+
import { NodeSpec, MarkSpec, Schema } from '@atlaskit/editor-prosemirror/model';
|
2
|
+
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
3
|
+
|
4
|
+
import {
|
5
|
+
link,
|
6
|
+
em,
|
7
|
+
strong,
|
8
|
+
textColor,
|
9
|
+
strike,
|
10
|
+
subsup,
|
11
|
+
underline,
|
12
|
+
code,
|
13
|
+
typeAheadQuery,
|
14
|
+
confluenceInlineComment,
|
15
|
+
breakout,
|
16
|
+
alignment,
|
17
|
+
indentation,
|
18
|
+
annotation,
|
19
|
+
unsupportedMark,
|
20
|
+
unsupportedNodeAttribute,
|
21
|
+
dataConsumer,
|
22
|
+
fragment,
|
23
|
+
border,
|
24
|
+
} from './marks';
|
25
|
+
|
26
|
+
import {
|
27
|
+
confluenceJiraIssue,
|
28
|
+
confluenceUnsupportedBlock,
|
29
|
+
confluenceUnsupportedInline,
|
30
|
+
doc,
|
31
|
+
paragraph,
|
32
|
+
text,
|
33
|
+
bulletList,
|
34
|
+
orderedListWithOrder,
|
35
|
+
listItem,
|
36
|
+
heading,
|
37
|
+
blockquote,
|
38
|
+
codeBlock,
|
39
|
+
panel,
|
40
|
+
rule,
|
41
|
+
image,
|
42
|
+
mention,
|
43
|
+
media,
|
44
|
+
mediaInline,
|
45
|
+
mediaSingleWithCaption,
|
46
|
+
mediaGroup,
|
47
|
+
hardBreak,
|
48
|
+
emoji,
|
49
|
+
table,
|
50
|
+
tableCell,
|
51
|
+
tableHeader,
|
52
|
+
tableRow,
|
53
|
+
decisionList,
|
54
|
+
decisionItem,
|
55
|
+
taskList,
|
56
|
+
taskItem,
|
57
|
+
unknownBlock,
|
58
|
+
extension,
|
59
|
+
inlineExtension,
|
60
|
+
bodiedExtension,
|
61
|
+
date,
|
62
|
+
placeholder,
|
63
|
+
layoutSection,
|
64
|
+
layoutColumn,
|
65
|
+
inlineCard,
|
66
|
+
blockCard,
|
67
|
+
unsupportedBlock,
|
68
|
+
unsupportedInline,
|
69
|
+
status,
|
70
|
+
expand,
|
71
|
+
nestedExpand,
|
72
|
+
embedCard,
|
73
|
+
caption,
|
74
|
+
} from './nodes';
|
75
|
+
|
76
|
+
function addItems(
|
77
|
+
builtInItems: SchemaBuiltInItem[],
|
78
|
+
config: string[],
|
79
|
+
customSpecs: SchemaCustomNodeSpecs | SchemaCustomMarkSpecs = {},
|
80
|
+
) {
|
81
|
+
if (!config) {
|
82
|
+
return {};
|
83
|
+
}
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Add built-in Node / Mark specs
|
87
|
+
*/
|
88
|
+
const items = builtInItems.reduce<Record<string, NodeSpec | MarkSpec>>(
|
89
|
+
(items, { name, spec }) => {
|
90
|
+
if (config.indexOf(name) !== -1) {
|
91
|
+
items[name] = customSpecs[name] || spec;
|
92
|
+
}
|
93
|
+
|
94
|
+
return items;
|
95
|
+
},
|
96
|
+
{},
|
97
|
+
);
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Add Custom Node / Mark specs
|
101
|
+
*/
|
102
|
+
return Object.keys(customSpecs).reduce((items, name) => {
|
103
|
+
if (items[name]) {
|
104
|
+
return items;
|
105
|
+
}
|
106
|
+
|
107
|
+
items[name] = customSpecs[name];
|
108
|
+
|
109
|
+
return items;
|
110
|
+
}, items);
|
111
|
+
}
|
112
|
+
|
113
|
+
// We use groups to allow schemas to be constructed in different shapes without changing node/mark
|
114
|
+
// specs, but this means nodes/marks are defined with groups that might never be used in the schema.
|
115
|
+
// In this scenario ProseMirror will complain and prevent the schema from being constructed.
|
116
|
+
//
|
117
|
+
// To avoid the problem, we include items that serve to "declare" the groups in the schema. This
|
118
|
+
// approach unfortunately leaves unused items in the schema, but has the benefit of avoiding the
|
119
|
+
// need to manipulate `exclude` or content expression values for potentially every schema item.
|
120
|
+
function groupDeclaration(name: string) {
|
121
|
+
return {
|
122
|
+
name: `__${name}GroupDeclaration`,
|
123
|
+
spec: {
|
124
|
+
group: name,
|
125
|
+
},
|
126
|
+
};
|
127
|
+
}
|
128
|
+
|
129
|
+
const markGroupDeclarations = [
|
130
|
+
groupDeclaration(COLOR),
|
131
|
+
groupDeclaration(FONT_STYLE),
|
132
|
+
groupDeclaration(SEARCH_QUERY),
|
133
|
+
groupDeclaration(LINK),
|
134
|
+
];
|
135
|
+
|
136
|
+
const markGroupDeclarationsNames = markGroupDeclarations.map(
|
137
|
+
(groupMark) => groupMark.name,
|
138
|
+
);
|
139
|
+
|
140
|
+
const nodesInOrder: SchemaBuiltInItem[] = [
|
141
|
+
{ name: 'doc', spec: doc },
|
142
|
+
{ name: 'paragraph', spec: paragraph },
|
143
|
+
{ name: 'text', spec: text },
|
144
|
+
{ name: 'bulletList', spec: bulletList },
|
145
|
+
{ name: 'orderedList', spec: orderedListWithOrder },
|
146
|
+
{ name: 'listItem', spec: listItem },
|
147
|
+
{ name: 'heading', spec: heading },
|
148
|
+
{ name: 'blockquote', spec: blockquote },
|
149
|
+
{ name: 'codeBlock', spec: codeBlock },
|
150
|
+
{ name: 'panel', spec: panel(true) },
|
151
|
+
{ name: 'rule', spec: rule },
|
152
|
+
{ name: 'image', spec: image },
|
153
|
+
{ name: 'mention', spec: mention },
|
154
|
+
{ name: 'caption', spec: caption },
|
155
|
+
{ name: 'media', spec: media },
|
156
|
+
{ name: 'mediaGroup', spec: mediaGroup },
|
157
|
+
{ name: 'mediaSingle', spec: mediaSingleWithCaption },
|
158
|
+
{ name: 'mediaInline', spec: mediaInline },
|
159
|
+
{ name: 'placeholder', spec: placeholder },
|
160
|
+
{ name: 'layoutSection', spec: layoutSection },
|
161
|
+
{ name: 'layoutColumn', spec: layoutColumn },
|
162
|
+
{ name: 'hardBreak', spec: hardBreak },
|
163
|
+
{ name: 'emoji', spec: emoji },
|
164
|
+
{ name: 'table', spec: table },
|
165
|
+
{ name: 'tableCell', spec: tableCell },
|
166
|
+
{ name: 'tableRow', spec: tableRow },
|
167
|
+
{ name: 'tableHeader', spec: tableHeader },
|
168
|
+
{ name: 'confluenceJiraIssue', spec: confluenceJiraIssue },
|
169
|
+
{ name: 'confluenceUnsupportedInline', spec: confluenceUnsupportedInline },
|
170
|
+
{ name: 'confluenceUnsupportedBlock', spec: confluenceUnsupportedBlock },
|
171
|
+
{ name: 'decisionList', spec: decisionList },
|
172
|
+
{ name: 'decisionItem', spec: decisionItem },
|
173
|
+
{ name: 'taskList', spec: taskList },
|
174
|
+
{ name: 'taskItem', spec: taskItem },
|
175
|
+
{ name: 'date', spec: date },
|
176
|
+
{ name: 'status', spec: status },
|
177
|
+
{ name: 'expand', spec: expand },
|
178
|
+
{ name: 'nestedExpand', spec: nestedExpand },
|
179
|
+
{ name: 'extension', spec: extension },
|
180
|
+
{ name: 'inlineExtension', spec: inlineExtension },
|
181
|
+
{ name: 'bodiedExtension', spec: bodiedExtension },
|
182
|
+
{ name: 'inlineCard', spec: inlineCard },
|
183
|
+
{ name: 'blockCard', spec: blockCard },
|
184
|
+
{ name: 'embedCard', spec: embedCard },
|
185
|
+
{ name: 'unknownBlock', spec: unknownBlock },
|
186
|
+
{ name: 'unsupportedBlock', spec: unsupportedBlock },
|
187
|
+
{ name: 'unsupportedInline', spec: unsupportedInline },
|
188
|
+
];
|
189
|
+
|
190
|
+
const marksInOrder: SchemaBuiltInItem[] = [
|
191
|
+
{ name: 'link', spec: link },
|
192
|
+
{ name: 'em', spec: em },
|
193
|
+
{ name: 'strong', spec: strong },
|
194
|
+
{ name: 'textColor', spec: textColor },
|
195
|
+
{ name: 'strike', spec: strike },
|
196
|
+
{ name: 'subsup', spec: subsup },
|
197
|
+
{ name: 'underline', spec: underline },
|
198
|
+
{ name: 'code', spec: code },
|
199
|
+
{ name: 'typeAheadQuery', spec: typeAheadQuery },
|
200
|
+
{ name: 'alignment', spec: alignment },
|
201
|
+
{ name: 'annotation', spec: annotation },
|
202
|
+
{ name: 'confluenceInlineComment', spec: confluenceInlineComment },
|
203
|
+
...markGroupDeclarations,
|
204
|
+
{ name: 'breakout', spec: breakout },
|
205
|
+
{ name: 'dataConsumer', spec: dataConsumer },
|
206
|
+
{ name: 'fragment', spec: fragment },
|
207
|
+
{ name: 'indentation', spec: indentation },
|
208
|
+
{ name: 'border', spec: border },
|
209
|
+
{ name: 'unsupportedMark', spec: unsupportedMark },
|
210
|
+
{ name: 'unsupportedNodeAttribute', spec: unsupportedNodeAttribute },
|
211
|
+
];
|
212
|
+
|
213
|
+
/**
|
214
|
+
* Creates a schema preserving order of marks and nodes.
|
215
|
+
*/
|
216
|
+
export function createSchema<
|
217
|
+
N extends string = string,
|
218
|
+
M extends string = string,
|
219
|
+
>(config: SchemaConfig<N, M>): Schema<N, M> {
|
220
|
+
const { customNodeSpecs, customMarkSpecs } = config;
|
221
|
+
const nodesConfig = Object.keys(customNodeSpecs || {}).concat(config.nodes);
|
222
|
+
const marksConfig = Object.keys(customMarkSpecs || {})
|
223
|
+
.concat(config.marks || [])
|
224
|
+
.concat(markGroupDeclarationsNames);
|
225
|
+
|
226
|
+
let nodes = addItems(nodesInOrder, nodesConfig, customNodeSpecs) as Record<
|
227
|
+
string,
|
228
|
+
NodeSpec
|
229
|
+
>;
|
230
|
+
let marks = addItems(marksInOrder, marksConfig, customMarkSpecs) as Record<
|
231
|
+
string,
|
232
|
+
MarkSpec
|
233
|
+
>;
|
234
|
+
nodes = sanitizeNodes(nodes, marks);
|
235
|
+
return new Schema<string, string>({
|
236
|
+
nodes,
|
237
|
+
marks,
|
238
|
+
});
|
239
|
+
}
|
240
|
+
|
241
|
+
export function sanitizeNodes(
|
242
|
+
nodes: { [key: string]: NodeSpec },
|
243
|
+
supportedMarks: { [key: string]: MarkSpec },
|
244
|
+
): { [key: string]: NodeSpec } {
|
245
|
+
const nodeNames = Object.keys(nodes);
|
246
|
+
nodeNames.forEach((nodeKey) => {
|
247
|
+
const nodeSpec = { ...nodes[nodeKey] };
|
248
|
+
if (nodeSpec.marks && nodeSpec.marks !== '_') {
|
249
|
+
nodeSpec.marks = nodeSpec.marks
|
250
|
+
.split(' ')
|
251
|
+
.filter((mark) => !!supportedMarks[mark])
|
252
|
+
.join(' ');
|
253
|
+
}
|
254
|
+
if (nodeSpec.content) {
|
255
|
+
nodeSpec.content = sanitizeNodeSpecContent(nodes, nodeSpec.content);
|
256
|
+
}
|
257
|
+
nodes[nodeKey] = nodeSpec;
|
258
|
+
});
|
259
|
+
return nodes;
|
260
|
+
}
|
261
|
+
|
262
|
+
export function sanitizeNodeSpecContent(
|
263
|
+
nodes: { [key: string]: NodeSpec },
|
264
|
+
rawContent: string,
|
265
|
+
): string {
|
266
|
+
const content = rawContent.replace(/\W/g, ' ');
|
267
|
+
const contentKeys = content.split(' ');
|
268
|
+
const unsupportedContentKeys = contentKeys.filter(
|
269
|
+
(contentKey) => !isContentSupported(nodes, contentKey),
|
270
|
+
);
|
271
|
+
return unsupportedContentKeys.reduce(
|
272
|
+
(newContent, nodeName) => sanitizedContent(newContent, nodeName),
|
273
|
+
rawContent,
|
274
|
+
);
|
275
|
+
}
|
276
|
+
|
277
|
+
function sanitizedContent(
|
278
|
+
content: string | undefined,
|
279
|
+
invalidContent: string,
|
280
|
+
): string {
|
281
|
+
if (!invalidContent.length) {
|
282
|
+
return content || '';
|
283
|
+
}
|
284
|
+
|
285
|
+
if (!content || !content.match(/\w/)) {
|
286
|
+
return '';
|
287
|
+
}
|
288
|
+
|
289
|
+
const pattern = `(${invalidContent}((\\s)*\\|)+)|((\\|(\\s)*)+${invalidContent})|(${invalidContent}$)|(${invalidContent}(\\+|\\*))`;
|
290
|
+
return content
|
291
|
+
.replace(new RegExp(pattern, 'g'), '')
|
292
|
+
.replace(' ', ' ')
|
293
|
+
.trim();
|
294
|
+
}
|
295
|
+
|
296
|
+
function isContentSupported(
|
297
|
+
nodes: { [key: string]: NodeSpec },
|
298
|
+
contentKey: string,
|
299
|
+
): boolean {
|
300
|
+
const nodeKeys = Object.keys(nodes);
|
301
|
+
|
302
|
+
// content is with valid node
|
303
|
+
if (nodeKeys.indexOf(contentKey) > -1) {
|
304
|
+
return true;
|
305
|
+
}
|
306
|
+
|
307
|
+
// content is with valid group
|
308
|
+
for (const supportedKey in nodes) {
|
309
|
+
const nodeSpec = nodes[supportedKey];
|
310
|
+
if (nodeSpec && nodeSpec.group === contentKey) {
|
311
|
+
return true;
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
return false;
|
316
|
+
}
|
317
|
+
|
318
|
+
export interface SchemaConfig<N = string, M = string> {
|
319
|
+
nodes: N[];
|
320
|
+
customNodeSpecs?: SchemaCustomNodeSpecs;
|
321
|
+
marks?: M[];
|
322
|
+
customMarkSpecs?: SchemaCustomMarkSpecs;
|
323
|
+
}
|
324
|
+
|
325
|
+
export interface SchemaBuiltInItem {
|
326
|
+
name: string;
|
327
|
+
spec: NodeSpec | MarkSpec;
|
328
|
+
}
|
329
|
+
|
330
|
+
export interface SchemaCustomNodeSpecs {
|
331
|
+
[name: string]: NodeSpec;
|
332
|
+
}
|
333
|
+
export interface SchemaCustomMarkSpecs {
|
334
|
+
[name: string]: MarkSpec;
|
335
|
+
}
|
336
|
+
|
337
|
+
export const allowCustomPanel: boolean = true;
|
@@ -0,0 +1,180 @@
|
|
1
|
+
import memoizeOne from 'memoize-one';
|
2
|
+
|
3
|
+
import {
|
4
|
+
mediaSingleFull,
|
5
|
+
layoutSectionWithSingleColumn,
|
6
|
+
tableWithCustomWidth,
|
7
|
+
} from './nodes';
|
8
|
+
import { createSchema, SchemaConfig } from './create-schema';
|
9
|
+
|
10
|
+
type DefaultSchemaNodes =
|
11
|
+
| 'doc'
|
12
|
+
| 'paragraph'
|
13
|
+
| 'text'
|
14
|
+
| 'bulletList'
|
15
|
+
| 'orderedList'
|
16
|
+
| 'listItem'
|
17
|
+
| 'heading'
|
18
|
+
| 'blockquote'
|
19
|
+
| 'codeBlock'
|
20
|
+
| 'panel'
|
21
|
+
| 'rule'
|
22
|
+
| 'image'
|
23
|
+
| 'mention'
|
24
|
+
| 'media'
|
25
|
+
| 'caption'
|
26
|
+
| 'mediaGroup'
|
27
|
+
| 'mediaSingle'
|
28
|
+
| 'mediaInline'
|
29
|
+
| 'confluenceUnsupportedBlock'
|
30
|
+
| 'confluenceUnsupportedInline'
|
31
|
+
| 'confluenceJiraIssue'
|
32
|
+
| 'expand'
|
33
|
+
| 'nestedExpand'
|
34
|
+
| 'extension'
|
35
|
+
| 'inlineExtension'
|
36
|
+
| 'bodiedExtension'
|
37
|
+
| 'hardBreak'
|
38
|
+
| 'emoji'
|
39
|
+
| 'table'
|
40
|
+
| 'tableCell'
|
41
|
+
| 'tableHeader'
|
42
|
+
| 'tableRow'
|
43
|
+
| 'decisionList'
|
44
|
+
| 'decisionItem'
|
45
|
+
| 'taskList'
|
46
|
+
| 'taskItem'
|
47
|
+
| 'unknownBlock'
|
48
|
+
| 'date'
|
49
|
+
| 'status'
|
50
|
+
| 'placeholder'
|
51
|
+
| 'layoutSection'
|
52
|
+
| 'layoutColumn'
|
53
|
+
| 'inlineCard'
|
54
|
+
| 'blockCard'
|
55
|
+
| 'embedCard'
|
56
|
+
| 'unsupportedBlock'
|
57
|
+
| 'unsupportedInline';
|
58
|
+
|
59
|
+
type DefaultSchemaMarks =
|
60
|
+
| 'link'
|
61
|
+
| 'em'
|
62
|
+
| 'strong'
|
63
|
+
| 'strike'
|
64
|
+
| 'subsup'
|
65
|
+
| 'underline'
|
66
|
+
| 'code'
|
67
|
+
| 'textColor'
|
68
|
+
| 'confluenceInlineComment'
|
69
|
+
| 'breakout'
|
70
|
+
| 'alignment'
|
71
|
+
| 'indentation'
|
72
|
+
| 'annotation'
|
73
|
+
| 'border'
|
74
|
+
| 'unsupportedMark'
|
75
|
+
| 'unsupportedNodeAttribute'
|
76
|
+
| 'typeAheadQuery'
|
77
|
+
| 'dataConsumer'
|
78
|
+
| 'fragment';
|
79
|
+
|
80
|
+
const getDefaultSchemaConfig = (): SchemaConfig<
|
81
|
+
DefaultSchemaNodes,
|
82
|
+
DefaultSchemaMarks
|
83
|
+
> => {
|
84
|
+
let defaultSchemaConfig: SchemaConfig<
|
85
|
+
DefaultSchemaNodes,
|
86
|
+
DefaultSchemaMarks
|
87
|
+
> = {
|
88
|
+
nodes: [
|
89
|
+
'doc',
|
90
|
+
'paragraph',
|
91
|
+
'text',
|
92
|
+
'bulletList',
|
93
|
+
'orderedList',
|
94
|
+
'listItem',
|
95
|
+
'heading',
|
96
|
+
'blockquote',
|
97
|
+
'codeBlock',
|
98
|
+
'panel',
|
99
|
+
'rule',
|
100
|
+
'image',
|
101
|
+
'caption',
|
102
|
+
'mention',
|
103
|
+
'media',
|
104
|
+
'mediaGroup',
|
105
|
+
'mediaSingle',
|
106
|
+
'mediaInline',
|
107
|
+
'confluenceUnsupportedBlock',
|
108
|
+
'confluenceUnsupportedInline',
|
109
|
+
'confluenceJiraIssue',
|
110
|
+
'expand',
|
111
|
+
'nestedExpand',
|
112
|
+
'extension',
|
113
|
+
'inlineExtension',
|
114
|
+
'bodiedExtension',
|
115
|
+
'hardBreak',
|
116
|
+
'emoji',
|
117
|
+
'table',
|
118
|
+
'tableCell',
|
119
|
+
'tableHeader',
|
120
|
+
'tableRow',
|
121
|
+
'decisionList',
|
122
|
+
'decisionItem',
|
123
|
+
'taskList',
|
124
|
+
'taskItem',
|
125
|
+
'unknownBlock',
|
126
|
+
'date',
|
127
|
+
'status',
|
128
|
+
'placeholder',
|
129
|
+
'layoutSection',
|
130
|
+
'layoutColumn',
|
131
|
+
'inlineCard',
|
132
|
+
'blockCard',
|
133
|
+
'embedCard',
|
134
|
+
'unsupportedBlock',
|
135
|
+
'unsupportedInline',
|
136
|
+
],
|
137
|
+
marks: [
|
138
|
+
'link',
|
139
|
+
'em',
|
140
|
+
'strong',
|
141
|
+
'strike',
|
142
|
+
'subsup',
|
143
|
+
'underline',
|
144
|
+
'code',
|
145
|
+
'textColor',
|
146
|
+
'confluenceInlineComment',
|
147
|
+
'breakout',
|
148
|
+
'alignment',
|
149
|
+
'indentation',
|
150
|
+
'annotation',
|
151
|
+
'dataConsumer',
|
152
|
+
'border',
|
153
|
+
'unsupportedMark',
|
154
|
+
'unsupportedNodeAttribute',
|
155
|
+
'typeAheadQuery', // https://product-fabric.atlassian.net/browse/ED-10214,
|
156
|
+
'fragment',
|
157
|
+
],
|
158
|
+
};
|
159
|
+
return defaultSchemaConfig;
|
160
|
+
};
|
161
|
+
|
162
|
+
export const defaultSchemaConfig: SchemaConfig<
|
163
|
+
DefaultSchemaNodes,
|
164
|
+
DefaultSchemaMarks
|
165
|
+
> = getDefaultSchemaConfig();
|
166
|
+
|
167
|
+
export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
168
|
+
const defaultSchemaConfig = getDefaultSchemaConfig();
|
169
|
+
if (stage === 'stage0') {
|
170
|
+
defaultSchemaConfig.customNodeSpecs = {
|
171
|
+
layoutSection: layoutSectionWithSingleColumn,
|
172
|
+
table: tableWithCustomWidth,
|
173
|
+
mediaSingle: mediaSingleFull,
|
174
|
+
};
|
175
|
+
}
|
176
|
+
|
177
|
+
return createSchema(defaultSchemaConfig);
|
178
|
+
});
|
179
|
+
|
180
|
+
export const defaultSchema = getSchemaBasedOnStage();
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// # What do marks exist?
|
2
|
+
//
|
3
|
+
// Marks are categorised into different groups. One motivation for this was to allow the `code` mark
|
4
|
+
// to exclude other marks, without needing to explicitly name them. Explicit naming requires the
|
5
|
+
// named mark to exist in the schema. This is undesirable because we want to construct different
|
6
|
+
// schemas that have different sets of nodes/marks.
|
7
|
+
//
|
8
|
+
// Groups provide a level of indirection, and solve this problem. For the immediate use-case, one
|
9
|
+
// group called "not_code" would have sufficed, but this an ultra-specialised to code.
|
10
|
+
|
11
|
+
// Mark group for font styling (e.g. bold, italic, underline, superscript).
|
12
|
+
export const FONT_STYLE = 'fontStyle';
|
13
|
+
|
14
|
+
// Marks group for search queries.
|
15
|
+
export const SEARCH_QUERY = 'searchQuery';
|
16
|
+
|
17
|
+
// Marks group for links.
|
18
|
+
export const LINK = 'link';
|
19
|
+
|
20
|
+
// Marks group for colors (text-color, background-color, etc).
|
21
|
+
export const COLOR = 'color';
|
22
|
+
|
23
|
+
// They need to be on their own group so that they can exclude each other
|
24
|
+
// and also work when one of them is disabled.
|
25
|
+
|
26
|
+
// Marks group for alignment.
|
27
|
+
export const ALIGNMENT = 'alignment';
|
28
|
+
|
29
|
+
// Marks group for indentation.
|
30
|
+
export const INDENTATION = 'indentation';
|