@atlaskit/renderer 126.8.0 → 126.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/react/nodes/inlineCard.js +13 -2
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +15 -4
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/inlineCard.js +15 -4
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7ba3979b92b42`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ba3979b92b42) -
|
|
8
|
+
Remove platform_synced_block_dogfooding feature gate
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 126.8.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 126.8.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -140,6 +140,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
140
140
|
}, children);
|
|
141
141
|
};
|
|
142
142
|
var InlineCard = function InlineCard(props) {
|
|
143
|
+
var _cardContext$value5;
|
|
143
144
|
var url = props.url,
|
|
144
145
|
data = props.data,
|
|
145
146
|
eventHandlers = props.eventHandlers,
|
|
@@ -149,6 +150,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
149
150
|
onSetLinkTarget = props.onSetLinkTarget;
|
|
150
151
|
var portal = (0, _PortalContext.usePortal)(props);
|
|
151
152
|
var cardContext = (0, _linkProvider.useSmartCardContext)();
|
|
153
|
+
var reload = (0, _hooks.useSmartLinkReload)({
|
|
154
|
+
url: url || ''
|
|
155
|
+
});
|
|
152
156
|
var _useState = (0, _react.useState)(false),
|
|
153
157
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
154
158
|
isResolvedViewRendered = _useState2[0],
|
|
@@ -184,7 +188,14 @@ var InlineCard = function InlineCard(props) {
|
|
|
184
188
|
}
|
|
185
189
|
};
|
|
186
190
|
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
187
|
-
|
|
191
|
+
var cardState = cardContext === null || cardContext === void 0 || (_cardContext$value5 = cardContext.value) === null || _cardContext$value5 === void 0 || (_cardContext$value5 = _cardContext$value5.store) === null || _cardContext$value5 === void 0 ? void 0 : _cardContext$value5.getState()[url || ''];
|
|
192
|
+
(0, _react.useEffect)(function () {
|
|
193
|
+
// if we render from cache, we want to make sure we reload the data in the background
|
|
194
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true) && !ssr && url && (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved') {
|
|
195
|
+
reload();
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !(0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
188
199
|
exposure: true
|
|
189
200
|
})) {
|
|
190
201
|
if (
|
|
@@ -215,7 +226,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
215
226
|
actionOptions: actionOptions,
|
|
216
227
|
onClick: onClick
|
|
217
228
|
}), CompetitorPromptComponent);
|
|
218
|
-
} else if (ssr && url && (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
229
|
+
} else if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
219
230
|
exposure: true
|
|
220
231
|
})) {
|
|
221
232
|
if (
|
|
@@ -1906,7 +1906,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1906
1906
|
// this should be placed after baseOtherStyles
|
|
1907
1907
|
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, (0, _expValEquals.expValEquals)('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1908
1908
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1909
|
-
(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 && ((0, _expValEquals.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' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) && syncBlockStyles, (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) &&
|
|
1909
|
+
(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 && ((0, _expValEquals.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' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) && syncBlockStyles, (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) && syncBlockOverflowStyles],
|
|
1910
1910
|
"data-testid": testId
|
|
1911
1911
|
}, children)
|
|
1912
1912
|
);
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "126.
|
|
74
|
+
var packageVersion = "126.8.1";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -3,13 +3,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { Fragment, useState, useMemo } from 'react';
|
|
6
|
+
import { Fragment, useState, useMemo, useEffect } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
10
10
|
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
11
11
|
import { isWithinPreviewPanelIFrame } from '@atlaskit/linking-common/utils';
|
|
12
|
-
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
12
|
+
import { useSmartLinkActions, useSmartLinkReload } from '@atlaskit/smart-card/hooks';
|
|
13
13
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
14
14
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -123,6 +123,7 @@ const OverlayWithCardContext = ({
|
|
|
123
123
|
}, children);
|
|
124
124
|
};
|
|
125
125
|
const InlineCard = props => {
|
|
126
|
+
var _cardContext$value5, _cardContext$value5$s;
|
|
126
127
|
const {
|
|
127
128
|
url,
|
|
128
129
|
data,
|
|
@@ -134,6 +135,9 @@ const InlineCard = props => {
|
|
|
134
135
|
} = props;
|
|
135
136
|
const portal = usePortal(props);
|
|
136
137
|
const cardContext = useSmartCardContext();
|
|
138
|
+
const reload = useSmartLinkReload({
|
|
139
|
+
url: url || ''
|
|
140
|
+
});
|
|
137
141
|
const [isResolvedViewRendered, setIsResolvedViewRendered] = useState(false);
|
|
138
142
|
const onClick = getCardClickHandler(eventHandlers, url);
|
|
139
143
|
const cardProps = {
|
|
@@ -168,7 +172,14 @@ const InlineCard = props => {
|
|
|
168
172
|
}
|
|
169
173
|
};
|
|
170
174
|
const MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
171
|
-
|
|
175
|
+
const cardState = cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value5 = cardContext.value) === null || _cardContext$value5 === void 0 ? void 0 : (_cardContext$value5$s = _cardContext$value5.store) === null || _cardContext$value5$s === void 0 ? void 0 : _cardContext$value5$s.getState()[url || ''];
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
// if we render from cache, we want to make sure we reload the data in the background
|
|
178
|
+
if (expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && !ssr && url && (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved') {
|
|
179
|
+
reload();
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
172
183
|
exposure: true
|
|
173
184
|
})) {
|
|
174
185
|
if (
|
|
@@ -199,7 +210,7 @@ const InlineCard = props => {
|
|
|
199
210
|
actionOptions: actionOptions,
|
|
200
211
|
onClick: onClick
|
|
201
212
|
}), CompetitorPromptComponent);
|
|
202
|
-
} else if (ssr && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
213
|
+
} else if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
203
214
|
exposure: true
|
|
204
215
|
})) {
|
|
205
216
|
if (
|
|
@@ -2424,7 +2424,7 @@ export const RendererStyleContainer = props => {
|
|
|
2424
2424
|
// this should be placed after baseOtherStyles
|
|
2425
2425
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2426
2426
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2427
|
-
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 && (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) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles, expValEquals('platform_synced_block', 'isEnabled', true) &&
|
|
2427
|
+
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 && (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) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockOverflowStyles],
|
|
2428
2428
|
"data-testid": testId
|
|
2429
2429
|
}, children)
|
|
2430
2430
|
);
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "126.
|
|
60
|
+
const packageVersion = "126.8.1";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -4,13 +4,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
|
-
import { Fragment, useState, useMemo } from 'react';
|
|
7
|
+
import { Fragment, useState, useMemo, useEffect } from 'react';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
11
11
|
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
12
12
|
import { isWithinPreviewPanelIFrame } from '@atlaskit/linking-common/utils';
|
|
13
|
-
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
13
|
+
import { useSmartLinkActions, useSmartLinkReload } from '@atlaskit/smart-card/hooks';
|
|
14
14
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
15
15
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -131,6 +131,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
131
131
|
}, children);
|
|
132
132
|
};
|
|
133
133
|
var InlineCard = function InlineCard(props) {
|
|
134
|
+
var _cardContext$value5;
|
|
134
135
|
var url = props.url,
|
|
135
136
|
data = props.data,
|
|
136
137
|
eventHandlers = props.eventHandlers,
|
|
@@ -140,6 +141,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
140
141
|
onSetLinkTarget = props.onSetLinkTarget;
|
|
141
142
|
var portal = usePortal(props);
|
|
142
143
|
var cardContext = useSmartCardContext();
|
|
144
|
+
var reload = useSmartLinkReload({
|
|
145
|
+
url: url || ''
|
|
146
|
+
});
|
|
143
147
|
var _useState = useState(false),
|
|
144
148
|
_useState2 = _slicedToArray(_useState, 2),
|
|
145
149
|
isResolvedViewRendered = _useState2[0],
|
|
@@ -175,7 +179,14 @@ var InlineCard = function InlineCard(props) {
|
|
|
175
179
|
}
|
|
176
180
|
};
|
|
177
181
|
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
178
|
-
|
|
182
|
+
var cardState = cardContext === null || cardContext === void 0 || (_cardContext$value5 = cardContext.value) === null || _cardContext$value5 === void 0 || (_cardContext$value5 = _cardContext$value5.store) === null || _cardContext$value5 === void 0 ? void 0 : _cardContext$value5.getState()[url || ''];
|
|
183
|
+
useEffect(function () {
|
|
184
|
+
// if we render from cache, we want to make sure we reload the data in the background
|
|
185
|
+
if (expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && !ssr && url && (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved') {
|
|
186
|
+
reload();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
179
190
|
exposure: true
|
|
180
191
|
})) {
|
|
181
192
|
if (
|
|
@@ -206,7 +217,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
206
217
|
actionOptions: actionOptions,
|
|
207
218
|
onClick: onClick
|
|
208
219
|
}), CompetitorPromptComponent);
|
|
209
|
-
} else if (ssr && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
220
|
+
} else if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
210
221
|
exposure: true
|
|
211
222
|
})) {
|
|
212
223
|
if (
|
|
@@ -1899,7 +1899,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1899
1899
|
// this should be placed after baseOtherStyles
|
|
1900
1900
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1901
1901
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1902
|
-
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 && (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) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles, expValEquals('platform_synced_block', 'isEnabled', true) &&
|
|
1902
|
+
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 && (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) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockOverflowStyles],
|
|
1903
1903
|
"data-testid": testId
|
|
1904
1904
|
}, children)
|
|
1905
1905
|
);
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "126.
|
|
65
|
+
var packageVersion = "126.8.1";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.8.
|
|
3
|
+
"version": "126.8.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
55
|
"@atlaskit/react-ufo": "^5.1.0",
|
|
56
|
-
"@atlaskit/smart-card": "^43.
|
|
56
|
+
"@atlaskit/smart-card": "^43.24.0",
|
|
57
57
|
"@atlaskit/status": "^3.1.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^22.1.0",
|
|
61
61
|
"@atlaskit/tokens": "^11.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -241,9 +241,6 @@
|
|
|
241
241
|
"confluence_inline_insert_excerpt_width_bugfix": {
|
|
242
242
|
"type": "boolean"
|
|
243
243
|
},
|
|
244
|
-
"platform_synced_block_dogfooding": {
|
|
245
|
-
"type": "boolean"
|
|
246
|
-
},
|
|
247
244
|
"confluence_insert_excerpt_inline_vertical_align": {
|
|
248
245
|
"type": "boolean"
|
|
249
246
|
},
|