@atlaskit/renderer 124.1.4 → 124.1.6
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 +24 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-dev-agents/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-passionfruit/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/afm-rovo-extension/tsconfig.json +3 -0
- package/afm-townsquare/tsconfig.json +3 -0
- package/dist/cjs/react/nodes/inlineCard.js +6 -1
- package/dist/cjs/react/nodes/layoutColumn.js +11 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +8 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +6 -1
- package/dist/es2019/react/nodes/layoutColumn.js +11 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +11 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/inlineCard.js +6 -1
- package/dist/esm/react/nodes/layoutColumn.js +11 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +8 -3
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6b08c3a8cde08`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b08c3a8cde08) -
|
|
8
|
+
Construct confluence url from smart card embed preview href when smart card url is short
|
|
9
|
+
confluence url, in the form "{host}/wiki/x/{hash}"
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 124.1.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`be54c7e850cd3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be54c7e850cd3) -
|
|
17
|
+
remove unused deprecated styles used to be consumed in editor content styles
|
|
18
|
+
- [`30bb04cd8a8e9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/30bb04cd8a8e9) -
|
|
19
|
+
[ux] [ED-29292] Fix 2 issues with wrapped images in editor and renderer
|
|
20
|
+
|
|
21
|
+
1. There is a gap between the first and the second wrapped images
|
|
22
|
+
2. For wrapped images in layout, if image is the first node, it not horizontally aligned with the
|
|
23
|
+
following wrapped images
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 124.1.4
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
{
|
|
72
72
|
"path": "../../../linking-platform/link-datasource/afm-dev-agents/tsconfig.json"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../linking-platform/link-extractors/afm-dev-agents/tsconfig.json"
|
|
76
|
+
},
|
|
74
77
|
{
|
|
75
78
|
"path": "../../../media/media-card/afm-dev-agents/tsconfig.json"
|
|
76
79
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
{
|
|
72
72
|
"path": "../../../linking-platform/link-datasource/afm-passionfruit/tsconfig.json"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../linking-platform/link-extractors/afm-passionfruit/tsconfig.json"
|
|
76
|
+
},
|
|
74
77
|
{
|
|
75
78
|
"path": "../../../media/media-card/afm-passionfruit/tsconfig.json"
|
|
76
79
|
},
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
{
|
|
72
72
|
"path": "../../../linking-platform/link-datasource/afm-post-office/tsconfig.json"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../linking-platform/link-extractors/afm-post-office/tsconfig.json"
|
|
76
|
+
},
|
|
74
77
|
{
|
|
75
78
|
"path": "../../../media/media-card/afm-post-office/tsconfig.json"
|
|
76
79
|
},
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
{
|
|
72
72
|
"path": "../../../linking-platform/link-datasource/afm-rovo-extension/tsconfig.json"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../linking-platform/link-extractors/afm-rovo-extension/tsconfig.json"
|
|
76
|
+
},
|
|
74
77
|
{
|
|
75
78
|
"path": "../../../media/media-card/afm-rovo-extension/tsconfig.json"
|
|
76
79
|
},
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
{
|
|
72
72
|
"path": "../../../linking-platform/link-datasource/afm-townsquare/tsconfig.json"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../linking-platform/link-extractors/afm-townsquare/tsconfig.json"
|
|
76
|
+
},
|
|
74
77
|
{
|
|
75
78
|
"path": "../../../media/media-card/afm-townsquare/tsconfig.json"
|
|
76
79
|
},
|
|
@@ -25,6 +25,7 @@ var _SmartCardStorage = require("../../ui/SmartCardStorage");
|
|
|
25
25
|
var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
26
26
|
var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineAnnotationProps");
|
|
27
27
|
var _PortalContext = require("../../ui/Renderer/PortalContext");
|
|
28
|
+
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
28
29
|
/**
|
|
29
30
|
* @jsxRuntime classic
|
|
30
31
|
* @jsx jsx
|
|
@@ -105,6 +106,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
105
106
|
showPanelButtonIcon: showPanelButtonIcon,
|
|
106
107
|
onClick: function onClick(event) {
|
|
107
108
|
if (isPreviewPanelAvailable) {
|
|
109
|
+
var _extractSmartLinkEmbe;
|
|
108
110
|
// Prevent anchor default behaviour(click to open the anchor link)
|
|
109
111
|
// When glance panel is available, let openPreviewPanel handle it
|
|
110
112
|
event.preventDefault();
|
|
@@ -112,7 +114,10 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
112
114
|
url: resolvedUrl || '',
|
|
113
115
|
ari: ari || '',
|
|
114
116
|
name: name || '',
|
|
115
|
-
iconUrl: iconUrl
|
|
117
|
+
iconUrl: iconUrl,
|
|
118
|
+
panelData: {
|
|
119
|
+
embedUrl: (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = (0, _linkExtractors.extractSmartLinkEmbed)(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
|
|
120
|
+
}
|
|
116
121
|
});
|
|
117
122
|
(0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
118
123
|
exposure: true
|
|
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
/**
|
|
13
14
|
* @jsxRuntime classic
|
|
14
15
|
* @jsx jsx
|
|
@@ -24,6 +25,14 @@ var clearNextSiblingMarginTopStyle = (0, _react2.css)({
|
|
|
24
25
|
marginTop: '0 !important'
|
|
25
26
|
}
|
|
26
27
|
});
|
|
28
|
+
var multipleWrappedImagesStyle = (0, _react2.css)({
|
|
29
|
+
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
30
|
+
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
32
|
+
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
33
|
+
marginTop: '0'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
27
36
|
|
|
28
37
|
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
29
38
|
var clearNextSiblingBlockMarkMarginTopStyle = (0, _react2.css)((0, _defineProperty2.default)({}, "+ .fabric-editor-block-mark > p,\n\t + .fabric-editor-block-mark > h1,\n\t + .fabric-editor-block-mark > h2,\n\t + .fabric-editor-block-mark > h3,\n\t + .fabric-editor-block-mark > h4,\n\t + .fabric-editor-block-mark > h5,\n\t + .fabric-editor-block-mark > h6\n\t", {
|
|
@@ -36,7 +45,8 @@ function LayoutSection(props) {
|
|
|
36
45
|
"data-column-width": props.width,
|
|
37
46
|
style: {
|
|
38
47
|
flexBasis: "".concat(props.width, "%")
|
|
39
|
-
}
|
|
48
|
+
},
|
|
49
|
+
css: (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
40
50
|
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
41
51
|
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
42
52
|
}), props.children));
|
|
@@ -930,7 +930,10 @@ var alignedHeadingAnchorStyle = (0, _react.css)({
|
|
|
930
930
|
transform: "translate(8px, 0px)"
|
|
931
931
|
}))
|
|
932
932
|
});
|
|
933
|
-
|
|
933
|
+
var firstWrappedMediaStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.richMediaClassName, "[class*=\"image-wrap-\"]:has(+ .").concat(_styles.richMediaClassName, "[class*=\"image-wrap-\"])"), {
|
|
934
|
+
marginRight: 0,
|
|
935
|
+
marginLeft: 0
|
|
936
|
+
}));
|
|
934
937
|
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
935
938
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
936
939
|
// TODO: emotion refactor - there's a mediaSingleSharedNewStyle, but not originally used in the renderer.
|
|
@@ -1505,7 +1508,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1505
1508
|
exposure: true
|
|
1506
1509
|
});
|
|
1507
1510
|
return (
|
|
1508
|
-
// eslint-disable-next-line
|
|
1511
|
+
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
1509
1512
|
(0, _react.jsx)("div", {
|
|
1510
1513
|
ref: innerRef,
|
|
1511
1514
|
onClick: onClick,
|
|
@@ -1528,7 +1531,9 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1528
1531
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1529
1532
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') &&
|
|
1530
1533
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1531
|
-
(0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1534
|
+
(0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1535
|
+
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1536
|
+
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, (0, _platformFeatureFlags.fg)('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, _browser.browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth],
|
|
1532
1537
|
"data-testid": testId
|
|
1533
1538
|
}, children)
|
|
1534
1539
|
);
|
|
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
68
68
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
69
69
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
70
70
|
var packageName = "@atlaskit/renderer";
|
|
71
|
-
var packageVersion = "
|
|
71
|
+
var packageVersion = "0.0.0-development";
|
|
72
72
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
73
73
|
containerName: 'ak-renderer-wrapper',
|
|
74
74
|
containerType: 'inline-size'
|
|
@@ -22,6 +22,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
|
22
22
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
23
23
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
24
24
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
25
|
+
import { extractSmartLinkEmbed } from '@atlaskit/link-extractors';
|
|
25
26
|
const HoverLinkOverlayNoop = props => jsx(Fragment, null, props.children);
|
|
26
27
|
const HoverLinkOverlayWithCondition = componentWithCondition(() => editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
27
28
|
exposure: true
|
|
@@ -88,6 +89,7 @@ const OverlayWithCardContext = ({
|
|
|
88
89
|
showPanelButtonIcon: showPanelButtonIcon,
|
|
89
90
|
onClick: event => {
|
|
90
91
|
if (isPreviewPanelAvailable) {
|
|
92
|
+
var _extractSmartLinkEmbe;
|
|
91
93
|
// Prevent anchor default behaviour(click to open the anchor link)
|
|
92
94
|
// When glance panel is available, let openPreviewPanel handle it
|
|
93
95
|
event.preventDefault();
|
|
@@ -95,7 +97,10 @@ const OverlayWithCardContext = ({
|
|
|
95
97
|
url: resolvedUrl || '',
|
|
96
98
|
ari: ari || '',
|
|
97
99
|
name: name || '',
|
|
98
|
-
iconUrl
|
|
100
|
+
iconUrl,
|
|
101
|
+
panelData: {
|
|
102
|
+
embedUrl: expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = extractSmartLinkEmbed(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
|
|
103
|
+
}
|
|
99
104
|
});
|
|
100
105
|
editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
101
106
|
exposure: true
|
|
@@ -6,6 +6,7 @@ import React from 'react';
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
8
|
import { WidthProvider } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
|
|
10
11
|
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
11
12
|
const clearNextSiblingMarginTopStyle = css({
|
|
@@ -15,6 +16,14 @@ const clearNextSiblingMarginTopStyle = css({
|
|
|
15
16
|
marginTop: '0 !important'
|
|
16
17
|
}
|
|
17
18
|
});
|
|
19
|
+
const multipleWrappedImagesStyle = css({
|
|
20
|
+
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
21
|
+
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
23
|
+
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
24
|
+
marginTop: '0'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
18
27
|
|
|
19
28
|
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
20
29
|
const clearNextSiblingBlockMarkMarginTopStyle = css({
|
|
@@ -37,7 +46,8 @@ export default function LayoutSection(props) {
|
|
|
37
46
|
"data-column-width": props.width,
|
|
38
47
|
style: {
|
|
39
48
|
flexBasis: `${props.width}%`
|
|
40
|
-
}
|
|
49
|
+
},
|
|
50
|
+
css: fg('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
41
51
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
42
52
|
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
43
53
|
}), props.children));
|
|
@@ -1098,7 +1098,13 @@ const alignedHeadingAnchorStyle = css({
|
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
});
|
|
1101
|
-
|
|
1101
|
+
const firstWrappedMediaStyles = css({
|
|
1102
|
+
// Remove gap between first wrapped mediaSingle and its fellow wrapped mediaSingle
|
|
1103
|
+
[`.${richMediaClassName}[class*="image-wrap-"]:has(+ .${richMediaClassName}[class*="image-wrap-"])`]: {
|
|
1104
|
+
marginRight: 0,
|
|
1105
|
+
marginLeft: 0
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1102
1108
|
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
1103
1109
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
1104
1110
|
// TODO: emotion refactor - there's a mediaSingleSharedNewStyle, but not originally used in the renderer.
|
|
@@ -1906,7 +1912,7 @@ export const RendererStyleContainer = props => {
|
|
|
1906
1912
|
exposure: true
|
|
1907
1913
|
});
|
|
1908
1914
|
return (
|
|
1909
|
-
// eslint-disable-next-line
|
|
1915
|
+
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
1910
1916
|
jsx("div", {
|
|
1911
1917
|
ref: innerRef,
|
|
1912
1918
|
onClick: onClick,
|
|
@@ -1929,7 +1935,9 @@ export const RendererStyleContainer = props => {
|
|
|
1929
1935
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1930
1936
|
fg('editor_inline_comments_on_inline_nodes') &&
|
|
1931
1937
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1932
|
-
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1938
|
+
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1939
|
+
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1940
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, 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' && responsiveBreakoutWidthFullWidth],
|
|
1933
1941
|
"data-testid": testId
|
|
1934
1942
|
}, children)
|
|
1935
1943
|
);
|
|
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
54
54
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
55
55
|
const TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
56
56
|
const packageName = "@atlaskit/renderer";
|
|
57
|
-
const packageVersion = "
|
|
57
|
+
const packageVersion = "0.0.0-development";
|
|
58
58
|
const setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size'
|
|
@@ -23,6 +23,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
|
23
23
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
24
24
|
import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
|
|
25
25
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
26
|
+
import { extractSmartLinkEmbed } from '@atlaskit/link-extractors';
|
|
26
27
|
var HoverLinkOverlayNoop = function HoverLinkOverlayNoop(props) {
|
|
27
28
|
return jsx(Fragment, null, props.children);
|
|
28
29
|
};
|
|
@@ -96,6 +97,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
96
97
|
showPanelButtonIcon: showPanelButtonIcon,
|
|
97
98
|
onClick: function onClick(event) {
|
|
98
99
|
if (isPreviewPanelAvailable) {
|
|
100
|
+
var _extractSmartLinkEmbe;
|
|
99
101
|
// Prevent anchor default behaviour(click to open the anchor link)
|
|
100
102
|
// When glance panel is available, let openPreviewPanel handle it
|
|
101
103
|
event.preventDefault();
|
|
@@ -103,7 +105,10 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
103
105
|
url: resolvedUrl || '',
|
|
104
106
|
ari: ari || '',
|
|
105
107
|
name: name || '',
|
|
106
|
-
iconUrl: iconUrl
|
|
108
|
+
iconUrl: iconUrl,
|
|
109
|
+
panelData: {
|
|
110
|
+
embedUrl: expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = extractSmartLinkEmbed(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
|
|
111
|
+
}
|
|
107
112
|
});
|
|
108
113
|
editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
109
114
|
exposure: true
|
|
@@ -7,6 +7,7 @@ import React from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx, css } from '@emotion/react';
|
|
9
9
|
import { WidthProvider } from '@atlaskit/editor-common/ui';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
|
|
11
12
|
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
12
13
|
var clearNextSiblingMarginTopStyle = css({
|
|
@@ -16,6 +17,14 @@ var clearNextSiblingMarginTopStyle = css({
|
|
|
16
17
|
marginTop: '0 !important'
|
|
17
18
|
}
|
|
18
19
|
});
|
|
20
|
+
var multipleWrappedImagesStyle = css({
|
|
21
|
+
// Given the first wrapped mediaSingle has 0 marginTop (see clearNextSiblingMarginTopStyle),
|
|
22
|
+
// update all wrapped mediaSingle inside layout to have 0 margin top unless they don't have sibling wrapped mediaSingle
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
24
|
+
'& [class*="image-wrap-"] + [class*="image-wrap-"], & [class*="image-wrap-"]:has( + [class*="image-wrap-"])': {
|
|
25
|
+
marginTop: '0'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
19
28
|
|
|
20
29
|
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
21
30
|
var clearNextSiblingBlockMarkMarginTopStyle = css(_defineProperty({}, "+ .fabric-editor-block-mark > p,\n\t + .fabric-editor-block-mark > h1,\n\t + .fabric-editor-block-mark > h2,\n\t + .fabric-editor-block-mark > h3,\n\t + .fabric-editor-block-mark > h4,\n\t + .fabric-editor-block-mark > h5,\n\t + .fabric-editor-block-mark > h6\n\t", {
|
|
@@ -28,7 +37,8 @@ export default function LayoutSection(props) {
|
|
|
28
37
|
"data-column-width": props.width,
|
|
29
38
|
style: {
|
|
30
39
|
flexBasis: "".concat(props.width, "%")
|
|
31
|
-
}
|
|
40
|
+
},
|
|
41
|
+
css: fg('platform_editor_fix_media_in_renderer') && multipleWrappedImagesStyle
|
|
32
42
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
33
43
|
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
34
44
|
}), props.children));
|
|
@@ -923,7 +923,10 @@ var alignedHeadingAnchorStyle = css({
|
|
|
923
923
|
transform: "translate(8px, 0px)"
|
|
924
924
|
}))
|
|
925
925
|
});
|
|
926
|
-
|
|
926
|
+
var firstWrappedMediaStyles = css(_defineProperty({}, ".".concat(richMediaClassName, "[class*=\"image-wrap-\"]:has(+ .").concat(richMediaClassName, "[class*=\"image-wrap-\"])"), {
|
|
927
|
+
marginRight: 0,
|
|
928
|
+
marginLeft: 0
|
|
929
|
+
}));
|
|
927
930
|
// Temporarily ignoring the below the owning team can add the ticket number for the TODO. Context: https://atlassian.slack.com/archives/CPUEVD9MY/p1741565387326829
|
|
928
931
|
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
929
932
|
// TODO: emotion refactor - there's a mediaSingleSharedNewStyle, but not originally used in the renderer.
|
|
@@ -1498,7 +1501,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1498
1501
|
exposure: true
|
|
1499
1502
|
});
|
|
1500
1503
|
return (
|
|
1501
|
-
// eslint-disable-next-line
|
|
1504
|
+
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
1502
1505
|
jsx("div", {
|
|
1503
1506
|
ref: innerRef,
|
|
1504
1507
|
onClick: onClick,
|
|
@@ -1521,7 +1524,9 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1521
1524
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
1522
1525
|
fg('editor_inline_comments_on_inline_nodes') &&
|
|
1523
1526
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1524
|
-
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1527
|
+
fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1528
|
+
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1529
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, fg('platform_editor_tables_numbered_column_correction') ? rendererTableColumnStyles : rendererTableColumnStylesOld, 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' && responsiveBreakoutWidthFullWidth],
|
|
1525
1530
|
"data-testid": testId
|
|
1526
1531
|
}, children)
|
|
1527
1532
|
);
|
|
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
60
60
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
61
61
|
var packageName = "@atlaskit/renderer";
|
|
62
|
-
var packageVersion = "
|
|
62
|
+
var packageVersion = "0.0.0-development";
|
|
63
63
|
var setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.1.
|
|
3
|
+
"version": "124.1.6",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
40
40
|
"@atlaskit/emoji": "^69.5.0",
|
|
41
41
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
42
|
-
"@atlaskit/icon": "^28.
|
|
42
|
+
"@atlaskit/icon": "^28.5.0",
|
|
43
43
|
"@atlaskit/link": "^3.2.0",
|
|
44
44
|
"@atlaskit/link-datasource": "^4.25.0",
|
|
45
|
+
"@atlaskit/link-extractors": "^2.4.0",
|
|
45
46
|
"@atlaskit/media-card": "^79.5.0",
|
|
46
47
|
"@atlaskit/media-client": "^35.5.0",
|
|
47
48
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
@@ -52,11 +53,11 @@
|
|
|
52
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
54
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
54
55
|
"@atlaskit/react-ufo": "^4.11.0",
|
|
55
|
-
"@atlaskit/smart-card": "^43.
|
|
56
|
+
"@atlaskit/smart-card": "^43.1.0",
|
|
56
57
|
"@atlaskit/status": "^3.0.0",
|
|
57
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
58
59
|
"@atlaskit/theme": "^21.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^13.6.0",
|
|
60
61
|
"@atlaskit/tokens": "^6.4.0",
|
|
61
62
|
"@atlaskit/tooltip": "^20.5.0",
|
|
62
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"uuid": "^3.1.0"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^110.
|
|
74
|
+
"@atlaskit/editor-common": "^110.9.0",
|
|
74
75
|
"@atlaskit/link-provider": "^4.0.0",
|
|
75
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
76
77
|
"react": "^18.2.0",
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"@atlaskit/mention": "^24.2.0",
|
|
92
93
|
"@atlaskit/modal-dialog": "^14.4.0",
|
|
93
94
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|
|
94
|
-
"@atlaskit/profilecard": "^24.
|
|
95
|
+
"@atlaskit/profilecard": "^24.18.0",
|
|
95
96
|
"@atlaskit/util-data-test": "^18.3.0",
|
|
96
97
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
97
98
|
"@testing-library/react": "^13.4.0",
|