@atlaskit/adf-schema 28.1.8 → 28.1.10
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 +16 -0
- package/dist/cjs/schema/create-schema.js +2 -2
- package/dist/cjs/schema/marks/annotation.js +2 -2
- package/dist/cjs/schema/marks/data-consumer.js +2 -2
- package/dist/cjs/schema/marks/fragment.js +2 -2
- package/dist/cjs/schema/marks/link.js +2 -2
- package/dist/cjs/schema/nodes/block-card.js +2 -2
- package/dist/cjs/schema/nodes/expand.js +2 -2
- package/dist/cjs/schema/nodes/media-single.js +2 -2
- package/dist/cjs/schema/nodes/mention.js +2 -2
- package/dist/cjs/schema/nodes/ordered-list.js +2 -2
- package/dist/cjs/schema/nodes/panel.js +2 -2
- package/dist/cjs/schema/nodes/tableNodes.js +2 -2
- package/dist/cjs/steps/analytics.js +2 -2
- package/dist/cjs/steps/set-attrs.js +2 -2
- package/dist/cjs/steps/table/add-column.js +2 -2
- package/dist/cjs/steps/table/utils/cell-step.js +2 -2
- package/dist/cjs/steps/table/utils/side-effects/rows.js +2 -2
- package/dist/esm/schema/create-schema.js +2 -2
- package/dist/esm/schema/marks/annotation.js +2 -2
- package/dist/esm/schema/marks/data-consumer.js +2 -2
- package/dist/esm/schema/marks/fragment.js +2 -2
- package/dist/esm/schema/marks/link.js +2 -2
- package/dist/esm/schema/nodes/block-card.js +2 -2
- package/dist/esm/schema/nodes/expand.js +2 -2
- package/dist/esm/schema/nodes/media-single.js +2 -2
- package/dist/esm/schema/nodes/mention.js +2 -2
- package/dist/esm/schema/nodes/ordered-list.js +2 -2
- package/dist/esm/schema/nodes/panel.js +2 -2
- package/dist/esm/schema/nodes/tableNodes.js +2 -2
- package/dist/esm/steps/analytics.js +2 -2
- package/dist/esm/steps/set-attrs.js +2 -2
- package/dist/esm/steps/table/add-column.js +2 -2
- package/dist/esm/steps/table/utils/cell-step.js +2 -2
- package/dist/esm/steps/table/utils/side-effects/rows.js +2 -2
- package/dist/types/schema/default-schema.d.ts +2 -2
- package/dist/types/schema/jira-schema.d.ts +1 -1
- package/dist/types/schema/marks/data-consumer.d.ts +2 -2
- package/dist/types/schema/marks/fragment.d.ts +1 -1
- package/dist/types/schema/marks/link.d.ts +2 -2
- package/dist/types/schema/nodes/bodied-extension.d.ts +1 -0
- package/dist/types/schema/nodes/code-block.d.ts +1 -1
- package/dist/types/schema/nodes/expand.d.ts +2 -2
- package/dist/types/schema/nodes/extension.d.ts +1 -0
- package/dist/types/schema/nodes/inline-extension.d.ts +1 -0
- package/dist/types/schema/nodes/media-single.d.ts +1 -1
- package/dist/types/schema/nodes/media.d.ts +2 -2
- package/dist/types/schema/nodes/mention.d.ts +2 -2
- package/dist/types/schema/nodes/panel.d.ts +1 -0
- package/dist/types/schema/nodes/tableNodes.d.ts +2 -2
- package/dist/types/schema/nodes/unknown-block.d.ts +1 -0
- package/dist/types/steps/analytics.d.ts +4 -4
- package/dist/types/steps/link-meta-step.d.ts +4 -4
- package/dist/types/steps/set-attrs.d.ts +2 -2
- package/dist/types/steps/table/sort-column.d.ts +4 -4
- package/dist/types/steps/type-ahead.d.ts +4 -4
- package/package.json +4 -3
- package/src/__tests__/unit/json-schema/v1.ts +11 -9
- package/src/__tests__/unit/schema/nodes/confluence-unsupported-block.ts +1 -5
- package/src/__tests__/unit/schema/nodes/confluence-unsupported-inline.ts +1 -1
- package/src/__tests__/unit/schema/nodes/date.ts +1 -1
- package/src/__tests__/unit/schema/nodes/expand.ts +1 -1
- package/src/__tests__/unit/schema/nodes/inline-extension.ts +1 -1
- package/src/__tests__/unit/schema/nodes/list-item.ts +1 -1
- package/src/__tests__/unit/schema/nodes/media-group.ts +1 -1
- package/src/__tests__/unit/schema/nodes/media-single.ts +1 -1
- package/src/__tests__/unit/schema/nodes/media.ts +1 -5
- package/src/__tests__/unit/schema/nodes/nestedExpand.ts +1 -1
- package/src/__tests__/unit/schema/nodes/ordered-list.ts +1 -1
- package/src/__tests__/unit/schema/nodes/placeholder.ts +1 -1
- package/src/__tests__/unit/schema/nodes/status.ts +1 -1
- package/src/__tests__/unit/schema/nodes/unknown-block.ts +1 -1
- package/src/__tests__/unit/schema/nodes/unsupported-block.ts +1 -1
- package/src/__tests__/unit/schema/nodes/unsupported-inline.ts +1 -1
- package/src/schema/nodes/media-single.ts +2 -2
- package/src/schema/nodes/media.ts +5 -1
- package/src/schema/nodes/tableNodes.ts +3 -5
- package/src/steps/table/__tests__/_utils.ts +6 -7
- package/src/steps/table/__tests__/add-column-merge-columns.ts +27 -9
- package/src/steps/table/__tests__/add-column-merge-rows.ts +24 -8
- package/src/steps/table/__tests__/add-column.ts +46 -18
- package/src/steps/table/add-column.ts +4 -1
- package/src/steps/table/utils/cells-at-column.ts +4 -1
- package/src/utils/colors.ts +1 -1
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-attrs.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-with-marks.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockQuote-without-content.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockquote-with-list-inside.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-with-nested-bodiedExtension.json +0 -28
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-content.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionKey.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bodied-extension-without-extensionType.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-attrs.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-marks.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-with-not-listItem-content.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/bulletList-without-content.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-em.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strike.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-strong.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-subsup.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-and-underline.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/code-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-non-text.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-strong.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unknown-attribute.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/codeBlock-with-unsupported-marks.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decision-with-blockquote.json +0 -31
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-empty-decision.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/decisionList-with-no-decision.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-attrs.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-with-marks.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-content.json +0 -4
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/doc-without-version.json +0 -4
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/em-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-as-top-level-node.json +0 -12
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-content.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-empty-attrs.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-marks.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-with-unknown-attr.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/emoji-without-attrs.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-nested-with-marks.json +0 -60
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/expand-with-breakout-inside-of-layout.json +0 -50
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-content.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-with-empty-local-id.json +0 -16
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionKey.json +0 -12
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/extension-without-extensionType.json +0 -12
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-marks.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/hardBreak-with-wrong-text.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-invalid-level-attr.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-block.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-non-text-inline.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unknown-attrs.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-with-unsupported-mark.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/heading-without-attrs.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-with-content.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionKey.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/inlineExtension-without-extensionType.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-missing-layoutColumn.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-one-column.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-overflow-width.json +0 -37
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/layoutSection-with-two-columns-and-breakout-code-block.json +0 -38
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-empty-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-with-unknown-attr.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/link-without-attrs.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/list-with-blockquote.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-attrs.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-empty-content.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-list-as-first-child.json +0 -30
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/listItem-with-marks.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-as-top-level-node.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-empty-attrs.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-alt-text.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-invalid-occurrence-key-attr.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-marks.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-with-unknown-attr.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-attrs.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-id-attr.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/media-without-type-attr.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-attrs.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-with-marks.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaGroup-without-content.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaInline-with-subsup-mark.json +0 -30
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-attrs.json +0 -11
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-caption.json +0 -46
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-invalid-layout-attr.json +0 -38
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-negative-width.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-overflow-width.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mediaSingle-with-zero-width.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-extra-attrs.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-invalid-user-type.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-with-marks.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mention-without-attrs.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/mono-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-extra-attrs.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-with-marks.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/orderedList-without-content.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-blockquote.json +0 -25
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-codeBlock.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-empty-attrs.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-marks.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-panel.json +0 -25
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-with-unknown-attr.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/panel-without-attrs.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-text-with-unknown-mark.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-top-level-content.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/paragraph-with-unsupported-marks.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-content.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/placeholder-with-empty-attrs.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-attrs.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/rule-with-marks.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-with-extra-attr.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-attrs.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-color-attr.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/status-without-text-attr.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strike-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/strong-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-extra-attrs.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-with-invalid-type-attr.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-attrs.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/subsup-without-type-attr.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-breakout-code-block.json +0 -33
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-with-empty-local-id.json +0 -41
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-fragment-mark-without-local-id.json +0 -40
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-with-nested-table.json +0 -50
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-cells.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/table-without-rows.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-blockquote.json +0 -31
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/task-with-invalid-state.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskItem-with-nested-taskItem.json +0 -70
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-empty-task.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-no-task.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/taskList-with-taskList-as-first-child.json +0 -48
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/text-empty.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-extra-attrs.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-with-invalid-color-attr.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-attrs.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/textColor-without-color-attr.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/invalid/underline-with-attrs.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/annotation.json +0 -28
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/blockQuote-with-content.json +0 -16
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-Extension-with-rich-body.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-empty-content.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-media-link.json +0 -41
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-nested-extension.json +0 -33
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodied-extension-with-parameters.json +0 -30
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bodiedExtension-with-data-consumer-mark.json +0 -47
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/bulletList-with-content.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-attrs.json +0 -11
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-breakout-mark.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-empty-marks.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-language.json +0 -482
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-multiple-text.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-text.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/codeBlock-with-unknown-language.json +0 -13
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/decision-with-mention.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/decisionList-with-decision.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-all-content.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-content.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/doc-with-empty-content.json +0 -5
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/embed-card.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-fallback.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji-with-variation.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/emoji.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-embed-card.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-marks.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand-with-nestedExpand.json +0 -136
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/expand.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-data-consumer-mark.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-empty-marks.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-local-id.json +0 -16
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-named-fragment-mark.json +0 -25
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/extension-with-parameters.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-empty-attrs.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak-with-text.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/hardBreak.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-code-text.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-content.json +0 -78
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-em-text.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-content.json +0 -78
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-empty-marks.json +0 -14
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-link-text.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strike-text.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-strong-text.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-subsup-text.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-supported-mark.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/heading-with-underline-text.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-data-consumer-mark.json +0 -48
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-fragment-mark.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-with-parameters.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/inlineExtension-without-parameters.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layout-with-embed.json +0 -51
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-three-columns.json +0 -50
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns-and-breakout.json +0 -40
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/layoutSection-with-two-columns.json +0 -37
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href-title.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/link-with-href.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-bullet-list-and-media-single.json +0 -47
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-media-single-and-bullet-list.json +0 -57
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-ordered-list.json +0 -37
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-item-with-paragraph.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/list-with-codeBlock.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/listItem-with-content.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-external-with-alt-text-value.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-layout-column.json +0 -57
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-list-item.json +0 -88
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-nested-expand.json +0 -64
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-a-table.json +0 -56
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-single-with-a-link-mark-in-an-expand.json +0 -44
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text-value.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-alt-text.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-link-mark.json +0 -36
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-occurrence-key.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media-with-type-link.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/media.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaGroup-with-multiple-media.json +0 -27
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-file-type-attr.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-mark.json +0 -30
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline-with-link-type-attr.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaInline.json +0 -22
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption-inside-list-item.json +0 -38
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-caption.json +0 -28
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-link-mark.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-parameters.json +0 -86
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-with-width.json +0 -74
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mediaSingle-without-parameters.json +0 -19
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-attrs.json +0 -18
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/mention-with-user-type.json +0 -35
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-with-data-consumer-mark.json +0 -226
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nested-extensions-without-mark.json +0 -176
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/nestedExpand.json +0 -128
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-content.json +0 -30
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/orderedList-with-order.json +0 -33
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-info.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-note.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-tip.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-warning.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-blockCard.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-list.json +0 -31
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/panel-with-paragraph.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-content.json +0 -15
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-content.json +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-empty-marks.json +0 -11
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-with-supported-mark.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/paragraph-without-content.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/placeholder.json +0 -17
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/rule.json +0 -9
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-nested-in-list.json +0 -43
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-all-attrs.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/status-with-default-attrs.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sub.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/subsup-as-sup.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-empty-cell.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-fragment-mark.json +0 -41
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-header-row.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-layout.json +0 -50
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-local-id.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/table-with-nested-nodes.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/task-with-mention.json +0 -34
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-nested-taskLists.json +0 -74
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/taskList-with-tasks.json +0 -40
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code-and-link.json +0 -26
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-code.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-em.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-link.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-strong.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-subsup.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-textColor.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text-underline.json +0 -20
- package/src/__tests__/unit/json-schema/v1-reference/full/valid/text.json +0 -15
- 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 +0 -10
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-empty-datasource.json +0 -12
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-empty-views.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-id.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-layout.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-views-type.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/blockcard-with-invalid-datasource-width.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/bodiedExtension-with-source-as-string-data-consumer-mark.json +0 -46
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-invalid-local-id.json +0 -16
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/extension-with-nonsense-marks.json +0 -21
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/inlineExtension-with-source-as-string-data-consumer-mark.json +0 -48
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-percentage-width.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/mediaSingle-with-invalid-pixel-width.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/nested-extensions-with-link-mark.json +0 -216
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-empty-local-id.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-local-id.json +0 -32
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/invalid/table-with-invalid-width.json +0 -32
- 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 +0 -38
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-with-empty-datasource-parameters.json +0 -29
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/blockcard-without-optional-fields.json +0 -23
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/layoutSection-with-one-column.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-percentage-width.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/mediaSingle-with-pixel-width.json +0 -24
- package/src/__tests__/unit/json-schema/v1-reference/stage-0/valid/table-with-width.json +0 -32
@@ -147,7 +147,9 @@ describe('AddColumnStep', () => {
|
|
147
147
|
addColumnAtFactory('table', column)(editorState, refs),
|
148
148
|
);
|
149
149
|
|
150
|
-
expect(editorState.doc).
|
150
|
+
expect(editorState.doc.toJSON()).toEqual(
|
151
|
+
expectedDoc(defaultSchema).toJSON(),
|
152
|
+
);
|
151
153
|
},
|
152
154
|
);
|
153
155
|
});
|
@@ -165,7 +167,9 @@ describe('AddColumnStep', () => {
|
|
165
167
|
removeColumnAtFactory('table', column)(editorState, refs),
|
166
168
|
);
|
167
169
|
|
168
|
-
expect(editorState.doc).
|
170
|
+
expect(editorState.doc.toJSON()).toEqual(
|
171
|
+
expectedDoc(defaultSchema).toJSON(),
|
172
|
+
);
|
169
173
|
},
|
170
174
|
);
|
171
175
|
});
|
@@ -195,7 +199,9 @@ describe('AddColumnStep', () => {
|
|
195
199
|
transaction,
|
196
200
|
editorState,
|
197
201
|
);
|
198
|
-
expect(editorState.doc).
|
202
|
+
expect(editorState.doc.toJSON()).toEqual(
|
203
|
+
originalDoc(defaultSchema).toJSON(),
|
204
|
+
);
|
199
205
|
});
|
200
206
|
});
|
201
207
|
|
@@ -285,7 +291,9 @@ describe('AddColumnStep', () => {
|
|
285
291
|
|
286
292
|
editorState = editorState.apply(editorState.tr.step(addColumnStep!));
|
287
293
|
|
288
|
-
expect(editorState.doc).
|
294
|
+
expect(editorState.doc.toJSON()).toEqual(
|
295
|
+
expectedDoc(defaultSchema).toJSON(),
|
296
|
+
);
|
289
297
|
},
|
290
298
|
);
|
291
299
|
});
|
@@ -359,7 +367,9 @@ describe('AddColumnStep', () => {
|
|
359
367
|
historyTransactions,
|
360
368
|
);
|
361
369
|
|
362
|
-
expect(editorState.doc).
|
370
|
+
expect(editorState.doc.toJSON()).toEqual(
|
371
|
+
expectDoc(defaultSchema).toJSON(),
|
372
|
+
);
|
363
373
|
});
|
364
374
|
},
|
365
375
|
);
|
@@ -380,7 +390,9 @@ describe('AddColumnStep', () => {
|
|
380
390
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
381
391
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
382
392
|
|
383
|
-
expect(editorState.doc).
|
393
|
+
expect(editorState.doc.toJSON()).toEqual(
|
394
|
+
expectedDoc(defaultSchema).toJSON(),
|
395
|
+
);
|
384
396
|
},
|
385
397
|
);
|
386
398
|
|
@@ -398,7 +410,9 @@ describe('AddColumnStep', () => {
|
|
398
410
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
399
411
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
400
412
|
|
401
|
-
expect(editorState.doc).
|
413
|
+
expect(editorState.doc.toJSON()).toEqual(
|
414
|
+
expectedDoc(defaultSchema).toJSON(),
|
415
|
+
);
|
402
416
|
},
|
403
417
|
);
|
404
418
|
|
@@ -413,7 +427,9 @@ describe('AddColumnStep', () => {
|
|
413
427
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
414
428
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
415
429
|
|
416
|
-
expect(editorState.doc).
|
430
|
+
expect(editorState.doc.toJSON()).toEqual(
|
431
|
+
expectedDoc(defaultSchema).toJSON(),
|
432
|
+
);
|
417
433
|
},
|
418
434
|
);
|
419
435
|
|
@@ -430,7 +446,9 @@ describe('AddColumnStep', () => {
|
|
430
446
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
431
447
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
432
448
|
|
433
|
-
expect(editorState.doc).
|
449
|
+
expect(editorState.doc.toJSON()).toEqual(
|
450
|
+
expectedDoc(defaultSchema).toJSON(),
|
451
|
+
);
|
434
452
|
},
|
435
453
|
);
|
436
454
|
});
|
@@ -166,7 +166,9 @@ describe('AddColumnStep', () => {
|
|
166
166
|
addColumnAtFactory('table', column)(editorState, refs),
|
167
167
|
);
|
168
168
|
|
169
|
-
expect(editorState.doc).
|
169
|
+
expect(editorState.doc.toJSON()).toEqual(
|
170
|
+
expectedDoc(defaultSchema).toJSON(),
|
171
|
+
);
|
170
172
|
},
|
171
173
|
);
|
172
174
|
});
|
@@ -184,7 +186,9 @@ describe('AddColumnStep', () => {
|
|
184
186
|
removeColumnAtFactory('table', column)(editorState, refs),
|
185
187
|
);
|
186
188
|
|
187
|
-
expect(editorState.doc).
|
189
|
+
expect(editorState.doc.toJSON()).toEqual(
|
190
|
+
expectedDoc(defaultSchema).toJSON(),
|
191
|
+
);
|
188
192
|
},
|
189
193
|
);
|
190
194
|
});
|
@@ -214,7 +218,9 @@ describe('AddColumnStep', () => {
|
|
214
218
|
transaction,
|
215
219
|
editorState,
|
216
220
|
);
|
217
|
-
expect(editorState.doc).
|
221
|
+
expect(editorState.doc.toJSON()).toEqual(
|
222
|
+
originalDoc(defaultSchema).toJSON(),
|
223
|
+
);
|
218
224
|
});
|
219
225
|
});
|
220
226
|
|
@@ -323,7 +329,9 @@ describe('AddColumnStep', () => {
|
|
323
329
|
|
324
330
|
editorState = editorState.apply(editorState.tr.step(addColumnStep!));
|
325
331
|
|
326
|
-
expect(editorState.doc).
|
332
|
+
expect(editorState.doc.toJSON()).toEqual(
|
333
|
+
expectedDoc(defaultSchema).toJSON(),
|
334
|
+
);
|
327
335
|
},
|
328
336
|
);
|
329
337
|
});
|
@@ -343,7 +351,9 @@ describe('AddColumnStep', () => {
|
|
343
351
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
344
352
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
345
353
|
|
346
|
-
expect(editorState.doc).
|
354
|
+
expect(editorState.doc.toJSON()).toEqual(
|
355
|
+
expectedDoc(defaultSchema).toJSON(),
|
356
|
+
);
|
347
357
|
},
|
348
358
|
);
|
349
359
|
|
@@ -361,7 +371,9 @@ describe('AddColumnStep', () => {
|
|
361
371
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
362
372
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
363
373
|
|
364
|
-
expect(editorState.doc).
|
374
|
+
expect(editorState.doc.toJSON()).toEqual(
|
375
|
+
expectedDoc(defaultSchema).toJSON(),
|
376
|
+
);
|
365
377
|
},
|
366
378
|
);
|
367
379
|
|
@@ -376,7 +388,9 @@ describe('AddColumnStep', () => {
|
|
376
388
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
377
389
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
378
390
|
|
379
|
-
expect(editorState.doc).
|
391
|
+
expect(editorState.doc.toJSON()).toEqual(
|
392
|
+
expectedDoc(defaultSchema).toJSON(),
|
393
|
+
);
|
380
394
|
},
|
381
395
|
);
|
382
396
|
|
@@ -393,7 +407,9 @@ describe('AddColumnStep', () => {
|
|
393
407
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
394
408
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
395
409
|
|
396
|
-
expect(editorState.doc).
|
410
|
+
expect(editorState.doc.toJSON()).toEqual(
|
411
|
+
expectedDoc(defaultSchema).toJSON(),
|
412
|
+
);
|
397
413
|
},
|
398
414
|
);
|
399
415
|
});
|
@@ -119,7 +119,9 @@ describe('AddColumnStep', () => {
|
|
119
119
|
removeColumnAtFactory('table', 0)(editorState, refs),
|
120
120
|
);
|
121
121
|
|
122
|
-
expect(editorState.doc
|
122
|
+
expect(editorState.doc.toJSON()).toEqual(
|
123
|
+
doc(p(''))(defaultSchema).toJSON(),
|
124
|
+
);
|
123
125
|
});
|
124
126
|
|
125
127
|
it('should add the table after been removed it for a remove column', () => {
|
@@ -127,7 +129,9 @@ describe('AddColumnStep', () => {
|
|
127
129
|
removeColumnAtFactory('table', 0)(editorState, refs),
|
128
130
|
editorState,
|
129
131
|
);
|
130
|
-
expect(editorState.doc).
|
132
|
+
expect(editorState.doc.toJSON()).toEqual(
|
133
|
+
threeByOne(defaultSchema).toJSON(),
|
134
|
+
);
|
131
135
|
});
|
132
136
|
|
133
137
|
it('should remove the table after undoing the last column ', function () {
|
@@ -137,7 +141,9 @@ describe('AddColumnStep', () => {
|
|
137
141
|
[removeColumnAtFactory('table', 1)],
|
138
142
|
);
|
139
143
|
|
140
|
-
expect(editorState.doc
|
144
|
+
expect(editorState.doc.toJSON()).toEqual(
|
145
|
+
doc(p(''))(defaultSchema).toJSON(),
|
146
|
+
);
|
141
147
|
});
|
142
148
|
|
143
149
|
it('should drop add column step when I remove the column', function () {
|
@@ -176,10 +182,14 @@ describe('AddColumnStep', () => {
|
|
176
182
|
|
177
183
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
178
184
|
|
185
|
+
const expectedDoc = doc(
|
186
|
+
p(''),
|
187
|
+
'{table}',
|
188
|
+
table()(tr(tdEmpty), tr(tdEmpty), tr(tdEmpty)),
|
189
|
+
)(defaultSchema).toJSON();
|
190
|
+
|
179
191
|
// Should keep the new created single column and remove the old one
|
180
|
-
expect(editorState.doc).
|
181
|
-
doc(p(''), '{table}', table()(tr(tdEmpty), tr(tdEmpty), tr(tdEmpty))),
|
182
|
-
);
|
192
|
+
expect(editorState.doc.toJSON()).toEqual(expectedDoc);
|
183
193
|
});
|
184
194
|
|
185
195
|
it('should parse a json that we just generate', function () {
|
@@ -216,7 +226,9 @@ describe('AddColumnStep', () => {
|
|
216
226
|
editorState.tr.step(removeLastRowInverted),
|
217
227
|
);
|
218
228
|
|
219
|
-
expect(editorState.doc).
|
229
|
+
expect(editorState.doc.toJSON()).toEqual(
|
230
|
+
threeByOne(defaultSchema).toJSON(),
|
231
|
+
);
|
220
232
|
});
|
221
233
|
|
222
234
|
it('should remove the table when I received a JSON', () => {
|
@@ -229,7 +241,9 @@ describe('AddColumnStep', () => {
|
|
229
241
|
editorState.tr.step(removeLastRowInverted),
|
230
242
|
);
|
231
243
|
|
232
|
-
expect(editorState.doc
|
244
|
+
expect(editorState.doc.toJSON()).toEqual(
|
245
|
+
doc(p(''))(defaultSchema).toJSON(),
|
246
|
+
);
|
233
247
|
});
|
234
248
|
});
|
235
249
|
|
@@ -313,7 +327,9 @@ describe('AddColumnStep', () => {
|
|
313
327
|
addColumnAtFactory('table', column)(editorState, refs),
|
314
328
|
);
|
315
329
|
|
316
|
-
expect(editorState.doc).
|
330
|
+
expect(editorState.doc.toJSON()).toEqual(
|
331
|
+
expectedDoc(defaultSchema).toJSON(),
|
332
|
+
);
|
317
333
|
},
|
318
334
|
);
|
319
335
|
});
|
@@ -331,7 +347,9 @@ describe('AddColumnStep', () => {
|
|
331
347
|
removeColumnAtFactory('table', column)(editorState, refs),
|
332
348
|
);
|
333
349
|
|
334
|
-
expect(editorState.doc).
|
350
|
+
expect(editorState.doc.toJSON()).toEqual(
|
351
|
+
expectedDoc(defaultSchema).toJSON(),
|
352
|
+
);
|
335
353
|
},
|
336
354
|
);
|
337
355
|
});
|
@@ -363,7 +381,9 @@ describe('AddColumnStep', () => {
|
|
363
381
|
addColumnAtFactory('table', column)(editorState, refs),
|
364
382
|
);
|
365
383
|
|
366
|
-
expect(editorState.doc).
|
384
|
+
expect(editorState.doc.toJSON()).toEqual(
|
385
|
+
expectedDoc(defaultSchema).toJSON(),
|
386
|
+
);
|
367
387
|
},
|
368
388
|
);
|
369
389
|
});
|
@@ -381,7 +401,9 @@ describe('AddColumnStep', () => {
|
|
381
401
|
removeColumnAtFactory('table', column)(editorState, refs),
|
382
402
|
);
|
383
403
|
|
384
|
-
expect(editorState.doc).
|
404
|
+
expect(editorState.doc.toJSON()).toEqual(
|
405
|
+
expectedDoc(defaultSchema).toJSON(),
|
406
|
+
);
|
385
407
|
},
|
386
408
|
);
|
387
409
|
});
|
@@ -432,7 +454,7 @@ describe('AddColumnStep', () => {
|
|
432
454
|
transaction,
|
433
455
|
editorState,
|
434
456
|
);
|
435
|
-
expect(editorState.doc).
|
457
|
+
expect(editorState.doc.toJSON()).toEqual(originalDoc.toJSON());
|
436
458
|
});
|
437
459
|
});
|
438
460
|
|
@@ -496,7 +518,9 @@ describe('AddColumnStep', () => {
|
|
496
518
|
|
497
519
|
editorState = editorState.apply(editorState.tr.step(addColumnStep!));
|
498
520
|
|
499
|
-
expect(editorState.doc).
|
521
|
+
expect(editorState.doc.toJSON()).toEqual(
|
522
|
+
expectedDoc(defaultSchema).toJSON(),
|
523
|
+
);
|
500
524
|
},
|
501
525
|
);
|
502
526
|
});
|
@@ -509,13 +533,13 @@ describe('AddColumnStep', () => {
|
|
509
533
|
[addColumnAtFactory('table', 1), addColumnAtFactory('table', 1)],
|
510
534
|
);
|
511
535
|
|
512
|
-
expect(editorState.doc).
|
536
|
+
expect(editorState.doc.toJSON()).toEqual(
|
513
537
|
doc(
|
514
538
|
table()(
|
515
539
|
tr(tdColorA, tdEmpty, tdEmpty, tdColorB, tdColorC),
|
516
540
|
tr(tdColorA, tdEmpty, tdEmpty, tdColorB, tdColorC),
|
517
541
|
),
|
518
|
-
),
|
542
|
+
)(defaultSchema).toJSON(),
|
519
543
|
);
|
520
544
|
});
|
521
545
|
});
|
@@ -533,7 +557,9 @@ describe('AddColumnStep', () => {
|
|
533
557
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
534
558
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
535
559
|
|
536
|
-
expect(editorState.doc).
|
560
|
+
expect(editorState.doc.toJSON()).toEqual(
|
561
|
+
expectedDoc(defaultSchema).toJSON(),
|
562
|
+
);
|
537
563
|
},
|
538
564
|
);
|
539
565
|
|
@@ -548,7 +574,9 @@ describe('AddColumnStep', () => {
|
|
548
574
|
const addColumnStep = Step.fromJSON(defaultSchema, jsonStep);
|
549
575
|
editorState = editorState.apply(editorState.tr.step(addColumnStep));
|
550
576
|
|
551
|
-
expect(editorState.doc).
|
577
|
+
expect(editorState.doc.toJSON()).toEqual(
|
578
|
+
expectedDoc(defaultSchema).toJSON(),
|
579
|
+
);
|
552
580
|
},
|
553
581
|
);
|
554
582
|
});
|
@@ -21,7 +21,10 @@ export interface Cell {
|
|
21
21
|
* @param rect
|
22
22
|
* @param col
|
23
23
|
*/
|
24
|
-
export function* cellsAtColumn(
|
24
|
+
export function* cellsAtColumn(
|
25
|
+
rect: TableRect,
|
26
|
+
col: number,
|
27
|
+
): Generator<Cell, void, number | undefined> {
|
25
28
|
const { map, tableStart, table } = rect;
|
26
29
|
|
27
30
|
let refColumn: number | null = col > 0 ? -1 : 0;
|
package/src/utils/colors.ts
CHANGED
@@ -89,7 +89,7 @@ export function normalizeHexColor(
|
|
89
89
|
// http://dev.w3.org/csswg/css-color/#named-colors
|
90
90
|
if (color === 'default') {
|
91
91
|
return null;
|
92
|
-
} else if (
|
92
|
+
} else if (namedColors.default && (namedColors as any).default[color]) {
|
93
93
|
color = (namedColors as any).default[color];
|
94
94
|
} else if (namedColors && namedColors[color]) {
|
95
95
|
color = namedColors[color];
|
package/src/__tests__/unit/json-schema/v1-reference/full/invalid/blockquote-with-list-inside.json
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 1,
|
3
|
-
"type": "doc",
|
4
|
-
"content": [
|
5
|
-
{
|
6
|
-
"type": "blockquote",
|
7
|
-
"content": [{
|
8
|
-
"type": "bulletList",
|
9
|
-
"content": [{
|
10
|
-
"type": "listItem",
|
11
|
-
"content": [
|
12
|
-
{
|
13
|
-
"type": "paragraph",
|
14
|
-
"content": [{
|
15
|
-
"type": "text",
|
16
|
-
"text": "foo"
|
17
|
-
}]
|
18
|
-
}
|
19
|
-
]}
|
20
|
-
]}
|
21
|
-
]
|
22
|
-
}
|
23
|
-
]
|
24
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 1,
|
3
|
-
"type": "doc",
|
4
|
-
"content": [
|
5
|
-
{
|
6
|
-
"type": "bodiedExtension",
|
7
|
-
"attrs": {
|
8
|
-
"extensionType": "com.atlassian.confluence.macro.core",
|
9
|
-
"extensionKey": "expand"
|
10
|
-
},
|
11
|
-
"content": [
|
12
|
-
{
|
13
|
-
"type": "bodiedExtension",
|
14
|
-
"attrs": {
|
15
|
-
"extensionType": "com.atlassian.confluence.macro.core",
|
16
|
-
"extensionKey": "expand"
|
17
|
-
},
|
18
|
-
"content": [
|
19
|
-
{
|
20
|
-
"type": "paragraph",
|
21
|
-
"content": []
|
22
|
-
}
|
23
|
-
]
|
24
|
-
}
|
25
|
-
]
|
26
|
-
}
|
27
|
-
]
|
28
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 1,
|
3
|
-
"type": "doc",
|
4
|
-
"content": [
|
5
|
-
{
|
6
|
-
"type": "bulletList",
|
7
|
-
"content": [
|
8
|
-
{
|
9
|
-
"type": "listItem",
|
10
|
-
"content": [
|
11
|
-
{
|
12
|
-
"type": "paragraph",
|
13
|
-
"content": [{
|
14
|
-
"type": "text",
|
15
|
-
"text": "foo"
|
16
|
-
}]
|
17
|
-
}
|
18
|
-
]
|
19
|
-
}
|
20
|
-
],
|
21
|
-
"marks": []
|
22
|
-
}
|
23
|
-
]
|
24
|
-
}
|