@atlaskit/adf-schema 28.1.5 → 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 +13 -0
- package/index.ts +275 -0
- package/package.json +6 -23
- 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,440 @@
|
|
1
|
+
import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
2
|
+
import {
|
3
|
+
Mappable,
|
4
|
+
Step,
|
5
|
+
StepMap,
|
6
|
+
StepResult,
|
7
|
+
Transform,
|
8
|
+
} from '@atlaskit/editor-prosemirror/transform';
|
9
|
+
import { TableRect } from '@atlaskit/editor-tables/table-map';
|
10
|
+
|
11
|
+
import { Cell, cellsAtColumn } from './utils/cells-at-column';
|
12
|
+
import { findColumn } from './utils/find-column';
|
13
|
+
import {
|
14
|
+
AddColumnStepInfo,
|
15
|
+
AddColumnStepJson,
|
16
|
+
CellStep,
|
17
|
+
CellStepJson,
|
18
|
+
ColumnInfo,
|
19
|
+
} from './types';
|
20
|
+
import { getTableRectFromDoc } from './utils/get-table-rect-from-doc';
|
21
|
+
import {
|
22
|
+
applyCellStep,
|
23
|
+
createCellStep,
|
24
|
+
getMapFromCellStep,
|
25
|
+
invertCellStep,
|
26
|
+
} from './utils/cell-step';
|
27
|
+
import { SideEffectsHandler } from './utils/side-effects/side-effects';
|
28
|
+
import memoizeOne from 'memoize-one';
|
29
|
+
import { SideEffects } from './utils/side-effects/types';
|
30
|
+
|
31
|
+
const ADD_COLUMN_STEP = 'ak-add-column';
|
32
|
+
|
33
|
+
function printColumnInfo(columnInfo: ColumnInfo) {
|
34
|
+
let cellsFrom = [];
|
35
|
+
for (const cellInfo of columnInfo.values()) {
|
36
|
+
cellsFrom.push(cellInfo.from);
|
37
|
+
}
|
38
|
+
return `[${cellsFrom.join(',')}]`;
|
39
|
+
}
|
40
|
+
|
41
|
+
function createColumnInfo(cellsInfo: CellStep[]): ColumnInfo {
|
42
|
+
return new Map<number, CellStep>(
|
43
|
+
cellsInfo.map((cellInfo) => [cellInfo.from, cellInfo]),
|
44
|
+
);
|
45
|
+
}
|
46
|
+
|
47
|
+
const getTableRectAndColumnFactory = (
|
48
|
+
doc: ProseMirrorNode,
|
49
|
+
pos: number,
|
50
|
+
columnInfo: ColumnInfo,
|
51
|
+
) => {
|
52
|
+
return memoizeOne(() => {
|
53
|
+
const rect = getTableRectFromDoc(doc, pos);
|
54
|
+
|
55
|
+
const column = findColumn(columnInfo, rect);
|
56
|
+
if (column === null) {
|
57
|
+
throw new Error('no column');
|
58
|
+
}
|
59
|
+
return {
|
60
|
+
rect,
|
61
|
+
column,
|
62
|
+
};
|
63
|
+
});
|
64
|
+
};
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Index and positions looks like
|
68
|
+
* 0 1 2 3 -> Add Column Index
|
69
|
+
* | 5 | 10 | 15 | -> Table with Positions
|
70
|
+
* | 20 | 25 | 30 |
|
71
|
+
* 0 1 2 x -> Remove Column Index
|
72
|
+
*
|
73
|
+
*/
|
74
|
+
export class AddColumnStep<S extends Schema = any> extends Step {
|
75
|
+
private readonly tablePos: number;
|
76
|
+
private readonly isDelete: boolean;
|
77
|
+
private columnInfo: ColumnInfo;
|
78
|
+
private sideEffectsHandler: SideEffectsHandler;
|
79
|
+
|
80
|
+
constructor(
|
81
|
+
tablePos: number,
|
82
|
+
addColumnStepInfo: AddColumnStepInfo,
|
83
|
+
isDelete = false,
|
84
|
+
) {
|
85
|
+
super();
|
86
|
+
|
87
|
+
this.tablePos = tablePos;
|
88
|
+
this.isDelete = isDelete;
|
89
|
+
this.sideEffectsHandler = new SideEffectsHandler(
|
90
|
+
addColumnStepInfo.sideEffects,
|
91
|
+
);
|
92
|
+
this.columnInfo = createColumnInfo(addColumnStepInfo.cells);
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Detect the column based on all the cells step in column info.
|
97
|
+
* Recreate columnInfo based on the current document. We might need to add new cells added by insert row or unmerge cells.
|
98
|
+
* If isDelete
|
99
|
+
* Decrease colspan if one row has merged cell
|
100
|
+
* Remove all the cells using columnInfo.cellStep[].from
|
101
|
+
* else
|
102
|
+
* Increase colspan if one row had merged cell
|
103
|
+
* Add all new cells at columnInfo.cellStep[].from,
|
104
|
+
* if there is columnInfo.cellStep[].newCell use it
|
105
|
+
* else create an empty cell
|
106
|
+
*
|
107
|
+
* @param doc Current document
|
108
|
+
*/
|
109
|
+
apply(doc: ProseMirrorNode): StepResult {
|
110
|
+
const { tablePos } = this;
|
111
|
+
// Create transform base on the doc
|
112
|
+
const tr = new Transform(doc);
|
113
|
+
|
114
|
+
if (this.sideEffectsHandler.table.handleAddTable(tr, this.isDelete)) {
|
115
|
+
return StepResult.ok(tr.doc);
|
116
|
+
}
|
117
|
+
|
118
|
+
let tableRect: TableRect | undefined;
|
119
|
+
try {
|
120
|
+
tableRect = getTableRectFromDoc(doc, tablePos);
|
121
|
+
} catch (e) {
|
122
|
+
return StepResult.fail((e as Error).message);
|
123
|
+
}
|
124
|
+
|
125
|
+
const column = findColumn(this.columnInfo, tableRect);
|
126
|
+
|
127
|
+
if (column === null) {
|
128
|
+
return StepResult.fail(
|
129
|
+
`No column for this cells "${printColumnInfo(
|
130
|
+
this.columnInfo,
|
131
|
+
)}" in table at position "${tablePos}".`,
|
132
|
+
);
|
133
|
+
}
|
134
|
+
|
135
|
+
if (
|
136
|
+
this.sideEffectsHandler.table.handleRemoveTable(
|
137
|
+
tr,
|
138
|
+
this.tablePos,
|
139
|
+
tableRect,
|
140
|
+
column,
|
141
|
+
this.isDelete,
|
142
|
+
)
|
143
|
+
) {
|
144
|
+
return StepResult.ok(tr.doc);
|
145
|
+
}
|
146
|
+
|
147
|
+
this.columnInfo = this.applyCellSteps(tr, tableRect, column, this.isDelete);
|
148
|
+
|
149
|
+
// Return the document modified.
|
150
|
+
return StepResult.ok(tr.doc);
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Update tablePos with the new position. If tablePos doesnt exist any more remove the step
|
155
|
+
* Update all the cellStep inside columnInfo. If cellStep.from position gets deleted removed it from column info
|
156
|
+
* if cellStep.length === 0 remove the step
|
157
|
+
* Create a new step with all the position updated
|
158
|
+
* @param mapping
|
159
|
+
*/
|
160
|
+
map(mapping: Mappable): Step | null {
|
161
|
+
const tablePosResult = mapping.mapResult(this.tablePos);
|
162
|
+
if (tablePosResult.deleted) {
|
163
|
+
// If table was deleted remove the step
|
164
|
+
return null;
|
165
|
+
}
|
166
|
+
|
167
|
+
const cellSteps: CellStep[] = [];
|
168
|
+
for (const oldCellStep of this.columnInfo.values()) {
|
169
|
+
const fromResult = mapping.mapResult(oldCellStep.from);
|
170
|
+
const toResult = mapping.mapResult(oldCellStep.to);
|
171
|
+
if (fromResult.deleted && toResult.deleted) {
|
172
|
+
continue;
|
173
|
+
}
|
174
|
+
const cellStep: CellStep = {
|
175
|
+
...oldCellStep,
|
176
|
+
from: fromResult.pos,
|
177
|
+
to: toResult.pos,
|
178
|
+
};
|
179
|
+
|
180
|
+
if (oldCellStep.mergeWith !== undefined) {
|
181
|
+
cellStep.mergeWith = mapping.map(oldCellStep.mergeWith);
|
182
|
+
}
|
183
|
+
cellSteps.push(cellStep);
|
184
|
+
}
|
185
|
+
|
186
|
+
if (cellSteps.length === 0) {
|
187
|
+
return null;
|
188
|
+
}
|
189
|
+
|
190
|
+
const sideEffects = this.sideEffectsHandler.map(mapping);
|
191
|
+
|
192
|
+
return new AddColumnStep(
|
193
|
+
tablePosResult.pos,
|
194
|
+
{ cells: cellSteps, sideEffects },
|
195
|
+
this.isDelete,
|
196
|
+
);
|
197
|
+
}
|
198
|
+
|
199
|
+
/**
|
200
|
+
* if isDelete
|
201
|
+
* Get the original cell node at columnInfo.cellStep[].from to columnInfo.cellStep[].to
|
202
|
+
* Create a copy of the node
|
203
|
+
* Create a new cellStep with the same positions but with the clone node as a content
|
204
|
+
* return new step inverted
|
205
|
+
* else
|
206
|
+
* Remove the content from each columnInfo.cellStep[].content
|
207
|
+
* return new step inverted
|
208
|
+
* @param originalDoc
|
209
|
+
*/
|
210
|
+
invert(originalDoc: ProseMirrorNode): Step {
|
211
|
+
const stepMap = this.getMap();
|
212
|
+
|
213
|
+
// Memoize function to be called only on delete scenarios
|
214
|
+
const getTableRectAndColumn = getTableRectAndColumnFactory(
|
215
|
+
originalDoc,
|
216
|
+
this.tablePos,
|
217
|
+
this.columnInfo,
|
218
|
+
);
|
219
|
+
// This is needed because the real pos of the cell in the generated document is affected by the previous operations.
|
220
|
+
const newCellSteps: CellStep[] = Array.from(
|
221
|
+
this.columnInfo.values(),
|
222
|
+
(oldCellStep) => {
|
223
|
+
const newCellStep = invertCellStep(
|
224
|
+
originalDoc,
|
225
|
+
getTableRectAndColumn,
|
226
|
+
oldCellStep,
|
227
|
+
this.isDelete,
|
228
|
+
stepMap,
|
229
|
+
);
|
230
|
+
return newCellStep;
|
231
|
+
},
|
232
|
+
);
|
233
|
+
|
234
|
+
const sideEffects = this.sideEffectsHandler.invert(
|
235
|
+
originalDoc,
|
236
|
+
this.isDelete,
|
237
|
+
stepMap,
|
238
|
+
);
|
239
|
+
|
240
|
+
return new AddColumnStep(
|
241
|
+
this.tablePos,
|
242
|
+
{ cells: newCellSteps, sideEffects },
|
243
|
+
!this.isDelete,
|
244
|
+
);
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* StepMap is created based on columnInfo.
|
249
|
+
* ColumnInfo is created on constructor and once is applied (the document could have new cells that weren't part of the original set)
|
250
|
+
* if isDelete
|
251
|
+
* Create range array based on cell info where each range is [cellStep.from, cellStep.from - cellStep.to, 0]
|
252
|
+
* else
|
253
|
+
* Create range array base on cell info where each range is [cellStep.from, 0, cellStep.content ? cellStep.content.nodeSize : defaultEmptyCellNodeSize]
|
254
|
+
*
|
255
|
+
* Ranges in ProseMirror are represented by each 3 elements in an array.
|
256
|
+
* As [pos, currentSize, newSize, pos2, currentSize2, newSize2] where:
|
257
|
+
* pos: Position in the document
|
258
|
+
* currentSize: Represent the affected range, this will be pos + currentSize
|
259
|
+
* newSize: Represent the new values, pos + newSize
|
260
|
+
*/
|
261
|
+
getMap(): StepMap {
|
262
|
+
const tableMap = this.sideEffectsHandler.getTableMap(this.isDelete);
|
263
|
+
if (tableMap) {
|
264
|
+
return tableMap;
|
265
|
+
}
|
266
|
+
|
267
|
+
let ranges: number[] = [];
|
268
|
+
for (const cellStep of this.columnInfo.values()) {
|
269
|
+
ranges.push(...getMapFromCellStep(cellStep, this.isDelete));
|
270
|
+
}
|
271
|
+
|
272
|
+
ranges = this.sideEffectsHandler.rows.addRowRanges(ranges, this.isDelete);
|
273
|
+
|
274
|
+
// If no steps, I create am empty stepMap
|
275
|
+
return new StepMap(ranges);
|
276
|
+
}
|
277
|
+
|
278
|
+
/**
|
279
|
+
* Try to merge this step with another one, to be applied directly
|
280
|
+
* after it. Returns the merged step when possible, null if the
|
281
|
+
* steps can't be merged.
|
282
|
+
*/
|
283
|
+
merge(other: Step): Step | null {
|
284
|
+
// We cannot merge add column step at the moment
|
285
|
+
return null;
|
286
|
+
}
|
287
|
+
|
288
|
+
/**
|
289
|
+
* Create a JSON-serializeable representation of this step. When
|
290
|
+
* defining this for a custom subclass, make sure the result object
|
291
|
+
* includes the step type's [JSON id](#transform.Step^jsonID) under
|
292
|
+
* the `stepType` property.
|
293
|
+
*/
|
294
|
+
toJSON() {
|
295
|
+
const addColumnStepJson: AddColumnStepJson = {
|
296
|
+
stepType: ADD_COLUMN_STEP,
|
297
|
+
tablePos: this.tablePos,
|
298
|
+
cells: Array.from(this.columnInfo.values(), (cellStep) => {
|
299
|
+
const cellStepJson: CellStepJson = {
|
300
|
+
from: cellStep.from,
|
301
|
+
to: cellStep.to,
|
302
|
+
};
|
303
|
+
|
304
|
+
if (cellStep.mergeWith !== undefined) {
|
305
|
+
cellStepJson.mergeWith = cellStep.mergeWith;
|
306
|
+
}
|
307
|
+
|
308
|
+
if (cellStep.newCell !== undefined) {
|
309
|
+
cellStepJson.newCell = cellStep.newCell.toJSON();
|
310
|
+
}
|
311
|
+
return cellStepJson;
|
312
|
+
}),
|
313
|
+
isDelete: this.isDelete,
|
314
|
+
};
|
315
|
+
|
316
|
+
const sideEffectsJSON = this.sideEffectsHandler.toJSON();
|
317
|
+
if (sideEffectsJSON) {
|
318
|
+
addColumnStepJson.sideEffects = sideEffectsJSON;
|
319
|
+
}
|
320
|
+
|
321
|
+
return addColumnStepJson;
|
322
|
+
}
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Deserialize a step from its JSON representation. Will call
|
326
|
+
* through to the step class' own implementation of this method.
|
327
|
+
*/
|
328
|
+
static fromJSON<S extends Schema = any>(
|
329
|
+
schema: S,
|
330
|
+
json: AddColumnStepJson,
|
331
|
+
): Step {
|
332
|
+
// TODO: Add validation. Return null if it is invalid. Check in review if this is necessary
|
333
|
+
const cells = json.cells.map((cellsJson) => {
|
334
|
+
const cell: CellStep = {
|
335
|
+
...cellsJson,
|
336
|
+
newCell: cellsJson.newCell
|
337
|
+
? schema.nodeFromJSON(cellsJson.newCell)
|
338
|
+
: undefined,
|
339
|
+
};
|
340
|
+
return cell;
|
341
|
+
});
|
342
|
+
|
343
|
+
let sideEffects: SideEffects | undefined;
|
344
|
+
if (json.sideEffects) {
|
345
|
+
sideEffects = SideEffectsHandler.fromJSON(schema, json.sideEffects);
|
346
|
+
}
|
347
|
+
|
348
|
+
return new AddColumnStep(
|
349
|
+
json.tablePos,
|
350
|
+
{ cells, sideEffects },
|
351
|
+
json.isDelete,
|
352
|
+
);
|
353
|
+
}
|
354
|
+
|
355
|
+
static create(
|
356
|
+
doc: ProseMirrorNode,
|
357
|
+
tablePos: number,
|
358
|
+
column: number,
|
359
|
+
isDelete = false,
|
360
|
+
) {
|
361
|
+
const tableRect = getTableRectFromDoc(doc, tablePos);
|
362
|
+
|
363
|
+
// By default add column will rely on default behaviour (add empty cell).
|
364
|
+
// There is no need to add content
|
365
|
+
const cells: CellStep[] = [];
|
366
|
+
const iter = cellsAtColumn(tableRect, column);
|
367
|
+
let next = iter.next();
|
368
|
+
while (!next.done) {
|
369
|
+
const cell: Cell = next.value as Cell;
|
370
|
+
cells.push(createCellStep(cell, column, isDelete));
|
371
|
+
|
372
|
+
let skipRows = 0;
|
373
|
+
if (cell.attrs && cell.attrs.rowspan) {
|
374
|
+
skipRows = cell.attrs.rowspan - 1;
|
375
|
+
}
|
376
|
+
|
377
|
+
next = iter.next(skipRows);
|
378
|
+
}
|
379
|
+
|
380
|
+
return new AddColumnStep(tablePos, { cells }, isDelete);
|
381
|
+
}
|
382
|
+
|
383
|
+
private applyCellSteps(
|
384
|
+
tr: Transform,
|
385
|
+
tableRect: TableRect,
|
386
|
+
column: number,
|
387
|
+
isDelete: boolean,
|
388
|
+
) {
|
389
|
+
const newColumnInfo: Map<number, CellStep> = new Map<number, CellStep>();
|
390
|
+
const rowsHandler = this.sideEffectsHandler.rows.start(this.isDelete);
|
391
|
+
|
392
|
+
const iter = cellsAtColumn(tableRect, column);
|
393
|
+
let next = iter.next();
|
394
|
+
// Iterate for all the cells in the current document
|
395
|
+
while (!next.done) {
|
396
|
+
const cell: Cell = next.value as Cell;
|
397
|
+
|
398
|
+
const previousCellStep = this.columnInfo.get(cell.from);
|
399
|
+
|
400
|
+
const newCellStep: CellStep = createCellStep(
|
401
|
+
cell,
|
402
|
+
column,
|
403
|
+
isDelete,
|
404
|
+
previousCellStep,
|
405
|
+
);
|
406
|
+
|
407
|
+
// If is the last cell in the row and doesnt have colspan I need to remove the whole row.
|
408
|
+
const removeRowResult = rowsHandler.handle(
|
409
|
+
tr,
|
410
|
+
tableRect,
|
411
|
+
cell.row,
|
412
|
+
column,
|
413
|
+
cell,
|
414
|
+
);
|
415
|
+
if (removeRowResult.handled) {
|
416
|
+
next = iter.next(removeRowResult.skipRows);
|
417
|
+
continue;
|
418
|
+
}
|
419
|
+
|
420
|
+
// Apply the step, to the pseudo document, get rows to skip, and the cellstep (might be modified, for example, a merge cell that remove the cell instead)
|
421
|
+
const { skipRows, cellStep } = applyCellStep(
|
422
|
+
tr,
|
423
|
+
tableRect,
|
424
|
+
cell,
|
425
|
+
newCellStep,
|
426
|
+
isDelete,
|
427
|
+
column,
|
428
|
+
);
|
429
|
+
|
430
|
+
// Store the new cell step. This could be an existing one or a new cell.
|
431
|
+
newColumnInfo.set(newCellStep.from, cellStep);
|
432
|
+
next = iter.next(skipRows);
|
433
|
+
}
|
434
|
+
|
435
|
+
rowsHandler.end(tr, tableRect, column);
|
436
|
+
return newColumnInfo;
|
437
|
+
}
|
438
|
+
}
|
439
|
+
|
440
|
+
Step.jsonID(ADD_COLUMN_STEP, AddColumnStep);
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
2
|
+
import {
|
3
|
+
ReplaceStep,
|
4
|
+
Step,
|
5
|
+
StepMap,
|
6
|
+
StepResult,
|
7
|
+
} from '@atlaskit/editor-prosemirror/transform';
|
8
|
+
|
9
|
+
import { TableColumnOrdering } from './types';
|
10
|
+
|
11
|
+
export const tableSortingStepType = 'atlaskit-table-sorting-ordering';
|
12
|
+
|
13
|
+
export class TableSortStep extends Step {
|
14
|
+
prev: TableColumnOrdering | undefined;
|
15
|
+
next: TableColumnOrdering | undefined;
|
16
|
+
pos: number;
|
17
|
+
|
18
|
+
constructor(
|
19
|
+
pos: number,
|
20
|
+
prev?: TableColumnOrdering,
|
21
|
+
next?: TableColumnOrdering,
|
22
|
+
) {
|
23
|
+
super();
|
24
|
+
this.prev = prev;
|
25
|
+
this.next = next;
|
26
|
+
this.pos = pos;
|
27
|
+
}
|
28
|
+
|
29
|
+
invert() {
|
30
|
+
return new TableSortStep(this.pos, this.next, this.prev);
|
31
|
+
}
|
32
|
+
|
33
|
+
apply(doc: PMNode) {
|
34
|
+
return StepResult.ok(doc);
|
35
|
+
}
|
36
|
+
|
37
|
+
map(): null {
|
38
|
+
return null;
|
39
|
+
}
|
40
|
+
|
41
|
+
getMap() {
|
42
|
+
return new StepMap([0, 0, 0]);
|
43
|
+
}
|
44
|
+
|
45
|
+
toJSON() {
|
46
|
+
return {
|
47
|
+
stepType: tableSortingStepType,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
|
51
|
+
static fromJSON() {
|
52
|
+
return new ReplaceStep(0, 0, Slice.empty);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
/** Register this step with Prosemirror */
|
57
|
+
Step.jsonID(tableSortingStepType, TableSortStep);
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
2
|
+
import { SideEffects, SideEffectsJSON } from './utils/side-effects/types';
|
3
|
+
import { SortOrder } from './constants';
|
4
|
+
|
5
|
+
export type ColumnInfo = Map<number, CellStep>;
|
6
|
+
|
7
|
+
export interface AddColumnStepInfo {
|
8
|
+
cells: CellStep[];
|
9
|
+
sideEffects?: SideEffects;
|
10
|
+
}
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Information about the cell
|
14
|
+
* from: where the cell will be added removed
|
15
|
+
* to: where the original cell ends
|
16
|
+
* newCell?: the content of the new cells if it's added
|
17
|
+
*/
|
18
|
+
export interface CellStep {
|
19
|
+
from: number; // beginning of cell at column
|
20
|
+
to: number; // end of cell at column
|
21
|
+
|
22
|
+
// Used to add a cell with a specific content. Useful for reverse a delete add column
|
23
|
+
newCell?: ProseMirrorNode;
|
24
|
+
|
25
|
+
mergeWith?: number; // Represent the cell that has to do the merge operation
|
26
|
+
}
|
27
|
+
|
28
|
+
export interface CellStepJson {
|
29
|
+
from: number;
|
30
|
+
to: number; // end of cell at column
|
31
|
+
|
32
|
+
// Used to add a cell with a specific content. Useful for reverse a delete add column
|
33
|
+
newCell?: { [key: string]: any }; // ToJson type of ProseMirrorNode.toJson()
|
34
|
+
mergeWith?: number; // Represent the cell that has to do the merge operation
|
35
|
+
}
|
36
|
+
|
37
|
+
export interface AddColumnStepJson {
|
38
|
+
stepType: 'ak-add-column';
|
39
|
+
tablePos: number;
|
40
|
+
cells: CellStepJson[];
|
41
|
+
sideEffects?: SideEffectsJSON;
|
42
|
+
isDelete: boolean;
|
43
|
+
}
|
44
|
+
|
45
|
+
export interface TableColumnOrdering {
|
46
|
+
columnIndex: number;
|
47
|
+
order: SortOrder;
|
48
|
+
}
|