@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,4 @@
|
|
|
1
|
+
export { AnnotationTypes, PanelType, alignment, alignmentPositionMap, annotation, bitbucketSchema, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceSchema, confluenceSchemaWithMediaSingle, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createJIRASchema, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, defaultSchema, defaultSchemaConfig, doc, em, embedCard, emoji, expand, expandToJSON, extension, getSchemaBasedOnStage, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, isSchemaWithAdvancedTextFormattingMarks, isSchemaWithBlockQuotes, isSchemaWithCodeBlock, isSchemaWithEmojis, isSchemaWithLinks, isSchemaWithLists, isSchemaWithMedia, isSchemaWithMentions, isSchemaWithSubSupMark, isSchemaWithTables, isSchemaWithTextColor, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './schema';
|
|
2
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, } from './schema';
|
|
3
|
+
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, normalizeHexColor, normalizeUrl, rgbToHex, uuid, } from './utils';
|
|
4
|
+
export type { Match, NameToEmoji } from './utils';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a schema preserving order of marks and nodes.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createSchema<N extends string = string, M extends string = string>(config: SchemaConfig<N, M>): Schema<N, M>;
|
|
6
|
+
export declare function sanitizeNodes(nodes: {
|
|
7
|
+
[key: string]: NodeSpec;
|
|
8
|
+
}, supportedMarks: {
|
|
9
|
+
[key: string]: MarkSpec;
|
|
10
|
+
}): {
|
|
11
|
+
[key: string]: NodeSpec;
|
|
12
|
+
};
|
|
13
|
+
export declare function sanitizeNodeSpecContent(nodes: {
|
|
14
|
+
[key: string]: NodeSpec;
|
|
15
|
+
}, rawContent: string): string;
|
|
16
|
+
export interface SchemaConfig<N = string, M = string> {
|
|
17
|
+
nodes: N[];
|
|
18
|
+
customNodeSpecs?: SchemaCustomNodeSpecs;
|
|
19
|
+
marks?: M[];
|
|
20
|
+
customMarkSpecs?: SchemaCustomMarkSpecs;
|
|
21
|
+
}
|
|
22
|
+
export interface SchemaBuiltInItem {
|
|
23
|
+
name: string;
|
|
24
|
+
spec: NodeSpec | MarkSpec;
|
|
25
|
+
}
|
|
26
|
+
export interface SchemaCustomNodeSpecs {
|
|
27
|
+
[name: string]: NodeSpec;
|
|
28
|
+
}
|
|
29
|
+
export interface SchemaCustomMarkSpecs {
|
|
30
|
+
[name: string]: MarkSpec;
|
|
31
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SchemaConfig } from './create-schema';
|
|
2
|
+
declare 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
|
+
declare type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery';
|
|
4
|
+
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
5
|
+
export declare const getSchemaBasedOnStage: (stage?: string) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
6
|
+
export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FONT_STYLE = "fontStyle";
|
|
2
|
+
export declare const SEARCH_QUERY = "searchQuery";
|
|
3
|
+
export declare const LINK = "link";
|
|
4
|
+
export declare const COLOR = "color";
|
|
5
|
+
export declare const ALIGNMENT = "alignment";
|
|
6
|
+
export declare const INDENTATION = "indentation";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, customPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
|
2
|
+
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
|
3
|
+
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, } from './marks';
|
|
4
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, CodeDefinition, EmDefinition, IndentationMarkAttributes, IndentationMarkDefinition, LinkAttributes, LinkDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TextColorAttributes, TextColorDefinition, UnderlineDefinition, AnnotationId, AnnotationDataAttributes, DataConsumerAttributes, DataConsumerDefinition, } from './marks';
|
|
5
|
+
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
|
6
|
+
export { inlineNodes } from './inline-nodes';
|
|
7
|
+
export { sanitizeNodes, createSchema } from './create-schema';
|
|
8
|
+
export { bitbucketSchema } from './bitbucket-schema';
|
|
9
|
+
export { confluenceSchema, confluenceSchemaWithMediaSingle, } from './confluence-schema';
|
|
10
|
+
export { defaultSchema, getSchemaBasedOnStage, defaultSchemaConfig, } from './default-schema';
|
|
11
|
+
export { default as createJIRASchema, isSchemaWithLists, isSchemaWithMentions, isSchemaWithEmojis, isSchemaWithLinks, isSchemaWithAdvancedTextFormattingMarks, isSchemaWithCodeBlock, isSchemaWithBlockQuotes, isSchemaWithMedia, isSchemaWithSubSupMark, isSchemaWithTextColor, isSchemaWithTables, } from './jira-schema';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const inlineNodes: Set<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
export interface JIRASchemaConfig {
|
|
3
|
+
allowLists?: boolean;
|
|
4
|
+
allowMentions?: boolean;
|
|
5
|
+
allowEmojis?: boolean;
|
|
6
|
+
allowLinks?: boolean;
|
|
7
|
+
allowAdvancedTextFormatting?: boolean;
|
|
8
|
+
allowCodeBlock?: boolean;
|
|
9
|
+
allowBlockQuote?: boolean;
|
|
10
|
+
allowSubSup?: boolean;
|
|
11
|
+
allowMedia?: boolean;
|
|
12
|
+
allowTextColor?: boolean;
|
|
13
|
+
allowTables?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default function makeSchema(config: JIRASchemaConfig): Schema<string, string>;
|
|
16
|
+
export declare function isSchemaWithLists(schema: Schema): boolean;
|
|
17
|
+
export declare function isSchemaWithMentions(schema: Schema): boolean;
|
|
18
|
+
export declare function isSchemaWithEmojis(schema: Schema): boolean;
|
|
19
|
+
export declare function isSchemaWithLinks(schema: Schema): boolean;
|
|
20
|
+
export declare function isSchemaWithAdvancedTextFormattingMarks(schema: Schema): boolean;
|
|
21
|
+
export declare function isSchemaWithSubSupMark(schema: Schema): boolean;
|
|
22
|
+
export declare function isSchemaWithCodeBlock(schema: Schema): boolean;
|
|
23
|
+
export declare function isSchemaWithBlockQuotes(schema: Schema): boolean;
|
|
24
|
+
export declare function isSchemaWithMedia(schema: Schema): boolean;
|
|
25
|
+
export declare function isSchemaWithTextColor(schema: Schema): boolean;
|
|
26
|
+
export declare function isSchemaWithTables(schema: Schema): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
/** TODO: Flip these positions for RTL */
|
|
3
|
+
export declare const alignmentPositionMap: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
export interface AlignmentAttributes {
|
|
7
|
+
align: 'center' | 'end';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @name alignment_mark
|
|
11
|
+
*/
|
|
12
|
+
export interface AlignmentMarkDefinition {
|
|
13
|
+
type: 'alignment';
|
|
14
|
+
attrs: AlignmentAttributes;
|
|
15
|
+
}
|
|
16
|
+
export declare const alignment: MarkSpec;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* @name annotation_mark
|
|
4
|
+
*/
|
|
5
|
+
export interface AnnotationMarkDefinition {
|
|
6
|
+
type: 'annotation';
|
|
7
|
+
attrs: AnnotationMarkAttributes;
|
|
8
|
+
}
|
|
9
|
+
export interface AnnotationMarkAttributes {
|
|
10
|
+
id: AnnotationId;
|
|
11
|
+
annotationType: AnnotationTypes;
|
|
12
|
+
}
|
|
13
|
+
export declare type AnnotationId = string;
|
|
14
|
+
export declare enum AnnotationTypes {
|
|
15
|
+
INLINE_COMMENT = "inlineComment"
|
|
16
|
+
}
|
|
17
|
+
export declare enum AnnotationMarkStates {
|
|
18
|
+
RESOLVED = "resolved",
|
|
19
|
+
ACTIVE = "active"
|
|
20
|
+
}
|
|
21
|
+
export declare type AnnotationDataAttributes = {
|
|
22
|
+
'data-mark-type': string;
|
|
23
|
+
'data-mark-annotation-type': AnnotationTypes;
|
|
24
|
+
'data-id': AnnotationId;
|
|
25
|
+
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
26
|
+
};
|
|
27
|
+
declare type BuildDataAttributesProps = AnnotationMarkAttributes & {
|
|
28
|
+
state?: AnnotationMarkStates | undefined | null;
|
|
29
|
+
};
|
|
30
|
+
export declare function buildDataAttributes({ id, annotationType, state, }: BuildDataAttributesProps): AnnotationDataAttributes;
|
|
31
|
+
export declare const annotation: MarkSpec;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
export declare type BreakoutMarkAttrs = {
|
|
3
|
+
mode: 'wide' | 'full-width';
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* @name breakout_mark
|
|
7
|
+
*/
|
|
8
|
+
export interface BreakoutMarkDefinition {
|
|
9
|
+
type: 'breakout';
|
|
10
|
+
attrs: BreakoutMarkAttrs;
|
|
11
|
+
}
|
|
12
|
+
export declare const breakout: MarkSpec;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* @name inline_comment_marker
|
|
4
|
+
* @description This temporary mark represents a Confluence-backed inline comment that wraps a piece of text. It will be replaced with a cross-product inline comment solution at later date.
|
|
5
|
+
*/
|
|
6
|
+
export interface ConfluenceInlineCommentDefinition {
|
|
7
|
+
type: 'confluenceInlineComment';
|
|
8
|
+
attrs: {
|
|
9
|
+
reference: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const confluenceInlineComment: MarkSpec;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Mark, MarkSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* @minLength 1
|
|
4
|
+
*/
|
|
5
|
+
declare type DataConsumerSource = string;
|
|
6
|
+
export interface DataConsumerAttributes {
|
|
7
|
+
/**
|
|
8
|
+
* @minItems 1
|
|
9
|
+
*/
|
|
10
|
+
sources: Array<DataConsumerSource>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @name dataConsumer_mark
|
|
14
|
+
* @description This mark is used for metadata surrounding a node consuming data
|
|
15
|
+
* from a given source node
|
|
16
|
+
*/
|
|
17
|
+
export interface DataConsumerDefinition {
|
|
18
|
+
type: 'dataConsumer';
|
|
19
|
+
attrs: DataConsumerAttributes;
|
|
20
|
+
}
|
|
21
|
+
export interface DataConsumerMark extends Mark {
|
|
22
|
+
attrs: DataConsumerAttributes;
|
|
23
|
+
}
|
|
24
|
+
export declare const dataConsumer: MarkSpec;
|
|
25
|
+
/**
|
|
26
|
+
* We want to ensure any "invalid ADF" doesn't get serialised, but the entire
|
|
27
|
+
* mark itself is not valid without a non-empty `sources`.
|
|
28
|
+
*
|
|
29
|
+
* We _almost could_ simply return `null` if sources length is < 0 & would fit
|
|
30
|
+
* the type signature of prosemirror-model's `fragment` but not `mark`'s toJSON.
|
|
31
|
+
*
|
|
32
|
+
* So we'll leave any extra transformation checks in
|
|
33
|
+
* `editor-json-transformer`(?)
|
|
34
|
+
*/
|
|
35
|
+
export declare const toJSON: (mark: Mark) => {
|
|
36
|
+
type: string;
|
|
37
|
+
attrs: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
export interface IndentationMarkAttributes {
|
|
3
|
+
/**
|
|
4
|
+
* @minimum 1
|
|
5
|
+
* @maximum 6
|
|
6
|
+
*/
|
|
7
|
+
level: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @name indentation_mark
|
|
11
|
+
*/
|
|
12
|
+
export interface IndentationMarkDefinition {
|
|
13
|
+
type: 'indentation';
|
|
14
|
+
attrs: IndentationMarkAttributes;
|
|
15
|
+
}
|
|
16
|
+
export declare const indentation: MarkSpec;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { em } from './em';
|
|
2
|
+
export type { EmDefinition } from './em';
|
|
3
|
+
export { code } from './code';
|
|
4
|
+
export type { CodeDefinition } from './code';
|
|
5
|
+
export { strike } from './strike';
|
|
6
|
+
export type { StrikeDefinition } from './strike';
|
|
7
|
+
export { strong } from './strong';
|
|
8
|
+
export type { StrongDefinition } from './strong';
|
|
9
|
+
export { underline } from './underline';
|
|
10
|
+
export type { UnderlineDefinition } from './underline';
|
|
11
|
+
export { link, toJSON as linkToJSON } from './link';
|
|
12
|
+
export type { LinkAttributes, LinkDefinition } from './link';
|
|
13
|
+
export { typeAheadQuery } from './type-ahead-query';
|
|
14
|
+
export { subsup } from './subsup';
|
|
15
|
+
export type { SubSupDefinition, SubSupAttributes } from './subsup';
|
|
16
|
+
export { textColor, colorPalette, colorPaletteExtended } from './text-color';
|
|
17
|
+
export type { TextColorDefinition, TextColorAttributes } from './text-color';
|
|
18
|
+
export { confluenceInlineComment } from './confluence-inline-comment';
|
|
19
|
+
export { breakout } from './breakout';
|
|
20
|
+
export type { BreakoutMarkAttrs, BreakoutMarkDefinition } from './breakout';
|
|
21
|
+
export { alignment, alignmentPositionMap } from './alignment';
|
|
22
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition } from './alignment';
|
|
23
|
+
export { indentation } from './indentation';
|
|
24
|
+
export type { IndentationMarkAttributes, IndentationMarkDefinition, } from './indentation';
|
|
25
|
+
export { annotation, AnnotationMarkStates, buildDataAttributes as buildAnnotationMarkDataAttributes, AnnotationTypes, } from './annotation';
|
|
26
|
+
export type { AnnotationMarkDefinition, AnnotationMarkAttributes, AnnotationId, AnnotationDataAttributes, } from './annotation';
|
|
27
|
+
export { unsupportedMark } from './unsupported-mark';
|
|
28
|
+
export { unsupportedNodeAttribute } from './unsupported-node-attributes';
|
|
29
|
+
export type { DataConsumerAttributes, DataConsumerDefinition, } from './data-consumer';
|
|
30
|
+
export { dataConsumer, toJSON as dataConsumerToJSON } from './data-consumer';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MarkSpec, Mark } from 'prosemirror-model';
|
|
2
|
+
export interface ConfluenceLinkMetadata {
|
|
3
|
+
linkType: string;
|
|
4
|
+
versionAtSave?: string | null;
|
|
5
|
+
fileName?: string | null;
|
|
6
|
+
spaceKey?: string | null;
|
|
7
|
+
contentTitle?: string | null;
|
|
8
|
+
isRenamedTitle?: boolean;
|
|
9
|
+
anchorName?: string | null;
|
|
10
|
+
contentId?: string | null;
|
|
11
|
+
container?: ConfluenceLinkMetadata;
|
|
12
|
+
}
|
|
13
|
+
export interface LinkAttributes {
|
|
14
|
+
href: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
collection?: string;
|
|
18
|
+
occurrenceKey?: string;
|
|
19
|
+
__confluenceMetadata?: ConfluenceLinkMetadata;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @name link_mark
|
|
23
|
+
*/
|
|
24
|
+
export interface LinkDefinition {
|
|
25
|
+
type: 'link';
|
|
26
|
+
attrs: LinkAttributes;
|
|
27
|
+
}
|
|
28
|
+
export declare const link: MarkSpec;
|
|
29
|
+
export declare const toJSON: (mark: Mark) => {
|
|
30
|
+
type: string;
|
|
31
|
+
attrs: Record<string, string>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MarkSpec, Mark } from 'prosemirror-model';
|
|
2
|
+
export interface SubSupAttributes {
|
|
3
|
+
type: 'sub' | 'sup';
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @name subsup_mark
|
|
7
|
+
*/
|
|
8
|
+
export interface SubSupDefinition {
|
|
9
|
+
type: 'subsup';
|
|
10
|
+
attrs: SubSupAttributes;
|
|
11
|
+
}
|
|
12
|
+
export interface SubSupMark extends Mark {
|
|
13
|
+
attrs: SubSupAttributes;
|
|
14
|
+
}
|
|
15
|
+
export declare const subsup: MarkSpec;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Mark, MarkSpec } from 'prosemirror-model';
|
|
2
|
+
export interface TextColorAttributes {
|
|
3
|
+
/**
|
|
4
|
+
* @pattern "^#[0-9a-fA-F]{6}$"
|
|
5
|
+
*/
|
|
6
|
+
color: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @name textColor_mark
|
|
10
|
+
*/
|
|
11
|
+
export interface TextColorDefinition {
|
|
12
|
+
type: 'textColor';
|
|
13
|
+
attrs: TextColorAttributes;
|
|
14
|
+
}
|
|
15
|
+
export interface TextColorMark extends Mark {
|
|
16
|
+
attrs: TextColorAttributes;
|
|
17
|
+
}
|
|
18
|
+
export declare type TextColorKey = 'Light gray' | 'Purple' | 'Teal' | 'Green' | 'Red' | 'Orange' | 'Dark gray' | 'Blue' | 'Yellow' | 'Dark blue' | 'Dark teal' | 'Dark green' | 'Dark red' | 'Dark purple' | 'White' | 'Light blue' | 'Light teal' | 'Light green' | 'Light yellow' | 'Light red' | 'Light purple';
|
|
19
|
+
export declare const colorPalette: Map<string, TextColorKey>;
|
|
20
|
+
export declare const colorPaletteExtended: Map<string, TextColorKey>;
|
|
21
|
+
export declare const textColor: MarkSpec;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
export interface UrlType {
|
|
3
|
+
url: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DataType {
|
|
6
|
+
/**
|
|
7
|
+
* @additionalProperties true
|
|
8
|
+
*/
|
|
9
|
+
data: object;
|
|
10
|
+
}
|
|
11
|
+
export declare type CardAttributes = UrlType | DataType;
|
|
12
|
+
/**
|
|
13
|
+
* @name blockCard_node
|
|
14
|
+
*/
|
|
15
|
+
export interface BlockCardDefinition {
|
|
16
|
+
type: 'blockCard';
|
|
17
|
+
attrs: CardAttributes;
|
|
18
|
+
}
|
|
19
|
+
export declare const blockCard: NodeSpec;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { ParagraphDefinition as Paragraph } from './paragraph';
|
|
3
|
+
/**
|
|
4
|
+
* @name blockquote_node
|
|
5
|
+
*/
|
|
6
|
+
export interface BlockQuoteDefinition {
|
|
7
|
+
type: 'blockquote';
|
|
8
|
+
/**
|
|
9
|
+
* @minItems 1
|
|
10
|
+
* @allowUnsupportedBlock true
|
|
11
|
+
*/
|
|
12
|
+
content: Array<Paragraph>;
|
|
13
|
+
}
|
|
14
|
+
export declare const blockquote: NodeSpec;
|