@atlaskit/renderer 137.2.7 → 137.4.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 +83 -0
- package/default/package.json +10 -0
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/cards.js +7 -0
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/media.js +7 -0
- package/dist/cjs/entry-points/experimental-sync-custom-nodes/small-nodes.js +7 -0
- package/dist/cjs/entry-points/nodes-default.js +12 -0
- package/dist/cjs/entry-points/renderer-default.js +44 -0
- package/dist/cjs/react/nodes/extension.js +2 -2
- package/dist/cjs/react/nodes/mediaInline.js +12 -3
- package/dist/cjs/react/nodes/nodes.js +104 -0
- package/dist/cjs/ui/MediaCard.js +8 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +4 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/custom-nodes.js +6 -0
- package/dist/es2019/entry-points/custom-nodes-loosely-lazy.js +7 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/cards.js +7 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/media.js +7 -0
- package/dist/es2019/entry-points/experimental-sync-custom-nodes/small-nodes.js +7 -0
- package/dist/es2019/entry-points/loosely-lazy.js +7 -0
- package/dist/es2019/entry-points/nodes-default.js +3 -0
- package/dist/es2019/entry-points/nodes.js +14 -1
- package/dist/es2019/entry-points/renderer-default.js +23 -0
- package/dist/es2019/entry-points/renderer.js +48 -1
- package/dist/es2019/index.js +21 -1
- package/dist/es2019/react/nodes/extension.js +2 -2
- package/dist/es2019/react/nodes/mediaInline.js +11 -4
- package/dist/es2019/react/nodes/nodes.js +97 -0
- package/dist/es2019/ui/MediaCard.js +6 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +9 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/custom-nodes.js +6 -0
- package/dist/esm/entry-points/custom-nodes-loosely-lazy.js +7 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/cards.js +7 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/media.js +7 -0
- package/dist/esm/entry-points/experimental-sync-custom-nodes/small-nodes.js +7 -0
- package/dist/esm/entry-points/loosely-lazy.js +7 -0
- package/dist/esm/entry-points/nodes-default.js +3 -0
- package/dist/esm/entry-points/nodes.js +14 -1
- package/dist/esm/entry-points/renderer-default.js +25 -0
- package/dist/esm/entry-points/renderer.js +48 -1
- package/dist/esm/index.js +21 -1
- package/dist/esm/react/nodes/extension.js +2 -2
- package/dist/esm/react/nodes/mediaInline.js +13 -4
- package/dist/esm/react/nodes/nodes.js +97 -0
- package/dist/esm/ui/MediaCard.js +8 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +4 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/custom-nodes.d.ts +5 -0
- package/dist/types/entry-points/custom-nodes-loosely-lazy.d.ts +5 -0
- package/dist/types/entry-points/experimental-sync-custom-nodes/cards.d.ts +5 -0
- package/dist/types/entry-points/experimental-sync-custom-nodes/media.d.ts +5 -0
- package/dist/types/entry-points/experimental-sync-custom-nodes/small-nodes.d.ts +5 -0
- package/dist/types/entry-points/loosely-lazy.d.ts +5 -0
- package/dist/types/entry-points/nodes-default.d.ts +2 -0
- package/dist/types/entry-points/nodes.d.ts +10 -0
- package/dist/types/entry-points/renderer-default.d.ts +6 -0
- package/dist/types/entry-points/renderer.d.ts +40 -1
- package/dist/types/index.d.ts +17 -1
- package/dist/types/react/nodes/nodes.d.ts +7 -0
- package/dist/types/types/mediaOptions.d.ts +8 -0
- package/nodes/default/package.json +10 -0
- package/package.json +8 -8
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `DEGRADED_SEVERITY_THRESHOLD` from `@atlaskit/renderer/default` instead.
|
|
6
|
+
* This export will be removed in January 2027.
|
|
7
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
8
|
+
*/
|
|
9
|
+
export { DEGRADED_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `NORMAL_SEVERITY_THRESHOLD` from `@atlaskit/renderer/default` instead.
|
|
13
|
+
* This export will be removed in January 2027.
|
|
14
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
15
|
+
*/
|
|
16
|
+
export { NORMAL_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
20
|
+
* This export will be removed in January 2027.
|
|
21
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
22
|
+
*/
|
|
23
|
+
export { Renderer } from '../ui/Renderer/index';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `RendererFunctionalComponent` from `@atlaskit/renderer/default` instead.
|
|
27
|
+
* This export will be removed in January 2027.
|
|
28
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
29
|
+
*/
|
|
30
|
+
export { RendererFunctionalComponent } from '../ui/Renderer/index';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `RendererWithAnalytics` from `@atlaskit/renderer/default` instead.
|
|
34
|
+
* This export will be removed in January 2027.
|
|
35
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
36
|
+
*/
|
|
37
|
+
export { RendererWithAnalytics } from '../ui/Renderer/index';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `RendererWrapperProps` from `@atlaskit/renderer/default` instead.
|
|
41
|
+
* This export will be removed in January 2027.
|
|
42
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
47
|
+
* This export will be removed in January 2027.
|
|
48
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
49
|
+
*/
|
|
3
50
|
export { default } from '../ui/Renderer/index';
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
4
5
|
export { default as ReactSerializer } from './react';
|
|
5
6
|
export { default as TextSerializer } from './text';
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
10
|
+
* This export will be removed in January 2027.
|
|
11
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
12
|
+
*/
|
|
13
|
+
export { default as ReactRenderer } from './ui/Renderer';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `RendererWithAnalytics` from `@atlaskit/renderer/default` instead.
|
|
17
|
+
* This export will be removed in January 2027.
|
|
18
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
19
|
+
*/
|
|
20
|
+
export { RendererWithAnalytics } from './ui/Renderer';
|
|
7
21
|
export { InlineNodeRendererWrapper } from './ui/ExtensionRenderer';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
25
|
+
* This export will be removed in January 2027.
|
|
26
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
27
|
+
*/
|
|
8
28
|
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
9
29
|
export { AnnotationsWrapper } from './ui/annotations';
|
|
10
30
|
export { ValidationContextProvider } from './ui/Renderer/ValidationContext';
|
|
@@ -150,7 +150,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
150
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
151
151
|
,
|
|
152
152
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
153
|
-
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
153
|
+
css: [!(isInsideOfTable && !isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
154
154
|
}, asInlineAnalytics, content));
|
|
155
155
|
return centerAlignClass ? jsx("div", {
|
|
156
156
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -182,7 +182,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
182
182
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
183
183
|
,
|
|
184
184
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
185
|
-
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
185
|
+
css: [!(isInsideOfTable && !isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
186
186
|
}, asInlineAnalytics, content));
|
|
187
187
|
return centerAlignClass ? jsx("div", {
|
|
188
188
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -5,7 +5,7 @@ import { MediaInlineCard } from '@atlaskit/media-card';
|
|
|
5
5
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
6
6
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
7
7
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
8
|
-
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
8
|
+
import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react';
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -18,12 +18,17 @@ const RenderMediaInline = ({
|
|
|
18
18
|
collection: collectionName,
|
|
19
19
|
eventHandlers,
|
|
20
20
|
identifier,
|
|
21
|
-
fallbackMediaNameFetcher
|
|
21
|
+
fallbackMediaNameFetcher,
|
|
22
|
+
ssr
|
|
22
23
|
}) => {
|
|
23
24
|
const [contextIdentifier, setContextIdentifier] = useState();
|
|
24
25
|
const [fileState, setFileState] = useState();
|
|
25
26
|
const mediaClient = useContext(MediaClientContext);
|
|
26
27
|
const contextIdentifierProvider = useProvider('contextIdentifierProvider');
|
|
28
|
+
const ssrMediaItem = useMemo(() => {
|
|
29
|
+
var _ssr$ssrMediaItems;
|
|
30
|
+
return ssr === null || ssr === void 0 ? void 0 : (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(item => item.id === identifier.id);
|
|
31
|
+
}, [ssr === null || ssr === void 0 ? void 0 : ssr.ssrMediaItems, identifier.id]);
|
|
27
32
|
useEffect(() => {
|
|
28
33
|
if (contextIdentifierProvider) {
|
|
29
34
|
contextIdentifierProvider.then(resolvedContextID => {
|
|
@@ -110,7 +115,8 @@ const RenderMediaInline = ({
|
|
|
110
115
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
111
116
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
112
117
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
113
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
118
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
119
|
+
ssrMediaItem: ssrMediaItem
|
|
114
120
|
}))
|
|
115
121
|
);
|
|
116
122
|
};
|
|
@@ -179,7 +185,8 @@ const MediaInline = props => {
|
|
|
179
185
|
intl: intl,
|
|
180
186
|
collection: collection,
|
|
181
187
|
featureFlags: featureFlags,
|
|
182
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
188
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
189
|
+
ssr: ssr
|
|
183
190
|
});
|
|
184
191
|
};
|
|
185
192
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
+
|
|
3
|
+
import { UnsupportedBlock, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
4
|
+
import Expand from '../../ui/Expand';
|
|
5
|
+
import BlockCard from './blockCard';
|
|
6
|
+
import Blockquote from './blockquote';
|
|
7
|
+
import BodiedExtension from './bodiedExtension';
|
|
8
|
+
import BodiedSyncBlock from './bodiedSyncBlock';
|
|
9
|
+
import BulletList from './bulletList';
|
|
10
|
+
import Caption from './caption';
|
|
11
|
+
import CodeBlock from './codeBlock/codeBlock';
|
|
12
|
+
import WindowedCodeBlock from './codeBlock/windowedCodeBlock';
|
|
13
|
+
import DateNode from './date';
|
|
14
|
+
import DecisionItem from './decisionItem';
|
|
15
|
+
import DecisionList from './decisionList';
|
|
16
|
+
import Doc from './doc';
|
|
17
|
+
import EmbedCard from './embedCard';
|
|
18
|
+
import Emoji from './emoji';
|
|
19
|
+
import Extension from './extension';
|
|
20
|
+
import ExtensionFrame from './extensionFrame';
|
|
21
|
+
import HardBreak from './hardBreak';
|
|
22
|
+
import Heading from './heading';
|
|
23
|
+
import InlineCard from './inlineCard';
|
|
24
|
+
import InlineExtension from './inlineExtension';
|
|
25
|
+
import LayoutColumn from './layoutColumn';
|
|
26
|
+
import LayoutSection from './layoutSection';
|
|
27
|
+
import ListItem from './listItem';
|
|
28
|
+
import Media from './media';
|
|
29
|
+
import MediaGroup from './mediaGroup';
|
|
30
|
+
import MediaInline from './mediaInline';
|
|
31
|
+
import MediaSingle from './mediaSingle';
|
|
32
|
+
import Mention from './mention';
|
|
33
|
+
import MultiBodiedExtension from './multiBodiedExtension';
|
|
34
|
+
import OrderedList from './orderedList';
|
|
35
|
+
import Panel from './panel';
|
|
36
|
+
import Paragraph from './paragraph';
|
|
37
|
+
import Placeholder from './placeholder';
|
|
38
|
+
import Rule from './rule';
|
|
39
|
+
import Status from './status';
|
|
40
|
+
import SyncBlock from './syncBlock';
|
|
41
|
+
import Table from './table';
|
|
42
|
+
import { TableCell, TableHeader } from './tableCell';
|
|
43
|
+
import TableRow from './tableRow';
|
|
44
|
+
import TaskItem from './taskItem';
|
|
45
|
+
import TaskList from './taskList';
|
|
46
|
+
import UnknownBlock from './unknownBlock';
|
|
47
|
+
export const nodes = {
|
|
48
|
+
blockCard: BlockCard,
|
|
49
|
+
blockquote: Blockquote,
|
|
50
|
+
blockTaskItem: TaskItem,
|
|
51
|
+
bodiedExtension: BodiedExtension,
|
|
52
|
+
bodiedSyncBlock: BodiedSyncBlock,
|
|
53
|
+
bulletList: BulletList,
|
|
54
|
+
caption: Caption,
|
|
55
|
+
codeBlock: CodeBlock,
|
|
56
|
+
date: DateNode,
|
|
57
|
+
decisionItem: DecisionItem,
|
|
58
|
+
decisionList: DecisionList,
|
|
59
|
+
doc: Doc,
|
|
60
|
+
embedCard: EmbedCard,
|
|
61
|
+
emoji: Emoji,
|
|
62
|
+
expand: Expand,
|
|
63
|
+
extension: Extension,
|
|
64
|
+
extensionFrame: ExtensionFrame,
|
|
65
|
+
hardBreak: HardBreak,
|
|
66
|
+
heading: Heading,
|
|
67
|
+
inlineCard: InlineCard,
|
|
68
|
+
inlineExtension: InlineExtension,
|
|
69
|
+
layoutColumn: LayoutColumn,
|
|
70
|
+
layoutSection: LayoutSection,
|
|
71
|
+
listItem: ListItem,
|
|
72
|
+
media: Media,
|
|
73
|
+
mediaGroup: MediaGroup,
|
|
74
|
+
mediaInline: MediaInline,
|
|
75
|
+
mediaSingle: MediaSingle,
|
|
76
|
+
mention: Mention,
|
|
77
|
+
multiBodiedExtension: MultiBodiedExtension,
|
|
78
|
+
nestedExpand: Expand,
|
|
79
|
+
orderedList: OrderedList,
|
|
80
|
+
panel: Panel,
|
|
81
|
+
panel_c1: Panel,
|
|
82
|
+
paragraph: Paragraph,
|
|
83
|
+
placeholder: Placeholder,
|
|
84
|
+
rule: Rule,
|
|
85
|
+
status: Status,
|
|
86
|
+
syncBlock: SyncBlock,
|
|
87
|
+
table: Table,
|
|
88
|
+
tableCell: TableCell,
|
|
89
|
+
tableHeader: TableHeader,
|
|
90
|
+
tableRow: TableRow,
|
|
91
|
+
taskItem: TaskItem,
|
|
92
|
+
taskList: TaskList,
|
|
93
|
+
unknownBlock: UnknownBlock,
|
|
94
|
+
unsupportedBlock: UnsupportedBlock,
|
|
95
|
+
unsupportedInline: UnsupportedInline,
|
|
96
|
+
windowedCodeBlock: WindowedCodeBlock
|
|
97
|
+
};
|
|
@@ -223,6 +223,7 @@ export class MediaCardView extends Component {
|
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
render() {
|
|
226
|
+
var _ssr$ssrMediaItems;
|
|
226
227
|
const {
|
|
227
228
|
contextIdentifierProvider,
|
|
228
229
|
fileState
|
|
@@ -282,6 +283,7 @@ export class MediaCardView extends Component {
|
|
|
282
283
|
// More robust solution will be implemented as part of CCPDF-233 - Link: https://hello.jira.atlassian.cloud/browse/CCPDF-233
|
|
283
284
|
const currentUrl = window.location.href;
|
|
284
285
|
const shouldDisableLazyLoading = expValEquals('platform_editor_disable_lazy_load_media', 'isEnabled', true) && currentUrl.includes('/wiki/pdf/spaces/');
|
|
286
|
+
const ssrMediaItem = ssr === null || ssr === void 0 ? void 0 : (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(item => item.id === id);
|
|
285
287
|
return /*#__PURE__*/React.createElement("div", _extends({}, getClipboardAttrs({
|
|
286
288
|
id,
|
|
287
289
|
alt,
|
|
@@ -307,7 +309,10 @@ export class MediaCardView extends Component {
|
|
|
307
309
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
308
310
|
featureFlags: featureFlags,
|
|
309
311
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
310
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
312
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
313
|
+
// Optional SSR seed supplied by the host product. Undefined when absent,
|
|
314
|
+
,
|
|
315
|
+
ssrMediaItem: ssrMediaItem,
|
|
311
316
|
shouldHideTooltip: isMobile,
|
|
312
317
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
313
318
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
@@ -2078,6 +2078,14 @@ const tableContentModeScopedStyles = css({
|
|
|
2078
2078
|
width: 'unset !important'
|
|
2079
2079
|
}
|
|
2080
2080
|
});
|
|
2081
|
+
const tableContentModeExtensionContainmentStyles = css({
|
|
2082
|
+
// Content-mode tables need extension content to participate in intrinsic width calculation.
|
|
2083
|
+
// Keep containment for extensions in all other table modes so nested renderers stay constrained.
|
|
2084
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
2085
|
+
[`.${RendererCssClassName.DOCUMENT} table[data-initial-width-mode="content"] .${RendererCssClassName.EXTENSION_INNER_WRAPPER}`]: {
|
|
2086
|
+
containerType: 'normal'
|
|
2087
|
+
}
|
|
2088
|
+
});
|
|
2081
2089
|
const tableContentModeNestedTableStyles = css({
|
|
2082
2090
|
// Nested tables may sit inside expands, extensions, or other blocks within the parent cell.
|
|
2083
2091
|
[`.${RendererCssClassName.DOCUMENT} table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .${TableSharedCssClassName.TABLE_CONTAINER} > table,
|
|
@@ -2936,7 +2944,7 @@ export const RendererStyleContainer = props => {
|
|
|
2936
2944
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2937
2945
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2938
2946
|
// this should be placed after baseOtherStyles
|
|
2939
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), forgeInlineBodiedSpacingStyle, inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && !isExperimentEnabled('platform_editor_table_q4_patch_7') && roundedTableLegacyClipPathStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeScopedStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && expValEquals('platform_editor_table_css_overflow_shadow', 'isEnabled', true) && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2947
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), forgeInlineBodiedSpacingStyle, inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && !isExperimentEnabled('platform_editor_table_q4_patch_7') && roundedTableLegacyClipPathStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeScopedStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && expValEquals('platform_editor_table_css_overflow_shadow', 'isEnabled', true) && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2940
2948
|
"data-testid": testId
|
|
2941
2949
|
}, children);
|
|
2942
2950
|
};
|
|
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
61
61
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
62
62
|
const packageName = "@atlaskit/renderer";
|
|
63
|
-
const packageVersion = "137.
|
|
63
|
+
const packageVersion = "137.3.0";
|
|
64
64
|
const setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
package/dist/esm/custom-nodes.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
7
|
+
* This entry point will be removed in January 2027.
|
|
8
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
9
|
+
*/
|
|
4
10
|
export { nodeToReact as defaultNodeComponentsWithLooselyLazy } from './react/nodes/loosely-lazy';
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
6
|
+
* This entry point will be removed in January 2027.
|
|
7
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
8
|
+
*/
|
|
2
9
|
export { nodeToReact as defaultNodeComponentsWithLooselyLazy } from '../react/nodes/loosely-lazy';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
@@ -17,4 +18,10 @@ var nodeToReact = {
|
|
|
17
18
|
embedCard: EmbedCard,
|
|
18
19
|
inlineCard: InlineCard
|
|
19
20
|
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
24
|
+
* This entry point will be removed in January 2027.
|
|
25
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
26
|
+
*/
|
|
20
27
|
export default nodeToReact;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
@@ -19,4 +20,10 @@ var nodeToReact = {
|
|
|
19
20
|
mediaInline: MediaInline,
|
|
20
21
|
mediaSingle: MediaSingle
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
26
|
+
* This entry point will be removed in January 2027.
|
|
27
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
28
|
+
*/
|
|
22
29
|
export default nodeToReact;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
@@ -35,4 +36,10 @@ var nodeToReact = {
|
|
|
35
36
|
taskList: TaskList,
|
|
36
37
|
expand: Expand
|
|
37
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
42
|
+
* This entry point will be removed in January 2027.
|
|
43
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
44
|
+
*/
|
|
38
45
|
export default nodeToReact;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
6
|
+
* This entry point will be removed in January 2027.
|
|
7
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
8
|
+
*/
|
|
2
9
|
export { nodeToReact } from '../react/nodes/loosely-lazy';
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
6
|
+
* This entry point will be removed in January 2027.
|
|
7
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
8
|
+
*/
|
|
9
|
+
export { BlockCard, Blockquote, BodiedExtension, BulletList, Caption, CodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, EmbedCard, Emoji, Expand, Extension, ExtensionFrame, HardBreak, Heading, InlineCard, InlineExtension, LayoutColumn, LayoutSection, ListItem, Media, MediaGroup, MediaInline, MediaSingle, Mention, MultiBodiedExtension, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, Table, TableCell, TableRow, TaskItem, TaskList, UnknownBlock, WindowedCodeBlock, isEmojiDoc, isText, isTextNode, isTextWrapper, mergeTextNodes, nodeToReact, toReact } from '../react/nodes/index';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated This entry point is deprecated. Use `nodes` from `@atlaskit/renderer/nodes/default` for default renderer nodes.
|
|
13
|
+
* This entry point will be removed in January 2027.
|
|
14
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
15
|
+
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { nodes } from '../react/nodes/nodes';
|
|
8
|
+
import RenderLegacy, { RendererFunctionalComponent as RendererFunctionalComponentLegacy, RendererWithAnalytics as RendererWithAnalyticsLegacy } from '../ui/Renderer/index';
|
|
9
|
+
export { DEGRADED_SEVERITY_THRESHOLD, NORMAL_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
10
|
+
function withSyncNodes(BaseComponent) {
|
|
11
|
+
var ComponentWithSyncNodes = function ComponentWithSyncNodes(props) {
|
|
12
|
+
var nodeComponentsWithSyncNodes = React.useMemo(function () {
|
|
13
|
+
return _objectSpread(_objectSpread({}, nodes), props.nodeComponents);
|
|
14
|
+
}, [props.nodeComponents]);
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
+
return /*#__PURE__*/React.createElement(BaseComponent, _extends({}, props, {
|
|
18
|
+
nodeComponents: nodeComponentsWithSyncNodes
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
return ComponentWithSyncNodes;
|
|
22
|
+
}
|
|
23
|
+
export var Renderer = withSyncNodes(RenderLegacy);
|
|
24
|
+
export var RendererFunctionalComponent = withSyncNodes(RendererFunctionalComponentLegacy);
|
|
25
|
+
export var RendererWithAnalytics = withSyncNodes(RendererWithAnalyticsLegacy);
|
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `DEGRADED_SEVERITY_THRESHOLD` from `@atlaskit/renderer/default` instead.
|
|
6
|
+
* This export will be removed in January 2027.
|
|
7
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
8
|
+
*/
|
|
9
|
+
export { DEGRADED_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `NORMAL_SEVERITY_THRESHOLD` from `@atlaskit/renderer/default` instead.
|
|
13
|
+
* This export will be removed in January 2027.
|
|
14
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
15
|
+
*/
|
|
16
|
+
export { NORMAL_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
20
|
+
* This export will be removed in January 2027.
|
|
21
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
22
|
+
*/
|
|
23
|
+
export { Renderer } from '../ui/Renderer/index';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `RendererFunctionalComponent` from `@atlaskit/renderer/default` instead.
|
|
27
|
+
* This export will be removed in January 2027.
|
|
28
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
29
|
+
*/
|
|
30
|
+
export { RendererFunctionalComponent } from '../ui/Renderer/index';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `RendererWithAnalytics` from `@atlaskit/renderer/default` instead.
|
|
34
|
+
* This export will be removed in January 2027.
|
|
35
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
36
|
+
*/
|
|
37
|
+
export { RendererWithAnalytics } from '../ui/Renderer/index';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `RendererWrapperProps` from `@atlaskit/renderer/default` instead.
|
|
41
|
+
* This export will be removed in January 2027.
|
|
42
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
47
|
+
* This export will be removed in January 2027.
|
|
48
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
49
|
+
*/
|
|
3
50
|
export { default } from '../ui/Renderer/index';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required */
|
|
1
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
3
|
// Entry file in package.json
|
|
3
4
|
|
|
4
5
|
export { default as ReactSerializer } from './react';
|
|
5
6
|
export { default as TextSerializer } from './text';
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `Renderer` from `@atlaskit/renderer/default` instead.
|
|
10
|
+
* This export will be removed in January 2027.
|
|
11
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
12
|
+
*/
|
|
13
|
+
export { default as ReactRenderer } from './ui/Renderer';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `RendererWithAnalytics` from `@atlaskit/renderer/default` instead.
|
|
17
|
+
* This export will be removed in January 2027.
|
|
18
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
19
|
+
*/
|
|
20
|
+
export { RendererWithAnalytics } from './ui/Renderer';
|
|
7
21
|
export { InlineNodeRendererWrapper } from './ui/ExtensionRenderer';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use `nodes` from `@atlaskit/renderer/nodes/default` instead.
|
|
25
|
+
* This export will be removed in January 2027.
|
|
26
|
+
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/7650942996/Moving+to+Synchronous+Rendering+in+Editor+Renderer for more.
|
|
27
|
+
*/
|
|
8
28
|
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
9
29
|
export { AnnotationsWrapper } from './ui/annotations';
|
|
10
30
|
export { ValidationContextProvider } from './ui/Renderer/ValidationContext';
|
|
@@ -161,7 +161,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
161
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
162
162
|
,
|
|
163
163
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
164
|
-
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
164
|
+
css: [!(isInsideOfTable && !isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
165
165
|
}, asInlineAnalytics, content));
|
|
166
166
|
return centerAlignClass ? jsx("div", {
|
|
167
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -192,7 +192,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
192
192
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
193
193
|
,
|
|
194
194
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
195
|
-
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
195
|
+
css: [!(isInsideOfTable && !isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
196
196
|
}, asInlineAnalytics, content));
|
|
197
197
|
return centerAlignClass ? jsx("div", {
|
|
198
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -11,7 +11,7 @@ import { MediaInlineCard } from '@atlaskit/media-card';
|
|
|
11
11
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
12
12
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
13
13
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
14
|
-
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
14
|
+
import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react';
|
|
15
15
|
import { injectIntl } from 'react-intl';
|
|
16
16
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
17
17
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -24,7 +24,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
24
24
|
collectionName = _ref.collection,
|
|
25
25
|
eventHandlers = _ref.eventHandlers,
|
|
26
26
|
identifier = _ref.identifier,
|
|
27
|
-
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher
|
|
27
|
+
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
28
|
+
ssr = _ref.ssr;
|
|
28
29
|
var _useState = useState(),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
31
|
contextIdentifier = _useState2[0],
|
|
@@ -35,6 +36,12 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
35
36
|
setFileState = _useState4[1];
|
|
36
37
|
var mediaClient = useContext(MediaClientContext);
|
|
37
38
|
var contextIdentifierProvider = useProvider('contextIdentifierProvider');
|
|
39
|
+
var ssrMediaItem = useMemo(function () {
|
|
40
|
+
var _ssr$ssrMediaItems;
|
|
41
|
+
return ssr === null || ssr === void 0 || (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(function (item) {
|
|
42
|
+
return item.id === identifier.id;
|
|
43
|
+
});
|
|
44
|
+
}, [ssr === null || ssr === void 0 ? void 0 : ssr.ssrMediaItems, identifier.id]);
|
|
38
45
|
useEffect(function () {
|
|
39
46
|
if (contextIdentifierProvider) {
|
|
40
47
|
contextIdentifierProvider.then(function (resolvedContextID) {
|
|
@@ -135,7 +142,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
135
142
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
136
143
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
137
144
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
138
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
145
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
146
|
+
ssrMediaItem: ssrMediaItem
|
|
139
147
|
}))
|
|
140
148
|
);
|
|
141
149
|
};
|
|
@@ -205,7 +213,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
205
213
|
intl: intl,
|
|
206
214
|
collection: collection,
|
|
207
215
|
featureFlags: featureFlags,
|
|
208
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
216
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
217
|
+
ssr: ssr
|
|
209
218
|
});
|
|
210
219
|
};
|
|
211
220
|
|