@atlaskit/renderer 141.0.0 → 141.0.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 +20 -0
- package/dist/cjs/actions/index.js +1 -1
- package/dist/cjs/actions/selection.js +1 -1
- package/dist/cjs/analytics/unsupported-content.js +1 -1
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/small-nodes.js +1 -1
- package/dist/cjs/react/index.js +9 -9
- package/dist/cjs/react/marks/index.js +10 -10
- package/dist/cjs/react/marks/link.js +3 -3
- package/dist/cjs/react/nodes/blockCard.js +12 -12
- package/dist/cjs/react/nodes/bodiedExtension.js +4 -4
- package/dist/cjs/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +1 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockButtonContainer.js +1 -0
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +1 -0
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +15 -12
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockDownloadButton.js +3 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -2
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +1 -1
- package/dist/cjs/react/nodes/date.js +2 -2
- package/dist/cjs/react/nodes/embedCard.js +33 -32
- package/dist/cjs/react/nodes/emoji.js +12 -12
- package/dist/cjs/react/nodes/extension.js +19 -19
- package/dist/cjs/react/nodes/fallback.js +2 -2
- package/dist/cjs/react/nodes/heading-anchor.js +1 -1
- package/dist/cjs/react/nodes/heading.js +3 -3
- package/dist/cjs/react/nodes/index.js +5 -5
- package/dist/cjs/react/nodes/inlineCard.js +12 -12
- package/dist/cjs/react/nodes/loosely-lazy.js +0 -1
- package/dist/cjs/react/nodes/media/index.js +10 -10
- package/dist/cjs/react/nodes/mediaInline.js +6 -6
- package/dist/cjs/react/nodes/mediaSingle/index.js +4 -4
- package/dist/cjs/react/nodes/multiBodiedExtension.js +29 -29
- package/dist/cjs/react/nodes/panel-compiled.js +1 -1
- package/dist/cjs/react/nodes/panel-emotion.js +1 -1
- package/dist/cjs/react/nodes/status.js +1 -1
- package/dist/cjs/react/nodes/table/colgroup.js +2 -2
- package/dist/cjs/react/nodes/table/sticky.js +1 -1
- package/dist/cjs/react/nodes/table/table.js +2 -2
- package/dist/cjs/react/nodes/table.js +14 -14
- package/dist/cjs/react/nodes/tableCell.js +7 -7
- package/dist/cjs/react/nodes/tableRow.js +2 -2
- package/dist/cjs/react/nodes/taskItem.js +2 -2
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +2 -2
- package/dist/cjs/react/utils/use-select-all-trap.js +1 -1
- package/dist/cjs/render-document.js +1 -1
- package/dist/cjs/steps/index.js +1 -1
- package/dist/cjs/text/nodes/status.js +1 -1
- package/dist/cjs/ui/Expand.js +53 -52
- package/dist/cjs/ui/ExtensionRenderer.js +19 -17
- package/dist/cjs/ui/MediaCard.js +4 -4
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +21 -21
- package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +22 -22
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +7 -6
- package/dist/cjs/ui/RendererActionsContext/index.js +2 -2
- package/dist/cjs/ui/annotations/draft/component.js +5 -5
- package/dist/cjs/ui/annotations/element/index.js +4 -4
- package/dist/cjs/ui/annotations/element/mark.js +1 -1
- package/dist/cjs/ui/annotations/hooks/use-events.js +17 -17
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +2 -2
- package/dist/cjs/ui/annotations/hover/mounter.js +2 -2
- package/dist/cjs/ui/annotations/hover/range-validator.js +2 -2
- package/dist/cjs/ui/annotations/index.js +6 -6
- package/dist/cjs/ui/annotations/selection/mounter.js +3 -3
- package/dist/cjs/ui/annotations/selection/range-validator.js +1 -1
- package/dist/cjs/ui/annotations/view/index.js +1 -1
- package/dist/cjs/utils.js +1 -0
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/actions/selection.js +1 -1
- package/dist/es2019/analytics/unsupported-content.js +1 -1
- package/dist/es2019/custom-nodes.js +1 -0
- package/dist/es2019/entry-points/actions-renderer-actions-context.js +1 -0
- package/dist/es2019/entry-points/actions-with-renderer-actions.js +1 -0
- package/dist/es2019/entry-points/annotations.js +1 -0
- package/dist/es2019/entry-points/consts.js +1 -0
- package/dist/es2019/entry-points/custom-nodes-loosely-lazy.js +1 -0
- package/dist/es2019/entry-points/events.js +1 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/cards.js +1 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/media.js +1 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/small-nodes.js +2 -1
- package/dist/es2019/entry-points/extension-renderer.js +1 -0
- package/dist/es2019/entry-points/loosely-lazy.js +1 -0
- package/dist/es2019/entry-points/messages.js +1 -0
- package/dist/es2019/entry-points/nodes.js +1 -0
- package/dist/es2019/entry-points/render-document.js +1 -0
- package/dist/es2019/entry-points/renderer-actions-context.js +1 -0
- package/dist/es2019/entry-points/renderer-context.js +1 -0
- package/dist/es2019/entry-points/renderer-default.js +1 -0
- package/dist/es2019/entry-points/renderer.js +1 -0
- package/dist/es2019/entry-points/text-serializer-text.js +1 -0
- package/dist/es2019/entry-points/text.js +1 -0
- package/dist/es2019/entry-points/use-feature-flags.js +1 -0
- package/dist/es2019/entry-points/utils.js +1 -0
- package/dist/es2019/entry-points/validation-context.js +1 -0
- package/dist/es2019/i18n/index.js +1 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/react/index.js +9 -9
- package/dist/es2019/react/marks/alignment.js +1 -0
- package/dist/es2019/react/marks/index.js +11 -12
- package/dist/es2019/react/marks/link.js +3 -3
- package/dist/es2019/react/nodes/blockCard.js +9 -9
- package/dist/es2019/react/nodes/bodiedExtension.js +4 -4
- package/dist/es2019/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +2 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockButtonContainer.js +1 -0
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -0
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +12 -7
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockDownloadButton.js +3 -3
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -2
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -1
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +2 -1
- package/dist/es2019/react/nodes/date.js +2 -2
- package/dist/es2019/react/nodes/embedCard.js +11 -10
- package/dist/es2019/react/nodes/emoji.js +5 -4
- package/dist/es2019/react/nodes/extension.js +5 -4
- package/dist/es2019/react/nodes/fallback.js +2 -2
- package/dist/es2019/react/nodes/heading-anchor.js +2 -1
- package/dist/es2019/react/nodes/heading.js +3 -3
- package/dist/es2019/react/nodes/index.js +9 -8
- package/dist/es2019/react/nodes/inlineCard.js +12 -12
- package/dist/es2019/react/nodes/loosely-lazy.js +2 -2
- package/dist/es2019/react/nodes/media/index.js +11 -10
- package/dist/es2019/react/nodes/mediaInline.js +6 -6
- package/dist/es2019/react/nodes/mediaSingle/index.js +5 -4
- package/dist/es2019/react/nodes/multiBodiedExtension.js +6 -5
- package/dist/es2019/react/nodes/panel-compiled.js +1 -1
- package/dist/es2019/react/nodes/panel-emotion.js +1 -1
- package/dist/es2019/react/nodes/status.js +1 -1
- package/dist/es2019/react/nodes/table/colgroup.js +2 -3
- package/dist/es2019/react/nodes/table/sticky.js +2 -1
- package/dist/es2019/react/nodes/table/table.js +2 -2
- package/dist/es2019/react/nodes/table.js +12 -11
- package/dist/es2019/react/nodes/tableCell.js +7 -7
- package/dist/es2019/react/nodes/tableRow.js +2 -2
- package/dist/es2019/react/nodes/taskItem.js +2 -2
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +2 -2
- package/dist/es2019/react/utils/getStandaloneBackgroundColorMarks.js +1 -0
- package/dist/es2019/react/utils/use-select-all-trap.js +1 -1
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/steps/index.js +2 -1
- package/dist/es2019/text/nodes/status.js +1 -1
- package/dist/es2019/ui/Expand.js +7 -5
- package/dist/es2019/ui/ExtensionRenderer.js +5 -2
- package/dist/es2019/ui/MediaCard.js +4 -4
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/es2019/ui/Renderer/PortalContext.js +1 -0
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +15 -15
- package/dist/es2019/ui/Renderer/breakout-ssr.js +2 -1
- package/dist/es2019/ui/Renderer/count-nodes.js +1 -0
- package/dist/es2019/ui/Renderer/index.js +23 -24
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +7 -2
- package/dist/es2019/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
- package/dist/es2019/ui/RendererActionsContext/index.js +3 -2
- package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
- package/dist/es2019/ui/annotations/draft/component.js +6 -5
- package/dist/es2019/ui/annotations/element/index.js +4 -4
- package/dist/es2019/ui/annotations/element/mark.js +2 -1
- package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +1 -0
- package/dist/es2019/ui/annotations/hooks/use-events.js +2 -2
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +2 -2
- package/dist/es2019/ui/annotations/hover/mounter.js +2 -2
- package/dist/es2019/ui/annotations/hover/range-validator.js +2 -2
- package/dist/es2019/ui/annotations/index.js +6 -6
- package/dist/es2019/ui/annotations/selection/mounter.js +3 -3
- package/dist/es2019/ui/annotations/selection/range-validator.js +1 -1
- package/dist/es2019/ui/annotations/view/index.js +1 -1
- package/dist/es2019/utils.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/actions/selection.js +1 -1
- package/dist/esm/analytics/unsupported-content.js +1 -1
- package/dist/esm/custom-nodes.js +1 -0
- package/dist/esm/entry-points/actions-renderer-actions-context.js +1 -0
- package/dist/esm/entry-points/actions-with-renderer-actions.js +1 -0
- package/dist/esm/entry-points/annotations.js +1 -0
- package/dist/esm/entry-points/consts.js +1 -0
- package/dist/esm/entry-points/custom-nodes-loosely-lazy.js +1 -0
- package/dist/esm/entry-points/events.js +1 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/cards.js +1 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/media.js +1 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/small-nodes.js +2 -1
- package/dist/esm/entry-points/extension-renderer.js +1 -0
- package/dist/esm/entry-points/loosely-lazy.js +1 -0
- package/dist/esm/entry-points/messages.js +1 -0
- package/dist/esm/entry-points/nodes.js +1 -0
- package/dist/esm/entry-points/render-document.js +1 -0
- package/dist/esm/entry-points/renderer-actions-context.js +1 -0
- package/dist/esm/entry-points/renderer-context.js +1 -0
- package/dist/esm/entry-points/renderer-default.js +1 -0
- package/dist/esm/entry-points/renderer.js +1 -0
- package/dist/esm/entry-points/text-serializer-text.js +1 -0
- package/dist/esm/entry-points/text.js +1 -0
- package/dist/esm/entry-points/use-feature-flags.js +1 -0
- package/dist/esm/entry-points/utils.js +1 -0
- package/dist/esm/entry-points/validation-context.js +1 -0
- package/dist/esm/i18n/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/react/index.js +9 -9
- package/dist/esm/react/marks/alignment.js +1 -0
- package/dist/esm/react/marks/index.js +11 -12
- package/dist/esm/react/marks/link.js +3 -3
- package/dist/esm/react/nodes/blockCard.js +9 -9
- package/dist/esm/react/nodes/bodiedExtension.js +4 -4
- package/dist/esm/react/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +2 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockButtonContainer.js +1 -0
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +1 -0
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +12 -7
- package/dist/esm/react/nodes/codeBlock/components/codeBlockDownloadButton.js +3 -3
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -2
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +3 -1
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +2 -1
- package/dist/esm/react/nodes/date.js +2 -2
- package/dist/esm/react/nodes/embedCard.js +11 -10
- package/dist/esm/react/nodes/emoji.js +5 -4
- package/dist/esm/react/nodes/extension.js +5 -4
- package/dist/esm/react/nodes/fallback.js +2 -2
- package/dist/esm/react/nodes/heading-anchor.js +2 -1
- package/dist/esm/react/nodes/heading.js +3 -3
- package/dist/esm/react/nodes/index.js +9 -8
- package/dist/esm/react/nodes/inlineCard.js +12 -12
- package/dist/esm/react/nodes/loosely-lazy.js +2 -2
- package/dist/esm/react/nodes/media/index.js +11 -10
- package/dist/esm/react/nodes/mediaInline.js +6 -6
- package/dist/esm/react/nodes/mediaSingle/index.js +5 -4
- package/dist/esm/react/nodes/multiBodiedExtension.js +6 -5
- package/dist/esm/react/nodes/panel-compiled.js +1 -1
- package/dist/esm/react/nodes/panel-emotion.js +1 -1
- package/dist/esm/react/nodes/status.js +1 -1
- package/dist/esm/react/nodes/table/colgroup.js +2 -3
- package/dist/esm/react/nodes/table/sticky.js +2 -1
- package/dist/esm/react/nodes/table/table.js +2 -2
- package/dist/esm/react/nodes/table.js +12 -11
- package/dist/esm/react/nodes/tableCell.js +7 -7
- package/dist/esm/react/nodes/tableRow.js +2 -2
- package/dist/esm/react/nodes/taskItem.js +2 -2
- package/dist/esm/react/utils/EditorMediaClientProvider.js +2 -2
- package/dist/esm/react/utils/getStandaloneBackgroundColorMarks.js +1 -0
- package/dist/esm/react/utils/use-select-all-trap.js +1 -1
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/steps/index.js +2 -1
- package/dist/esm/text/nodes/status.js +1 -1
- package/dist/esm/ui/Expand.js +7 -5
- package/dist/esm/ui/ExtensionRenderer.js +5 -2
- package/dist/esm/ui/MediaCard.js +4 -4
- package/dist/esm/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/esm/ui/Renderer/PortalContext.js +1 -0
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +15 -15
- package/dist/esm/ui/Renderer/breakout-ssr.js +2 -1
- package/dist/esm/ui/Renderer/count-nodes.js +1 -0
- package/dist/esm/ui/Renderer/index.js +23 -24
- package/dist/esm/ui/Renderer/truncated-wrapper.js +7 -2
- package/dist/esm/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
- package/dist/esm/ui/RendererActionsContext/index.js +3 -2
- package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
- package/dist/esm/ui/annotations/draft/component.js +6 -5
- package/dist/esm/ui/annotations/element/index.js +4 -4
- package/dist/esm/ui/annotations/element/mark.js +2 -1
- package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +1 -0
- package/dist/esm/ui/annotations/hooks/use-events.js +2 -2
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +2 -2
- package/dist/esm/ui/annotations/hover/mounter.js +2 -2
- package/dist/esm/ui/annotations/hover/range-validator.js +2 -2
- package/dist/esm/ui/annotations/index.js +6 -6
- package/dist/esm/ui/annotations/selection/mounter.js +3 -3
- package/dist/esm/ui/annotations/selection/range-validator.js +1 -1
- package/dist/esm/ui/annotations/view/index.js +1 -1
- package/dist/esm/utils.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +1 -1
- package/dist/types/react/index.d.ts +4 -4
- package/dist/types/react/marks/annotation.d.ts +1 -1
- package/dist/types/react/marks/index.d.ts +7 -7
- package/dist/types/react/nodes/blockCard.d.ts +2 -2
- package/dist/types/react/nodes/bodiedExtension.d.ts +4 -4
- package/dist/types/react/nodes/codeBlock/components/codeBlockButtonContainer.d.ts +1 -1
- package/dist/types/react/nodes/codeBlock/components/codeBlockContainer.d.ts +1 -1
- package/dist/types/react/nodes/codeBlock/components/codeBlockCopyButton.d.ts +4 -0
- package/dist/types/react/nodes/codeBlock/components/codeBlockWrapButton.d.ts +4 -0
- package/dist/types/react/nodes/embedCard.d.ts +3 -3
- package/dist/types/react/nodes/emoji.d.ts +5 -1
- package/dist/types/react/nodes/extension.d.ts +3 -3
- package/dist/types/react/nodes/extensionFrame.d.ts +3 -3
- package/dist/types/react/nodes/heading.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +27 -27
- package/dist/types/react/nodes/inlineCard.d.ts +4 -4
- package/dist/types/react/nodes/inlineExtension.d.ts +2 -2
- package/dist/types/react/nodes/media/index.d.ts +6 -6
- package/dist/types/react/nodes/mediaGroup.d.ts +2 -2
- package/dist/types/react/nodes/mediaInline.d.ts +4 -4
- package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +4 -4
- package/dist/types/react/nodes/table/sticky.d.ts +2 -2
- package/dist/types/react/nodes/table/types.d.ts +1 -1
- package/dist/types/react/nodes/table.d.ts +2 -2
- package/dist/types/react/nodes/text-wrapper.d.ts +1 -1
- package/dist/types/react/types.d.ts +2 -2
- package/dist/types/react/utils/markBlockAsInline.d.ts +1 -1
- package/dist/types/react/utils/render-text-segments.d.ts +1 -1
- package/dist/types/types/mediaOptions.d.ts +1 -1
- package/dist/types/ui/Expand.d.ts +5 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +2 -2
- package/dist/types/ui/MediaCard.d.ts +8 -8
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +1 -1
- package/dist/types/ui/annotations/context.d.ts +1 -1
- package/dist/types/ui/annotations/draft/component.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +1 -1
- package/dist/types/ui/annotations/hover/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/hover/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/selection/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/selection/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/types.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +1 -1
- package/dist/types/utils.d.ts +3 -3
- package/package.json +8 -5
package/dist/es2019/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { default as TextSerializer } from './text';
|
|
|
10
10
|
* This export will be removed in January 2027.
|
|
11
11
|
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
12
12
|
*/
|
|
13
|
+
|
|
13
14
|
export { default as ReactRenderer } from './ui/Renderer';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
-
import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
|
|
7
|
-
import { Doc, DocWithSelectAllTrap, isTextNode, isTextWrapper, mergeTextNodes, toReact } from './nodes';
|
|
8
|
-
import TextWrapperComponent from './nodes/text-wrapper';
|
|
9
|
-
import { isNestedHeaderLinksEnabled } from './utils/links';
|
|
10
4
|
import { getColumnWidths } from '@atlaskit/editor-common/utils';
|
|
11
5
|
import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
|
|
6
|
+
import { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
12
7
|
import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
13
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
|
+
import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
|
|
15
12
|
import { getText } from '../utils';
|
|
16
13
|
import { isAnnotationMark, toReact as markToReact } from './marks';
|
|
17
14
|
import { isCodeMark } from './marks/code';
|
|
15
|
+
import { Doc, DocWithSelectAllTrap, isTextNode, isTextWrapper, mergeTextNodes, toReact } from './nodes';
|
|
16
|
+
import TextWrapperComponent from './nodes/text-wrapper';
|
|
18
17
|
import { getNestedUnderNodes, insideBlockNode, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
19
|
-
import { renderTextSegments } from './utils/render-text-segments';
|
|
20
|
-
import { segmentText } from './utils/segment-text';
|
|
21
|
-
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
22
18
|
import { createContentGetter } from './utils/content-getter';
|
|
19
|
+
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
20
|
+
import { isNestedHeaderLinksEnabled } from './utils/links';
|
|
23
21
|
import { markBlockAsInline } from './utils/markBlockAsInline';
|
|
22
|
+
import { renderTextSegments } from './utils/render-text-segments';
|
|
23
|
+
import { segmentText } from './utils/segment-text';
|
|
24
24
|
function mergeMarks(marksAndNodes) {
|
|
25
25
|
return marksAndNodes.reduce((acc, markOrNode) => {
|
|
26
26
|
const prev = acc.length && acc[acc.length - 1] || null;
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
+
|
|
7
8
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
8
9
|
import { jsx } from '@emotion/react';
|
|
9
10
|
import { alignmentPositionMap } from '@atlaskit/adf-schema/alignment';
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
2
|
// Mapping file
|
|
3
3
|
|
|
4
|
+
import Alignment from './alignment';
|
|
5
|
+
import Annotation, { isAnnotationMark } from './annotation';
|
|
6
|
+
import BackgroundColor from './backgroundColor';
|
|
7
|
+
import Border from './border';
|
|
8
|
+
import Breakout from './breakout';
|
|
4
9
|
import Code from './code';
|
|
10
|
+
// Stage0
|
|
11
|
+
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
12
|
+
import DataConsumer from './data-consumer';
|
|
5
13
|
import Em from './em';
|
|
14
|
+
import FontSize from './fontSize';
|
|
15
|
+
import FragmentMark from './fragment';
|
|
16
|
+
import Indentation from './indentation';
|
|
6
17
|
import Link from './link';
|
|
7
18
|
import Strike from './strike';
|
|
8
19
|
import Strong from './strong';
|
|
9
20
|
import Subsup from './subsup';
|
|
10
21
|
import TextColor from './textColor';
|
|
11
|
-
import BackgroundColor from './backgroundColor';
|
|
12
22
|
import Underline from './underline';
|
|
13
|
-
import Breakout from './breakout';
|
|
14
|
-
import Alignment from './alignment';
|
|
15
|
-
import Indentation from './indentation';
|
|
16
23
|
import UnsupportedMark from './unsupportedMark';
|
|
17
24
|
import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
18
|
-
import DataConsumer from './data-consumer';
|
|
19
|
-
import FragmentMark from './fragment';
|
|
20
|
-
import Annotation, { isAnnotationMark } from './annotation';
|
|
21
|
-
import Border from './border';
|
|
22
|
-
import FontSize from './fontSize';
|
|
23
|
-
|
|
24
|
-
// Stage0
|
|
25
|
-
import ConfluenceInlineComment from './confluence-inline-comment';
|
|
26
25
|
export const markToReact = {
|
|
27
26
|
code: Code,
|
|
28
27
|
em: Em,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
5
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
6
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
5
|
-
import { getEventHandler } from '../../utils';
|
|
6
7
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
7
|
-
import {
|
|
8
|
-
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
8
|
+
import { getEventHandler } from '../../utils';
|
|
9
9
|
import { LinkUrlCompiled } from './link-compiled';
|
|
10
10
|
import { LinkUrlEmotion } from './link-emotion';
|
|
11
11
|
const LinkUrlMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LinkUrlCompiled, LinkUrlEmotion);
|
|
@@ -5,20 +5,20 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
*/
|
|
6
6
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
|
-
import
|
|
8
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
9
9
|
import { UnsupportedBlock, UnsupportedInline, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
10
|
-
import {
|
|
10
|
+
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
12
|
-
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
13
|
-
import { getEventHandler } from '../../utils';
|
|
14
|
-
import InlineCard from './inlineCard';
|
|
15
|
-
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
16
12
|
import { DatasourceTableViewWithWrappers as DatasourceTableView } from '@atlaskit/link-datasource/datasource-table-view-with-wrappers';
|
|
17
|
-
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
18
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
14
|
+
import { Card } from '@atlaskit/smart-card';
|
|
15
|
+
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
21
16
|
import { RendererCssClassName } from '../../consts';
|
|
17
|
+
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
18
|
+
import { getEventHandler } from '../../utils';
|
|
19
|
+
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
20
|
+
import { CardErrorBoundary } from './fallback';
|
|
21
|
+
import InlineCard from './inlineCard';
|
|
22
22
|
const datasourceCenterWrapperStyles = css({
|
|
23
23
|
marginTop: "var(--ds-space-150, 12px)",
|
|
24
24
|
marginBottom: "var(--ds-space-150, 12px)"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
4
|
-
import { renderExtension } from './extension';
|
|
5
|
-
import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
6
|
-
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
7
|
-
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
8
4
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
9
6
|
import { AnnotationsPositionContext } from '../../ui/annotations';
|
|
7
|
+
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
8
|
+
import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
10
9
|
import { ValidationContextProvider } from '../../ui/Renderer/ValidationContext';
|
|
10
|
+
import { renderExtension } from './extension';
|
|
11
11
|
const BodiedExtension = props => {
|
|
12
12
|
const {
|
|
13
13
|
children,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
3
3
|
export default function BodiedSyncBlock(props) {
|
|
4
4
|
const {
|
|
5
5
|
children,
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { useState } from 'react';
|
|
6
|
+
|
|
6
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
8
|
import { jsx } from '@emotion/react';
|
|
8
9
|
import { injectIntl } from 'react-intl';
|
|
9
|
-
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
10
10
|
import AkCodeBlock from '@atlaskit/code/code-block';
|
|
11
|
+
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
13
|
import CodeBlockContainer from './components/codeBlockContainer';
|
|
13
14
|
function CodeBlock(props) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
6
7
|
import { jsx, css } from '@emotion/react';
|
|
7
8
|
import CopyButton from './codeBlockCopyButton';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
6
7
|
import { jsx, css } from '@emotion/react';
|
|
7
8
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { injectIntl } from 'react-intl';
|
|
5
11
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
6
12
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
7
13
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
14
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
16
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx } from '@emotion/react';
|
|
11
|
-
import { useState } from 'react';
|
|
12
|
-
import { injectIntl } from 'react-intl';
|
|
13
17
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
14
18
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
15
19
|
import { copyTextToClipboard } from '../../../utils/clipboard';
|
|
@@ -17,10 +21,11 @@ const CopyButton = ({
|
|
|
17
21
|
content,
|
|
18
22
|
intl
|
|
19
23
|
}) => {
|
|
20
|
-
const
|
|
24
|
+
const copyCodeToClipboardMessage = isExperimentEnabled('platform_editor_a11y_codeblock_copy_name') ? codeBlockButtonMessages.copyCodeSnippetToClipboard : codeBlockButtonMessages.copyCodeToClipboard;
|
|
25
|
+
const [tooltip, setTooltip] = useState(intl.formatMessage(copyCodeToClipboardMessage));
|
|
21
26
|
const [className, setClassName] = useState('copy-to-clipboard');
|
|
22
27
|
const onMouseLeave = () => {
|
|
23
|
-
setTooltip(intl.formatMessage(
|
|
28
|
+
setTooltip(intl.formatMessage(copyCodeToClipboardMessage));
|
|
24
29
|
setClassName('copy-to-clipboard');
|
|
25
30
|
};
|
|
26
31
|
return jsx(AnalyticsContext.Consumer, null, ({
|
|
@@ -34,7 +39,7 @@ const CopyButton = ({
|
|
|
34
39
|
onBlur: onMouseLeave
|
|
35
40
|
}, jsx(Button, {
|
|
36
41
|
appearance: "subtle",
|
|
37
|
-
"aria-haspopup": true,
|
|
42
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
38
43
|
"aria-label": tooltip
|
|
39
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
45
|
,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { injectIntl } from 'react-intl';
|
|
7
|
-
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
7
|
import { jsx } from '@emotion/react';
|
|
8
|
+
import { injectIntl } from 'react-intl';
|
|
10
9
|
import IconButton from '@atlaskit/button/icon/button';
|
|
11
|
-
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
10
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
12
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
13
13
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
14
14
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
15
15
|
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
7
|
import { jsx } from '@emotion/react';
|
|
7
8
|
import { injectIntl } from 'react-intl';
|
|
8
|
-
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
9
9
|
import Button from '@atlaskit/button/custom-theme-button/custom-theme-button';
|
|
10
10
|
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
+
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
13
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
14
|
import AnalyticsContext from '../../../../analytics/analyticsContext';
|
|
13
15
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../../../analytics/enums';
|
|
@@ -25,7 +27,7 @@ const CodeBlockWrapButton = ({
|
|
|
25
27
|
position: "top"
|
|
26
28
|
}, jsx(Button, {
|
|
27
29
|
appearance: "subtle",
|
|
28
|
-
"aria-haspopup": true,
|
|
30
|
+
"aria-haspopup": fg('platform_editor_a11y_codeblock_haspopup') ? undefined : true,
|
|
29
31
|
"aria-label": wrapMessage
|
|
30
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
31
33
|
,
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
* @jsxRuntime classic
|
|
6
6
|
* @jsx jsx
|
|
7
7
|
*/
|
|
8
|
+
|
|
8
9
|
import React, { forwardRef, useMemo } from 'react';
|
|
10
|
+
|
|
9
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
12
|
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
12
13
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
14
|
+
import { akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
13
15
|
import { RendererCssClassName } from '../../../../consts';
|
|
14
16
|
const codeBlockSharedStyles = css({
|
|
15
17
|
[`.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { Fragment, lazy, memo, Suspense, useState } from 'react';
|
|
6
|
+
|
|
6
7
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
7
8
|
import { jsx } from '@emotion/react';
|
|
8
9
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { useInViewport } from '../../hooks/use-in-viewport';
|
|
11
|
-
import LightWeightCodeBlock from './components/lightWeightCodeBlock';
|
|
12
12
|
import CodeBlockContainer from './components/codeBlockContainer';
|
|
13
|
+
import LightWeightCodeBlock from './components/lightWeightCodeBlock';
|
|
13
14
|
const LazyAkCodeBlock = /*#__PURE__*/lazy(
|
|
14
15
|
// Ignored via go/ees005
|
|
15
16
|
// eslint-disable-next-line require-await
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
|
+
import { injectIntl } from 'react-intl';
|
|
3
4
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
5
|
import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
|
|
5
|
-
import { injectIntl } from 'react-intl';
|
|
6
6
|
import { useRendererContext } from '../../renderer-context';
|
|
7
|
-
import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext/TaskItemsFormatContext';
|
|
8
7
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
8
|
+
import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext/TaskItemsFormatContext';
|
|
9
9
|
const Date = /*#__PURE__*/memo(function Date(props) {
|
|
10
10
|
const inlineAnnotationProps = useInlineAnnotationProps(props);
|
|
11
11
|
const {
|
|
@@ -3,27 +3,28 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
import { useContext, useState, useRef } from 'react';
|
|
6
8
|
/* eslint-disable jsdoc/check-tag-names */
|
|
7
9
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
8
10
|
import { jsx, css } from '@emotion/react';
|
|
9
|
-
import
|
|
10
|
-
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
11
|
-
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
12
|
-
import { SmartCardContext } from '@atlaskit/link-provider/context';
|
|
11
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
13
12
|
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthContext } from '@atlaskit/editor-common/ui';
|
|
14
13
|
import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
15
|
-
import {
|
|
14
|
+
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
15
|
+
import { SmartCardContext } from '@atlaskit/link-provider/context';
|
|
16
16
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
|
+
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
19
|
+
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
17
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
|
-
import { CardErrorBoundary } from './fallback';
|
|
19
|
-
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
20
21
|
import { RendererCssClassName } from '../../consts';
|
|
22
|
+
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
21
23
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
22
|
-
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
23
24
|
import { getEventHandler } from '../../utils';
|
|
24
|
-
import
|
|
25
|
-
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
25
|
+
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
26
26
|
import BlockCard from './blockCard';
|
|
27
|
+
import { CardErrorBoundary } from './fallback';
|
|
27
28
|
const embedCardWrapperStyles = css({
|
|
28
29
|
width: '100%',
|
|
29
30
|
height: '100%',
|
|
@@ -3,16 +3,17 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
import { PureComponent, memo } from 'react';
|
|
6
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { jsx } from '@emotion/react';
|
|
8
|
-
import { PureComponent, memo } from 'react';
|
|
9
10
|
import { messages } from '@atlaskit/editor-common/emoji';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
|
-
import { ResourcedEmoji } from '@atlaskit/emoji/element';
|
|
12
11
|
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
13
12
|
import { isSingleEmoji } from '@atlaskit/editor-common/utils/isSingleEmoji';
|
|
13
|
+
import { ResourcedEmoji } from '@atlaskit/emoji/element';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
15
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
15
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
16
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components -- class kept for WithProviders compatibility
|
|
16
17
|
class EmojiNode extends PureComponent {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
@@ -4,18 +4,19 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import React, { useEffect, useRef } from 'react';
|
|
8
|
+
|
|
7
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
10
|
import { jsx, css } from '@emotion/react';
|
|
9
|
-
import React, { useEffect, useRef } from 'react';
|
|
10
11
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
|
-
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
12
12
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { RendererCssClassName } from '../../consts';
|
|
15
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
+
import { RendererCssClassName } from '../../consts';
|
|
18
|
+
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
17
19
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
20
|
const FORGE_EXTENSION_TYPE = 'com.atlassian.ecosystem';
|
|
20
21
|
/**
|
|
21
22
|
* Mirrors `FORGE_INLINE_BODIED_PARAM` in `@atlassian/xen-editor-provider`. Duplicated rather than
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
3
|
-
import Link from '@atlaskit/link/link';
|
|
4
4
|
import { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from '@atlaskit/link-datasource/analytics/render-failed';
|
|
5
|
-
import
|
|
5
|
+
import Link from '@atlaskit/link/link';
|
|
6
6
|
import { InlineCard } from './';
|
|
7
7
|
// Ignored via go/ees005
|
|
8
8
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -6,13 +6,14 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
|
|
9
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
import { css, jsx } from '@emotion/react';
|
|
11
12
|
import { injectIntl } from 'react-intl';
|
|
12
13
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
13
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
|
-
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
16
17
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
17
18
|
export const HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
18
19
|
const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -4,16 +4,16 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import IconButton from '@atlaskit/button/icon/button';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
8
|
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles/constants';
|
|
8
9
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
9
10
|
import { abortAll } from '@atlaskit/react-ufo/interaction-metrics';
|
|
10
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
|
-
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
12
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
|
+
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
13
13
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
14
|
-
import { copyTextToClipboard } from '../utils/clipboard';
|
|
15
14
|
import { collapsibleHeadingMessages } from '../../messages';
|
|
16
15
|
import { useCollapsibleHeading } from '../../ui/collapsible-headings';
|
|
16
|
+
import { copyTextToClipboard } from '../utils/clipboard';
|
|
17
17
|
import HeadingAnchor from './heading-anchor';
|
|
18
18
|
const RENDERER_HEADING_WRAPPER = 'renderer-heading-wrapper';
|
|
19
19
|
const RENDERER_COLLAPSIBLE_HEADING_WRAPPER = 'renderer-collapsible-heading-wrapper';
|
|
@@ -5,18 +5,22 @@ import Loadable from 'react-loadable';
|
|
|
5
5
|
import { UnsupportedBlock, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import Blockquote from './blockquote';
|
|
7
7
|
import BodiedExtension from './bodiedExtension';
|
|
8
|
-
import MultiBodiedExtension from './multiBodiedExtension';
|
|
9
|
-
import ExtensionFrame from './extensionFrame';
|
|
10
8
|
import BulletList from './bulletList';
|
|
9
|
+
import Caption from './caption';
|
|
10
|
+
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
13
|
+
|
|
11
14
|
import Doc, { DocWithSelectAllTrap } from './doc';
|
|
12
15
|
import Extension from './extension';
|
|
16
|
+
import ExtensionFrame from './extensionFrame';
|
|
13
17
|
import HardBreak from './hardBreak';
|
|
14
18
|
import Heading from './heading';
|
|
15
19
|
import InlineExtension from './inlineExtension';
|
|
16
|
-
import LayoutSection from './layoutSection';
|
|
17
20
|
import LayoutColumn from './layoutColumn';
|
|
21
|
+
import LayoutSection from './layoutSection';
|
|
18
22
|
import ListItem from './listItem';
|
|
19
|
-
import
|
|
23
|
+
import MultiBodiedExtension from './multiBodiedExtension';
|
|
20
24
|
import OrderedList from './orderedList';
|
|
21
25
|
import Paragraph from './paragraph';
|
|
22
26
|
import Placeholder from './placeholder';
|
|
@@ -25,10 +29,6 @@ import Table from './table';
|
|
|
25
29
|
import { TableCell, TableHeader } from './tableCell';
|
|
26
30
|
import TableRow from './tableRow';
|
|
27
31
|
import UnknownBlock from './unknownBlock';
|
|
28
|
-
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
31
|
-
|
|
32
32
|
const WindowedCodeBlock = Loadable({
|
|
33
33
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_renderer-node_WindowedCodeBlock" */
|
|
34
34
|
'./codeBlock/windowedCodeBlock').then(mod => mod.default),
|
|
@@ -248,6 +248,7 @@ export const toReact = (node, flags, nodeComponents
|
|
|
248
248
|
* }
|
|
249
249
|
* ]
|
|
250
250
|
*/
|
|
251
|
+
|
|
251
252
|
export const mergeTextNodes = nodes => {
|
|
252
253
|
return nodes.reduce((acc, current) => {
|
|
253
254
|
if (!isText(current.type.name)) {
|
|
@@ -7,25 +7,25 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
import { Fragment, useState, useMemo, useEffect } from 'react';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import { useProvider } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
+
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
14
|
+
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
15
|
+
import { extractSmartLinkEmbed } from '@atlaskit/link-extractors/extract-smart-link-embed';
|
|
10
16
|
import { useSmartCardContext } from '@atlaskit/link-provider/use-smart-card-context';
|
|
11
|
-
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
12
17
|
import { isWithinPreviewPanelIFrame } from '@atlaskit/linking-common/utils/is-within-preview-panel-iframe';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
|
+
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
13
20
|
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
14
21
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
15
|
-
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
|
-
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
18
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
20
|
-
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
21
|
-
import { useProvider } from '@atlaskit/editor-common/provider-factory';
|
|
22
|
-
import { CardErrorBoundary } from './fallback';
|
|
23
|
-
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
24
|
-
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
25
|
-
import { getEventHandler } from '../../utils';
|
|
26
23
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
27
24
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
28
|
-
import {
|
|
25
|
+
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
26
|
+
import { getEventHandler } from '../../utils';
|
|
27
|
+
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
28
|
+
import { CardErrorBoundary } from './fallback';
|
|
29
29
|
const HoverLinkOverlayNoop = props => jsx(Fragment, null, props.children);
|
|
30
30
|
const OverlayWithCardContext = ({
|
|
31
31
|
rendererAppearance,
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
5
5
|
import { lazyForPaint } from 'react-loosely-lazy';
|
|
6
|
-
import Table from './table';
|
|
7
|
-
import TableRow from './tableRow';
|
|
8
6
|
|
|
9
7
|
// Ignored via go/ees005
|
|
10
8
|
// eslint-disable-next-line import/no-named-as-default
|
|
11
9
|
|
|
10
|
+
import Table from './table';
|
|
11
|
+
import TableRow from './tableRow';
|
|
12
12
|
const CodeBlock = lazyForPaint(() => import( /* webpackChunkName: "@atlaskit-internal_renderer-node_CodeBlock" */
|
|
13
13
|
'./codeBlock/codeBlock').then(mod => mod.default));
|
|
14
14
|
const TaskList = lazyForPaint(() => import( /* webpackChunkName: "@atlaskit-internal_renderer-node_TaskList" */
|