@atlaskit/renderer 137.2.6 → 137.3.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 +59 -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/marks/link.js +2 -2
- package/dist/cjs/react/nodes/extension.js +2 -2
- package/dist/cjs/react/nodes/layoutColumn.js +2 -2
- package/dist/cjs/react/nodes/nodes.js +104 -0
- package/dist/cjs/react/nodes/panel.js +2 -2
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +4 -1
- package/dist/cjs/ui/Renderer/index.js +5 -5
- 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/marks/link.js +2 -2
- package/dist/es2019/react/nodes/extension.js +2 -2
- package/dist/es2019/react/nodes/layoutColumn.js +2 -2
- package/dist/es2019/react/nodes/nodes.js +97 -0
- package/dist/es2019/react/nodes/panel.js +2 -2
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +9 -1
- package/dist/es2019/ui/Renderer/index.js +5 -5
- 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/marks/link.js +2 -2
- package/dist/esm/react/nodes/extension.js +2 -2
- package/dist/esm/react/nodes/layoutColumn.js +2 -2
- package/dist/esm/react/nodes/nodes.js +97 -0
- package/dist/esm/react/nodes/panel.js +2 -2
- package/dist/esm/react/utils/EditorMediaClientProvider.js +5 -5
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +4 -1
- package/dist/esm/ui/Renderer/index.js +5 -5
- 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/ui/renderer-props.d.ts +4 -5
- package/nodes/default/package.json +10 -0
- package/package.json +7 -10
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { nodes } from '../react/nodes/nodes';
|
|
5
|
+
import RenderLegacy, { RendererFunctionalComponent as RendererFunctionalComponentLegacy, RendererWithAnalytics as RendererWithAnalyticsLegacy } from '../ui/Renderer/index';
|
|
6
|
+
export { DEGRADED_SEVERITY_THRESHOLD, NORMAL_SEVERITY_THRESHOLD } from '../ui/Renderer/index';
|
|
7
|
+
function withSyncNodes(BaseComponent) {
|
|
8
|
+
const ComponentWithSyncNodes = props => {
|
|
9
|
+
const nodeComponentsWithSyncNodes = React.useMemo(() => ({
|
|
10
|
+
...nodes,
|
|
11
|
+
...props.nodeComponents
|
|
12
|
+
}), [props.nodeComponents]);
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
15
|
+
return /*#__PURE__*/React.createElement(BaseComponent, _extends({}, props, {
|
|
16
|
+
nodeComponents: nodeComponentsWithSyncNodes
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
return ComponentWithSyncNodes;
|
|
20
|
+
}
|
|
21
|
+
export const Renderer = withSyncNodes(RenderLegacy);
|
|
22
|
+
export const RendererFunctionalComponent = withSyncNodes(RendererFunctionalComponentLegacy);
|
|
23
|
+
export const 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/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';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
4
5
|
import { getEventHandler } from '../../utils';
|
|
5
6
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
6
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
9
9
|
import { LinkUrlCompiled } from './link-compiled';
|
|
10
10
|
import { LinkUrlEmotion } from './link-emotion';
|
|
11
|
-
const LinkUrlMigration = componentWithCondition(() =>
|
|
11
|
+
const LinkUrlMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LinkUrlCompiled, LinkUrlEmotion);
|
|
12
12
|
/**
|
|
13
13
|
* Render an ADF link mark in renderer.
|
|
14
14
|
*/
|
|
@@ -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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
3
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
4
|
import { LayoutSectionCompiled } from './layoutColumn-compiled';
|
|
5
5
|
import { LayoutSectionEmotion } from './layoutColumn-emotion';
|
|
6
|
-
const LayoutSectionMigration = componentWithCondition(() =>
|
|
6
|
+
const LayoutSectionMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), LayoutSectionCompiled, LayoutSectionEmotion);
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Render a layout column in renderer.
|
|
@@ -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
|
+
};
|
|
@@ -4,8 +4,8 @@ import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, Panel
|
|
|
4
4
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
5
5
|
import EmojiIcon from '@atlaskit/icon/core/emoji';
|
|
6
6
|
import TipIcon from '@atlaskit/icon/core/lightbulb';
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
8
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import EmojiItem from './emoji';
|
|
10
10
|
import { PanelStyledCompiled } from './panel-compiled';
|
|
11
11
|
import { PanelStyledEmotion } from './panel-emotion';
|
|
@@ -18,7 +18,7 @@ const panelIcons = {
|
|
|
18
18
|
error: PanelErrorIcon,
|
|
19
19
|
custom: EmojiIcon
|
|
20
20
|
};
|
|
21
|
-
const PanelStyledMigration = componentWithCondition(() =>
|
|
21
|
+
const PanelStyledMigration = componentWithCondition(() => isExperimentEnabled('platform_editor_renderer_static_css'), PanelStyledCompiled, PanelStyledEmotion);
|
|
22
22
|
const Panel = props => {
|
|
23
23
|
const {
|
|
24
24
|
allowCustomPanels,
|
|
@@ -2,8 +2,8 @@ import React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from
|
|
|
2
2
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
3
3
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
4
4
|
import { useProviderFactory, useProviderLayout } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
const getMediaClientConfigForRenderer = provider => {
|
|
8
8
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
9
9
|
return provider.viewAndUploadMediaClientConfig && fg('platform_media_video_captions') ? provider.viewAndUploadMediaClientConfig : provider.viewMediaClientConfig;
|
|
@@ -12,7 +12,7 @@ export const EditorMediaClientProvider = ({
|
|
|
12
12
|
children,
|
|
13
13
|
ssr
|
|
14
14
|
}) => {
|
|
15
|
-
const [mediaClientConfig, setMediaClientConfig] = useState(() =>
|
|
15
|
+
const [mediaClientConfig, setMediaClientConfig] = useState(() => isExperimentEnabled('platform_editor_media_reliability_enhancements') ? ssr === null || ssr === void 0 ? void 0 : ssr.config : undefined);
|
|
16
16
|
const providerFactory = useProviderFactory();
|
|
17
17
|
const mediaProvider = useProviderLayout('mediaProvider');
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ export const EditorMediaClientProvider = ({
|
|
|
30
30
|
*
|
|
31
31
|
* hasProvider() is synchronous and correct from render 1, closing that window.
|
|
32
32
|
*/
|
|
33
|
-
const shouldSkipContext =
|
|
33
|
+
const shouldSkipContext = isExperimentEnabled('platform_editor_media_reliability_enhancements') ? Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || providerFactory.hasProvider('mediaProvider') || mediaProvider) : Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
|
|
34
34
|
const contextMediaClient = useContext(MediaClientContext);
|
|
35
35
|
|
|
36
36
|
// MediaClientProvider currently requires a mediaClientConfig
|
|
@@ -54,7 +54,7 @@ export const EditorMediaClientProvider = ({
|
|
|
54
54
|
// The two hooks below are mutually exclusive — only one runs per render — so there is no
|
|
55
55
|
// actual chaining of state updates at runtime. The lint rule cannot statically prove this.
|
|
56
56
|
useEffect(() => {
|
|
57
|
-
if (!
|
|
57
|
+
if (!isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
if (ssr !== null && ssr !== void 0 && ssr.config) {
|
|
@@ -80,7 +80,7 @@ export const EditorMediaClientProvider = ({
|
|
|
80
80
|
// Legacy path (experiment off): keep useLayoutEffect to preserve existing behaviour.
|
|
81
81
|
// remove this when clean up platform_editor_media_reliability_enhancements
|
|
82
82
|
useLayoutEffect(() => {
|
|
83
|
-
if (
|
|
83
|
+
if (isExperimentEnabled('platform_editor_media_reliability_enhancements')) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (ssr !== null && ssr !== void 0 && ssr.config) {
|
|
@@ -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.2.
|
|
63
|
+
const packageVersion = "137.2.8";
|
|
64
64
|
const setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
|
@@ -341,13 +341,13 @@ export const RendererFunctionalComponent = props => {
|
|
|
341
341
|
let heightWidthAnalyticsRicID;
|
|
342
342
|
let heightWidthAnalyticsRafID;
|
|
343
343
|
const handleAnalytics = () => {
|
|
344
|
-
if (
|
|
344
|
+
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
345
345
|
fireAnalyticsEvent({
|
|
346
346
|
action: ACTION.STARTED,
|
|
347
347
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
348
348
|
attributes: {
|
|
349
349
|
platform: PLATFORM.WEB,
|
|
350
|
-
sampleRate:
|
|
350
|
+
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
351
351
|
},
|
|
352
352
|
eventType: EVENT_TYPE.UI
|
|
353
353
|
});
|
|
@@ -389,11 +389,11 @@ export const RendererFunctionalComponent = props => {
|
|
|
389
389
|
nodes,
|
|
390
390
|
nestedRendererType,
|
|
391
391
|
severity,
|
|
392
|
-
sampleRate:
|
|
392
|
+
sampleRate: RENDER_EVENT_SAMPLE_RATE
|
|
393
393
|
},
|
|
394
394
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
395
395
|
};
|
|
396
|
-
if (
|
|
396
|
+
if (Math.random() < RENDER_EVENT_SAMPLE_RATE) {
|
|
397
397
|
fireAnalyticsEvent(event);
|
|
398
398
|
}
|
|
399
399
|
}
|
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';
|