@atlaskit/adf-schema 54.0.3 → 55.0.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 +34 -0
- package/alignment/package.json +1 -8
- package/annotation/package.json +1 -8
- package/background-color/package.json +1 -8
- package/block-card/package.json +1 -8
- package/block-content/package.json +1 -8
- package/blockquote/package.json +1 -8
- package/bodied-extension/package.json +1 -8
- package/bodied-sync-block/package.json +1 -8
- package/border/package.json +1 -8
- package/breakout/package.json +1 -8
- package/bullet-list/package.json +1 -8
- package/caption/package.json +1 -8
- package/code/package.json +1 -8
- package/code-block/package.json +1 -8
- package/colors/package.json +1 -8
- package/confluence/emoji/package.json +1 -8
- package/confluence-inline-comment/package.json +1 -8
- package/confluence-jira-issue/package.json +1 -8
- package/confluence-unsupported-block/package.json +1 -8
- package/confluence-unsupported-inline/package.json +1 -8
- package/create-schema/package.json +1 -8
- package/createPMSpecFactory/package.json +1 -8
- package/data-consumer/package.json +1 -8
- package/date/package.json +1 -8
- package/decision-item/package.json +1 -8
- package/decision-list/package.json +1 -8
- package/dist/cjs/schema/marks/background-color.js +4 -2
- package/dist/cjs/schema/marks/strong.js +4 -3
- package/dist/cjs/schema/marks/text-color.js +4 -2
- package/dist/cjs/schema/nodes/code-block.js +7 -5
- package/dist/cjs/schema/nodes/media.js +3 -2
- package/dist/cjs/schema/nodes/status.js +4 -2
- package/dist/cjs/schema/nodes/tableNodes.js +4 -3
- package/dist/cjs/schema/sanitizeNodes.js +5 -3
- package/dist/cjs/utils/colors.js +7 -4
- package/dist/cjs/utils/lch-color-inversion.js +8 -8
- package/dist/es2019/schema/marks/background-color.js +4 -2
- package/dist/es2019/schema/marks/strong.js +4 -3
- package/dist/es2019/schema/marks/text-color.js +4 -2
- package/dist/es2019/schema/nodes/code-block.js +7 -5
- package/dist/es2019/schema/nodes/media.js +3 -2
- package/dist/es2019/schema/nodes/status.js +3 -2
- package/dist/es2019/schema/nodes/tableNodes.js +4 -3
- package/dist/es2019/schema/sanitizeNodes.js +5 -3
- package/dist/es2019/utils/colors.js +7 -4
- package/dist/es2019/utils/lch-color-inversion.js +6 -5
- package/dist/esm/schema/marks/background-color.js +4 -2
- package/dist/esm/schema/marks/strong.js +4 -3
- package/dist/esm/schema/marks/text-color.js +4 -2
- package/dist/esm/schema/nodes/code-block.js +7 -5
- package/dist/esm/schema/nodes/media.js +3 -2
- package/dist/esm/schema/nodes/status.js +3 -2
- package/dist/esm/schema/nodes/tableNodes.js +4 -3
- package/dist/esm/schema/sanitizeNodes.js +5 -3
- package/dist/esm/utils/colors.js +7 -4
- package/dist/esm/utils/lch-color-inversion.js +8 -8
- package/dist/json-schema/package.json +1 -8
- package/doc/package.json +1 -8
- package/em/package.json +1 -8
- package/embed-card/package.json +1 -8
- package/emoji/package.json +1 -8
- package/expand/package.json +1 -8
- package/extension/package.json +1 -8
- package/extensions/package.json +1 -8
- package/font-size/package.json +1 -8
- package/fragment/package.json +1 -8
- package/hard-break/package.json +1 -8
- package/heading/package.json +1 -8
- package/image/package.json +1 -8
- package/indentation/package.json +1 -8
- package/inline-card/package.json +1 -8
- package/inline-content/package.json +1 -8
- package/inline-extension/package.json +1 -8
- package/inline-nodes/package.json +1 -8
- package/json-schema/package.json +1 -8
- package/layout-column/package.json +1 -8
- package/layout-section/package.json +1 -8
- package/lch-color-inversion/package.json +1 -8
- package/link/package.json +1 -8
- package/list/package.json +1 -8
- package/list-item/package.json +1 -8
- package/mark/package.json +1 -8
- package/media/package.json +1 -8
- package/media-group/package.json +1 -8
- package/media-inline/package.json +1 -8
- package/media-single/package.json +1 -8
- package/mention/package.json +1 -8
- package/multi-bodied-extension/package.json +1 -8
- package/nested-expand/package.json +1 -8
- package/non-nestable-block-content/package.json +1 -8
- package/ordered-list/package.json +1 -8
- package/package.json +5 -5
- package/panel/package.json +1 -8
- package/paragraph/package.json +1 -8
- package/placeholder/package.json +1 -8
- package/rich-media-common/package.json +1 -8
- package/rule/package.json +1 -8
- package/sanitizeNodes/package.json +1 -8
- package/schema/alignment/package.json +1 -8
- package/schema/annotation/package.json +1 -8
- package/schema/background-color/package.json +1 -8
- package/schema/block-card/package.json +1 -8
- package/schema/block-content/package.json +1 -8
- package/schema/blockquote/package.json +1 -8
- package/schema/bodied-extension/package.json +1 -8
- package/schema/bodied-sync-block/package.json +1 -8
- package/schema/border/package.json +1 -8
- package/schema/breakout/package.json +1 -8
- package/schema/bullet-list/package.json +1 -8
- package/schema/caption/package.json +1 -8
- package/schema/code/package.json +1 -8
- package/schema/code-block/package.json +1 -8
- package/schema/confluence-inline-comment/package.json +1 -8
- package/schema/confluence-jira-issue/package.json +1 -8
- package/schema/confluence-unsupported-block/package.json +1 -8
- package/schema/confluence-unsupported-inline/package.json +1 -8
- package/schema/create-schema/package.json +1 -8
- package/schema/createPMSpecFactory/package.json +1 -8
- package/schema/data-consumer/package.json +1 -8
- package/schema/date/package.json +1 -8
- package/schema/decision-item/package.json +1 -8
- package/schema/decision-list/package.json +1 -8
- package/schema/doc/package.json +1 -8
- package/schema/em/package.json +1 -8
- package/schema/embed-card/package.json +1 -8
- package/schema/emoji/package.json +1 -8
- package/schema/expand/package.json +1 -8
- package/schema/extension/package.json +1 -8
- package/schema/extensions/package.json +1 -8
- package/schema/font-size/package.json +1 -8
- package/schema/fragment/package.json +1 -8
- package/schema/hard-break/package.json +1 -8
- package/schema/heading/package.json +1 -8
- package/schema/image/package.json +1 -8
- package/schema/indentation/package.json +1 -8
- package/schema/inline-card/package.json +1 -8
- package/schema/inline-content/package.json +1 -8
- package/schema/inline-extension/package.json +1 -8
- package/schema/inline-nodes/package.json +1 -8
- package/schema/layout-section/package.json +1 -8
- package/schema/link/package.json +1 -8
- package/schema/list/package.json +1 -8
- package/schema/list-item/package.json +1 -8
- package/schema/mark/package.json +1 -8
- package/schema/media/package.json +1 -8
- package/schema/media-group/package.json +1 -8
- package/schema/media-inline/package.json +1 -8
- package/schema/media-single/package.json +1 -8
- package/schema/mention/package.json +1 -8
- package/schema/multi-bodied-extension/package.json +1 -8
- package/schema/nested-expand/package.json +1 -8
- package/schema/non-nestable-block-content/package.json +1 -8
- package/schema/ordered-list/package.json +1 -8
- package/schema/package.json +1 -8
- package/schema/panel/package.json +1 -8
- package/schema/paragraph/package.json +1 -8
- package/schema/placeholder/package.json +1 -8
- package/schema/rich-media-common/package.json +1 -8
- package/schema/rule/package.json +1 -8
- package/schema/sanitizeNodes/package.json +1 -8
- package/schema/status/package.json +1 -8
- package/schema/strike/package.json +1 -8
- package/schema/strong/package.json +1 -8
- package/schema/subsup/package.json +1 -8
- package/schema/sync-block/package.json +1 -8
- package/schema/tableNodes/package.json +1 -8
- package/schema/task-item/package.json +1 -8
- package/schema/task-list/package.json +1 -8
- package/schema/text/package.json +1 -8
- package/schema/text-color/package.json +1 -8
- package/schema/type-ahead-query/package.json +1 -8
- package/schema/underline/package.json +1 -8
- package/schema/unknown-block/package.json +1 -8
- package/schema/unsupported/package.json +1 -8
- package/schema/unsupported-block/package.json +1 -8
- package/schema/unsupported-inline/package.json +1 -8
- package/schema/unsupported-mark/package.json +1 -8
- package/schema/unsupported-node-attributes/package.json +1 -8
- package/schema-bitbucket/package.json +1 -8
- package/schema-confluence/package.json +1 -8
- package/schema-default/package.json +1 -8
- package/schema-jira/package.json +1 -8
- package/schema-next/markTypes/package.json +1 -8
- package/schema-next/nodeGroupTypes/package.json +1 -8
- package/schema-next/nodeTypes/package.json +1 -8
- package/schema-next/package.json +1 -8
- package/schema-validator/package.json +1 -8
- package/status/package.json +1 -8
- package/steps/analytics/package.json +1 -8
- package/steps/batch-attrs-step/package.json +1 -8
- package/steps/link-meta-step/package.json +1 -8
- package/steps/override-document-step/package.json +1 -8
- package/steps/package.json +1 -8
- package/steps/set-attrs/package.json +1 -8
- package/steps/type-ahead/package.json +1 -8
- package/strike/package.json +1 -8
- package/strong/package.json +1 -8
- package/subsup/package.json +1 -8
- package/sync-block/package.json +1 -8
- package/tableNodes/package.json +1 -8
- package/task-item/package.json +1 -8
- package/task-list/package.json +1 -8
- package/text/package.json +1 -8
- package/text-color/package.json +1 -8
- package/type-ahead-query/package.json +1 -8
- package/underline/package.json +1 -8
- package/unknown-block/package.json +1 -8
- package/unsupported/package.json +1 -8
- package/unsupported-block/package.json +1 -8
- package/unsupported-inline/package.json +1 -8
- package/unsupported-mark/package.json +1 -8
- package/unsupported-node-attributes/package.json +1 -8
- package/url/package.json +1 -8
- package/uuid/package.json +1 -8
- package/dist/types-ts4.5/entry-points/alignment.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/annotation.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/background-color.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/block-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/block-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockquote.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/bodied-sync-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/border.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/breakout.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/bullet-list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/caption.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/code-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/code.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/colors.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/confluence-emoji.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/confluence-inline-comment.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/confluence-jira-issue.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/confluence-unsupported-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/confluence-unsupported-inline.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/create-schema.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/createPMSpecFactory.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/data-consumer.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/date.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/decision-item.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/decision-list.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/doc.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/em.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/embed-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/emoji.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/expand.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/extensions.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/font-size.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/fragment.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/hard-break.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/heading.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/image.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/indentation.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/inline-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/inline-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/inline-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/inline-nodes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/layout-column.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/layout-section.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/lch-color-inversion.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/link.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/list-item.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/mark.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/media-group.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/media-inline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/media-single.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/media.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/mention.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/multi-bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/nested-expand.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/non-nestable-block-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/ordered-list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/panel.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/paragraph.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/placeholder.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/rich-media-common.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/rule.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/sanitizeNodes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-alignment.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-annotation.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-background-color.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-block-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-block-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-blockquote.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-bodied-sync-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-border.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-breakout.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-bullet-list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-caption.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-code-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-code.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-confluence-inline-comment.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-confluence-jira-issue.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-confluence-unsupported-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-confluence-unsupported-inline.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-create-schema.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-createPMSpecFactory.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-data-consumer.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-date.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-decision-item.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-decision-list.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-doc.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-em.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-embed-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-emoji.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-expand.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-extensions.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-font-size.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-fragment.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-hard-break.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-heading.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-image.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-indentation.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-inline-card.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-inline-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-inline-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-inline-nodes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-layout-section.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-link.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-list-item.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-mark.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-media-group.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-media-inline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-media-single.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-media.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-mention.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-multi-bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-nested-expand.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-next-markTypes.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-next-nodeGroupTypes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-next-nodeTypes.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-non-nestable-block-content.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-ordered-list.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-panel.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-paragraph.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-placeholder.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-rich-media-common.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-rule.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-sanitizeNodes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-status.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-strike.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-strong.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-subsup.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-sync-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-tableNodes.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-task-item.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-task-list.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-text-color.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-type-ahead-query.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-underline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/schema-unknown-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-unsupported-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-unsupported-inline.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-unsupported-mark.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-unsupported-node-attributes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/schema-unsupported.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/status.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/steps-analytics.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/steps-batch-attrs-step.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/steps-link-meta-step.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/steps-override-document-step.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/steps-set-attrs.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/steps-type-ahead.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/strike.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/strong.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/subsup.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/sync-block.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/tableNodes.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/task-item.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/task-list.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/text-color.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/type-ahead-query.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/underline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/unknown-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/unsupported-block.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/unsupported-inline.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/unsupported-mark.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/unsupported-node-attributes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/unsupported.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/uuid.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -8
- package/dist/types-ts4.5/next-schema/full-schema.adf.d.ts +0 -5
- package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +0 -218
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +0 -10
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +0 -1056
- package/dist/types-ts4.5/next-schema/groups/blockContentGroup.d.ts +0 -14
- package/dist/types-ts4.5/next-schema/groups/blockGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/blockRootOnlyGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/fontStyleGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/inlineContentGroup.d.ts +0 -12
- package/dist/types-ts4.5/next-schema/groups/inlineGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/linkMarkGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/nonNestableBlockContentGroup.d.ts +0 -9
- package/dist/types-ts4.5/next-schema/groups/searchQueryMarkGroup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/groups/tableCellContentPseudoGroup.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/index.d.ts +0 -3
- package/dist/types-ts4.5/next-schema/marks/alignmentAndIndentation.d.ts +0 -3
- package/dist/types-ts4.5/next-schema/marks/annotation.d.ts +0 -3
- package/dist/types-ts4.5/next-schema/marks/border.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/breakout.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/code.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/color.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/marks/confluenceInlineComment.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/dataConsumer.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/em.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/fontSize.d.ts +0 -17
- package/dist/types-ts4.5/next-schema/marks/fragment.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/link.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/strike.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/strong.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/subsup.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/typeAheadQuery.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/underline.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/unsupportedMark.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/marks/unsupportedNodeAttribute.d.ts +0 -2
- package/dist/types-ts4.5/next-schema/nodes/blockCard.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/blockquote.d.ts +0 -15
- package/dist/types-ts4.5/next-schema/nodes/bodiedExtension.d.ts +0 -9
- package/dist/types-ts4.5/next-schema/nodes/bodiedSyncBlock.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/caption.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/codeBlock.d.ts +0 -9
- package/dist/types-ts4.5/next-schema/nodes/confluenceJiraIssue.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedBlock.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/confluenceUnsupportedInline.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/date.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/decisionItem.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/decisionList.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/embedCard.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/emoji.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/expand.d.ts +0 -9
- package/dist/types-ts4.5/next-schema/nodes/extension.d.ts +0 -8
- package/dist/types-ts4.5/next-schema/nodes/extensionFrame.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/hardBreak.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/heading.d.ts +0 -39
- package/dist/types-ts4.5/next-schema/nodes/image.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/inlineCard.d.ts +0 -7
- package/dist/types-ts4.5/next-schema/nodes/inlineExtension.d.ts +0 -7
- package/dist/types-ts4.5/next-schema/nodes/layoutColumn.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/layoutSection.d.ts +0 -26
- package/dist/types-ts4.5/next-schema/nodes/list.d.ts +0 -7
- package/dist/types-ts4.5/next-schema/nodes/media.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/mediaGroup.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/mediaInline.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/mediaSingle.d.ts +0 -7
- package/dist/types-ts4.5/next-schema/nodes/mention.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/multiBodiedExtension.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/nestedExpand.d.ts +0 -12
- package/dist/types-ts4.5/next-schema/nodes/panel.d.ts +0 -5
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +0 -30
- package/dist/types-ts4.5/next-schema/nodes/placeholder.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/rule.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/status.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/syncBlock.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/tableCellContent.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/tableNodes.d.ts +0 -5
- package/dist/types-ts4.5/next-schema/nodes/task.d.ts +0 -10
- package/dist/types-ts4.5/next-schema/nodes/text.d.ts +0 -26
- package/dist/types-ts4.5/next-schema/nodes/unsupportedBlock.d.ts +0 -4
- package/dist/types-ts4.5/next-schema/nodes/unsupportedInline.d.ts +0 -4
- package/dist/types-ts4.5/schema/bitbucket-schema.d.ts +0 -5
- package/dist/types-ts4.5/schema/confluence-schema.d.ts +0 -9
- package/dist/types-ts4.5/schema/create-schema.d.ts +0 -27
- package/dist/types-ts4.5/schema/createPMSpecFactory.d.ts +0 -37
- package/dist/types-ts4.5/schema/default-schema.d.ts +0 -9
- package/dist/types-ts4.5/schema/groups.d.ts +0 -6
- package/dist/types-ts4.5/schema/index.d.ts +0 -12
- package/dist/types-ts4.5/schema/inline-nodes.d.ts +0 -1
- package/dist/types-ts4.5/schema/jira-schema.d.ts +0 -65
- package/dist/types-ts4.5/schema/marks/alignment.d.ts +0 -16
- package/dist/types-ts4.5/schema/marks/annotation.d.ts +0 -32
- package/dist/types-ts4.5/schema/marks/background-color.d.ts +0 -15
- package/dist/types-ts4.5/schema/marks/border.d.ts +0 -26
- package/dist/types-ts4.5/schema/marks/breakout.d.ts +0 -12
- package/dist/types-ts4.5/schema/marks/code.d.ts +0 -8
- package/dist/types-ts4.5/schema/marks/confluence-inline-comment.d.ts +0 -12
- package/dist/types-ts4.5/schema/marks/data-consumer.d.ts +0 -48
- package/dist/types-ts4.5/schema/marks/em.d.ts +0 -8
- package/dist/types-ts4.5/schema/marks/font-size.d.ts +0 -12
- package/dist/types-ts4.5/schema/marks/fragment.d.ts +0 -30
- package/dist/types-ts4.5/schema/marks/indentation.d.ts +0 -16
- package/dist/types-ts4.5/schema/marks/index.d.ts +0 -38
- package/dist/types-ts4.5/schema/marks/link.d.ts +0 -40
- package/dist/types-ts4.5/schema/marks/strike.d.ts +0 -8
- package/dist/types-ts4.5/schema/marks/strong.d.ts +0 -8
- package/dist/types-ts4.5/schema/marks/subsup.d.ts +0 -15
- package/dist/types-ts4.5/schema/marks/text-color.d.ts +0 -27
- package/dist/types-ts4.5/schema/marks/type-ahead-query.d.ts +0 -2
- package/dist/types-ts4.5/schema/marks/underline.d.ts +0 -8
- package/dist/types-ts4.5/schema/marks/unsupported-mark.d.ts +0 -2
- package/dist/types-ts4.5/schema/marks/unsupported-node-attributes.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +0 -49
- package/dist/types-ts4.5/schema/nodes/blockquote.d.ts +0 -30
- package/dist/types-ts4.5/schema/nodes/bodied-extension.d.ts +0 -26
- package/dist/types-ts4.5/schema/nodes/bodied-sync-block.d.ts +0 -46
- package/dist/types-ts4.5/schema/nodes/bullet-list.d.ts +0 -4
- package/dist/types-ts4.5/schema/nodes/caption.d.ts +0 -27
- package/dist/types-ts4.5/schema/nodes/code-block.d.ts +0 -34
- package/dist/types-ts4.5/schema/nodes/confluence-jira-issue.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-block.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/confluence-unsupported-inline.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/date.d.ts +0 -23
- package/dist/types-ts4.5/schema/nodes/decision-item.d.ts +0 -18
- package/dist/types-ts4.5/schema/nodes/decision-list.d.ts +0 -20
- package/dist/types-ts4.5/schema/nodes/doc.d.ts +0 -22
- package/dist/types-ts4.5/schema/nodes/embed-card.d.ts +0 -17
- package/dist/types-ts4.5/schema/nodes/emoji.d.ts +0 -22
- package/dist/types-ts4.5/schema/nodes/expand.d.ts +0 -36
- package/dist/types-ts4.5/schema/nodes/extension.d.ts +0 -18
- package/dist/types-ts4.5/schema/nodes/hard-break.d.ts +0 -11
- package/dist/types-ts4.5/schema/nodes/heading.d.ts +0 -43
- package/dist/types-ts4.5/schema/nodes/image.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/index.d.ts +0 -98
- package/dist/types-ts4.5/schema/nodes/inline-card.d.ts +0 -17
- package/dist/types-ts4.5/schema/nodes/inline-extension.d.ts +0 -18
- package/dist/types-ts4.5/schema/nodes/layout-column.d.ts +0 -30
- package/dist/types-ts4.5/schema/nodes/layout-section.d.ts +0 -57
- package/dist/types-ts4.5/schema/nodes/list-item.d.ts +0 -9
- package/dist/types-ts4.5/schema/nodes/media-group.d.ts +0 -16
- package/dist/types-ts4.5/schema/nodes/media-inline.d.ts +0 -20
- package/dist/types-ts4.5/schema/nodes/media-single.d.ts +0 -78
- package/dist/types-ts4.5/schema/nodes/media.d.ts +0 -71
- package/dist/types-ts4.5/schema/nodes/mention.d.ts +0 -31
- package/dist/types-ts4.5/schema/nodes/multi-bodied-extension.d.ts +0 -55
- package/dist/types-ts4.5/schema/nodes/nested-expand.d.ts +0 -43
- package/dist/types-ts4.5/schema/nodes/ordered-list.d.ts +0 -6
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +0 -64
- package/dist/types-ts4.5/schema/nodes/paragraph.d.ts +0 -45
- package/dist/types-ts4.5/schema/nodes/placeholder.d.ts +0 -13
- package/dist/types-ts4.5/schema/nodes/rule.d.ts +0 -12
- package/dist/types-ts4.5/schema/nodes/status.d.ts +0 -27
- package/dist/types-ts4.5/schema/nodes/sync-block.d.ts +0 -23
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +0 -174
- package/dist/types-ts4.5/schema/nodes/task-item.d.ts +0 -36
- package/dist/types-ts4.5/schema/nodes/task-list.d.ts +0 -26
- package/dist/types-ts4.5/schema/nodes/text.d.ts +0 -14
- package/dist/types-ts4.5/schema/nodes/types/block-content.d.ts +0 -21
- package/dist/types-ts4.5/schema/nodes/types/extensions.d.ts +0 -34
- package/dist/types-ts4.5/schema/nodes/types/inline-content.d.ts +0 -28
- package/dist/types-ts4.5/schema/nodes/types/list.d.ts +0 -51
- package/dist/types-ts4.5/schema/nodes/types/mark.d.ts +0 -15
- package/dist/types-ts4.5/schema/nodes/types/non-nestable-block-content.d.ts +0 -19
- package/dist/types-ts4.5/schema/nodes/types/rich-media-common.d.ts +0 -37
- package/dist/types-ts4.5/schema/nodes/types/valign.d.ts +0 -6
- package/dist/types-ts4.5/schema/nodes/unknown-block.d.ts +0 -3
- package/dist/types-ts4.5/schema/nodes/unsupported-block.d.ts +0 -2
- package/dist/types-ts4.5/schema/nodes/unsupported-inline.d.ts +0 -2
- package/dist/types-ts4.5/schema/sanitizeNodes.d.ts +0 -8
- package/dist/types-ts4.5/schema/unsupported.d.ts +0 -1
- package/dist/types-ts4.5/steps/analytics.d.ts +0 -60
- package/dist/types-ts4.5/steps/batch-attrs-step.d.ts +0 -74
- package/dist/types-ts4.5/steps/link-meta-step.d.ts +0 -52
- package/dist/types-ts4.5/steps/override-document-step.d.ts +0 -26
- package/dist/types-ts4.5/steps/set-attrs.d.ts +0 -24
- package/dist/types-ts4.5/steps/type-ahead.d.ts +0 -35
- package/dist/types-ts4.5/steps/types.d.ts +0 -96
- package/dist/types-ts4.5/steps.d.ts +0 -10
- package/dist/types-ts4.5/utils/colors.d.ts +0 -81
- package/dist/types-ts4.5/utils/confluence/emoji.d.ts +0 -50
- package/dist/types-ts4.5/utils/editor-palette.d.ts +0 -257
- package/dist/types-ts4.5/utils/extensions.d.ts +0 -3
- package/dist/types-ts4.5/utils/index.d.ts +0 -7
- package/dist/types-ts4.5/utils/lch-color-inversion.d.ts +0 -2
- package/dist/types-ts4.5/utils/parseDOM.d.ts +0 -1
- package/dist/types-ts4.5/utils/url.d.ts +0 -40
- package/dist/types-ts4.5/utils/uuid.d.ts +0 -5
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +0 -2016
|
@@ -10,21 +10,21 @@ exports.getDarkModeLCHColor = exports.clampLightness = void 0;
|
|
|
10
10
|
|
|
11
11
|
// https://en.wikipedia.org/wiki/CIELAB_color_space
|
|
12
12
|
|
|
13
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
14
|
+
var SHORTHAND_HEX_REGEX = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i;
|
|
15
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
16
|
+
var FULL_HEX_REGEX = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
13
17
|
var clamp = function clamp(i, min, max) {
|
|
14
18
|
return Math.round(Math.min(Math.max(i, min), max));
|
|
15
19
|
};
|
|
16
20
|
var expandShorthandHex = function expandShorthandHex(input) {
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return r + r + g + g + b + b;
|
|
21
|
-
})
|
|
22
|
-
);
|
|
21
|
+
return input.replace(SHORTHAND_HEX_REGEX, function (m, r, g, b) {
|
|
22
|
+
return r + r + g + g + b + b;
|
|
23
|
+
});
|
|
23
24
|
};
|
|
24
25
|
var rgbFromHex = function rgbFromHex(input) {
|
|
25
26
|
var fullHex = expandShorthandHex(input);
|
|
26
|
-
|
|
27
|
-
var result = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(fullHex);
|
|
27
|
+
var result = FULL_HEX_REGEX.exec(fullHex);
|
|
28
28
|
return result === null ? null : {
|
|
29
29
|
r: parseInt(result[1], 16),
|
|
30
30
|
g: parseInt(result[2], 16),
|
|
@@ -26,14 +26,16 @@ const colorArrayPalette = [[Neutral300, 'Gray'],
|
|
|
26
26
|
// @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/55979455/Colour+picker+decisions#Colourpickerdecisions-Visualdesigndecisions
|
|
27
27
|
export const backgroundColorPalette = new Map();
|
|
28
28
|
colorArrayPalette.forEach(([color, label]) => backgroundColorPalette.set(color.toLowerCase(), label));
|
|
29
|
+
|
|
30
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
31
|
+
const RGB_PREFIX_BG_COLOR_REGEX = /^rgb/iu;
|
|
29
32
|
export const backgroundColor = backgroundColorFactory({
|
|
30
33
|
parseDOM: [{
|
|
31
34
|
style: 'background-color',
|
|
32
35
|
getAttrs: maybeValue => {
|
|
33
36
|
const value = maybeValue;
|
|
34
37
|
let hexColor;
|
|
35
|
-
|
|
36
|
-
if (value.match(/^rgb/iu)) {
|
|
38
|
+
if (value.match(RGB_PREFIX_BG_COLOR_REGEX)) {
|
|
37
39
|
hexColor = rgbToHex(value);
|
|
38
40
|
} else if (value[0] === '#') {
|
|
39
41
|
hexColor = value.toLowerCase();
|
|
@@ -5,6 +5,9 @@ import { strong as strongFactory } from '../../next-schema/generated/markTypes';
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const strongDOM = ['strong'];
|
|
8
|
+
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
const BOLD_FONT_WEIGHT_REGEX = /^(bold(er)?|[5-9]\d{2,})$/u;
|
|
8
11
|
export const strong = strongFactory({
|
|
9
12
|
parseDOM: [{
|
|
10
13
|
tag: 'strong'
|
|
@@ -27,9 +30,7 @@ export const strong = strongFactory({
|
|
|
27
30
|
const {
|
|
28
31
|
fontWeight
|
|
29
32
|
} = element.style;
|
|
30
|
-
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' ||
|
|
31
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
32
|
-
/^(bold(er)?|[5-9]\d{2,})$/u.test(fontWeight)) && null;
|
|
33
|
+
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' || BOLD_FONT_WEIGHT_REGEX.test(fontWeight)) && null;
|
|
33
34
|
}
|
|
34
35
|
}],
|
|
35
36
|
toDOM() {
|
|
@@ -82,14 +82,16 @@ export const getGlobalTheme = () => {
|
|
|
82
82
|
colorMode
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
+
|
|
86
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
87
|
+
const RGB_PREFIX_TEXT_COLOR_REGEX = /^rgb/iu;
|
|
85
88
|
export const textColor = textColorFactory({
|
|
86
89
|
parseDOM: [{
|
|
87
90
|
style: 'color',
|
|
88
91
|
getAttrs: maybeValue => {
|
|
89
92
|
const value = maybeValue;
|
|
90
93
|
let hexColor;
|
|
91
|
-
|
|
92
|
-
if (value.match(/^rgb/iu)) {
|
|
94
|
+
if (value.match(RGB_PREFIX_TEXT_COLOR_REGEX)) {
|
|
93
95
|
hexColor = rgbToHex(value);
|
|
94
96
|
} else if (value[0] === '#') {
|
|
95
97
|
hexColor = value.toLowerCase();
|
|
@@ -31,10 +31,13 @@ const getLanguageFromCode = dom => {
|
|
|
31
31
|
return firstChild.getAttribute('data-language') || undefined;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
36
|
+
const LANGUAGE_CLASS_REGEX = /(?:^|\s)language-([^\s]+)/u;
|
|
37
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
38
|
+
const TRAILING_NEWLINE_REGEX = /\n$/u;
|
|
34
39
|
const extractLanguageFromClass = className => {
|
|
35
|
-
|
|
36
|
-
const languageRegex = /(?:^|\s)language-([^\s]+)/u;
|
|
37
|
-
const result = languageRegex.exec(className);
|
|
40
|
+
const result = LANGUAGE_CLASS_REGEX.exec(className);
|
|
38
41
|
if (result && result[1]) {
|
|
39
42
|
return result[1];
|
|
40
43
|
}
|
|
@@ -43,9 +46,8 @@ const extractLanguageFromClass = className => {
|
|
|
43
46
|
const removeLastNewLine = dom => {
|
|
44
47
|
const parent = dom && dom.parentElement;
|
|
45
48
|
if (parent && parent.classList.contains('codehilite')) {
|
|
46
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
47
49
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
-
dom.textContent = dom.textContent.replace(
|
|
50
|
+
dom.textContent = dom.textContent.replace(TRAILING_NEWLINE_REGEX, '');
|
|
49
51
|
}
|
|
50
52
|
return dom;
|
|
51
53
|
};
|
|
@@ -9,6 +9,8 @@ import { uuid } from '../../utils/uuid';
|
|
|
9
9
|
export const defaultAttrs = {
|
|
10
10
|
...mediaFactory({}).attrs
|
|
11
11
|
};
|
|
12
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
13
|
+
const PRIVATE_ATTR_PREFIX_REGEX = /^__/u;
|
|
12
14
|
export const camelCaseToKebabCase = str =>
|
|
13
15
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
14
16
|
str.replace(/([^A-Z]+)([A-Z])/gu, (_, x, y) => `${x}-${y.toLowerCase()}`);
|
|
@@ -29,9 +31,8 @@ export const createMediaSpec = (attributes, inline = false, generateLocalId = fa
|
|
|
29
31
|
const attrs = {};
|
|
30
32
|
if (attributes) {
|
|
31
33
|
Object.keys(attributes).forEach(k => {
|
|
32
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
33
34
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
34
|
-
const key = camelCaseToKebabCase(k).replace(
|
|
35
|
+
const key = camelCaseToKebabCase(k).replace(PRIVATE_ATTR_PREFIX_REGEX, '');
|
|
35
36
|
const value =
|
|
36
37
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
37
38
|
dom.getAttribute(`data-${key}`) || '';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
|
2
2
|
import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
4
|
+
const NEWLINE_REGEX = /\n/u;
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* @name status_node
|
|
@@ -12,9 +14,8 @@ export const status = statusFactory({
|
|
|
12
14
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
15
|
const dom = domNode;
|
|
14
16
|
|
|
15
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
16
17
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
-
const textContent = dom.textContent.replace(
|
|
18
|
+
const textContent = dom.textContent.replace(NEWLINE_REGEX, '').trim();
|
|
18
19
|
|
|
19
20
|
// Prefer data-text attribute over textContent
|
|
20
21
|
// When NodeView DOM is copied, inner text content may not be preserved
|
|
@@ -5,6 +5,9 @@ import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
|
5
5
|
import { table as tableFactory, tableWithNestedTable as tableWithNestedTableFactory, tableRow as tableRowFactory, tableRowWithNestedTable as tableRowWithNestedTableFactory, tableHeader as tableHeaderFactory, tableHeaderWithNestedTable as tableHeaderWithNestedTableFactory, tableHeaderWithNestedTableStage0 as tableHeaderWithNestedTableStage0Factory, tableHeaderStage0 as tableHeaderStage0Factory, tableCell as tableCellFactory, tableCellWithNestedTable as tableCellWithNestedTableFactory, tableCellWithNestedTableStage0 as tableCellWithNestedTableStage0Factory, tableCellStage0 as tableCellStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
6
6
|
import { parseValign } from './types/valign';
|
|
7
7
|
export const tablePrefixSelector = 'pm-table';
|
|
8
|
+
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
const COL_WIDTH_ATTR_REGEX = /^\d+(,\d+)*$/u;
|
|
8
11
|
export const tableCellSelector = `${tablePrefixSelector}-cell-content-wrap`;
|
|
9
12
|
export const tableHeaderSelector = `${tablePrefixSelector}-header-content-wrap`;
|
|
10
13
|
export const tableCellContentWrapperSelector = `${tablePrefixSelector}-cell-nodeview-wrapper`;
|
|
@@ -12,9 +15,7 @@ export const tableCellContentDomSelector = `${tablePrefixSelector}-cell-nodeview
|
|
|
12
15
|
const DEFAULT_TABLE_HEADER_CELL_BACKGROUND = N20.toLocaleLowerCase();
|
|
13
16
|
export const getCellAttrs = (dom, defaultValues = {}) => {
|
|
14
17
|
const widthAttr = dom.getAttribute('data-colwidth');
|
|
15
|
-
const width =
|
|
16
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
17
|
-
widthAttr && /^\d+(,\d+)*$/u.test(widthAttr) ? widthAttr.split(',').map(str => Number(str)) : null;
|
|
18
|
+
const width = widthAttr && COL_WIDTH_ATTR_REGEX.test(widthAttr) ? widthAttr.split(',').map(str => Number(str)) : null;
|
|
18
19
|
const colspan = Number(dom.getAttribute('colspan') || 1);
|
|
19
20
|
let {
|
|
20
21
|
backgroundColor
|
|
@@ -22,16 +22,18 @@ function sanitizeNodeSpecContent(nodes, rawContent) {
|
|
|
22
22
|
const unsupportedContentKeys = contentKeys.filter(contentKey => !isContentSupported(nodes, contentKey));
|
|
23
23
|
return unsupportedContentKeys.reduce((newContent, nodeName) => sanitizedContent(newContent, nodeName), rawContent);
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
27
|
+
const WORD_CHAR_REGEX = /\w/u;
|
|
25
28
|
function sanitizedContent(content, invalidContent) {
|
|
26
29
|
if (!invalidContent.length) {
|
|
27
30
|
return content || '';
|
|
28
31
|
}
|
|
29
|
-
|
|
30
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
31
|
-
if (!content || !content.match(/\w/u)) {
|
|
32
|
+
if (!content || !content.match(WORD_CHAR_REGEX)) {
|
|
32
33
|
return '';
|
|
33
34
|
}
|
|
34
35
|
const pattern = `(${invalidContent}((\\s)*\\|)+)|((\\|(\\s)*)+${invalidContent}(\\+|\\*)?)|(${invalidContent}$)|(${invalidContent}(\\+|\\*))`;
|
|
36
|
+
// Ignored via go/ees019
|
|
35
37
|
return content.replace(new RegExp(pattern, 'gu'), '').replace(' ', ' ').trim();
|
|
36
38
|
}
|
|
37
39
|
function isContentSupported(nodes, contentKey) {
|
|
@@ -151,11 +151,14 @@ export function rgbToHex(value) {
|
|
|
151
151
|
}
|
|
152
152
|
return null;
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
156
|
+
const IS_RGB_REGEX = /rgba?\(/u;
|
|
157
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
158
|
+
const IS_HEX_REGEX = /^#([A-Fa-f0-9]{3}){1,2}$/u;
|
|
154
159
|
export function isRgb(color) {
|
|
155
|
-
|
|
156
|
-
return /rgba?\(/u.test(color);
|
|
160
|
+
return IS_RGB_REGEX.test(color);
|
|
157
161
|
}
|
|
158
162
|
export function isHex(color) {
|
|
159
|
-
|
|
160
|
-
return /^#([A-Fa-f0-9]{3}){1,2}$/u.test(color);
|
|
163
|
+
return IS_HEX_REGEX.test(color);
|
|
161
164
|
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
// https://en.wikipedia.org/wiki/CIELAB_color_space
|
|
6
6
|
|
|
7
|
-
const clamp = (i, min, max) => Math.round(Math.min(Math.max(i, min), max));
|
|
8
|
-
const expandShorthandHex = input =>
|
|
9
7
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
-
|
|
8
|
+
const SHORTHAND_HEX_REGEX = /^#?([a-f\d])([a-f\d])([a-f\d])$/iu;
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
const FULL_HEX_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/iu;
|
|
11
|
+
const clamp = (i, min, max) => Math.round(Math.min(Math.max(i, min), max));
|
|
12
|
+
const expandShorthandHex = input => input.replace(SHORTHAND_HEX_REGEX, (m, r, g, b) => r + r + g + g + b + b);
|
|
11
13
|
const rgbFromHex = input => {
|
|
12
14
|
const fullHex = expandShorthandHex(input);
|
|
13
|
-
|
|
14
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/iu.exec(fullHex);
|
|
15
|
+
const result = FULL_HEX_REGEX.exec(fullHex);
|
|
15
16
|
return result === null ? null : {
|
|
16
17
|
r: parseInt(result[1], 16),
|
|
17
18
|
g: parseInt(result[2], 16),
|
|
@@ -33,14 +33,16 @@ colorArrayPalette.forEach(function (_ref) {
|
|
|
33
33
|
label = _ref2[1];
|
|
34
34
|
return backgroundColorPalette.set(color.toLowerCase(), label);
|
|
35
35
|
});
|
|
36
|
+
|
|
37
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
38
|
+
var RGB_PREFIX_BG_COLOR_REGEX = /^rgb/i;
|
|
36
39
|
export var backgroundColor = backgroundColorFactory({
|
|
37
40
|
parseDOM: [{
|
|
38
41
|
style: 'background-color',
|
|
39
42
|
getAttrs: function getAttrs(maybeValue) {
|
|
40
43
|
var value = maybeValue;
|
|
41
44
|
var hexColor;
|
|
42
|
-
|
|
43
|
-
if (value.match(/^rgb/i)) {
|
|
45
|
+
if (value.match(RGB_PREFIX_BG_COLOR_REGEX)) {
|
|
44
46
|
hexColor = rgbToHex(value);
|
|
45
47
|
} else if (value[0] === '#') {
|
|
46
48
|
hexColor = value.toLowerCase();
|
|
@@ -5,6 +5,9 @@ import { strong as strongFactory } from '../../next-schema/generated/markTypes';
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
var strongDOM = ['strong'];
|
|
8
|
+
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
var BOLD_FONT_WEIGHT_REGEX = /^(bold(er)?|[5-9][0-9]{2,})$/;
|
|
8
11
|
export var strong = strongFactory({
|
|
9
12
|
parseDOM: [{
|
|
10
13
|
tag: 'strong'
|
|
@@ -25,9 +28,7 @@ export var strong = strongFactory({
|
|
|
25
28
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
29
|
var element = node;
|
|
27
30
|
var fontWeight = element.style.fontWeight;
|
|
28
|
-
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' ||
|
|
29
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
30
|
-
/^(bold(er)?|[5-9][0-9]{2,})$/.test(fontWeight)) && null;
|
|
31
|
+
return typeof fontWeight === 'string' && (fontWeight === 'bold' || fontWeight === 'bolder' || BOLD_FONT_WEIGHT_REGEX.test(fontWeight)) && null;
|
|
31
32
|
}
|
|
32
33
|
}],
|
|
33
34
|
toDOM: function toDOM() {
|
|
@@ -89,14 +89,16 @@ export var getGlobalTheme = function getGlobalTheme() {
|
|
|
89
89
|
colorMode: colorMode
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
|
+
|
|
93
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
94
|
+
var RGB_PREFIX_TEXT_COLOR_REGEX = /^rgb/i;
|
|
92
95
|
export var textColor = textColorFactory({
|
|
93
96
|
parseDOM: [{
|
|
94
97
|
style: 'color',
|
|
95
98
|
getAttrs: function getAttrs(maybeValue) {
|
|
96
99
|
var value = maybeValue;
|
|
97
100
|
var hexColor;
|
|
98
|
-
|
|
99
|
-
if (value.match(/^rgb/i)) {
|
|
101
|
+
if (value.match(RGB_PREFIX_TEXT_COLOR_REGEX)) {
|
|
100
102
|
hexColor = rgbToHex(value);
|
|
101
103
|
} else if (value[0] === '#') {
|
|
102
104
|
hexColor = value.toLowerCase();
|
|
@@ -31,10 +31,13 @@ var getLanguageFromCode = function getLanguageFromCode(dom) {
|
|
|
31
31
|
return firstChild.getAttribute('data-language') || undefined;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
36
|
+
var LANGUAGE_CLASS_REGEX = /(?:^|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])language-((?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)/;
|
|
37
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
38
|
+
var TRAILING_NEWLINE_REGEX = /\n$/;
|
|
34
39
|
var extractLanguageFromClass = function extractLanguageFromClass(className) {
|
|
35
|
-
|
|
36
|
-
var languageRegex = /(?:^|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])language-((?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)/;
|
|
37
|
-
var result = languageRegex.exec(className);
|
|
40
|
+
var result = LANGUAGE_CLASS_REGEX.exec(className);
|
|
38
41
|
if (result && result[1]) {
|
|
39
42
|
return result[1];
|
|
40
43
|
}
|
|
@@ -43,9 +46,8 @@ var extractLanguageFromClass = function extractLanguageFromClass(className) {
|
|
|
43
46
|
var removeLastNewLine = function removeLastNewLine(dom) {
|
|
44
47
|
var parent = dom && dom.parentElement;
|
|
45
48
|
if (parent && parent.classList.contains('codehilite')) {
|
|
46
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
47
49
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
-
dom.textContent = dom.textContent.replace(
|
|
50
|
+
dom.textContent = dom.textContent.replace(TRAILING_NEWLINE_REGEX, '');
|
|
49
51
|
}
|
|
50
52
|
return dom;
|
|
51
53
|
};
|
|
@@ -10,6 +10,8 @@ import { uuid } from '../../utils/uuid';
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export var defaultAttrs = _objectSpread({}, mediaFactory({}).attrs);
|
|
13
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
14
|
+
var PRIVATE_ATTR_PREFIX_REGEX = /^__/;
|
|
13
15
|
export var camelCaseToKebabCase = function camelCaseToKebabCase(str) {
|
|
14
16
|
return (
|
|
15
17
|
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
@@ -37,9 +39,8 @@ export var createMediaSpec = function createMediaSpec(attributes) {
|
|
|
37
39
|
var attrs = {};
|
|
38
40
|
if (attributes) {
|
|
39
41
|
Object.keys(attributes).forEach(function (k) {
|
|
40
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
41
42
|
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
42
|
-
var key = camelCaseToKebabCase(k).replace(
|
|
43
|
+
var key = camelCaseToKebabCase(k).replace(PRIVATE_ATTR_PREFIX_REGEX, '');
|
|
43
44
|
var value =
|
|
44
45
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
45
46
|
dom.getAttribute("data-".concat(key)) || '';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
|
2
2
|
import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
4
|
+
var NEWLINE_REGEX = /\n/;
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* @name status_node
|
|
@@ -12,9 +14,8 @@ export var status = statusFactory({
|
|
|
12
14
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
15
|
var dom = domNode;
|
|
14
16
|
|
|
15
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
16
17
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
-
var textContent = dom.textContent.replace(
|
|
18
|
+
var textContent = dom.textContent.replace(NEWLINE_REGEX, '').trim();
|
|
18
19
|
|
|
19
20
|
// Prefer data-text attribute over textContent
|
|
20
21
|
// When NodeView DOM is copied, inner text content may not be preserved
|
|
@@ -9,6 +9,9 @@ import { getDarkModeLCHColor } from '../../utils/lch-color-inversion';
|
|
|
9
9
|
import { table as tableFactory, tableWithNestedTable as tableWithNestedTableFactory, tableRow as tableRowFactory, tableRowWithNestedTable as tableRowWithNestedTableFactory, tableHeader as tableHeaderFactory, tableHeaderWithNestedTable as tableHeaderWithNestedTableFactory, tableHeaderWithNestedTableStage0 as tableHeaderWithNestedTableStage0Factory, tableHeaderStage0 as tableHeaderStage0Factory, tableCell as tableCellFactory, tableCellWithNestedTable as tableCellWithNestedTableFactory, tableCellWithNestedTableStage0 as tableCellWithNestedTableStage0Factory, tableCellStage0 as tableCellStage0Factory } from '../../next-schema/generated/nodeTypes';
|
|
10
10
|
import { parseValign } from './types/valign';
|
|
11
11
|
export var tablePrefixSelector = 'pm-table';
|
|
12
|
+
|
|
13
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
14
|
+
var COL_WIDTH_ATTR_REGEX = /^[0-9]+(,[0-9]+)*$/;
|
|
12
15
|
export var tableCellSelector = "".concat(tablePrefixSelector, "-cell-content-wrap");
|
|
13
16
|
export var tableHeaderSelector = "".concat(tablePrefixSelector, "-header-content-wrap");
|
|
14
17
|
export var tableCellContentWrapperSelector = "".concat(tablePrefixSelector, "-cell-nodeview-wrapper");
|
|
@@ -17,9 +20,7 @@ var DEFAULT_TABLE_HEADER_CELL_BACKGROUND = N20.toLocaleLowerCase();
|
|
|
17
20
|
export var getCellAttrs = function getCellAttrs(dom) {
|
|
18
21
|
var defaultValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19
22
|
var widthAttr = dom.getAttribute('data-colwidth');
|
|
20
|
-
var width =
|
|
21
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
22
|
-
widthAttr && /^[0-9]+(,[0-9]+)*$/.test(widthAttr) ? widthAttr.split(',').map(function (str) {
|
|
23
|
+
var width = widthAttr && COL_WIDTH_ATTR_REGEX.test(widthAttr) ? widthAttr.split(',').map(function (str) {
|
|
23
24
|
return Number(str);
|
|
24
25
|
}) : null;
|
|
25
26
|
var colspan = Number(dom.getAttribute('colspan') || 1);
|
|
@@ -29,16 +29,18 @@ function sanitizeNodeSpecContent(nodes, rawContent) {
|
|
|
29
29
|
return sanitizedContent(newContent, nodeName);
|
|
30
30
|
}, rawContent);
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
34
|
+
var WORD_CHAR_REGEX = /[0-9A-Z_a-z]/;
|
|
32
35
|
function sanitizedContent(content, invalidContent) {
|
|
33
36
|
if (!invalidContent.length) {
|
|
34
37
|
return content || '';
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
38
|
-
if (!content || !content.match(/[0-9A-Z_a-z]/)) {
|
|
39
|
+
if (!content || !content.match(WORD_CHAR_REGEX)) {
|
|
39
40
|
return '';
|
|
40
41
|
}
|
|
41
42
|
var pattern = "(".concat(invalidContent, "((\\s)*\\|)+)|((\\|(\\s)*)+").concat(invalidContent, "(\\+|\\*)?)|(").concat(invalidContent, "$)|(").concat(invalidContent, "(\\+|\\*))");
|
|
43
|
+
// Ignored via go/ees019
|
|
42
44
|
return content.replace(new RegExp(pattern, 'gu'), '').replace(' ', ' ').trim();
|
|
43
45
|
}
|
|
44
46
|
function isContentSupported(nodes, contentKey) {
|
package/dist/esm/utils/colors.js
CHANGED
|
@@ -160,11 +160,14 @@ export function rgbToHex(value) {
|
|
|
160
160
|
}
|
|
161
161
|
return null;
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
165
|
+
var IS_RGB_REGEX = /rgba?\(/;
|
|
166
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
167
|
+
var IS_HEX_REGEX = /^#([0-9A-Fa-f]{3}){1,2}$/;
|
|
163
168
|
export function isRgb(color) {
|
|
164
|
-
|
|
165
|
-
return /rgba?\(/.test(color);
|
|
169
|
+
return IS_RGB_REGEX.test(color);
|
|
166
170
|
}
|
|
167
171
|
export function isHex(color) {
|
|
168
|
-
|
|
169
|
-
return /^#([0-9A-Fa-f]{3}){1,2}$/.test(color);
|
|
172
|
+
return IS_HEX_REGEX.test(color);
|
|
170
173
|
}
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
// https://en.wikipedia.org/wiki/CIELAB_color_space
|
|
6
6
|
|
|
7
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
8
|
+
var SHORTHAND_HEX_REGEX = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i;
|
|
9
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
10
|
+
var FULL_HEX_REGEX = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
7
11
|
var clamp = function clamp(i, min, max) {
|
|
8
12
|
return Math.round(Math.min(Math.max(i, min), max));
|
|
9
13
|
};
|
|
10
14
|
var expandShorthandHex = function expandShorthandHex(input) {
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return r + r + g + g + b + b;
|
|
15
|
-
})
|
|
16
|
-
);
|
|
15
|
+
return input.replace(SHORTHAND_HEX_REGEX, function (m, r, g, b) {
|
|
16
|
+
return r + r + g + g + b + b;
|
|
17
|
+
});
|
|
17
18
|
};
|
|
18
19
|
var rgbFromHex = function rgbFromHex(input) {
|
|
19
20
|
var fullHex = expandShorthandHex(input);
|
|
20
|
-
|
|
21
|
-
var result = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(fullHex);
|
|
21
|
+
var result = FULL_HEX_REGEX.exec(fullHex);
|
|
22
22
|
return result === null ? null : {
|
|
23
23
|
r: parseInt(result[1], 16),
|
|
24
24
|
g: parseInt(result[2], 16),
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/json-schema/index.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/json-schema/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/json-schema/index.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/json-schema/index.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/json-schema/index.d.ts"
|
|
15
8
|
}
|
package/doc/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/doc.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/doc.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/doc.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/doc.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/doc.d.ts"
|
|
15
8
|
}
|
package/em/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/em.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/em.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/em.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/em.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/em.d.ts"
|
|
15
8
|
}
|
package/embed-card/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/embed-card.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/embed-card.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/embed-card.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/embed-card.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/embed-card.d.ts"
|
|
15
8
|
}
|
package/emoji/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/emoji.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/emoji.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/emoji.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/emoji.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/emoji.d.ts"
|
|
15
8
|
}
|
package/expand/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/expand.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/expand.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/expand.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/expand.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/expand.d.ts"
|
|
15
8
|
}
|
package/extension/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/extension.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/extension.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/extension.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/extension.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/extension.d.ts"
|
|
15
8
|
}
|
package/extensions/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/extensions.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/extensions.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/extensions.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/extensions.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/extensions.d.ts"
|
|
15
8
|
}
|
package/font-size/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/font-size.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/font-size.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/font-size.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/font-size.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/font-size.d.ts"
|
|
15
8
|
}
|
package/fragment/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/fragment.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/fragment.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/fragment.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/fragment.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/fragment.d.ts"
|
|
15
8
|
}
|