@atlaskit/renderer 105.1.1 → 105.1.2
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 +6 -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 +2 -2
|
@@ -10,14 +10,14 @@ export default class RendererActions {
|
|
|
10
10
|
// This is our psuedo feature flag for now
|
|
11
11
|
// This module can only be used when wrapped with
|
|
12
12
|
// the <RendererContext> component for now.
|
|
13
|
+
|
|
13
14
|
constructor(initFromContext = false) {
|
|
14
15
|
_defineProperty(this, "initFromContext", false);
|
|
15
|
-
|
|
16
16
|
this.initFromContext = initFromContext;
|
|
17
17
|
this.transformer = new JSONTransformer();
|
|
18
|
-
}
|
|
19
|
-
|
|
18
|
+
}
|
|
20
19
|
|
|
20
|
+
//#region private
|
|
21
21
|
_privateRegisterRenderer(ref, doc, schema, onAnalyticsEvent) {
|
|
22
22
|
if (!this.initFromContext) {
|
|
23
23
|
return;
|
|
@@ -26,39 +26,34 @@ export default class RendererActions {
|
|
|
26
26
|
} else if (this.ref !== ref) {
|
|
27
27
|
throw new Error("Renderer has already been registered! It's not allowed to re-register with another new Renderer instance.");
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
this.doc = doc;
|
|
31
30
|
this.schema = schema;
|
|
32
31
|
this.onAnalyticsEvent = onAnalyticsEvent;
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
_privateUnregisterRenderer() {
|
|
36
34
|
this.doc = undefined;
|
|
37
35
|
this.ref = undefined;
|
|
38
36
|
this.schema = undefined;
|
|
39
37
|
}
|
|
38
|
+
|
|
40
39
|
/**
|
|
41
40
|
* Validate whether we can create an annotation between two positions
|
|
42
41
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
42
|
_privateValidatePositionsForAnnotation(from, to) {
|
|
46
43
|
if (!this.doc || !this.schema) {
|
|
47
44
|
return false;
|
|
48
45
|
}
|
|
49
|
-
|
|
50
46
|
return canApplyAnnotationOnRange({
|
|
51
47
|
from,
|
|
52
48
|
to
|
|
53
49
|
}, this.doc, this.schema);
|
|
54
|
-
}
|
|
55
|
-
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
56
52
|
|
|
57
53
|
deleteAnnotation(annotationId, annotationType) {
|
|
58
54
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
59
55
|
return false;
|
|
60
56
|
}
|
|
61
|
-
|
|
62
57
|
const mark = this.schema.marks.annotation.create({
|
|
63
58
|
id: annotationId,
|
|
64
59
|
annotationType
|
|
@@ -67,7 +62,6 @@ export default class RendererActions {
|
|
|
67
62
|
let to;
|
|
68
63
|
this.doc.descendants((node, pos) => {
|
|
69
64
|
const found = mark.isInSet(node.marks);
|
|
70
|
-
|
|
71
65
|
if (found && !from) {
|
|
72
66
|
// Set both here incase it only spans one node.
|
|
73
67
|
from = pos;
|
|
@@ -77,20 +71,16 @@ export default class RendererActions {
|
|
|
77
71
|
// we'll keep setting the end until no longer found.
|
|
78
72
|
to = pos + node.nodeSize;
|
|
79
73
|
}
|
|
80
|
-
|
|
81
74
|
return true;
|
|
82
75
|
});
|
|
83
|
-
|
|
84
76
|
if (from === undefined || to === undefined) {
|
|
85
77
|
return false;
|
|
86
78
|
}
|
|
87
|
-
|
|
88
79
|
const step = new RemoveMarkStep(from, to, mark);
|
|
89
80
|
const {
|
|
90
81
|
doc,
|
|
91
82
|
failed
|
|
92
83
|
} = step.apply(this.doc);
|
|
93
|
-
|
|
94
84
|
if (this.onAnalyticsEvent) {
|
|
95
85
|
const payload = {
|
|
96
86
|
action: ACTION.DELETED,
|
|
@@ -100,99 +90,76 @@ export default class RendererActions {
|
|
|
100
90
|
};
|
|
101
91
|
this.onAnalyticsEvent(payload);
|
|
102
92
|
}
|
|
103
|
-
|
|
104
93
|
if (!failed && doc) {
|
|
105
94
|
return {
|
|
106
95
|
step,
|
|
107
96
|
doc: this.transformer.encode(doc)
|
|
108
97
|
};
|
|
109
98
|
}
|
|
110
|
-
|
|
111
99
|
return false;
|
|
112
100
|
}
|
|
113
|
-
|
|
114
101
|
annotate(range, annotationId, annotationType) {
|
|
115
102
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
116
103
|
return false;
|
|
117
104
|
}
|
|
118
|
-
|
|
119
105
|
const pos = getPosFromRange(range);
|
|
120
|
-
|
|
121
106
|
if (!pos) {
|
|
122
107
|
return false;
|
|
123
108
|
}
|
|
124
|
-
|
|
125
109
|
const {
|
|
126
110
|
from,
|
|
127
111
|
to
|
|
128
112
|
} = pos;
|
|
129
|
-
|
|
130
113
|
const validPositions = this._privateValidatePositionsForAnnotation(from, to);
|
|
131
|
-
|
|
132
114
|
if (!validPositions) {
|
|
133
115
|
return false;
|
|
134
116
|
}
|
|
135
|
-
|
|
136
117
|
return this.applyAnnotation(pos, {
|
|
137
118
|
annotationId,
|
|
138
119
|
annotationType: AnnotationTypes.INLINE_COMMENT
|
|
139
120
|
});
|
|
140
121
|
}
|
|
141
|
-
|
|
142
122
|
isValidAnnotationRange(range) {
|
|
143
123
|
const pos = getPosFromRange(range);
|
|
144
|
-
|
|
145
124
|
if (!pos || !this.doc) {
|
|
146
125
|
return false;
|
|
147
126
|
}
|
|
148
|
-
|
|
149
127
|
return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
|
|
150
128
|
}
|
|
151
|
-
|
|
152
129
|
isValidAnnotationPosition(pos) {
|
|
153
130
|
if (!pos || !this.doc) {
|
|
154
131
|
return false;
|
|
155
132
|
}
|
|
156
|
-
|
|
157
133
|
return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
|
|
158
134
|
}
|
|
159
|
-
|
|
160
135
|
getPositionFromRange(range) {
|
|
161
136
|
if (!this.doc || !this.schema) {
|
|
162
137
|
return false;
|
|
163
138
|
}
|
|
164
|
-
|
|
165
139
|
return getPosFromRange(range);
|
|
166
140
|
}
|
|
167
|
-
|
|
168
141
|
getAnnotationMarks() {
|
|
169
142
|
const {
|
|
170
143
|
schema,
|
|
171
144
|
doc
|
|
172
145
|
} = this;
|
|
173
|
-
|
|
174
146
|
if (!schema || !doc) {
|
|
175
147
|
return [];
|
|
176
148
|
}
|
|
177
|
-
|
|
178
149
|
const {
|
|
179
150
|
marks: {
|
|
180
151
|
annotation: annotationMarkType
|
|
181
152
|
}
|
|
182
153
|
} = schema;
|
|
183
|
-
|
|
184
154
|
if (!annotationMarkType) {
|
|
185
155
|
return [];
|
|
186
156
|
}
|
|
187
|
-
|
|
188
157
|
const marks = [];
|
|
189
158
|
doc.descendants(node => {
|
|
190
159
|
const annotationsMark = node.marks.filter(m => m.type === annotationMarkType);
|
|
191
|
-
|
|
192
160
|
if (!annotationsMark || !annotationsMark.length) {
|
|
193
161
|
return true;
|
|
194
162
|
}
|
|
195
|
-
|
|
196
163
|
marks.push(...annotationsMark);
|
|
197
164
|
return false;
|
|
198
165
|
});
|
|
@@ -202,26 +169,20 @@ export default class RendererActions {
|
|
|
202
169
|
});
|
|
203
170
|
return Array.from(uniqueMarks.values());
|
|
204
171
|
}
|
|
205
|
-
|
|
206
172
|
getAnnotationsByPosition(range) {
|
|
207
173
|
if (!this.doc || !this.schema) {
|
|
208
174
|
return [];
|
|
209
175
|
}
|
|
210
|
-
|
|
211
176
|
const pos = getPosFromRange(range);
|
|
212
|
-
|
|
213
177
|
if (!pos || !this.doc) {
|
|
214
178
|
return [];
|
|
215
179
|
}
|
|
216
|
-
|
|
217
180
|
return getAnnotationIdsFromRange(pos, this.doc, this.schema);
|
|
218
181
|
}
|
|
219
|
-
|
|
220
182
|
applyAnnotation(pos, annotation) {
|
|
221
183
|
if (!this.doc || !pos || !this.schema) {
|
|
222
184
|
return false;
|
|
223
185
|
}
|
|
224
|
-
|
|
225
186
|
const {
|
|
226
187
|
from,
|
|
227
188
|
to
|
|
@@ -239,11 +200,9 @@ export default class RendererActions {
|
|
|
239
200
|
doc,
|
|
240
201
|
failed
|
|
241
202
|
} = step.apply(this.doc);
|
|
242
|
-
|
|
243
203
|
if (failed || !doc) {
|
|
244
204
|
return false;
|
|
245
205
|
}
|
|
246
|
-
|
|
247
206
|
const originalSelection = doc.textBetween(from, to);
|
|
248
207
|
const {
|
|
249
208
|
numMatches,
|
|
@@ -257,12 +216,10 @@ export default class RendererActions {
|
|
|
257
216
|
matchIndex
|
|
258
217
|
};
|
|
259
218
|
}
|
|
260
|
-
|
|
261
219
|
generateAnnotationIndexMatch(pos) {
|
|
262
220
|
if (!this.doc || !pos || !this.schema) {
|
|
263
221
|
return false;
|
|
264
222
|
}
|
|
265
|
-
|
|
266
223
|
const {
|
|
267
224
|
from,
|
|
268
225
|
to
|
|
@@ -278,5 +235,4 @@ export default class RendererActions {
|
|
|
278
235
|
matchIndex
|
|
279
236
|
};
|
|
280
237
|
}
|
|
281
|
-
|
|
282
238
|
}
|
|
@@ -11,38 +11,39 @@ export function getIndexMatch(doc, schema, selectedText, startIndex) {
|
|
|
11
11
|
// Eg: panel (invalid) > p (valid)
|
|
12
12
|
return true;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
const nodeStart = pos;
|
|
16
|
-
const nodeEnd = nodeStart + node.nodeSize;
|
|
15
|
+
const nodeEnd = nodeStart + node.nodeSize;
|
|
17
16
|
|
|
17
|
+
// If the start of the annotation selection is within the current node, we scan the document for previous occurrences
|
|
18
18
|
if (startIndex >= nodeStart && startIndex <= nodeEnd) {
|
|
19
19
|
// Find the index by counting all previous instances of the selectedText in the partial textContent
|
|
20
20
|
// Need to scan from start, up to `startIndex` (which includes partial of the current node)
|
|
21
21
|
textContent += doc.textBetween(nodeStart, startIndex - 1);
|
|
22
|
-
matchIndex = countMatches(textContent, selectedText);
|
|
22
|
+
matchIndex = countMatches(textContent, selectedText);
|
|
23
23
|
|
|
24
|
+
// Complete appending of the node
|
|
24
25
|
textContent += doc.textBetween(startIndex, nodeEnd);
|
|
25
26
|
} else {
|
|
26
27
|
textContent += node.textContent;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
29
|
return true;
|
|
30
|
-
});
|
|
30
|
+
});
|
|
31
31
|
|
|
32
|
+
// Count total number of matches in final text
|
|
32
33
|
const numMatches = countMatches(textContent, selectedText);
|
|
33
34
|
return {
|
|
34
35
|
numMatches,
|
|
35
36
|
matchIndex,
|
|
36
37
|
textContent
|
|
37
38
|
};
|
|
38
|
-
}
|
|
39
|
+
}
|
|
39
40
|
|
|
41
|
+
// countMatches finds the total number of occurrences of `query` within a given `searchString`
|
|
40
42
|
export function countMatches(searchString, query) {
|
|
41
43
|
if (searchString === '' || query === '') {
|
|
42
44
|
return 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
}
|
|
46
|
+
// Escape characters that would trigger as syntax in a regex query before converting to the query
|
|
46
47
|
const reg = new RegExp(query.replace(/(?=[.\\+*?[^\]$(){}\|])/g, '\\'), 'g');
|
|
47
48
|
return (searchString.match(reg) || []).length;
|
|
48
49
|
}
|
package/dist/es2019/actions.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RendererActionsContext, RendererActionsContextConsumer } from './ui/RendererActionsContext';
|
|
2
|
-
import { WithRendererActions } from './ui/RendererActionsContext/WithRendererActions';
|
|
2
|
+
import { WithRendererActions } from './ui/RendererActionsContext/WithRendererActions';
|
|
3
3
|
|
|
4
|
+
// This file exists purely as an entry point, until they are configurable.
|
|
4
5
|
export { RendererActionsContext, RendererActionsContextConsumer, WithRendererActions };
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
export let PLATFORM;
|
|
2
|
-
|
|
3
2
|
(function (PLATFORM) {
|
|
4
3
|
PLATFORM["NATIVE"] = "mobileNative";
|
|
5
4
|
PLATFORM["HYBRID"] = "mobileHybrid";
|
|
6
5
|
PLATFORM["WEB"] = "web";
|
|
7
6
|
})(PLATFORM || (PLATFORM = {}));
|
|
8
|
-
|
|
9
7
|
export let MODE;
|
|
10
|
-
|
|
11
8
|
(function (MODE) {
|
|
12
9
|
MODE["RENDERER"] = "renderer";
|
|
13
10
|
MODE["EDITOR"] = "editor";
|
|
14
11
|
})(MODE || (MODE = {}));
|
|
15
|
-
|
|
16
12
|
export let RESOLVE_METHOD;
|
|
17
|
-
|
|
18
13
|
(function (RESOLVE_METHOD) {
|
|
19
14
|
RESOLVE_METHOD["COMPONENT"] = "component";
|
|
20
15
|
RESOLVE_METHOD["CONSUMER"] = "consumer";
|
|
@@ -2,7 +2,6 @@ import { getUnsupportedContentLevelData, getAnalyticsAppearance } from '@atlaski
|
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { PLATFORM } from './events';
|
|
4
4
|
let rendersMap = {};
|
|
5
|
-
|
|
6
5
|
const processLevelsAndTrack = (item, thresholds, dispatchAnalyticsEvent) => {
|
|
7
6
|
try {
|
|
8
7
|
const {
|
|
@@ -38,7 +37,6 @@ const processLevelsAndTrack = (item, thresholds, dispatchAnalyticsEvent) => {
|
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
|
-
|
|
42
40
|
const schedule = fn => {
|
|
43
41
|
if (typeof window.requestIdleCallback === 'function') {
|
|
44
42
|
window.requestIdleCallback(fn);
|
|
@@ -46,37 +44,33 @@ const schedule = fn => {
|
|
|
46
44
|
setTimeout(fn, 0);
|
|
47
45
|
}
|
|
48
46
|
};
|
|
49
|
-
|
|
50
47
|
const DEFAULT_SAMPLING_RATE = 100;
|
|
51
48
|
export const trackUnsupportedContentLevels = (item, trackingOptions, dispatchAnalyticsEvent) => {
|
|
52
49
|
var _item$appearance;
|
|
53
|
-
|
|
54
50
|
const {
|
|
55
51
|
thresholds,
|
|
56
52
|
samplingRates
|
|
57
53
|
} = trackingOptions;
|
|
58
54
|
const appearance = (_item$appearance = item.appearance) !== null && _item$appearance !== void 0 ? _item$appearance : 'unknown';
|
|
59
|
-
|
|
60
55
|
if (!rendersMap[appearance]) {
|
|
61
56
|
rendersMap[appearance] = new Set();
|
|
62
|
-
}
|
|
63
|
-
|
|
57
|
+
}
|
|
64
58
|
|
|
59
|
+
// bail out if already processed a render from a given renderer instance
|
|
65
60
|
const didProcessRenderer = rendersMap[appearance].has(item.rendererId);
|
|
66
|
-
|
|
67
61
|
if (didProcessRenderer) {
|
|
68
62
|
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
63
|
+
}
|
|
71
64
|
|
|
65
|
+
// otherwise track the render
|
|
72
66
|
rendersMap[appearance].add(item.rendererId);
|
|
73
|
-
const sampleRate = samplingRates && samplingRates[appearance] || DEFAULT_SAMPLING_RATE;
|
|
67
|
+
const sampleRate = samplingRates && samplingRates[appearance] || DEFAULT_SAMPLING_RATE;
|
|
74
68
|
|
|
69
|
+
// sample from the first available tracked render
|
|
75
70
|
if (rendersMap[appearance].size === 1) {
|
|
76
71
|
schedule(() => processLevelsAndTrack(item, thresholds, dispatchAnalyticsEvent));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
}
|
|
73
|
+
// cleanup/refresh tracked renders at the sampling rate
|
|
80
74
|
if (rendersMap[appearance].size % sampleRate === 0) {
|
|
81
75
|
rendersMap[appearance] = new Set();
|
|
82
76
|
}
|
|
@@ -8,7 +8,6 @@ export const useBidiWarnings = ({
|
|
|
8
8
|
}) => {
|
|
9
9
|
const intl = useIntl();
|
|
10
10
|
const warningLabel = intl.formatMessage(codeBidiWarningMessages.label);
|
|
11
|
-
|
|
12
11
|
const renderBidiWarnings = text => {
|
|
13
12
|
return codeBidiWarningDecorator(text, ({
|
|
14
13
|
bidiCharacter,
|
|
@@ -20,7 +19,6 @@ export const useBidiWarnings = ({
|
|
|
20
19
|
tooltipEnabled: enableWarningTooltip
|
|
21
20
|
}));
|
|
22
21
|
};
|
|
23
|
-
|
|
24
22
|
return {
|
|
25
23
|
renderBidiWarnings,
|
|
26
24
|
warningLabel
|
|
@@ -6,7 +6,6 @@ export const useInViewport = () => {
|
|
|
6
6
|
if (!trackingRef || !(trackingRef !== null && trackingRef !== void 0 && trackingRef.current)) {
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
const target = trackingRef.current;
|
|
11
10
|
const observer = new IntersectionObserver(entries => {
|
|
12
11
|
for (const entry of entries) {
|
|
@@ -16,7 +16,6 @@ export const useObservedWidth = (node, useObservedWidthFlag) => {
|
|
|
16
16
|
if (!node || !useObservedWidthFlag) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
19
|
if (!resizeObserver) {
|
|
21
20
|
resizeObserver = new ResizeObserver(entries => {
|
|
22
21
|
for (let entry of entries) {
|
|
@@ -26,7 +25,6 @@ export const useObservedWidth = (node, useObservedWidthFlag) => {
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
nodeToCallback.set(node, rect => {
|
|
31
29
|
const {
|
|
32
30
|
x,
|