@atlaskit/adf-schema 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1524 -0
- package/LICENSE +13 -0
- package/build/tsconfig.json +17 -0
- package/dist/cjs/index.js +1089 -0
- package/dist/cjs/schema/bitbucket-schema.js +14 -0
- package/dist/cjs/schema/confluence-schema.js +21 -0
- package/dist/cjs/schema/create-schema.js +354 -0
- package/dist/cjs/schema/default-schema.js +52 -0
- package/dist/cjs/schema/groups.js +35 -0
- package/dist/cjs/schema/index.js +755 -0
- package/dist/cjs/schema/inline-nodes.js +20 -0
- package/dist/cjs/schema/jira-schema.js +118 -0
- package/dist/cjs/schema/marks/alignment.js +39 -0
- package/dist/cjs/schema/marks/annotation.js +96 -0
- package/dist/cjs/schema/marks/breakout.js +32 -0
- package/dist/cjs/schema/marks/code.js +46 -0
- package/dist/cjs/schema/marks/confluence-inline-comment.js +30 -0
- package/dist/cjs/schema/marks/data-consumer.js +71 -0
- package/dist/cjs/schema/marks/em.js +25 -0
- package/dist/cjs/schema/marks/indentation.js +32 -0
- package/dist/cjs/schema/marks/index.js +189 -0
- package/dist/cjs/schema/marks/link.js +128 -0
- package/dist/cjs/schema/marks/strike.js +29 -0
- package/dist/cjs/schema/marks/strong.js +37 -0
- package/dist/cjs/schema/marks/subsup.js +61 -0
- package/dist/cjs/schema/marks/text-color.js +93 -0
- package/dist/cjs/schema/marks/type-ahead-query.js +31 -0
- package/dist/cjs/schema/marks/underline.js +25 -0
- package/dist/cjs/schema/marks/unsupported-mark.js +15 -0
- package/dist/cjs/schema/marks/unsupported-node-attributes.js +16 -0
- package/dist/cjs/schema/nodes/block-card.js +56 -0
- package/dist/cjs/schema/nodes/blockquote.js +23 -0
- package/dist/cjs/schema/nodes/bodied-extension.js +66 -0
- package/dist/cjs/schema/nodes/bullet-list.js +29 -0
- package/dist/cjs/schema/nodes/caption.js +27 -0
- package/dist/cjs/schema/nodes/code-block.js +160 -0
- package/dist/cjs/schema/nodes/confluence-jira-issue.js +54 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-block.js +33 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +34 -0
- package/dist/cjs/schema/nodes/date.js +36 -0
- package/dist/cjs/schema/nodes/decision-item.js +45 -0
- package/dist/cjs/schema/nodes/decision-list.js +45 -0
- package/dist/cjs/schema/nodes/doc.js +15 -0
- package/dist/cjs/schema/nodes/embed-card.js +62 -0
- package/dist/cjs/schema/nodes/emoji.js +73 -0
- package/dist/cjs/schema/nodes/expand.js +86 -0
- package/dist/cjs/schema/nodes/extension.js +59 -0
- package/dist/cjs/schema/nodes/hard-break.js +22 -0
- package/dist/cjs/schema/nodes/heading.js +69 -0
- package/dist/cjs/schema/nodes/image.js +40 -0
- package/dist/cjs/schema/nodes/index.js +539 -0
- package/dist/cjs/schema/nodes/inline-card.js +64 -0
- package/dist/cjs/schema/nodes/inline-extension.js +54 -0
- package/dist/cjs/schema/nodes/layout-column.js +53 -0
- package/dist/cjs/schema/nodes/layout-section.js +61 -0
- package/dist/cjs/schema/nodes/list-item.js +25 -0
- package/dist/cjs/schema/nodes/media-group.js +29 -0
- package/dist/cjs/schema/nodes/media-inline.js +11 -0
- package/dist/cjs/schema/nodes/media-single.js +101 -0
- package/dist/cjs/schema/nodes/media.js +196 -0
- package/dist/cjs/schema/nodes/mention.js +90 -0
- package/dist/cjs/schema/nodes/nested-expand.js +64 -0
- package/dist/cjs/schema/nodes/ordered-list.js +29 -0
- package/dist/cjs/schema/nodes/panel.js +85 -0
- package/dist/cjs/schema/nodes/paragraph.js +45 -0
- package/dist/cjs/schema/nodes/placeholder.js +39 -0
- package/dist/cjs/schema/nodes/rule.js +21 -0
- package/dist/cjs/schema/nodes/status.js +56 -0
- package/dist/cjs/schema/nodes/tableNodes.js +276 -0
- package/dist/cjs/schema/nodes/task-item.js +46 -0
- package/dist/cjs/schema/nodes/task-list.js +45 -0
- package/dist/cjs/schema/nodes/text.js +17 -0
- package/dist/cjs/schema/nodes/types/block-content.js +5 -0
- package/dist/cjs/schema/nodes/types/extensions.js +5 -0
- package/dist/cjs/schema/nodes/types/inline-content.js +5 -0
- package/dist/cjs/schema/nodes/types/mark.js +5 -0
- package/dist/cjs/schema/nodes/types/non-nestable-block-content.js +5 -0
- package/dist/cjs/schema/nodes/types/rich-media-common.js +5 -0
- package/dist/cjs/schema/nodes/unknown-block.js +21 -0
- package/dist/cjs/schema/nodes/unsupported-block.js +33 -0
- package/dist/cjs/schema/nodes/unsupported-inline.js +32 -0
- package/dist/cjs/schema/unsupported.js +8 -0
- package/dist/cjs/steps/analytics.js +183 -0
- package/dist/cjs/steps/set-attrs.js +106 -0
- package/dist/cjs/steps/table/add-column.js +453 -0
- package/dist/cjs/steps/table/constants.js +13 -0
- package/dist/cjs/steps/table/sort-column.js +87 -0
- package/dist/cjs/steps/table/types.js +5 -0
- package/dist/cjs/steps/table/utils/cell-step.js +233 -0
- package/dist/cjs/steps/table/utils/cells-at-column.js +94 -0
- package/dist/cjs/steps/table/utils/find-column.js +94 -0
- package/dist/cjs/steps/table/utils/get-table-rect-from-doc.js +38 -0
- package/dist/cjs/steps/table/utils/side-effects/rows.js +370 -0
- package/dist/cjs/steps/table/utils/side-effects/side-effects.js +106 -0
- package/dist/cjs/steps/table/utils/side-effects/table.js +126 -0
- package/dist/cjs/steps/table/utils/side-effects/types.js +5 -0
- package/dist/cjs/steps/table/utils/table-map.js +36 -0
- package/dist/cjs/steps/type-ahead.js +134 -0
- package/dist/cjs/steps.js +59 -0
- package/dist/cjs/utils/colors.js +234 -0
- package/dist/cjs/utils/confluence/emoji.js +97 -0
- package/dist/cjs/utils/extensions.js +39 -0
- package/dist/cjs/utils/index.js +373 -0
- package/dist/cjs/utils/parseDOM.js +12 -0
- package/dist/cjs/utils/url.js +38 -0
- package/dist/cjs/utils/uuid.js +28 -0
- package/dist/cjs/version.json +5 -0
- package/dist/es2019/index.js +2 -0
- package/dist/es2019/schema/bitbucket-schema.js +5 -0
- package/dist/es2019/schema/confluence-schema.js +11 -0
- package/dist/es2019/schema/create-schema.js +325 -0
- package/dist/es2019/schema/default-schema.js +35 -0
- package/dist/es2019/schema/groups.js +23 -0
- package/dist/es2019/schema/index.js +9 -0
- package/dist/es2019/schema/inline-nodes.js +3 -0
- package/dist/es2019/schema/jira-schema.js +88 -0
- package/dist/es2019/schema/marks/alignment.js +32 -0
- package/dist/es2019/schema/marks/annotation.js +80 -0
- package/dist/es2019/schema/marks/breakout.js +29 -0
- package/dist/es2019/schema/marks/code.js +43 -0
- package/dist/es2019/schema/marks/confluence-inline-comment.js +24 -0
- package/dist/es2019/schema/marks/data-consumer.js +61 -0
- package/dist/es2019/schema/marks/em.js +22 -0
- package/dist/es2019/schema/marks/indentation.js +27 -0
- package/dist/es2019/schema/marks/index.js +17 -0
- package/dist/es2019/schema/marks/link.js +105 -0
- package/dist/es2019/schema/marks/strike.js +24 -0
- package/dist/es2019/schema/marks/strong.js +40 -0
- package/dist/es2019/schema/marks/subsup.js +51 -0
- package/dist/es2019/schema/marks/text-color.js +67 -0
- package/dist/es2019/schema/marks/type-ahead-query.js +23 -0
- package/dist/es2019/schema/marks/underline.js +20 -0
- package/dist/es2019/schema/marks/unsupported-mark.js +9 -0
- package/dist/es2019/schema/marks/unsupported-node-attributes.js +10 -0
- package/dist/es2019/schema/nodes/block-card.js +50 -0
- package/dist/es2019/schema/nodes/blockquote.js +17 -0
- package/dist/es2019/schema/nodes/bodied-extension.js +58 -0
- package/dist/es2019/schema/nodes/bullet-list.js +23 -0
- package/dist/es2019/schema/nodes/caption.js +21 -0
- package/dist/es2019/schema/nodes/code-block.js +143 -0
- package/dist/es2019/schema/nodes/confluence-jira-issue.js +49 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-block.js +30 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +31 -0
- package/dist/es2019/schema/nodes/date.js +28 -0
- package/dist/es2019/schema/nodes/decision-item.js +37 -0
- package/dist/es2019/schema/nodes/decision-list.js +41 -0
- package/dist/es2019/schema/nodes/doc.js +7 -0
- package/dist/es2019/schema/nodes/embed-card.js +55 -0
- package/dist/es2019/schema/nodes/emoji.js +67 -0
- package/dist/es2019/schema/nodes/expand.js +73 -0
- package/dist/es2019/schema/nodes/extension.js +51 -0
- package/dist/es2019/schema/nodes/hard-break.js +16 -0
- package/dist/es2019/schema/nodes/heading.js +63 -0
- package/dist/es2019/schema/nodes/image.js +37 -0
- package/dist/es2019/schema/nodes/index.js +44 -0
- package/dist/es2019/schema/nodes/inline-card.js +58 -0
- package/dist/es2019/schema/nodes/inline-extension.js +46 -0
- package/dist/es2019/schema/nodes/layout-column.js +49 -0
- package/dist/es2019/schema/nodes/layout-section.js +56 -0
- package/dist/es2019/schema/nodes/list-item.js +20 -0
- package/dist/es2019/schema/nodes/media-group.js +23 -0
- package/dist/es2019/schema/nodes/media-inline.js +2 -0
- package/dist/es2019/schema/nodes/media-single.js +77 -0
- package/dist/es2019/schema/nodes/media.js +165 -0
- package/dist/es2019/schema/nodes/mention.js +81 -0
- package/dist/es2019/schema/nodes/nested-expand.js +58 -0
- package/dist/es2019/schema/nodes/ordered-list.js +23 -0
- package/dist/es2019/schema/nodes/panel.js +79 -0
- package/dist/es2019/schema/nodes/paragraph.js +39 -0
- package/dist/es2019/schema/nodes/placeholder.js +33 -0
- package/dist/es2019/schema/nodes/rule.js +15 -0
- package/dist/es2019/schema/nodes/status.js +54 -0
- package/dist/es2019/schema/nodes/tableNodes.js +222 -0
- package/dist/es2019/schema/nodes/task-item.js +38 -0
- package/dist/es2019/schema/nodes/task-list.js +37 -0
- package/dist/es2019/schema/nodes/text.js +7 -0
- package/dist/es2019/schema/nodes/types/block-content.js +1 -0
- package/dist/es2019/schema/nodes/types/extensions.js +1 -0
- package/dist/es2019/schema/nodes/types/inline-content.js +1 -0
- package/dist/es2019/schema/nodes/types/mark.js +1 -0
- package/dist/es2019/schema/nodes/types/non-nestable-block-content.js +1 -0
- package/dist/es2019/schema/nodes/types/rich-media-common.js +1 -0
- package/dist/es2019/schema/nodes/unknown-block.js +16 -0
- package/dist/es2019/schema/nodes/unsupported-block.js +26 -0
- package/dist/es2019/schema/nodes/unsupported-inline.js +25 -0
- package/dist/es2019/schema/unsupported.js +1 -0
- package/dist/es2019/steps/analytics.js +122 -0
- package/dist/es2019/steps/set-attrs.js +57 -0
- package/dist/es2019/steps/table/add-column.js +349 -0
- package/dist/es2019/steps/table/constants.js +6 -0
- package/dist/es2019/steps/table/sort-column.js +41 -0
- package/dist/es2019/steps/table/types.js +1 -0
- package/dist/es2019/steps/table/utils/cell-step.js +204 -0
- package/dist/es2019/steps/table/utils/cells-at-column.js +57 -0
- package/dist/es2019/steps/table/utils/find-column.js +86 -0
- package/dist/es2019/steps/table/utils/get-table-rect-from-doc.js +30 -0
- package/dist/es2019/steps/table/utils/side-effects/rows.js +297 -0
- package/dist/es2019/steps/table/utils/side-effects/side-effects.js +81 -0
- package/dist/es2019/steps/table/utils/side-effects/table.js +99 -0
- package/dist/es2019/steps/table/utils/side-effects/types.js +1 -0
- package/dist/es2019/steps/table/utils/table-map.js +19 -0
- package/dist/es2019/steps/type-ahead.js +85 -0
- package/dist/es2019/steps.js +6 -0
- package/dist/es2019/utils/colors.js +148 -0
- package/dist/es2019/utils/confluence/emoji.js +83 -0
- package/dist/es2019/utils/extensions.js +26 -0
- package/dist/es2019/utils/index.js +4 -0
- package/dist/es2019/utils/parseDOM.js +1 -0
- package/dist/es2019/utils/url.js +19 -0
- package/dist/es2019/utils/uuid.js +18 -0
- package/dist/es2019/version.json +5 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/schema/bitbucket-schema.js +5 -0
- package/dist/esm/schema/confluence-schema.js +11 -0
- package/dist/esm/schema/create-schema.js +338 -0
- package/dist/esm/schema/default-schema.js +36 -0
- package/dist/esm/schema/groups.js +23 -0
- package/dist/esm/schema/index.js +9 -0
- package/dist/esm/schema/inline-nodes.js +5 -0
- package/dist/esm/schema/jira-schema.js +88 -0
- package/dist/esm/schema/marks/alignment.js +30 -0
- package/dist/esm/schema/marks/annotation.js +82 -0
- package/dist/esm/schema/marks/breakout.js +25 -0
- package/dist/esm/schema/marks/code.js +41 -0
- package/dist/esm/schema/marks/confluence-inline-comment.js +22 -0
- package/dist/esm/schema/marks/data-consumer.js +63 -0
- package/dist/esm/schema/marks/em.js +20 -0
- package/dist/esm/schema/marks/indentation.js +23 -0
- package/dist/esm/schema/marks/index.js +17 -0
- package/dist/esm/schema/marks/link.js +113 -0
- package/dist/esm/schema/marks/strike.js +24 -0
- package/dist/esm/schema/marks/strong.js +32 -0
- package/dist/esm/schema/marks/subsup.js +53 -0
- package/dist/esm/schema/marks/text-color.js +78 -0
- package/dist/esm/schema/marks/type-ahead-query.js +21 -0
- package/dist/esm/schema/marks/underline.js +20 -0
- package/dist/esm/schema/marks/unsupported-mark.js +8 -0
- package/dist/esm/schema/marks/unsupported-node-attributes.js +9 -0
- package/dist/esm/schema/nodes/block-card.js +48 -0
- package/dist/esm/schema/nodes/blockquote.js +15 -0
- package/dist/esm/schema/nodes/bodied-extension.js +58 -0
- package/dist/esm/schema/nodes/bullet-list.js +21 -0
- package/dist/esm/schema/nodes/caption.js +19 -0
- package/dist/esm/schema/nodes/code-block.js +149 -0
- package/dist/esm/schema/nodes/confluence-jira-issue.js +47 -0
- package/dist/esm/schema/nodes/confluence-unsupported-block.js +26 -0
- package/dist/esm/schema/nodes/confluence-unsupported-inline.js +27 -0
- package/dist/esm/schema/nodes/date.js +28 -0
- package/dist/esm/schema/nodes/decision-item.js +36 -0
- package/dist/esm/schema/nodes/decision-list.js +39 -0
- package/dist/esm/schema/nodes/doc.js +7 -0
- package/dist/esm/schema/nodes/embed-card.js +54 -0
- package/dist/esm/schema/nodes/emoji.js +68 -0
- package/dist/esm/schema/nodes/expand.js +75 -0
- package/dist/esm/schema/nodes/extension.js +51 -0
- package/dist/esm/schema/nodes/hard-break.js +14 -0
- package/dist/esm/schema/nodes/heading.js +61 -0
- package/dist/esm/schema/nodes/image.js +33 -0
- package/dist/esm/schema/nodes/index.js +44 -0
- package/dist/esm/schema/nodes/inline-card.js +56 -0
- package/dist/esm/schema/nodes/inline-extension.js +46 -0
- package/dist/esm/schema/nodes/layout-column.js +45 -0
- package/dist/esm/schema/nodes/layout-section.js +52 -0
- package/dist/esm/schema/nodes/list-item.js +18 -0
- package/dist/esm/schema/nodes/media-group.js +21 -0
- package/dist/esm/schema/nodes/media-inline.js +2 -0
- package/dist/esm/schema/nodes/media-single.js +84 -0
- package/dist/esm/schema/nodes/media.js +174 -0
- package/dist/esm/schema/nodes/mention.js +80 -0
- package/dist/esm/schema/nodes/nested-expand.js +56 -0
- package/dist/esm/schema/nodes/ordered-list.js +21 -0
- package/dist/esm/schema/nodes/panel.js +76 -0
- package/dist/esm/schema/nodes/paragraph.js +37 -0
- package/dist/esm/schema/nodes/placeholder.js +31 -0
- package/dist/esm/schema/nodes/rule.js +13 -0
- package/dist/esm/schema/nodes/status.js +51 -0
- package/dist/esm/schema/nodes/tableNodes.js +238 -0
- package/dist/esm/schema/nodes/task-item.js +37 -0
- package/dist/esm/schema/nodes/task-list.js +35 -0
- package/dist/esm/schema/nodes/text.js +9 -0
- package/dist/esm/schema/nodes/types/block-content.js +1 -0
- package/dist/esm/schema/nodes/types/extensions.js +1 -0
- package/dist/esm/schema/nodes/types/inline-content.js +1 -0
- package/dist/esm/schema/nodes/types/mark.js +1 -0
- package/dist/esm/schema/nodes/types/non-nestable-block-content.js +1 -0
- package/dist/esm/schema/nodes/types/rich-media-common.js +1 -0
- package/dist/esm/schema/nodes/unknown-block.js +14 -0
- package/dist/esm/schema/nodes/unsupported-block.js +26 -0
- package/dist/esm/schema/nodes/unsupported-inline.js +25 -0
- package/dist/esm/schema/unsupported.js +1 -0
- package/dist/esm/steps/analytics.js +166 -0
- package/dist/esm/steps/set-attrs.js +89 -0
- package/dist/esm/steps/table/add-column.js +431 -0
- package/dist/esm/steps/table/constants.js +6 -0
- package/dist/esm/steps/table/sort-column.js +69 -0
- package/dist/esm/steps/table/types.js +1 -0
- package/dist/esm/steps/table/utils/cell-step.js +216 -0
- package/dist/esm/steps/table/utils/cells-at-column.js +84 -0
- package/dist/esm/steps/table/utils/find-column.js +87 -0
- package/dist/esm/steps/table/utils/get-table-rect-from-doc.js +30 -0
- package/dist/esm/steps/table/utils/side-effects/rows.js +360 -0
- package/dist/esm/steps/table/utils/side-effects/side-effects.js +93 -0
- package/dist/esm/steps/table/utils/side-effects/table.js +113 -0
- package/dist/esm/steps/table/utils/side-effects/types.js +1 -0
- package/dist/esm/steps/table/utils/table-map.js +19 -0
- package/dist/esm/steps/type-ahead.js +117 -0
- package/dist/esm/steps.js +6 -0
- package/dist/esm/utils/colors.js +160 -0
- package/dist/esm/utils/confluence/emoji.js +85 -0
- package/dist/esm/utils/extensions.js +27 -0
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/parseDOM.js +3 -0
- package/dist/esm/utils/url.js +21 -0
- package/dist/esm/utils/uuid.js +18 -0
- package/dist/esm/version.json +5 -0
- package/dist/json-schema/v1/full.json +2536 -0
- package/dist/json-schema/v1/stage-0.json +2737 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/schema/bitbucket-schema.d.ts +2 -0
- package/dist/types/schema/confluence-schema.d.ts +3 -0
- package/dist/types/schema/create-schema.d.ts +31 -0
- package/dist/types/schema/default-schema.d.ts +7 -0
- package/dist/types/schema/groups.d.ts +6 -0
- package/dist/types/schema/index.d.ts +11 -0
- package/dist/types/schema/inline-nodes.d.ts +1 -0
- package/dist/types/schema/jira-schema.d.ts +26 -0
- package/dist/types/schema/marks/alignment.d.ts +16 -0
- package/dist/types/schema/marks/annotation.d.ts +32 -0
- package/dist/types/schema/marks/breakout.d.ts +12 -0
- package/dist/types/schema/marks/code.d.ts +8 -0
- package/dist/types/schema/marks/confluence-inline-comment.d.ts +12 -0
- package/dist/types/schema/marks/data-consumer.d.ts +41 -0
- package/dist/types/schema/marks/em.d.ts +8 -0
- package/dist/types/schema/marks/indentation.d.ts +16 -0
- package/dist/types/schema/marks/index.d.ts +30 -0
- package/dist/types/schema/marks/link.d.ts +32 -0
- package/dist/types/schema/marks/strike.d.ts +8 -0
- package/dist/types/schema/marks/strong.d.ts +8 -0
- package/dist/types/schema/marks/subsup.d.ts +15 -0
- package/dist/types/schema/marks/text-color.d.ts +21 -0
- package/dist/types/schema/marks/type-ahead-query.d.ts +2 -0
- package/dist/types/schema/marks/underline.d.ts +8 -0
- package/dist/types/schema/marks/unsupported-mark.d.ts +2 -0
- package/dist/types/schema/marks/unsupported-node-attributes.d.ts +2 -0
- package/dist/types/schema/nodes/block-card.d.ts +19 -0
- package/dist/types/schema/nodes/blockquote.d.ts +14 -0
- package/dist/types/schema/nodes/bodied-extension.d.ts +27 -0
- package/dist/types/schema/nodes/bullet-list.d.ts +14 -0
- package/dist/types/schema/nodes/caption.d.ts +21 -0
- package/dist/types/schema/nodes/code-block.d.ts +31 -0
- package/dist/types/schema/nodes/confluence-jira-issue.d.ts +2 -0
- package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +2 -0
- package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
- package/dist/types/schema/nodes/date.d.ts +14 -0
- package/dist/types/schema/nodes/decision-item.d.ts +17 -0
- package/dist/types/schema/nodes/decision-list.d.ts +18 -0
- package/dist/types/schema/nodes/doc.d.ts +18 -0
- package/dist/types/schema/nodes/embed-card.d.ts +15 -0
- package/dist/types/schema/nodes/emoji.d.ts +14 -0
- package/dist/types/schema/nodes/expand.d.ts +33 -0
- package/dist/types/schema/nodes/extension.d.ts +21 -0
- package/dist/types/schema/nodes/hard-break.d.ts +11 -0
- package/dist/types/schema/nodes/heading.d.ts +36 -0
- package/dist/types/schema/nodes/image.d.ts +2 -0
- package/dist/types/schema/nodes/index.d.ts +93 -0
- package/dist/types/schema/nodes/inline-card.d.ts +19 -0
- package/dist/types/schema/nodes/inline-extension.d.ts +21 -0
- package/dist/types/schema/nodes/layout-column.d.ts +21 -0
- package/dist/types/schema/nodes/layout-section.d.ts +44 -0
- package/dist/types/schema/nodes/list-item.d.ts +20 -0
- package/dist/types/schema/nodes/media-group.d.ts +14 -0
- package/dist/types/schema/nodes/media-inline.d.ts +16 -0
- package/dist/types/schema/nodes/media-single.d.ts +59 -0
- package/dist/types/schema/nodes/media.d.ts +60 -0
- package/dist/types/schema/nodes/mention.d.ts +26 -0
- package/dist/types/schema/nodes/nested-expand.d.ts +27 -0
- package/dist/types/schema/nodes/ordered-list.d.ts +20 -0
- package/dist/types/schema/nodes/panel.d.ts +46 -0
- package/dist/types/schema/nodes/paragraph.d.ts +37 -0
- package/dist/types/schema/nodes/placeholder.d.ts +11 -0
- package/dist/types/schema/nodes/rule.d.ts +8 -0
- package/dist/types/schema/nodes/status.d.ts +20 -0
- package/dist/types/schema/nodes/tableNodes.d.ts +111 -0
- package/dist/types/schema/nodes/task-item.d.ts +17 -0
- package/dist/types/schema/nodes/task-list.d.ts +21 -0
- package/dist/types/schema/nodes/text.d.ts +15 -0
- package/dist/types/schema/nodes/types/block-content.d.ts +22 -0
- package/dist/types/schema/nodes/types/extensions.d.ts +34 -0
- package/dist/types/schema/nodes/types/inline-content.d.ts +32 -0
- package/dist/types/schema/nodes/types/mark.d.ts +15 -0
- package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
- package/dist/types/schema/nodes/types/rich-media-common.d.ts +9 -0
- package/dist/types/schema/nodes/unknown-block.d.ts +3 -0
- package/dist/types/schema/nodes/unsupported-block.d.ts +2 -0
- package/dist/types/schema/nodes/unsupported-inline.d.ts +2 -0
- package/dist/types/schema/unsupported.d.ts +1 -0
- package/dist/types/steps/analytics.d.ts +59 -0
- package/dist/types/steps/set-attrs.d.ts +23 -0
- package/dist/types/steps/table/add-column.d.ts +88 -0
- package/dist/types/steps/table/constants.d.ts +4 -0
- package/dist/types/steps/table/sort-column.d.ts +18 -0
- package/dist/types/steps/table/types.d.ts +39 -0
- package/dist/types/steps/table/utils/cell-step.d.ts +47 -0
- package/dist/types/steps/table/utils/cells-at-column.d.ts +20 -0
- package/dist/types/steps/table/utils/find-column.d.ts +8 -0
- package/dist/types/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
- package/dist/types/steps/table/utils/side-effects/rows.d.ts +25 -0
- package/dist/types/steps/table/utils/side-effects/side-effects.d.ts +15 -0
- package/dist/types/steps/table/utils/side-effects/table.d.ts +16 -0
- package/dist/types/steps/table/utils/side-effects/types.d.ts +33 -0
- package/dist/types/steps/table/utils/table-map.d.ts +6 -0
- package/dist/types/steps/type-ahead.d.ts +35 -0
- package/dist/types/steps.d.ts +8 -0
- package/dist/types/utils/colors.d.ts +71 -0
- package/dist/types/utils/confluence/emoji.d.ts +50 -0
- package/dist/types/utils/extensions.d.ts +3 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/parseDOM.d.ts +1 -0
- package/dist/types/utils/url.d.ts +15 -0
- package/dist/types/utils/uuid.d.ts +5 -0
- package/document-fixtures/unsupported-content.json +526 -0
- package/json-schema/v1/full.json +2536 -0
- package/json-schema/v1/stage-0.json +2737 -0
- package/package.json +63 -0
- package/steps/package.json +7 -0
- package/test-helpers/html-helpers.ts +40 -0
- package/test-helpers/matches.ts +8 -0
- package/test-helpers/schema-builder.ts +329 -0
- package/test-helpers/schema.ts +79 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* @name status_node
|
|
4
|
+
*/
|
|
5
|
+
export interface StatusDefinition {
|
|
6
|
+
type: 'status';
|
|
7
|
+
attrs: {
|
|
8
|
+
/**
|
|
9
|
+
* @minLength 1
|
|
10
|
+
*/
|
|
11
|
+
text: string;
|
|
12
|
+
color: 'neutral' | 'purple' | 'blue' | 'red' | 'yellow' | 'green';
|
|
13
|
+
localId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Supported values are bold and subtle
|
|
16
|
+
*/
|
|
17
|
+
style?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const status: NodeSpec;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Node as PmNode, NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { CellAttributes } from '@atlaskit/editor-tables/types';
|
|
3
|
+
import { PanelDefinition as Panel } from './panel';
|
|
4
|
+
import { ParagraphDefinition as Paragraph, ParagraphWithAlignmentDefinition as ParagraphWithMarks } from './paragraph';
|
|
5
|
+
import { BlockQuoteDefinition as Blockquote } from './blockquote';
|
|
6
|
+
import { OrderedListDefinition as OrderedList } from './ordered-list';
|
|
7
|
+
import { BulletListDefinition as BulletList } from './bullet-list';
|
|
8
|
+
import { RuleDefinition as Rule } from './rule';
|
|
9
|
+
import { HeadingDefinition as Heading, HeadingWithMarksDefinition as HeadingWithMarks } from './heading';
|
|
10
|
+
import { CodeBlockDefinition as CodeBlock } from './code-block';
|
|
11
|
+
import { MediaGroupDefinition as MediaGroup } from './media-group';
|
|
12
|
+
import { MediaSingleDefinition as MediaSingle } from './media-single';
|
|
13
|
+
import { DecisionListDefinition as DecisionList } from './decision-list';
|
|
14
|
+
import { TaskListDefinition as TaskList } from './task-list';
|
|
15
|
+
import { ExtensionDefinition as Extension, ExtensionWithMarksDefinition as ExtensionWithMarks } from './extension';
|
|
16
|
+
import { BlockCardDefinition as BlockCard } from './block-card';
|
|
17
|
+
import { EmbedCardDefinition as EmbedCard } from './embed-card';
|
|
18
|
+
import { NestedExpandDefinition as NestedExpand } from './nested-expand';
|
|
19
|
+
export type { CellAttributes };
|
|
20
|
+
export declare const tablePrefixSelector = "pm-table";
|
|
21
|
+
export declare const tableCellSelector: string;
|
|
22
|
+
export declare const tableHeaderSelector: string;
|
|
23
|
+
export declare const tableCellContentWrapperSelector: string;
|
|
24
|
+
export declare const tableCellContentDomSelector: string;
|
|
25
|
+
export declare const getCellAttrs: (dom: HTMLElement, defaultValues?: CellAttributes) => {
|
|
26
|
+
colspan: number;
|
|
27
|
+
rowspan: number;
|
|
28
|
+
colwidth: number[] | null;
|
|
29
|
+
background: string | null;
|
|
30
|
+
};
|
|
31
|
+
export declare type CellDomAttrs = {
|
|
32
|
+
colspan?: string;
|
|
33
|
+
rowspan?: string;
|
|
34
|
+
style?: string;
|
|
35
|
+
colorname?: string;
|
|
36
|
+
'data-colwidth'?: string;
|
|
37
|
+
class?: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* gets cell dom attributes based on node attributes
|
|
41
|
+
* @returns CellDomAttrs
|
|
42
|
+
*/
|
|
43
|
+
export declare const getCellDomAttrs: (node: PmNode) => CellDomAttrs;
|
|
44
|
+
export declare const tableBackgroundColorPalette: Map<string, string>;
|
|
45
|
+
export declare const tableBackgroundBorderColor: string;
|
|
46
|
+
export declare const tableBackgroundColorNames: Map<string, string>;
|
|
47
|
+
export declare type Layout = 'default' | 'full-width' | 'wide';
|
|
48
|
+
export interface TableAttributes {
|
|
49
|
+
isNumberColumnEnabled?: boolean;
|
|
50
|
+
layout?: Layout;
|
|
51
|
+
__autoSize?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @minLength 1
|
|
54
|
+
*/
|
|
55
|
+
localId?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @name table_node
|
|
59
|
+
*/
|
|
60
|
+
export interface TableDefinition {
|
|
61
|
+
type: 'table';
|
|
62
|
+
attrs?: TableAttributes;
|
|
63
|
+
/**
|
|
64
|
+
* @minItems 1
|
|
65
|
+
*/
|
|
66
|
+
content: Array<TableRow>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @name table_row_node
|
|
70
|
+
*/
|
|
71
|
+
export interface TableRow {
|
|
72
|
+
type: 'tableRow';
|
|
73
|
+
content: Array<TableHeader | TableCell>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @name table_cell_content
|
|
77
|
+
* @minItems 1
|
|
78
|
+
* @allowUnsupportedBlock true
|
|
79
|
+
*/
|
|
80
|
+
export declare type TableCellContent = Array<Panel | Paragraph | ParagraphWithMarks | Blockquote | OrderedList | BulletList | Rule | Heading | HeadingWithMarks | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Extension | ExtensionWithMarks | BlockCard | NestedExpand | EmbedCard>;
|
|
81
|
+
/**
|
|
82
|
+
* @name table_cell_node
|
|
83
|
+
*/
|
|
84
|
+
export interface TableCell {
|
|
85
|
+
type: 'tableCell';
|
|
86
|
+
attrs?: CellAttributes;
|
|
87
|
+
content: TableCellContent;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @name table_header_node
|
|
91
|
+
*/
|
|
92
|
+
export interface TableHeader {
|
|
93
|
+
type: 'tableHeader';
|
|
94
|
+
attrs?: CellAttributes;
|
|
95
|
+
content: TableCellContent;
|
|
96
|
+
}
|
|
97
|
+
export declare const table: NodeSpec;
|
|
98
|
+
export declare const tableToJSON: (node: PmNode) => {
|
|
99
|
+
attrs: {
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export declare const tableRow: NodeSpec;
|
|
104
|
+
export declare const tableCell: NodeSpec;
|
|
105
|
+
export declare const toJSONTableCell: (node: PmNode) => {
|
|
106
|
+
attrs: Record<string, any>;
|
|
107
|
+
};
|
|
108
|
+
export declare const tableHeader: NodeSpec;
|
|
109
|
+
export declare const toJSONTableHeader: (node: PmNode) => {
|
|
110
|
+
attrs: Record<string, any>;
|
|
111
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { Inline } from './types/inline-content';
|
|
3
|
+
/**
|
|
4
|
+
* @name taskItem_node
|
|
5
|
+
*/
|
|
6
|
+
export interface TaskItemDefinition {
|
|
7
|
+
type: 'taskItem';
|
|
8
|
+
/**
|
|
9
|
+
* @allowUnsupportedInline true
|
|
10
|
+
*/
|
|
11
|
+
content?: Array<Inline>;
|
|
12
|
+
attrs: {
|
|
13
|
+
localId: string;
|
|
14
|
+
state: 'TODO' | 'DONE';
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const taskItem: NodeSpec;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { TaskItemDefinition as TaskItemNode } from './task-item';
|
|
3
|
+
export interface TaskListContent extends Array<TaskItemNode | TaskListDefinition> {
|
|
4
|
+
0: TaskItemNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @name taskList_node
|
|
8
|
+
*/
|
|
9
|
+
export interface TaskListDefinition {
|
|
10
|
+
type: 'taskList';
|
|
11
|
+
/**
|
|
12
|
+
* @minItems 1
|
|
13
|
+
* @allowUnsupportedBlock true
|
|
14
|
+
*/
|
|
15
|
+
content: TaskListContent;
|
|
16
|
+
attrs: {
|
|
17
|
+
localId: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const taskListSelector: string;
|
|
21
|
+
export declare const taskList: NodeSpec;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* @name text_node
|
|
4
|
+
*/
|
|
5
|
+
export interface TextDefinition {
|
|
6
|
+
type: 'text';
|
|
7
|
+
/**
|
|
8
|
+
* @minLength 1
|
|
9
|
+
*/
|
|
10
|
+
text: string;
|
|
11
|
+
marks?: Array<any>;
|
|
12
|
+
}
|
|
13
|
+
export declare const text: NodeSpec & {
|
|
14
|
+
toDebugString?: () => string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExpandDefinition as Expand } from '../expand';
|
|
2
|
+
import { BodiedExtensionDefinition as BodiedExtension, BodiedExtensionWithMarksDefinition as BodiedExtensionWithMarks } from '../bodied-extension';
|
|
3
|
+
import { PanelDefinition as Panel } from '../panel';
|
|
4
|
+
import { ParagraphDefinition as Paragraph, ParagraphWithAlignmentDefinition as ParagraphWithMarks } from '../paragraph';
|
|
5
|
+
import { BlockQuoteDefinition as Blockquote } from '../blockquote';
|
|
6
|
+
import { OrderedListDefinition as OrderedList } from '../ordered-list';
|
|
7
|
+
import { BulletListDefinition as BulletList } from '../bullet-list';
|
|
8
|
+
import { RuleDefinition as Rule } from '../rule';
|
|
9
|
+
import { HeadingDefinition as Heading, HeadingWithMarksDefinition as HeadingWithMarks } from '../heading';
|
|
10
|
+
import { CodeBlockDefinition as CodeBlock } from '../code-block';
|
|
11
|
+
import { MediaGroupDefinition as MediaGroup } from '../media-group';
|
|
12
|
+
import { MediaSingleDefinition as MediaSingle } from '../media-single';
|
|
13
|
+
import { DecisionListDefinition as DecisionList } from '../decision-list';
|
|
14
|
+
import { TaskListDefinition as TaskList } from '../task-list';
|
|
15
|
+
import { TableDefinition as Table } from '../tableNodes';
|
|
16
|
+
import { ExtensionDefinition as Extension, ExtensionWithMarksDefinition as ExtensionWithMarks } from '../extension';
|
|
17
|
+
import { BlockCardDefinition as BlockCard } from '../block-card';
|
|
18
|
+
import { EmbedCardDefinition as EmbedCard } from '../embed-card';
|
|
19
|
+
/**
|
|
20
|
+
* @name block_content
|
|
21
|
+
*/
|
|
22
|
+
export declare type BlockContent = Panel | Paragraph | ParagraphWithMarks | Blockquote | OrderedList | BulletList | Rule | Heading | HeadingWithMarks | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Table | Expand | Extension | ExtensionWithMarks | BodiedExtension | BodiedExtensionWithMarks | BlockCard | EmbedCard;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare type Layout = 'default' | 'wide' | 'full-width';
|
|
2
|
+
export interface ExtensionAttributes {
|
|
3
|
+
/**
|
|
4
|
+
* @minLength 1
|
|
5
|
+
*/
|
|
6
|
+
extensionKey: string;
|
|
7
|
+
/**
|
|
8
|
+
* @minLength 1
|
|
9
|
+
*/
|
|
10
|
+
extensionType: string;
|
|
11
|
+
parameters?: object;
|
|
12
|
+
text?: string;
|
|
13
|
+
layout?: Layout;
|
|
14
|
+
/**
|
|
15
|
+
* @minLength 1
|
|
16
|
+
*/
|
|
17
|
+
localId?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface InlineExtensionAttributes {
|
|
20
|
+
/**
|
|
21
|
+
* @minLength 1
|
|
22
|
+
*/
|
|
23
|
+
extensionKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* @minLength 1
|
|
26
|
+
*/
|
|
27
|
+
extensionType: string;
|
|
28
|
+
parameters?: object;
|
|
29
|
+
text?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @minLength 1
|
|
32
|
+
*/
|
|
33
|
+
localId?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HardBreakDefinition as HardBreak } from '../hard-break';
|
|
2
|
+
import { MentionDefinition as Mention } from '../mention';
|
|
3
|
+
import { EmojiDefinition as Emoji } from '../emoji';
|
|
4
|
+
import { InlineExtensionDefinition as InlineExtensionWithoutMark, InlineExtensionWithMarksDefinition as InlineExtensionWithMark } from '../inline-extension';
|
|
5
|
+
import { DateDefinition as Date } from '../date';
|
|
6
|
+
import { PlaceholderDefinition as Placeholder } from '../placeholder';
|
|
7
|
+
import { InlineCardDefinition as InlineCard } from '../inline-card';
|
|
8
|
+
import { StatusDefinition as Status } from '../status';
|
|
9
|
+
import { TextDefinition as Text } from '../text';
|
|
10
|
+
import { MarksObject } from './mark';
|
|
11
|
+
import { AnnotationMarkDefinition as Annotation, CodeDefinition as Code, EmDefinition as Em, LinkDefinition as Link, StrikeDefinition as Strike, StrongDefinition as Strong, SubSupDefinition as SubSup, TextColorDefinition as TextColor, UnderlineDefinition as Underline } from '../../marks';
|
|
12
|
+
import { MediaInlineDefinition } from '../media-inline';
|
|
13
|
+
/**
|
|
14
|
+
* @name formatted_text_inline_node
|
|
15
|
+
*/
|
|
16
|
+
export declare type InlineFormattedText = Text & MarksObject<Link | Em | Strong | Strike | SubSup | Underline | TextColor | Annotation>;
|
|
17
|
+
/**
|
|
18
|
+
* @name link_text_inline_node
|
|
19
|
+
*/
|
|
20
|
+
export declare type InlineLinkText = Text & MarksObject<Link>;
|
|
21
|
+
/**
|
|
22
|
+
* @name code_inline_node
|
|
23
|
+
*/
|
|
24
|
+
export declare type InlineCode = Text & MarksObject<Code | Link | Annotation>;
|
|
25
|
+
/**
|
|
26
|
+
* @name atomic_inline_node
|
|
27
|
+
*/
|
|
28
|
+
export declare type InlineAtomic = HardBreak | Mention | Emoji | InlineExtensionWithoutMark | Date | Placeholder | InlineCard | Status | MediaInlineDefinition;
|
|
29
|
+
/**
|
|
30
|
+
* @name inline_node
|
|
31
|
+
*/
|
|
32
|
+
export declare type Inline = InlineFormattedText | InlineCode | InlineExtensionWithMark | InlineAtomic;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PanelDefinition as Panel } from '../panel';
|
|
2
|
+
import { ParagraphDefinition as Paragraph } from '../paragraph';
|
|
3
|
+
import { BlockQuoteDefinition as Blockquote } from '../blockquote';
|
|
4
|
+
import { OrderedListDefinition as OrderedList } from '../ordered-list';
|
|
5
|
+
import { BulletListDefinition as BulletList } from '../bullet-list';
|
|
6
|
+
import { RuleDefinition as Rule } from '../rule';
|
|
7
|
+
import { HeadingDefinition as Heading } from '../heading';
|
|
8
|
+
import { CodeBlockDefinition as CodeBlock } from '../code-block';
|
|
9
|
+
import { MediaGroupDefinition as MediaGroup } from '../media-group';
|
|
10
|
+
import { MediaSingleDefinition as MediaSingle } from '../media-single';
|
|
11
|
+
import { DecisionListDefinition as DecisionList } from '../decision-list';
|
|
12
|
+
import { TaskListDefinition as TaskList } from '../task-list';
|
|
13
|
+
import { TableDefinition as Table } from '../tableNodes';
|
|
14
|
+
import { ExtensionDefinition as Extension, ExtensionWithMarksDefinition as ExtensionWithMarks } from '../extension';
|
|
15
|
+
import { BlockCardDefinition as BlockCard } from '../block-card';
|
|
16
|
+
import { EmbedCardDefinition as EmbedCard } from '../embed-card';
|
|
17
|
+
/**
|
|
18
|
+
* @name non_nestable_block_content
|
|
19
|
+
*/
|
|
20
|
+
export declare type NonNestableBlockContent = Panel | Paragraph | Blockquote | OrderedList | BulletList | Rule | Heading | CodeBlock | MediaGroup | MediaSingle | DecisionList | TaskList | Table | Extension | ExtensionWithMarks | BlockCard | EmbedCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const unsupportedNodeTypesForMediaCards: Set<string>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
import { Step, StepResult, StepMap, ReplaceStep, Mappable } from 'prosemirror-transform';
|
|
3
|
+
export declare const analyticsStepType = "atlaskit-analytics";
|
|
4
|
+
export declare const analyticsInvertStepType = "atlaskit-analytics-invert";
|
|
5
|
+
export interface AnalyticsPayload {
|
|
6
|
+
action: string;
|
|
7
|
+
actionSubject: string;
|
|
8
|
+
actionSubjectId?: string | null;
|
|
9
|
+
attributes?: Record<string, any>;
|
|
10
|
+
eventType: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AnalyticsWithChannel<P extends AnalyticsPayload> {
|
|
13
|
+
payload: P;
|
|
14
|
+
channel: string;
|
|
15
|
+
}
|
|
16
|
+
declare enum HISTORY_ACTIONS {
|
|
17
|
+
UNDID = "undid",
|
|
18
|
+
REDID = "redid"
|
|
19
|
+
}
|
|
20
|
+
interface UndoAnalyticsEventPayload {
|
|
21
|
+
action: HISTORY_ACTIONS.UNDID;
|
|
22
|
+
actionSubject: string;
|
|
23
|
+
actionSubjectId?: string;
|
|
24
|
+
attributes?: Record<string, any>;
|
|
25
|
+
eventType: string;
|
|
26
|
+
}
|
|
27
|
+
interface RedoAnalyticsEventPayload {
|
|
28
|
+
action: HISTORY_ACTIONS.REDID;
|
|
29
|
+
actionSubject: string;
|
|
30
|
+
actionSubjectId?: string;
|
|
31
|
+
attributes?: Record<string, any>;
|
|
32
|
+
eventType: string;
|
|
33
|
+
}
|
|
34
|
+
declare type AnalyticsInvertPayload = UndoAnalyticsEventPayload | RedoAnalyticsEventPayload;
|
|
35
|
+
export declare type AnalyticsInvertStep = AnalyticsStep<AnalyticsInvertPayload>;
|
|
36
|
+
/**
|
|
37
|
+
* Custom Prosemirror Step to fire our GAS V3 analytics events
|
|
38
|
+
* Using a Step means that it will work with prosemirror-history and we get
|
|
39
|
+
* undo/redo events for free
|
|
40
|
+
*/
|
|
41
|
+
export declare class AnalyticsStep<P extends AnalyticsPayload> extends Step {
|
|
42
|
+
analyticsEvents: AnalyticsWithChannel<P>[];
|
|
43
|
+
pos?: number;
|
|
44
|
+
private actionsToIgnore;
|
|
45
|
+
constructor(analyticsEvents: AnalyticsWithChannel<P>[], actionsToIgnore?: string[], pos?: number);
|
|
46
|
+
/**
|
|
47
|
+
* Generate new undo/redo analytics event when step is inverted
|
|
48
|
+
*/
|
|
49
|
+
invert(): AnalyticsStep<AnalyticsInvertPayload>;
|
|
50
|
+
apply(doc: PMNode): StepResult<any>;
|
|
51
|
+
map(mapping: Mappable): AnalyticsStep<P>;
|
|
52
|
+
getMap(): StepMap;
|
|
53
|
+
merge(other: Step): AnalyticsStep<P> | null;
|
|
54
|
+
toJSON(): {
|
|
55
|
+
stepType: string;
|
|
56
|
+
};
|
|
57
|
+
static fromJSON(): ReplaceStep<any>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Mappable, Step, StepResult } from 'prosemirror-transform';
|
|
2
|
+
import { Node as ProseMirrorNode, Schema } from 'prosemirror-model';
|
|
3
|
+
/**
|
|
4
|
+
* For more context on what this is about:
|
|
5
|
+
* @see https://discuss.prosemirror.net/t/preventing-image-placeholder-replacement-from-being-undone/1394
|
|
6
|
+
*/
|
|
7
|
+
export declare class SetAttrsStep extends Step {
|
|
8
|
+
pos: number;
|
|
9
|
+
attrs: object;
|
|
10
|
+
constructor(pos: number, attrs: object);
|
|
11
|
+
apply(doc: ProseMirrorNode): StepResult<any>;
|
|
12
|
+
invert(doc: ProseMirrorNode): SetAttrsStep;
|
|
13
|
+
map(mapping: Mappable): SetAttrsStep | null;
|
|
14
|
+
toJSON(): {
|
|
15
|
+
stepType: string;
|
|
16
|
+
pos: number;
|
|
17
|
+
attrs: object;
|
|
18
|
+
};
|
|
19
|
+
static fromJSON(_schema: Schema, json: {
|
|
20
|
+
pos?: number;
|
|
21
|
+
attrs: object;
|
|
22
|
+
}): SetAttrsStep;
|
|
23
|
+
}
|