@atlaskit/renderer 105.1.1 → 106.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 +12 -0
- package/dist/cjs/actions/index.js +19 -71
- package/dist/cjs/actions/matches-utils.js +10 -11
- package/dist/cjs/actions.js +0 -2
- package/dist/cjs/analytics/analyticsContext.js +0 -4
- package/dist/cjs/analytics/events.js +0 -5
- package/dist/cjs/analytics/unsupported-content.js +14 -27
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -26
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/react/hooks/use-bidi-warnings.js +2 -12
- package/dist/cjs/react/hooks/use-in-viewport.js +4 -17
- package/dist/cjs/react/hooks/use-observed-width.js +20 -35
- package/dist/cjs/react/index.js +27 -114
- package/dist/cjs/react/marks/alignment.js +0 -9
- package/dist/cjs/react/marks/annotation.js +6 -21
- package/dist/cjs/react/marks/breakout.js +0 -9
- package/dist/cjs/react/marks/code.js +0 -11
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -19
- package/dist/cjs/react/marks/data-consumer.js +0 -4
- package/dist/cjs/react/marks/em.js +0 -3
- package/dist/cjs/react/marks/fragment.js +0 -4
- package/dist/cjs/react/marks/indentation.js +0 -3
- package/dist/cjs/react/marks/index.js +1 -24
- package/dist/cjs/react/marks/link.js +5 -25
- package/dist/cjs/react/marks/strike.js +0 -4
- package/dist/cjs/react/marks/strong.js +0 -3
- package/dist/cjs/react/marks/subsup.js +0 -5
- package/dist/cjs/react/marks/textColor.js +0 -9
- package/dist/cjs/react/marks/underline.js +0 -3
- package/dist/cjs/react/marks/unsupportedMark.js +0 -3
- package/dist/cjs/react/marks/unsupportedNodeAttribute.js +0 -3
- package/dist/cjs/react/nodes/blockCard.js +4 -16
- package/dist/cjs/react/nodes/blockquote.js +0 -3
- package/dist/cjs/react/nodes/bodiedExtension.js +6 -17
- package/dist/cjs/react/nodes/bulletList.js +0 -5
- package/dist/cjs/react/nodes/caption.js +1 -6
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +5 -14
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -16
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -23
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +9 -32
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +7 -31
- package/dist/cjs/react/nodes/date.js +5 -33
- package/dist/cjs/react/nodes/decisionItem.js +1 -5
- package/dist/cjs/react/nodes/decisionList.js +0 -20
- package/dist/cjs/react/nodes/doc.js +0 -6
- package/dist/cjs/react/nodes/embedCard.js +25 -54
- package/dist/cjs/react/nodes/emoji.js +6 -24
- package/dist/cjs/react/nodes/extension.js +12 -26
- package/dist/cjs/react/nodes/fallback.js +2 -24
- package/dist/cjs/react/nodes/hardBreak.js +1 -7
- package/dist/cjs/react/nodes/heading-anchor.js +1 -46
- package/dist/cjs/react/nodes/heading.js +4 -17
- package/dist/cjs/react/nodes/index.js +7 -62
- package/dist/cjs/react/nodes/inline.js +0 -6
- package/dist/cjs/react/nodes/inlineCard.js +6 -23
- package/dist/cjs/react/nodes/inlineExtension.js +2 -10
- package/dist/cjs/react/nodes/layoutColumn.js +0 -8
- package/dist/cjs/react/nodes/layoutSection.js +0 -3
- package/dist/cjs/react/nodes/listItem.js +0 -3
- package/dist/cjs/react/nodes/media.js +10 -49
- package/dist/cjs/react/nodes/mediaGroup.js +6 -47
- package/dist/cjs/react/nodes/mediaInline.js +7 -37
- package/dist/cjs/react/nodes/mediaSingle/index.js +38 -85
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -5
- package/dist/cjs/react/nodes/mention.js +5 -23
- package/dist/cjs/react/nodes/orderedList.js +0 -14
- package/dist/cjs/react/nodes/panel.js +10 -38
- package/dist/cjs/react/nodes/paragraph.js +1 -5
- package/dist/cjs/react/nodes/placeholder.js +0 -4
- package/dist/cjs/react/nodes/rule.js +0 -3
- package/dist/cjs/react/nodes/status.js +3 -22
- package/dist/cjs/react/nodes/table/colgroup.js +12 -26
- package/dist/cjs/react/nodes/table/sticky.js +17 -47
- package/dist/cjs/react/nodes/table/table.js +5 -10
- package/dist/cjs/react/nodes/table.js +19 -102
- package/dist/cjs/react/nodes/tableCell.js +26 -79
- package/dist/cjs/react/nodes/tableRow.js +4 -33
- package/dist/cjs/react/nodes/task-item-with-providers.js +4 -40
- package/dist/cjs/react/nodes/taskItem.js +8 -36
- package/dist/cjs/react/nodes/taskList.js +2 -22
- package/dist/cjs/react/nodes/text-wrapper.js +1 -8
- package/dist/cjs/react/nodes/unknownBlock.js +0 -3
- package/dist/cjs/react/renderer-node.js +0 -6
- package/dist/cjs/react/utils/clipboard.js +0 -3
- package/dist/cjs/react/utils/element-selection.js +0 -13
- package/dist/cjs/react/utils/getCardClickHandler.js +0 -3
- package/dist/cjs/react/utils/inject-props.js +4 -9
- package/dist/cjs/react/utils/links.js +2 -6
- package/dist/cjs/react/utils/lists.js +0 -1
- package/dist/cjs/react/utils/performance/RenderTracking.js +2 -10
- package/dist/cjs/react/utils/use-select-all-trap.js +1 -23
- package/dist/cjs/render-document.js +42 -83
- package/dist/cjs/renderer-context.js +0 -5
- package/dist/cjs/steps/index.js +7 -39
- package/dist/cjs/text/index.js +0 -9
- package/dist/cjs/text/nodes/blockquote.js +0 -3
- package/dist/cjs/text/nodes/bulletList.js +0 -3
- package/dist/cjs/text/nodes/date.js +0 -4
- package/dist/cjs/text/nodes/decisionItem.js +0 -5
- package/dist/cjs/text/nodes/hardBreak.js +0 -2
- package/dist/cjs/text/nodes/heading.js +0 -3
- package/dist/cjs/text/nodes/index.js +0 -21
- package/dist/cjs/text/nodes/inlineCard.js +0 -4
- package/dist/cjs/text/nodes/listItem.js +0 -3
- package/dist/cjs/text/nodes/mediaGroup.js +0 -4
- package/dist/cjs/text/nodes/mention.js +0 -3
- package/dist/cjs/text/nodes/orderedList.js +0 -4
- package/dist/cjs/text/nodes/panel.js +0 -3
- package/dist/cjs/text/nodes/paragraph.js +0 -5
- package/dist/cjs/text/nodes/rule.js +0 -2
- package/dist/cjs/text/nodes/status.js +0 -3
- package/dist/cjs/text/nodes/table.js +0 -5
- package/dist/cjs/text/nodes/taskItem.js +0 -5
- package/dist/cjs/text/nodes/unknown.js +0 -6
- package/dist/cjs/text-serializer.js +0 -2
- package/dist/cjs/ui/Expand.js +15 -59
- package/dist/cjs/ui/ExtensionRenderer.js +10 -43
- package/dist/cjs/ui/MediaCard.js +40 -116
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +0 -26
- package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -32
- package/dist/cjs/ui/Renderer/click-to-edit.js +0 -6
- package/dist/cjs/ui/Renderer/index.js +47 -149
- package/dist/cjs/ui/Renderer/style.js +1 -39
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +12 -30
- package/dist/cjs/ui/RendererActionsContext/WithRendererActions.js +0 -4
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -11
- package/dist/cjs/ui/SmartCardStorage.js +0 -20
- package/dist/cjs/ui/SortingIcon.js +10 -40
- package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -11
- package/dist/cjs/ui/TaskItemsFormatContext/index.js +0 -1
- package/dist/cjs/ui/active-header-id-provider.js +6 -19
- package/dist/cjs/ui/annotations/context.js +0 -24
- package/dist/cjs/ui/annotations/draft/component.js +5 -42
- package/dist/cjs/ui/annotations/draft/dom.js +3 -17
- package/dist/cjs/ui/annotations/draft/index.js +0 -2
- package/dist/cjs/ui/annotations/draft/position.js +1 -12
- package/dist/cjs/ui/annotations/draft/text.js +2 -8
- package/dist/cjs/ui/annotations/element/index.js +4 -16
- package/dist/cjs/ui/annotations/element/mark.js +8 -26
- package/dist/cjs/ui/annotations/hooks/index.js +0 -3
- package/dist/cjs/ui/annotations/hooks/use-events.js +13 -45
- package/dist/cjs/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -6
- package/dist/cjs/ui/annotations/hooks/use-inline-comments-filter.js +1 -8
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +4 -19
- package/dist/cjs/ui/annotations/hooks/user-selection.js +3 -18
- package/dist/cjs/ui/annotations/hooks/utils.js +0 -2
- package/dist/cjs/ui/annotations/index.js +4 -20
- package/dist/cjs/ui/annotations/selection/index.js +0 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +13 -42
- package/dist/cjs/ui/annotations/selection/range-validator.js +9 -23
- package/dist/cjs/ui/annotations/selection/wrapper.js +3 -13
- package/dist/cjs/ui/annotations/types.js +0 -1
- package/dist/cjs/ui/annotations/view/index.js +1 -12
- package/dist/cjs/ui/index.js +0 -2
- package/dist/cjs/use-feature-flags.js +0 -4
- package/dist/cjs/utils.js +1 -19
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +6 -50
- package/dist/es2019/actions/matches-utils.js +10 -9
- package/dist/es2019/actions.js +2 -1
- package/dist/es2019/analytics/events.js +0 -5
- package/dist/es2019/analytics/unsupported-content.js +8 -14
- package/dist/es2019/react/hooks/use-bidi-warnings.js +0 -2
- package/dist/es2019/react/hooks/use-in-viewport.js +0 -1
- package/dist/es2019/react/hooks/use-observed-width.js +0 -2
- package/dist/es2019/react/index.js +44 -119
- package/dist/es2019/react/marks/alignment.js +0 -3
- package/dist/es2019/react/marks/annotation.js +2 -5
- package/dist/es2019/react/marks/confluence-inline-comment.js +0 -1
- package/dist/es2019/react/marks/index.js +2 -1
- package/dist/es2019/react/marks/link.js +0 -6
- package/dist/es2019/react/marks/subsup.js +0 -3
- package/dist/es2019/react/nodes/bodiedExtension.js +2 -5
- package/dist/es2019/react/nodes/caption.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +0 -2
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -3
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +1 -6
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +0 -4
- package/dist/es2019/react/nodes/date.js +0 -7
- package/dist/es2019/react/nodes/decisionList.js +0 -3
- package/dist/es2019/react/nodes/embedCard.js +8 -16
- package/dist/es2019/react/nodes/emoji.js +0 -1
- package/dist/es2019/react/nodes/extension.js +4 -6
- package/dist/es2019/react/nodes/fallback.js +0 -8
- package/dist/es2019/react/nodes/hardBreak.js +0 -3
- package/dist/es2019/react/nodes/heading-anchor.js +0 -15
- package/dist/es2019/react/nodes/heading.js +0 -6
- package/dist/es2019/react/nodes/index.js +28 -61
- package/dist/es2019/react/nodes/inline.js +0 -2
- package/dist/es2019/react/nodes/inlineCard.js +0 -5
- package/dist/es2019/react/nodes/inlineExtension.js +2 -5
- package/dist/es2019/react/nodes/media.js +0 -10
- package/dist/es2019/react/nodes/mediaGroup.js +2 -22
- package/dist/es2019/react/nodes/mediaInline.js +1 -8
- package/dist/es2019/react/nodes/mediaSingle/index.js +8 -29
- package/dist/es2019/react/nodes/mention.js +0 -1
- package/dist/es2019/react/nodes/orderedList.js +0 -5
- package/dist/es2019/react/nodes/panel.js +4 -17
- package/dist/es2019/react/nodes/placeholder.js +0 -1
- package/dist/es2019/react/nodes/status.js +0 -1
- package/dist/es2019/react/nodes/table/colgroup.js +9 -18
- package/dist/es2019/react/nodes/table/sticky.js +3 -16
- package/dist/es2019/react/nodes/table.js +9 -75
- package/dist/es2019/react/nodes/tableCell.js +4 -31
- package/dist/es2019/react/nodes/tableRow.js +0 -10
- package/dist/es2019/react/nodes/task-item-with-providers.js +0 -6
- package/dist/es2019/react/nodes/taskItem.js +0 -7
- package/dist/es2019/react/nodes/taskList.js +0 -3
- package/dist/es2019/react/nodes/text-wrapper.js +0 -4
- package/dist/es2019/react/utils/clipboard.js +0 -1
- package/dist/es2019/react/utils/element-selection.js +0 -12
- package/dist/es2019/react/utils/inject-props.js +5 -7
- package/dist/es2019/react/utils/links.js +2 -4
- package/dist/es2019/react/utils/performance/RenderTracking.js +0 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +0 -7
- package/dist/es2019/render-document.js +16 -33
- package/dist/es2019/steps/index.js +4 -33
- package/dist/es2019/text/index.js +0 -3
- package/dist/es2019/text/nodes/blockquote.js +0 -2
- package/dist/es2019/text/nodes/bulletList.js +0 -2
- package/dist/es2019/text/nodes/date.js +0 -2
- package/dist/es2019/text/nodes/decisionItem.js +0 -4
- package/dist/es2019/text/nodes/hardBreak.js +0 -1
- package/dist/es2019/text/nodes/heading.js +0 -2
- package/dist/es2019/text/nodes/inlineCard.js +0 -3
- package/dist/es2019/text/nodes/listItem.js +0 -2
- package/dist/es2019/text/nodes/mediaGroup.js +0 -3
- package/dist/es2019/text/nodes/mention.js +0 -2
- package/dist/es2019/text/nodes/orderedList.js +0 -2
- package/dist/es2019/text/nodes/panel.js +0 -2
- package/dist/es2019/text/nodes/paragraph.js +0 -4
- package/dist/es2019/text/nodes/rule.js +0 -1
- package/dist/es2019/text/nodes/status.js +0 -2
- package/dist/es2019/text/nodes/table.js +0 -4
- package/dist/es2019/text/nodes/taskItem.js +0 -4
- package/dist/es2019/text/nodes/unknown.js +0 -4
- package/dist/es2019/ui/Expand.js +2 -17
- package/dist/es2019/ui/ExtensionRenderer.js +0 -19
- package/dist/es2019/ui/MediaCard.js +9 -40
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +0 -10
- package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -26
- package/dist/es2019/ui/Renderer/click-to-edit.js +1 -4
- package/dist/es2019/ui/Renderer/index.js +17 -66
- package/dist/es2019/ui/Renderer/style.js +0 -14
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -6
- package/dist/es2019/ui/SmartCardStorage.js +0 -1
- package/dist/es2019/ui/SortingIcon.js +3 -20
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/es2019/ui/active-header-id-provider.js +0 -3
- package/dist/es2019/ui/annotations/context.js +0 -6
- package/dist/es2019/ui/annotations/draft/component.js +0 -13
- package/dist/es2019/ui/annotations/draft/dom.js +0 -6
- package/dist/es2019/ui/annotations/draft/position.js +0 -8
- package/dist/es2019/ui/annotations/draft/text.js +0 -1
- package/dist/es2019/ui/annotations/element/index.js +0 -3
- package/dist/es2019/ui/annotations/element/mark.js +4 -6
- package/dist/es2019/ui/annotations/hooks/use-events.js +4 -13
- package/dist/es2019/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/es2019/ui/annotations/hooks/use-inline-comments-filter.js +0 -1
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +4 -8
- package/dist/es2019/ui/annotations/hooks/user-selection.js +0 -6
- package/dist/es2019/ui/annotations/selection/mounter.js +0 -13
- package/dist/es2019/ui/annotations/selection/range-validator.js +0 -2
- package/dist/es2019/ui/annotations/selection/wrapper.js +0 -2
- package/dist/es2019/ui/annotations/types.js +0 -1
- package/dist/es2019/ui/annotations/view/index.js +0 -4
- package/dist/es2019/use-feature-flags.js +0 -1
- package/dist/es2019/utils.js +1 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +19 -63
- package/dist/esm/actions/matches-utils.js +10 -9
- package/dist/esm/actions.js +2 -1
- package/dist/esm/analytics/events.js +0 -5
- package/dist/esm/analytics/unsupported-content.js +14 -21
- package/dist/esm/react/hooks/use-bidi-warnings.js +2 -4
- package/dist/esm/react/hooks/use-in-viewport.js +4 -13
- package/dist/esm/react/hooks/use-observed-width.js +20 -29
- package/dist/esm/react/index.js +27 -111
- package/dist/esm/react/marks/alignment.js +0 -4
- package/dist/esm/react/marks/annotation.js +6 -14
- package/dist/esm/react/marks/breakout.js +0 -2
- package/dist/esm/react/marks/confluence-inline-comment.js +2 -12
- package/dist/esm/react/marks/index.js +2 -1
- package/dist/esm/react/marks/link.js +5 -12
- package/dist/esm/react/marks/subsup.js +0 -3
- package/dist/esm/react/nodes/blockCard.js +4 -4
- package/dist/esm/react/nodes/bodiedExtension.js +6 -10
- package/dist/esm/react/nodes/caption.js +1 -3
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +4 -6
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -8
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -10
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +10 -21
- package/dist/esm/react/nodes/codeBlockCopyButton.js +7 -15
- package/dist/esm/react/nodes/date.js +5 -20
- package/dist/esm/react/nodes/decisionItem.js +1 -1
- package/dist/esm/react/nodes/decisionList.js +0 -12
- package/dist/esm/react/nodes/embedCard.js +25 -39
- package/dist/esm/react/nodes/emoji.js +6 -16
- package/dist/esm/react/nodes/extension.js +12 -16
- package/dist/esm/react/nodes/fallback.js +2 -18
- package/dist/esm/react/nodes/hardBreak.js +1 -5
- package/dist/esm/react/nodes/heading-anchor.js +1 -32
- package/dist/esm/react/nodes/heading.js +4 -10
- package/dist/esm/react/nodes/index.js +26 -64
- package/dist/esm/react/nodes/inline.js +0 -2
- package/dist/esm/react/nodes/inlineCard.js +6 -12
- package/dist/esm/react/nodes/inlineExtension.js +2 -6
- package/dist/esm/react/nodes/layoutColumn.js +0 -2
- package/dist/esm/react/nodes/media.js +10 -34
- package/dist/esm/react/nodes/mediaGroup.js +6 -37
- package/dist/esm/react/nodes/mediaInline.js +7 -20
- package/dist/esm/react/nodes/mediaSingle/index.js +37 -66
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -2
- package/dist/esm/react/nodes/mention.js +5 -15
- package/dist/esm/react/nodes/orderedList.js +0 -5
- package/dist/esm/react/nodes/panel.js +12 -28
- package/dist/esm/react/nodes/paragraph.js +1 -1
- package/dist/esm/react/nodes/placeholder.js +0 -1
- package/dist/esm/react/nodes/status.js +3 -13
- package/dist/esm/react/nodes/table/colgroup.js +12 -21
- package/dist/esm/react/nodes/table/sticky.js +17 -32
- package/dist/esm/react/nodes/table/table.js +5 -5
- package/dist/esm/react/nodes/table.js +19 -95
- package/dist/esm/react/nodes/tableCell.js +26 -66
- package/dist/esm/react/nodes/tableRow.js +4 -25
- package/dist/esm/react/nodes/task-item-with-providers.js +4 -27
- package/dist/esm/react/nodes/taskItem.js +8 -24
- package/dist/esm/react/nodes/taskList.js +2 -14
- package/dist/esm/react/nodes/text-wrapper.js +1 -5
- package/dist/esm/react/utils/clipboard.js +0 -1
- package/dist/esm/react/utils/element-selection.js +0 -10
- package/dist/esm/react/utils/inject-props.js +5 -7
- package/dist/esm/react/utils/links.js +2 -4
- package/dist/esm/react/utils/performance/RenderTracking.js +2 -4
- package/dist/esm/react/utils/use-select-all-trap.js +1 -9
- package/dist/esm/render-document.js +42 -70
- package/dist/esm/steps/index.js +7 -36
- package/dist/esm/text/index.js +0 -6
- package/dist/esm/text/nodes/blockquote.js +0 -2
- package/dist/esm/text/nodes/bulletList.js +0 -2
- package/dist/esm/text/nodes/date.js +0 -2
- package/dist/esm/text/nodes/decisionItem.js +0 -4
- package/dist/esm/text/nodes/hardBreak.js +0 -1
- package/dist/esm/text/nodes/heading.js +0 -2
- package/dist/esm/text/nodes/inlineCard.js +0 -3
- package/dist/esm/text/nodes/listItem.js +0 -2
- package/dist/esm/text/nodes/mediaGroup.js +0 -3
- package/dist/esm/text/nodes/mention.js +0 -2
- package/dist/esm/text/nodes/orderedList.js +0 -2
- package/dist/esm/text/nodes/panel.js +0 -2
- package/dist/esm/text/nodes/paragraph.js +0 -4
- package/dist/esm/text/nodes/rule.js +0 -1
- package/dist/esm/text/nodes/status.js +0 -2
- package/dist/esm/text/nodes/table.js +0 -4
- package/dist/esm/text/nodes/taskItem.js +0 -4
- package/dist/esm/text/nodes/unknown.js +0 -4
- package/dist/esm/ui/Expand.js +15 -36
- package/dist/esm/ui/ExtensionRenderer.js +10 -39
- package/dist/esm/ui/MediaCard.js +42 -99
- package/dist/esm/ui/Renderer/ErrorBoundary.js +0 -16
- package/dist/esm/ui/Renderer/breakout-ssr.js +7 -27
- package/dist/esm/ui/Renderer/click-to-edit.js +1 -4
- package/dist/esm/ui/Renderer/index.js +47 -110
- package/dist/esm/ui/Renderer/style.js +1 -21
- package/dist/esm/ui/Renderer/truncated-wrapper.js +12 -23
- package/dist/esm/ui/RendererActionsContext/index.js +1 -1
- package/dist/esm/ui/SmartCardStorage.js +0 -9
- package/dist/esm/ui/SortingIcon.js +10 -29
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
- package/dist/esm/ui/active-header-id-provider.js +6 -12
- package/dist/esm/ui/annotations/context.js +0 -15
- package/dist/esm/ui/annotations/draft/component.js +5 -19
- package/dist/esm/ui/annotations/draft/dom.js +3 -11
- package/dist/esm/ui/annotations/draft/position.js +1 -9
- package/dist/esm/ui/annotations/draft/text.js +2 -4
- package/dist/esm/ui/annotations/element/index.js +4 -7
- package/dist/esm/ui/annotations/element/mark.js +8 -14
- package/dist/esm/ui/annotations/hooks/use-events.js +13 -32
- package/dist/esm/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
- package/dist/esm/ui/annotations/hooks/use-inline-comments-filter.js +1 -2
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +4 -12
- package/dist/esm/ui/annotations/hooks/user-selection.js +3 -11
- package/dist/esm/ui/annotations/index.js +4 -6
- package/dist/esm/ui/annotations/selection/mounter.js +13 -29
- package/dist/esm/ui/annotations/selection/range-validator.js +9 -12
- package/dist/esm/ui/annotations/selection/wrapper.js +3 -5
- package/dist/esm/ui/annotations/types.js +0 -1
- package/dist/esm/ui/annotations/view/index.js +1 -5
- package/dist/esm/use-feature-flags.js +0 -1
- package/dist/esm/utils.js +1 -8
- package/dist/esm/version.json +1 -1
- package/package.json +7 -7
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
|
|
4
3
|
var _templateObject;
|
|
5
|
-
|
|
6
4
|
/** @jsx jsx */
|
|
7
5
|
import React, { Fragment } from 'react';
|
|
8
6
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,27 +11,23 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
13
11
|
var anchorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), "var(--ds-link, ".concat(B400, ")"), "var(--ds-link, ".concat(B300, ")"), "var(--ds-link-pressed, ".concat(B500, ")"));
|
|
14
12
|
export default function Link(props) {
|
|
15
13
|
var href = props.href,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
target = props.target,
|
|
15
|
+
eventHandlers = props.eventHandlers,
|
|
16
|
+
fireAnalyticsEvent = props.fireAnalyticsEvent,
|
|
17
|
+
isMediaLink = props.isMediaLink,
|
|
18
|
+
dataAttributes = props.dataAttributes;
|
|
21
19
|
var anchorProps = {
|
|
22
20
|
href: href,
|
|
23
21
|
target: target,
|
|
24
22
|
title: href
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
if (target === '_blank') {
|
|
28
25
|
anchorProps.rel = 'noreferrer noopener';
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
var handler = getEventHandler(eventHandlers, 'link');
|
|
32
|
-
|
|
33
28
|
if (isMediaLink) {
|
|
34
29
|
return jsx(Fragment, null, props.children);
|
|
35
30
|
}
|
|
36
|
-
|
|
37
31
|
return jsx("a", _extends({
|
|
38
32
|
css: anchorStyles,
|
|
39
33
|
onClick: function onClick(e) {
|
|
@@ -48,7 +42,6 @@ export default function Link(props) {
|
|
|
48
42
|
}
|
|
49
43
|
});
|
|
50
44
|
}
|
|
51
|
-
|
|
52
45
|
if (handler) {
|
|
53
46
|
handler(e, href);
|
|
54
47
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
2
|
var isSub = function isSub(type) {
|
|
4
3
|
return type === 'sub';
|
|
5
4
|
};
|
|
6
|
-
|
|
7
5
|
export default function SubSup(props) {
|
|
8
6
|
if (isSub(props.type)) {
|
|
9
7
|
return /*#__PURE__*/React.createElement("sub", props.dataAttributes, props.children);
|
|
10
8
|
}
|
|
11
|
-
|
|
12
9
|
return /*#__PURE__*/React.createElement("sup", props.dataAttributes, props.children);
|
|
13
10
|
}
|
|
@@ -7,10 +7,10 @@ import { CardErrorBoundary } from './fallback';
|
|
|
7
7
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
8
8
|
export default function BlockCard(props) {
|
|
9
9
|
var url = props.url,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
data = props.data,
|
|
11
|
+
eventHandlers = props.eventHandlers,
|
|
12
|
+
portal = props.portal,
|
|
13
|
+
rendererAppearance = props.rendererAppearance;
|
|
14
14
|
var onClick = getCardClickHandler(eventHandlers, url);
|
|
15
15
|
var platform = useMemo(function () {
|
|
16
16
|
return getPlatform(rendererAppearance);
|
|
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { renderExtension } from './extension';
|
|
4
4
|
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
5
|
-
|
|
6
5
|
var BodiedExtension = function BodiedExtension(props) {
|
|
7
6
|
var children = props.children,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
_props$layout = props.layout,
|
|
8
|
+
layout = _props$layout === void 0 ? 'default' : _props$layout,
|
|
9
|
+
_props$path = props.path,
|
|
10
|
+
path = _props$path === void 0 ? [] : _props$path;
|
|
12
11
|
var removeOverflow = React.Children.toArray(children).map(function (child) {
|
|
13
12
|
return child.props.nodeType === 'table';
|
|
14
13
|
}).every(Boolean);
|
|
@@ -16,7 +15,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
16
15
|
type: "bodiedExtension"
|
|
17
16
|
}), function (_ref) {
|
|
18
17
|
var result = _ref.result;
|
|
19
|
-
|
|
20
18
|
try {
|
|
21
19
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
22
20
|
// Return the content directly if it's a valid JSX.Element
|
|
@@ -26,15 +24,13 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
26
24
|
}
|
|
27
25
|
} catch (e) {
|
|
28
26
|
/** We don't want this error to block renderer */
|
|
29
|
-
|
|
30
27
|
/** We keep rendering the default content */
|
|
31
|
-
}
|
|
32
|
-
|
|
28
|
+
}
|
|
33
29
|
|
|
30
|
+
// Always return default content if anything goes wrong
|
|
34
31
|
return renderExtension(children, layout, {
|
|
35
32
|
isTopLevel: path.length < 1
|
|
36
33
|
}, removeOverflow);
|
|
37
34
|
});
|
|
38
35
|
};
|
|
39
|
-
|
|
40
36
|
export default BodiedExtension;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Caption } from '@atlaskit/editor-common/ui';
|
|
3
|
-
|
|
4
3
|
var RenderCaption = function RenderCaption(_ref) {
|
|
5
4
|
var children = _ref.children,
|
|
6
|
-
|
|
5
|
+
dataAttributes = _ref.dataAttributes;
|
|
7
6
|
return /*#__PURE__*/React.createElement(Caption, {
|
|
8
7
|
hasContent: true,
|
|
9
8
|
dataAttributes: dataAttributes
|
|
10
9
|
}, children);
|
|
11
10
|
};
|
|
12
|
-
|
|
13
11
|
export default RenderCaption;
|
|
@@ -5,13 +5,12 @@ import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
5
5
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
6
6
|
import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import CodeBlockContainer from './components/codeBlockContainer';
|
|
8
|
-
|
|
9
8
|
function CodeBlock(props) {
|
|
10
9
|
var text = props.text,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
language = props.language,
|
|
11
|
+
_props$allowCopyToCli = props.allowCopyToClipboard,
|
|
12
|
+
allowCopyToClipboard = _props$allowCopyToCli === void 0 ? false : _props$allowCopyToCli,
|
|
13
|
+
codeBidiWarningTooltipEnabled = props.codeBidiWarningTooltipEnabled;
|
|
15
14
|
var codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
16
15
|
var className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
|
|
17
16
|
return jsx(CodeBlockContainer, {
|
|
@@ -25,5 +24,4 @@ function CodeBlock(props) {
|
|
|
25
24
|
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
|
|
26
25
|
}));
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
export default injectIntl(CodeBlock);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
4
|
+
|
|
6
5
|
import { jsx, css } from '@emotion/react';
|
|
7
6
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
import { N20, DN50 } from '@atlaskit/theme/colors';
|
|
@@ -10,7 +9,6 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
10
9
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
11
10
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
12
11
|
import CopyButton from '../../codeBlockCopyButton';
|
|
13
|
-
|
|
14
12
|
var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
15
13
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n }\n "])), themed({
|
|
16
14
|
light: "var(--ds-surface-raised, ".concat(N20, ")"),
|
|
@@ -23,12 +21,11 @@ var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
|
23
21
|
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
24
22
|
}));
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
var CodeBlockContainer = function CodeBlockContainer(_ref) {
|
|
28
25
|
var text = _ref.text,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
allowCopyToClipboard = _ref.allowCopyToClipboard,
|
|
28
|
+
children = _ref.children;
|
|
32
29
|
return jsx("div", {
|
|
33
30
|
className: className,
|
|
34
31
|
css: codeBlockStyleOverrides
|
|
@@ -36,5 +33,4 @@ var CodeBlockContainer = function CodeBlockContainer(_ref) {
|
|
|
36
33
|
content: text
|
|
37
34
|
}) : null, children);
|
|
38
35
|
};
|
|
39
|
-
|
|
40
36
|
export default CodeBlockContainer;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject, _templateObject2;
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import React, { forwardRef, useMemo } from 'react';
|
|
7
5
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
@@ -24,19 +22,17 @@ export var getLightWeightCodeBlockStylesForRootRendererStyleSheet = function get
|
|
|
24
22
|
};
|
|
25
23
|
var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
26
24
|
var text = _ref.text,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
_ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
|
|
26
|
+
codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
|
|
27
|
+
className = _ref.className;
|
|
30
28
|
var theme = useTheme();
|
|
31
29
|
var textRows = useMemo(function () {
|
|
32
30
|
return (text !== null && text !== void 0 ? text : '').split('\n');
|
|
33
31
|
}, [text]);
|
|
34
|
-
|
|
35
32
|
var _useBidiWarnings = useBidiWarnings({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
34
|
+
}),
|
|
35
|
+
renderBidiWarnings = _useBidiWarnings.renderBidiWarnings;
|
|
40
36
|
var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
41
37
|
return jsx("div", {
|
|
42
38
|
className: classNames,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
|
|
4
3
|
/** @jsx jsx */
|
|
5
4
|
import { Fragment, memo } from 'react';
|
|
6
5
|
import { lazy, Suspense } from 'react';
|
|
@@ -15,10 +14,8 @@ var LazyAkCodeBlock = /*#__PURE__*/lazy( /*#__PURE__*/_asyncToGenerator( /*#__PU
|
|
|
15
14
|
while (1) {
|
|
16
15
|
switch (_context.prev = _context.next) {
|
|
17
16
|
case 0:
|
|
18
|
-
return _context.abrupt("return", import(
|
|
19
|
-
/* webpackChunkName: "@atlaskit-internal_renderer-codeBlock" */
|
|
17
|
+
return _context.abrupt("return", import( /* webpackChunkName: "@atlaskit-internal_renderer-codeBlock" */
|
|
20
18
|
'@atlaskit/code/block'));
|
|
21
|
-
|
|
22
19
|
case 1:
|
|
23
20
|
case "end":
|
|
24
21
|
return _context.stop();
|
|
@@ -26,33 +23,26 @@ var LazyAkCodeBlock = /*#__PURE__*/lazy( /*#__PURE__*/_asyncToGenerator( /*#__PU
|
|
|
26
23
|
}
|
|
27
24
|
}, _callee);
|
|
28
25
|
})));
|
|
29
|
-
|
|
30
26
|
var joinWithSpaces = function joinWithSpaces() {
|
|
31
27
|
for (var _len = arguments.length, strs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
28
|
strs[_key] = arguments[_key];
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
return strs.join(' ');
|
|
36
31
|
};
|
|
37
|
-
|
|
38
32
|
var MemoizedLightWeightCodeBlock = /*#__PURE__*/memo(LightWeightCodeBlock);
|
|
39
|
-
|
|
40
33
|
var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
41
34
|
var text = _ref2.text,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
language = _ref2.language,
|
|
36
|
+
allowCopyToClipboard = _ref2.allowCopyToClipboard,
|
|
37
|
+
codeBidiWarningTooltipEnabled = _ref2.codeBidiWarningTooltipEnabled,
|
|
38
|
+
rootClassName = _ref2.className;
|
|
47
39
|
var _useBidiWarnings = useBidiWarnings({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
41
|
+
}),
|
|
42
|
+
warningLabel = _useBidiWarnings.warningLabel;
|
|
52
43
|
var _useInViewport = useInViewport(),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
isInViewport = _useInViewport.isInViewport,
|
|
45
|
+
trackingRef = _useInViewport.trackingRef;
|
|
56
46
|
var className = joinWithSpaces(CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, rootClassName);
|
|
57
47
|
var memoizedLightWeightCodeBlock = jsx(MemoizedLightWeightCodeBlock, {
|
|
58
48
|
ref: trackingRef,
|
|
@@ -73,5 +63,4 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
|
|
|
73
63
|
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
|
|
74
64
|
})))) : memoizedLightWeightCodeBlock;
|
|
75
65
|
};
|
|
76
|
-
|
|
77
66
|
export default WindowedCodeBlock;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
|
|
4
3
|
var _templateObject;
|
|
5
|
-
|
|
6
4
|
/** @jsx jsx */
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
8
6
|
import React, { useState } from 'react';
|
|
@@ -14,26 +12,21 @@ import { N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
|
14
12
|
import { copyTextToClipboard } from '../utils/clipboard';
|
|
15
13
|
import { codeBlockCopyButtonMessages } from '@atlaskit/editor-common/messages';
|
|
16
14
|
var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), "var(--ds-border, #fff)", "var(--ds-surface-overlay, ".concat(N20, ")"), "var(--ds-text, rgb(66, 82, 110))", "var(--ds-border, transparent)", "var(--ds-surface-overlay-hovered, ".concat(N30, ")"), "var(--ds-border, transparent)", "var(--ds-surface-overlay-pressed, ".concat(N30, ")"), "var(--ds-surface-overlay, ".concat(N700, ")"), "var(--ds-text, #fff)", "var(--ds-surface-overlay-hovered, ".concat(N700, ")"));
|
|
17
|
-
|
|
18
15
|
var CopyButton = function CopyButton(_ref) {
|
|
19
16
|
var content = _ref.content,
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
intl = _ref.intl;
|
|
22
18
|
var _useState = useState(intl.formatMessage(codeBlockCopyButtonMessages.copyCodeToClipboard)),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
tooltip = _useState2[0],
|
|
21
|
+
setTooltip = _useState2[1];
|
|
27
22
|
var _useState3 = useState('copy-to-clipboard'),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
className = _useState4[0],
|
|
25
|
+
setClassName = _useState4[1];
|
|
32
26
|
var onMouseLeave = function onMouseLeave() {
|
|
33
27
|
setTooltip(intl.formatMessage(codeBlockCopyButtonMessages.copyCodeToClipboard));
|
|
34
28
|
setClassName('copy-to-clipboard');
|
|
35
29
|
};
|
|
36
|
-
|
|
37
30
|
return jsx("span", {
|
|
38
31
|
css: copyButtonWrapperStyles
|
|
39
32
|
}, jsx(Tooltip, {
|
|
@@ -58,5 +51,4 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
58
51
|
}
|
|
59
52
|
}))));
|
|
60
53
|
};
|
|
61
|
-
|
|
62
54
|
export default injectIntl(CopyButton);
|
|
@@ -5,36 +5,28 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
|
|
9
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import { PureComponent } from 'react';
|
|
15
12
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
16
13
|
import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
|
|
17
14
|
import { injectIntl } from 'react-intl-next';
|
|
18
15
|
import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext';
|
|
19
|
-
|
|
20
16
|
var Date = /*#__PURE__*/function (_PureComponent) {
|
|
21
17
|
_inherits(Date, _PureComponent);
|
|
22
|
-
|
|
23
18
|
var _super = _createSuper(Date);
|
|
24
|
-
|
|
25
19
|
function Date() {
|
|
26
20
|
_classCallCheck(this, Date);
|
|
27
|
-
|
|
28
21
|
return _super.apply(this, arguments);
|
|
29
22
|
}
|
|
30
|
-
|
|
31
23
|
_createClass(Date, [{
|
|
32
24
|
key: "render",
|
|
33
25
|
value: function render() {
|
|
34
26
|
var _this$props = this.props,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
timestamp = _this$props.timestamp,
|
|
28
|
+
parentIsIncompleteTask = _this$props.parentIsIncompleteTask,
|
|
29
|
+
intl = _this$props.intl;
|
|
38
30
|
var className = !!parentIsIncompleteTask && isPastDate(timestamp) ? 'date-node date-node-highlighted' : 'date-node';
|
|
39
31
|
return /*#__PURE__*/React.createElement("span", {
|
|
40
32
|
className: DateSharedCssClassName.DATE_WRAPPER
|
|
@@ -45,26 +37,19 @@ var Date = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
37
|
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
46
38
|
}
|
|
47
39
|
}]);
|
|
48
|
-
|
|
49
40
|
return Date;
|
|
50
41
|
}(PureComponent);
|
|
51
|
-
|
|
52
42
|
export var DateComponent = injectIntl(Date);
|
|
53
|
-
|
|
54
43
|
function DateWithFormatContext(props) {
|
|
55
44
|
var _useTaskItemsFormatCo = useTaskItemsFormatContext(),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
_useTaskItemsFormatCo2 = _slicedToArray(_useTaskItemsFormatCo, 1),
|
|
46
|
+
isChecked = _useTaskItemsFormatCo2[0];
|
|
59
47
|
var parentIsIncompleteTask = props.parentIsIncompleteTask;
|
|
60
|
-
|
|
61
48
|
if (typeof isChecked !== 'undefined') {
|
|
62
49
|
parentIsIncompleteTask = !isChecked;
|
|
63
50
|
}
|
|
64
|
-
|
|
65
51
|
return /*#__PURE__*/React.createElement(DateComponent, _extends({}, props, {
|
|
66
52
|
parentIsIncompleteTask: parentIsIncompleteTask
|
|
67
53
|
}));
|
|
68
54
|
}
|
|
69
|
-
|
|
70
55
|
export default DateWithFormatContext;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { DecisionItem as AkDecisionItem } from '@atlaskit/task-decision';
|
|
3
3
|
export default function DecisionItem(_ref) {
|
|
4
4
|
var children = _ref.children,
|
|
5
|
-
|
|
5
|
+
dataAttributes = _ref.dataAttributes;
|
|
6
6
|
return /*#__PURE__*/React.createElement(AkDecisionItem, {
|
|
7
7
|
dataAttributes: dataAttributes
|
|
8
8
|
}, children);
|
|
@@ -3,40 +3,28 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
8
|
import React from 'react';
|
|
12
9
|
import { PureComponent, Children } from 'react';
|
|
13
10
|
import { DecisionList as AkDecisionList } from '@atlaskit/task-decision';
|
|
14
|
-
|
|
15
11
|
var DecisionList = /*#__PURE__*/function (_PureComponent) {
|
|
16
12
|
_inherits(DecisionList, _PureComponent);
|
|
17
|
-
|
|
18
13
|
var _super = _createSuper(DecisionList);
|
|
19
|
-
|
|
20
14
|
function DecisionList() {
|
|
21
15
|
_classCallCheck(this, DecisionList);
|
|
22
|
-
|
|
23
16
|
return _super.apply(this, arguments);
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
_createClass(DecisionList, [{
|
|
27
19
|
key: "render",
|
|
28
20
|
value: function render() {
|
|
29
21
|
var children = this.props.children;
|
|
30
|
-
|
|
31
22
|
if (Children.count(children) === 0) {
|
|
32
23
|
return null;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
25
|
return /*#__PURE__*/React.createElement(AkDecisionList, null, children);
|
|
36
26
|
}
|
|
37
27
|
}]);
|
|
38
|
-
|
|
39
28
|
return DecisionList;
|
|
40
29
|
}(PureComponent);
|
|
41
|
-
|
|
42
30
|
export { DecisionList as default };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
-
|
|
5
4
|
var _templateObject, _templateObject2;
|
|
6
|
-
|
|
7
5
|
/** @jsx jsx */
|
|
8
6
|
import { css, jsx } from '@emotion/react';
|
|
9
7
|
import { useMemo, useContext, useState, useRef } from 'react';
|
|
@@ -19,13 +17,13 @@ var embedCardWrapperStyles = css(_templateObject || (_templateObject = _taggedTe
|
|
|
19
17
|
var uIMediaSingleLayoutStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 50%;\n transform: translateX(-50%);\n"])));
|
|
20
18
|
export default function EmbedCard(props) {
|
|
21
19
|
var url = props.url,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
data = props.data,
|
|
21
|
+
eventHandlers = props.eventHandlers,
|
|
22
|
+
portal = props.portal,
|
|
23
|
+
layout = props.layout,
|
|
24
|
+
width = props.width,
|
|
25
|
+
isInsideOfBlockNode = props.isInsideOfBlockNode,
|
|
26
|
+
rendererAppearance = props.rendererAppearance;
|
|
29
27
|
var embedIframeRef = useRef(null);
|
|
30
28
|
var onClick = getCardClickHandler(eventHandlers, url);
|
|
31
29
|
var platform = useMemo(function () {
|
|
@@ -39,77 +37,65 @@ export default function EmbedCard(props) {
|
|
|
39
37
|
platform: platform,
|
|
40
38
|
showActions: platform === 'web'
|
|
41
39
|
};
|
|
42
|
-
|
|
43
40
|
var _useState = useState(null),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
liveHeight = _useState2[0],
|
|
43
|
+
setLiveHeight = _useState2[1];
|
|
48
44
|
var _useState3 = useState(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var height = liveHeight || props.originalHeight; // We start with height and width defined with default values
|
|
45
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
46
|
+
aspectRatio = _useState4[0],
|
|
47
|
+
setAspectRatio = _useState4[1];
|
|
48
|
+
var height = liveHeight || props.originalHeight;
|
|
54
49
|
|
|
50
|
+
// We start with height and width defined with default values
|
|
55
51
|
var originalHeight = DEFAULT_EMBED_CARD_HEIGHT;
|
|
56
|
-
var originalWidth = DEFAULT_EMBED_CARD_WIDTH;
|
|
52
|
+
var originalWidth = DEFAULT_EMBED_CARD_WIDTH;
|
|
57
53
|
|
|
54
|
+
// Then can override height and width with values from ADF if available
|
|
58
55
|
if (props.originalHeight && props.originalWidth) {
|
|
59
56
|
originalHeight = props.originalHeight;
|
|
60
57
|
originalWidth = props.originalWidth;
|
|
61
|
-
}
|
|
62
|
-
|
|
58
|
+
}
|
|
63
59
|
|
|
60
|
+
// Then we can override it with aspectRatio that is comming from iframely via `resolve()`
|
|
64
61
|
if (aspectRatio) {
|
|
65
62
|
originalHeight = 1;
|
|
66
63
|
originalWidth = aspectRatio;
|
|
67
|
-
}
|
|
68
|
-
|
|
64
|
+
}
|
|
69
65
|
|
|
66
|
+
// And finally if iframe sends live `height` events we use that as most precise measure.
|
|
70
67
|
var isHeightOnlyMode = !(props.originalHeight && props.originalWidth) || liveHeight;
|
|
71
|
-
|
|
72
68
|
if (height && isHeightOnlyMode) {
|
|
73
69
|
originalHeight = height;
|
|
74
70
|
originalWidth = undefined;
|
|
75
71
|
}
|
|
76
|
-
|
|
77
72
|
var padding = rendererAppearance === 'full-page' ? FullPagePadding * 2 : 0;
|
|
78
|
-
|
|
79
73
|
var _useState5 = useState(true),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
75
|
+
hasPreview = _useState6[0],
|
|
76
|
+
setPreviewAvailableState = _useState6[1];
|
|
84
77
|
var cardContext = useContext(SmartCardContext);
|
|
85
|
-
|
|
86
78
|
var onResolve = function onResolve(_ref) {
|
|
87
79
|
var resolvedAspectRatio = _ref.aspectRatio;
|
|
88
80
|
var hasPreviewOnResolve = !!(cardContext && url && cardContext.extractors.getPreview(url, platform));
|
|
89
|
-
|
|
90
81
|
if (!hasPreviewOnResolve) {
|
|
91
82
|
setPreviewAvailableState(false);
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
setAspectRatio(resolvedAspectRatio);
|
|
95
85
|
};
|
|
96
|
-
|
|
97
86
|
return jsx(WidthConsumer, null, function (_ref2) {
|
|
98
87
|
var containerWidth = _ref2.width,
|
|
99
|
-
|
|
88
|
+
breakpoint = _ref2.breakpoint;
|
|
100
89
|
var nonFullWidthSize = containerWidth;
|
|
101
90
|
var isFullWidth = rendererAppearance === 'full-width';
|
|
102
|
-
|
|
103
91
|
if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
|
|
104
92
|
var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
|
|
105
|
-
|
|
106
93
|
if (isContainerSizeGreaterThanMaxFullPageWidth) {
|
|
107
94
|
nonFullWidthSize = akEditorDefaultLayoutWidth;
|
|
108
95
|
} else {
|
|
109
96
|
nonFullWidthSize = containerWidth - padding;
|
|
110
97
|
}
|
|
111
98
|
}
|
|
112
|
-
|
|
113
99
|
var lineLength = isFullWidth ? Math.min(akEditorFullWidthLayoutWidth, containerWidth - padding) : nonFullWidthSize;
|
|
114
100
|
var uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? uIMediaSingleLayoutStyles : '';
|
|
115
101
|
return jsx(CardErrorBoundary, _extends({
|
|
@@ -3,36 +3,28 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
7
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
-
|
|
9
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
8
|
import React from 'react';
|
|
12
9
|
import { PureComponent } from 'react';
|
|
13
10
|
import { Emoji } from '@atlaskit/editor-common/emoji';
|
|
14
|
-
|
|
15
11
|
var EmojiItem = /*#__PURE__*/function (_PureComponent) {
|
|
16
12
|
_inherits(EmojiItem, _PureComponent);
|
|
17
|
-
|
|
18
13
|
var _super = _createSuper(EmojiItem);
|
|
19
|
-
|
|
20
14
|
function EmojiItem() {
|
|
21
15
|
_classCallCheck(this, EmojiItem);
|
|
22
|
-
|
|
23
16
|
return _super.apply(this, arguments);
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
_createClass(EmojiItem, [{
|
|
27
19
|
key: "render",
|
|
28
20
|
value: function render() {
|
|
29
21
|
var _this$props = this.props,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
id = _this$props.id,
|
|
23
|
+
providers = _this$props.providers,
|
|
24
|
+
shortName = _this$props.shortName,
|
|
25
|
+
text = _this$props.text,
|
|
26
|
+
fitToHeight = _this$props.fitToHeight,
|
|
27
|
+
resourceConfig = _this$props.resourceConfig;
|
|
36
28
|
return /*#__PURE__*/React.createElement(Emoji, {
|
|
37
29
|
allowTextFallback: true,
|
|
38
30
|
id: id,
|
|
@@ -44,8 +36,6 @@ var EmojiItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
44
36
|
});
|
|
45
37
|
}
|
|
46
38
|
}]);
|
|
47
|
-
|
|
48
39
|
return EmojiItem;
|
|
49
40
|
}(PureComponent);
|
|
50
|
-
|
|
51
41
|
export { EmojiItem as default };
|