@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
@@ -2,6 +2,6 @@ import { SchemaConfig } from './create-schema';
|
|
2
2
|
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
|
3
3
|
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
4
4
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
5
|
-
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => Schema<
|
6
|
-
export declare const defaultSchema: Schema<
|
5
|
+
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
6
|
+
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
7
7
|
export {};
|
@@ -18,7 +18,7 @@ export interface JIRASchemaConfig {
|
|
18
18
|
/**
|
19
19
|
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
20
20
|
**/
|
21
|
-
export default function makeSchema(config: JIRASchemaConfig): Schema<
|
21
|
+
export default function makeSchema(config: JIRASchemaConfig): Schema<string, string>;
|
22
22
|
/**
|
23
23
|
* @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
|
24
24
|
**/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { MarkSpec, Mark } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export interface ConfluenceLinkMetadata {
|
3
3
|
linkType: string;
|
4
4
|
versionAtSave?: string | null;
|
@@ -30,6 +30,6 @@ export interface LinkDefinition {
|
|
30
30
|
}
|
31
31
|
export declare const link: MarkSpec;
|
32
32
|
export declare const toJSON: (mark: Mark) => {
|
33
|
-
type:
|
33
|
+
type: string;
|
34
34
|
attrs: Record<string, string>;
|
35
35
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { TextDefinition as Text } from './text';
|
3
3
|
import { BreakoutMarkDefinition } from '../marks/breakout';
|
4
4
|
import { MarksObject, NoMark } from './types/mark';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { BreakoutMarkDefinition } from '../marks';
|
3
3
|
import { MarksObject, NoMark } from './types/mark';
|
4
4
|
import { NonNestableBlockContent } from './types/non-nestable-block-content';
|
@@ -27,5 +27,5 @@ export type ExpandDefinition = ExpandBaseDefinition & NoMark;
|
|
27
27
|
export type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
|
28
28
|
export declare const expand: NodeSpec;
|
29
29
|
export declare const toJSON: (node: PMNode) => {
|
30
|
-
attrs:
|
30
|
+
attrs: import("prosemirror-model").Attrs;
|
31
31
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { MediaDefinition as Media } from './media';
|
3
3
|
import { LinkDefinition } from '../marks/link';
|
4
4
|
import { ExtendedMediaAttributes } from './types/rich-media-common';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { BorderMarkDefinition } from '../marks/border';
|
3
3
|
import { LinkDefinition } from '../marks/link';
|
4
4
|
export type MediaType = 'file' | 'link' | 'external';
|
@@ -53,7 +53,7 @@ export interface ExternalMediaAttributes {
|
|
53
53
|
}
|
54
54
|
export type MediaADFAttrs = MediaAttributes | ExternalMediaAttributes;
|
55
55
|
export declare const defaultAttrs: DefaultAttributes<MediaADFAttrs>;
|
56
|
-
export declare const createMediaSpec: (attributes: NodeSpec
|
56
|
+
export declare const createMediaSpec: (attributes: Partial<NodeSpec['attrs']>, inline?: boolean) => NodeSpec;
|
57
57
|
export declare const media: NodeSpec;
|
58
58
|
export declare const camelCaseToKebabCase: (str: string) => string;
|
59
59
|
export declare const copyPrivateAttributes: (from: Record<string, any>, to: Record<string, any>, map?: ((str: string) => string) | undefined) => void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
export declare enum USER_TYPES {
|
3
3
|
DEFAULT = "DEFAULT",
|
4
4
|
SPECIAL = "SPECIAL",
|
@@ -20,5 +20,5 @@ export interface MentionDefinition {
|
|
20
20
|
}
|
21
21
|
export declare const mention: NodeSpec;
|
22
22
|
export declare const toJSON: (node: PMNode) => {
|
23
|
-
attrs:
|
23
|
+
attrs: import("prosemirror-model").Attrs;
|
24
24
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
1
|
+
import { Node as PmNode, NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { CellAttributes } from '@atlaskit/editor-tables/types';
|
3
3
|
import { PanelDefinition as Panel } from './panel';
|
4
4
|
import { ParagraphDefinition as Paragraph, ParagraphWithAlignmentDefinition as ParagraphWithMarks } from './paragraph';
|
@@ -104,7 +104,7 @@ export interface TableHeader {
|
|
104
104
|
export declare const table: NodeSpec;
|
105
105
|
export declare const tableWithCustomWidth: NodeSpec;
|
106
106
|
export declare const tableToJSON: (node: PmNode) => {
|
107
|
-
attrs:
|
107
|
+
attrs: import("prosemirror-model").Attrs;
|
108
108
|
};
|
109
109
|
export declare const tableRow: NodeSpec;
|
110
110
|
export declare const tableCell: NodeSpec;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
|
-
import { Step, Mappable } from '@atlaskit/editor-prosemirror/transform';
|
2
|
+
import { Step, StepResult, StepMap, ReplaceStep, Mappable } from '@atlaskit/editor-prosemirror/transform';
|
3
3
|
export declare const analyticsStepType = "atlaskit-analytics";
|
4
4
|
export declare const analyticsInvertStepType = "atlaskit-analytics-invert";
|
5
5
|
export interface AnalyticsPayload {
|
@@ -47,13 +47,13 @@ export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
|
|
47
47
|
* Generate new undo/redo analytics event when step is inverted
|
48
48
|
*/
|
49
49
|
invert(): AnalyticsStep<AnalyticsInvertPayload>;
|
50
|
-
apply(doc: PMNode):
|
50
|
+
apply(doc: PMNode): StepResult;
|
51
51
|
map(mapping: Mappable): AnalyticsStep<P>;
|
52
|
-
getMap():
|
52
|
+
getMap(): StepMap;
|
53
53
|
merge(other: Step): AnalyticsStep<P> | null;
|
54
54
|
toJSON(): {
|
55
55
|
stepType: string;
|
56
56
|
};
|
57
|
-
static fromJSON():
|
57
|
+
static fromJSON(): ReplaceStep;
|
58
58
|
}
|
59
59
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
2
|
-
import { Step, Mappable } from '@atlaskit/editor-prosemirror/transform';
|
2
|
+
import { ReplaceStep, Step, StepMap, StepResult, Mappable } from '@atlaskit/editor-prosemirror/transform';
|
3
3
|
export declare const stepType = "editor-linking-meta";
|
4
4
|
export declare const invertStepType = "editor-linking-meta-invert";
|
5
5
|
export type LinkStepMetadata = {
|
@@ -36,9 +36,9 @@ export declare class LinkMetaStep extends Step {
|
|
36
36
|
* Generate new undo/redo analytics event when step is inverted
|
37
37
|
*/
|
38
38
|
invert(): LinkMetaStep;
|
39
|
-
apply(doc: PMNode):
|
39
|
+
apply(doc: PMNode): StepResult;
|
40
40
|
map(mapping: Mappable): LinkMetaStep;
|
41
|
-
getMap():
|
41
|
+
getMap(): StepMap;
|
42
42
|
merge(): null;
|
43
43
|
toJSON(): {
|
44
44
|
stepType: string;
|
@@ -47,5 +47,5 @@ export declare class LinkMetaStep extends Step {
|
|
47
47
|
};
|
48
48
|
static fromJSON<S extends Schema = any>(_: S, __: {
|
49
49
|
[key: string]: any;
|
50
|
-
}):
|
50
|
+
}): ReplaceStep;
|
51
51
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Mappable, Step } from '@atlaskit/editor-prosemirror/transform';
|
1
|
+
import { Mappable, Step, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
2
2
|
import { Node as ProseMirrorNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
3
3
|
/**
|
4
4
|
* For more context on what this is about:
|
@@ -8,7 +8,7 @@ export declare class SetAttrsStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
attrs: object;
|
10
10
|
constructor(pos: number, attrs: object);
|
11
|
-
apply(doc: ProseMirrorNode):
|
11
|
+
apply(doc: ProseMirrorNode): StepResult;
|
12
12
|
invert(doc: ProseMirrorNode): SetAttrsStep;
|
13
13
|
map(mapping: Mappable): SetAttrsStep | null;
|
14
14
|
toJSON(): {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
|
-
import { Step } from '@atlaskit/editor-prosemirror/transform';
|
2
|
+
import { ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
3
3
|
import { TableColumnOrdering } from './types';
|
4
4
|
export declare const tableSortingStepType = "atlaskit-table-sorting-ordering";
|
5
5
|
export declare class TableSortStep extends Step {
|
@@ -8,11 +8,11 @@ export declare class TableSortStep extends Step {
|
|
8
8
|
pos: number;
|
9
9
|
constructor(pos: number, prev?: TableColumnOrdering, next?: TableColumnOrdering);
|
10
10
|
invert(): TableSortStep;
|
11
|
-
apply(doc: PMNode):
|
11
|
+
apply(doc: PMNode): StepResult;
|
12
12
|
map(): null;
|
13
|
-
getMap():
|
13
|
+
getMap(): StepMap;
|
14
14
|
toJSON(): {
|
15
15
|
stepType: string;
|
16
16
|
};
|
17
|
-
static fromJSON():
|
17
|
+
static fromJSON(): ReplaceStep;
|
18
18
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
2
|
-
import { Mappable, Step } from '@atlaskit/editor-prosemirror/transform';
|
2
|
+
import { Mappable, ReplaceStep, Step, StepMap, StepResult } from '@atlaskit/editor-prosemirror/transform';
|
3
3
|
export declare const insertTypeAheadStepType = "atlaskit-insert-type-ahead";
|
4
4
|
export declare enum InsertTypeAheadStages {
|
5
5
|
DELETING_RAW_QUERY = "DELETING_RAW_QUERY",
|
@@ -19,17 +19,17 @@ export declare class InsertTypeAheadStep extends Step {
|
|
19
19
|
trigger: string;
|
20
20
|
constructor({ stage, query, trigger, selectedIndex }: Config, isInvertStep?: boolean);
|
21
21
|
invert(): InsertTypeAheadStep;
|
22
|
-
apply(doc: PMNode):
|
22
|
+
apply(doc: PMNode): StepResult;
|
23
23
|
merge(): null;
|
24
24
|
isInsertionStep(): boolean;
|
25
25
|
isUndoingStep(): boolean;
|
26
26
|
map(mapping: Mappable): InsertTypeAheadStep;
|
27
|
-
getMap():
|
27
|
+
getMap(): StepMap;
|
28
28
|
toJSON(): {
|
29
29
|
stepType: string;
|
30
30
|
from: number;
|
31
31
|
to: number;
|
32
32
|
};
|
33
|
-
static fromJSON():
|
33
|
+
static fromJSON(): ReplaceStep;
|
34
34
|
}
|
35
35
|
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "28.1.
|
3
|
+
"version": "28.1.10",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -20,14 +20,14 @@
|
|
20
20
|
"generate:json-schema:full": "json-schema-generator --outDir=./json-schema/v1/ ./src/schema/nodes/doc.ts",
|
21
21
|
"ak-postbuild": "yarn build:json-schema",
|
22
22
|
"test": "yarn test:unit",
|
23
|
-
"test:unit": "yarn jest --testPathPattern=adf-schema/src --config=../../jest.config.js",
|
23
|
+
"test:unit": "yarn workspace @atlaskit/editor-prosemirror build && jest --testPathPattern=adf-schema/src --config=../../jest.config.js",
|
24
24
|
"build:cjs": "NODE_ENV=production BABEL_ENV=production:node-cjs babel --config-file ../../babel.config.js src --out-dir dist/cjs -x .ts,.tsx",
|
25
25
|
"build:esm": "NODE_ENV=production BABEL_ENV=production:esm babel --config-file ../../babel.config.js src -d dist/esm -x .ts,.tsx",
|
26
26
|
"build:es2019": "NODE_ENV=production BABEL_ENV=production:es2019 babel --config-file ../../babel.config.js src -d dist/es2019 -x .ts,.tsx",
|
27
27
|
"build:types": "NODE_ENV=production tsc --project ./build/tsconfig.json --emitDeclarationOnly --outDir ./dist/types --rootDir ./src && yarn build:jsontypes",
|
28
28
|
"build:jsontypes": "mkdir -p dist/types/json-schema && cp src/json-schema/index.ts dist/types/json-schema/index.d.ts",
|
29
29
|
"build:all": "yarn build:cjs && yarn build:esm && yarn build:es2019 && yarn build:types",
|
30
|
-
"build": "yarn run build:all && yarn run generate:json-schema && yarn run build:json-schema",
|
30
|
+
"build": "yarn workspace @atlaskit/editor-prosemirror build && yarn run build:all && yarn run generate:json-schema && yarn run build:json-schema",
|
31
31
|
"clean": "../../scripts/build-clean.sh"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
@@ -42,6 +42,7 @@
|
|
42
42
|
"memoize-one": "^6.0.0"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
|
+
"@atlaskit/adf-schema-json": "^1.0.1",
|
45
46
|
"@babel/cli": "^7.22.9",
|
46
47
|
"@babel/core": "^7.22.9",
|
47
48
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import { initialize } from 'adf-test-helpers/src/ajv';
|
2
2
|
|
3
|
-
import { readFilesSync } from 'adf-test-helpers/src/adf-schema';
|
4
3
|
import v1SchemaFull from '../../../../json-schema/v1/full.json';
|
5
4
|
import v1SchemaStage0 from '../../../../json-schema/v1/stage-0.json';
|
6
5
|
|
6
|
+
import {
|
7
|
+
fullValidJsonSchema,
|
8
|
+
fullInvalidJsonSchema,
|
9
|
+
stage0ValidJsonSchema,
|
10
|
+
stage0InvalidJsonSchema,
|
11
|
+
} from '@atlaskit/adf-schema-json';
|
12
|
+
|
7
13
|
const ajv = initialize();
|
8
14
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
9
15
|
|
@@ -11,9 +17,8 @@ describe(`${packageName} json-schema v1`, () => {
|
|
11
17
|
const validateFull = ajv.compile(v1SchemaFull);
|
12
18
|
const validateStage0 = ajv.compile(v1SchemaStage0);
|
13
19
|
|
14
|
-
const valid = readFilesSync(`${__dirname}/v1-reference/full/valid`);
|
15
20
|
describe('full', () => {
|
16
|
-
for (const file of
|
21
|
+
for (const file of fullValidJsonSchema) {
|
17
22
|
it(`validates '${file.name}'`, () => {
|
18
23
|
validateFull(file.data);
|
19
24
|
expect(validateFull.errors).toEqual(null);
|
@@ -23,8 +28,7 @@ describe(`${packageName} json-schema v1`, () => {
|
|
23
28
|
});
|
24
29
|
}
|
25
30
|
|
26
|
-
const
|
27
|
-
for (const file of invalid) {
|
31
|
+
for (const file of fullInvalidJsonSchema) {
|
28
32
|
it(`does not validate '${file.name}'`, () => {
|
29
33
|
expect(validateFull(file.data)).toEqual(false);
|
30
34
|
});
|
@@ -32,8 +36,7 @@ describe(`${packageName} json-schema v1`, () => {
|
|
32
36
|
});
|
33
37
|
|
34
38
|
describe('stage-0', () => {
|
35
|
-
const
|
36
|
-
for (const file of valid) {
|
39
|
+
for (const file of stage0ValidJsonSchema) {
|
37
40
|
it(`validates '${file.name}'`, () => {
|
38
41
|
validateStage0(file.data);
|
39
42
|
expect(validateStage0.errors).toEqual(null);
|
@@ -43,8 +46,7 @@ describe(`${packageName} json-schema v1`, () => {
|
|
43
46
|
});
|
44
47
|
}
|
45
48
|
|
46
|
-
const
|
47
|
-
for (const file of invalid) {
|
49
|
+
for (const file of stage0InvalidJsonSchema) {
|
48
50
|
it(`does not validate '${file.name}'`, () => {
|
49
51
|
expect(validateStage0(file.data)).toEqual(false);
|
50
52
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { date } from '../../../..';
|
3
3
|
|
4
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
4
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
5
5
|
|
6
6
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
7
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { expand } from '../../../..';
|
3
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
3
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
4
4
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
5
5
|
|
6
6
|
describe(`${packageName}/schema expand node`, () => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { inlineExtension } from '../../../..';
|
3
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
3
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
4
4
|
|
5
5
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
6
6
|
|
@@ -2,7 +2,7 @@ import { toHTML, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
|
2
2
|
|
3
3
|
import { doc, ol, li, p } from 'adf-test-helpers/src/adf-schema/schema-builder';
|
4
4
|
|
5
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
5
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
6
6
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
7
7
|
|
8
8
|
describe(`${packageName}/schema listItem node`, () => {
|
@@ -6,11 +6,7 @@ import {
|
|
6
6
|
createMediaSpec,
|
7
7
|
} from '../../../../schema/nodes/media';
|
8
8
|
import { image as ImageNodeSpec } from '../../../../schema/nodes/image';
|
9
|
-
import {
|
10
|
-
fromHTML,
|
11
|
-
toDOM,
|
12
|
-
schema,
|
13
|
-
} from 'adf-test-helpers/src/adf-schema';
|
9
|
+
import { fromHTML, toDOM, schema } from 'adf-test-helpers/src/adf-schema';
|
14
10
|
|
15
11
|
// Note: We can't use dom.dataset in jest until it's upgraded to use latest version
|
16
12
|
// of jsdom. In the meantime we can use this helper-method.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { nestedExpand } from '../../../..';
|
3
3
|
import { Schema, Node } from '@atlaskit/editor-prosemirror/model';
|
4
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
4
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
5
5
|
|
6
6
|
const findNestedExpand = (doc: Node, schema: Schema) => {
|
7
7
|
let expand: Node | null = null;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { toHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
2
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
3
3
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
4
4
|
|
5
5
|
describe(`${packageName}/schema orderedList node`, () => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { placeholder } from '../../../..';
|
3
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
3
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
4
4
|
|
5
5
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { toDOM, fromHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { status } from '../../../..';
|
3
3
|
import { StatusLocalIdRegex } from 'adf-test-helpers/src/constants';
|
4
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
4
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
5
5
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
6
6
|
|
7
7
|
describe(`${packageName}/schema status node`, () => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { fromHTML, toHTML } from 'adf-test-helpers/src/adf-schema/html-helpers';
|
2
2
|
import { inlineNodes } from '../../../../schema/inline-nodes';
|
3
3
|
|
4
|
-
import { schema } from 'adf-test-helpers/src/adf-schema'
|
4
|
+
import { schema } from 'adf-test-helpers/src/adf-schema';
|
5
5
|
|
6
6
|
const packageName = process.env._PACKAGE_NAME_ as string;
|
7
7
|
|
@@ -57,10 +57,10 @@ export type MediaSingleFullDefinition = MediaSingleBaseDefinition &
|
|
57
57
|
|
58
58
|
export const defaultAttrs: {
|
59
59
|
width: {
|
60
|
-
|
60
|
+
default: null;
|
61
61
|
};
|
62
62
|
layout: {
|
63
|
-
|
63
|
+
default: string;
|
64
64
|
};
|
65
65
|
} = {
|
66
66
|
width: { default: null }, // null makes small images to have original size by default
|
@@ -201,7 +201,11 @@ export const media: NodeSpec = createMediaSpec(defaultAttrs);
|
|
201
201
|
export const camelCaseToKebabCase = (str: string) =>
|
202
202
|
str.replace(/([^A-Z]+)([A-Z])/g, (_, x, y) => `${x}-${y.toLowerCase()}`);
|
203
203
|
|
204
|
-
export const copyPrivateAttributes: (
|
204
|
+
export const copyPrivateAttributes: (
|
205
|
+
from: Record<string, any>,
|
206
|
+
to: Record<string, any>,
|
207
|
+
map?: ((str: string) => string) | undefined,
|
208
|
+
) => void = (
|
205
209
|
from: Record<string, any>,
|
206
210
|
to: Record<string, any>,
|
207
211
|
map?: (str: string) => string,
|
@@ -65,16 +65,14 @@ export const tableCellContentDomSelector = `${tablePrefixSelector}-cell-nodeview
|
|
65
65
|
const DEFAULT_TABLE_HEADER_CELL_BACKGROUND = N20.toLocaleLowerCase();
|
66
66
|
|
67
67
|
export const getCellAttrs: (
|
68
|
-
dom: HTMLElement,
|
68
|
+
dom: HTMLElement,
|
69
|
+
defaultValues?: CellAttributes,
|
69
70
|
) => {
|
70
71
|
colspan: number;
|
71
72
|
rowspan: number;
|
72
73
|
colwidth: number[] | null;
|
73
74
|
background: string | null;
|
74
|
-
} = (
|
75
|
-
dom: HTMLElement,
|
76
|
-
defaultValues: CellAttributes = {},
|
77
|
-
) => {
|
75
|
+
} = (dom: HTMLElement, defaultValues: CellAttributes = {}) => {
|
78
76
|
const widthAttr = dom.getAttribute('data-colwidth');
|
79
77
|
const width =
|
80
78
|
widthAttr && /^\d+(,\d+)*$/.test(widthAttr)
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
2
|
-
import { EditorState, Plugin, Transaction } from '@atlaskit/editor-prosemirror/state';
|
3
|
-
import { history, undo } from '@atlaskit/editor-prosemirror/history';
|
4
2
|
import {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
} from '
|
3
|
+
EditorState,
|
4
|
+
Plugin,
|
5
|
+
Transaction,
|
6
|
+
} from '@atlaskit/editor-prosemirror/state';
|
7
|
+
import { history, undo } from '@atlaskit/editor-prosemirror/history';
|
8
|
+
import { DocBuilder, p, Refs, td } from 'adf-test-helpers/src/doc-builder';
|
10
9
|
import { setSelectionTransform } from 'adf-test-helpers/src/set-selection-transform';
|
11
10
|
|
12
11
|
import { defaultSchema } from '../../../schema/default-schema';
|