@atlaskit/renderer 126.12.0 → 126.12.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 +21 -0
- package/dist/cjs/consts.js +1 -0
- package/dist/cjs/react/nodes/extension.js +2 -2
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +5 -11
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/element/mark.js +23 -14
- package/dist/es2019/consts.js +1 -0
- package/dist/es2019/react/nodes/extension.js +2 -2
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +5 -15
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/element/mark.js +24 -15
- package/dist/esm/consts.js +1 -0
- package/dist/esm/react/nodes/extension.js +2 -2
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +5 -11
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/element/mark.js +24 -15
- package/dist/types/consts.d.ts +1 -0
- package/dist/types/ui/annotations/element/mark.d.ts +0 -18
- package/dist/types-ts4.5/consts.d.ts +1 -0
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +0 -18
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.12.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6c36c47f10a70`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c36c47f10a70) -
|
|
8
|
+
[ux] Fixed the inline comment screen reader text markers to use the ::before ::after css elements
|
|
9
|
+
instead of inline spans. This is because spans will affect the text selection range for comments
|
|
10
|
+
which try to be added directly after the inline comment causing the wrong part of the document to
|
|
11
|
+
be highlighted when another comment is started
|
|
12
|
+
- [`6fe8b0bce516c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6fe8b0bce516c) -
|
|
13
|
+
[ux] EDITOR-5604 - Inline Bodied Extension: Fix wrong style for nested block elements
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 126.12.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`85444e8a5672a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85444e8a5672a) -
|
|
21
|
+
EDITOR-5526 clean up platform_synced_block_patch_2
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 126.12.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/dist/cjs/consts.js
CHANGED
|
@@ -15,6 +15,7 @@ var RendererCssClassName = exports.RendererCssClassName = {
|
|
|
15
15
|
EXTENSION_AS_INLINE: "".concat(clPrefix, "extension-as-inline"),
|
|
16
16
|
EXTENSION_CENTER_ALIGN: "".concat(clPrefix, "extension-center-align"),
|
|
17
17
|
EXTENSION_OVERFLOW_CONTAINER: "".concat(clPrefix, "extension-overflow-container"),
|
|
18
|
+
EXTENSION_INNER_WRAPPER: "".concat(clPrefix, "extension-inner-wrapper"),
|
|
18
19
|
/** Wrapper for center-aligned extensions/MBE; margin here so it participates in collapse */
|
|
19
20
|
STICKY_SAFE_CENTER_WRAPPER: "".concat(clPrefix, "sticky-safe-center-wrapper"),
|
|
20
21
|
/** Wrapper for center-aligned embed card (wide/full-width); margin here so it participates in collapse */
|
|
@@ -98,7 +98,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
98
98
|
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
99
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
100
100
|
,
|
|
101
|
-
className: overflowContainerClass,
|
|
101
|
+
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
102
102
|
css: [!(isInsideOfInlineExtension && (0, _expValEquals.expValEquals)('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
103
103
|
}, content));
|
|
104
104
|
return centerAlignClass && (0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true) ? (0, _react.jsx)("div", {
|
|
@@ -127,7 +127,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
127
127
|
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
128
128
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
129
129
|
,
|
|
130
|
-
className: overflowContainerClass,
|
|
130
|
+
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
131
131
|
css: [!(isInsideOfInlineExtension && (0, _expValEquals.expValEquals)('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
132
132
|
}, content));
|
|
133
133
|
return centerAlignClass && (0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true) ? (0, _react.jsx)("div", {
|
|
@@ -807,7 +807,7 @@ var oldExtensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0
|
|
|
807
807
|
display: 'inline-block',
|
|
808
808
|
overflowX: 'visible',
|
|
809
809
|
containerType: 'normal'
|
|
810
|
-
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, "
|
|
810
|
+
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
811
811
|
display: 'inline-block'
|
|
812
812
|
}));
|
|
813
813
|
var extensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
@@ -820,7 +820,7 @@ var extensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _
|
|
|
820
820
|
display: 'inline-block',
|
|
821
821
|
overflowX: 'visible',
|
|
822
822
|
containerType: 'normal'
|
|
823
|
-
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, "
|
|
823
|
+
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
824
824
|
display: 'inline-block'
|
|
825
825
|
}));
|
|
826
826
|
|
|
@@ -1946,7 +1946,8 @@ var denseStyles = (0, _react.css)((0, _defineProperty2.default)((0, _definePrope
|
|
|
1946
1946
|
var syncBlockStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.error, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1947
1947
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
1948
1948
|
marginTop: "var(--ds-space-075, 6px)",
|
|
1949
|
-
paddingBlock: "var(--ds-space-150, 12px)"
|
|
1949
|
+
paddingBlock: "var(--ds-space-150, 12px)",
|
|
1950
|
+
overflow: 'visible'
|
|
1950
1951
|
}), ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer), {
|
|
1951
1952
|
// First child node in syncBlock in editor is overridden with marginTop: 0, hence apply the same style in renderer for consistency
|
|
1952
1953
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1964,13 +1965,6 @@ var syncBlockStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineP
|
|
|
1964
1965
|
}), ".".concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1965
1966
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #0B120E24)")
|
|
1966
1967
|
}));
|
|
1967
|
-
var syncBlockOverflowStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.error, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1968
|
-
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
1969
|
-
overflow: 'hidden'
|
|
1970
|
-
}));
|
|
1971
|
-
var syncBlockPatch2Styles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.error, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1972
|
-
overflow: 'visible'
|
|
1973
|
-
}));
|
|
1974
1968
|
var RendererStyleContainer = exports.RendererStyleContainer = function RendererStyleContainer(props) {
|
|
1975
1969
|
var onClick = props.onClick,
|
|
1976
1970
|
onMouseDown = props.onMouseDown,
|
|
@@ -2016,7 +2010,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2016
2010
|
// this should be placed after baseOtherStyles
|
|
2017
2011
|
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (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,
|
|
2018
2012
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2019
|
-
(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, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockStyles,
|
|
2013
|
+
(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, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2020
2014
|
"data-testid": testId
|
|
2021
2015
|
}, children);
|
|
2022
2016
|
};
|
|
@@ -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 = "
|
|
74
|
+
var packageVersion = "126.12.1";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -113,13 +113,23 @@ var accessibilityStylesOld = (0, _react2.css)({
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
var accessibilityStylesNew = (0, _react2.css)({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
'&::before, &::after': {
|
|
117
|
+
clipPath: 'inset(100%)',
|
|
118
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
119
|
+
height: '1px',
|
|
120
|
+
overflow: 'hidden',
|
|
121
|
+
position: 'absolute',
|
|
122
|
+
whiteSpace: 'nowrap',
|
|
123
|
+
width: '1px'
|
|
124
|
+
},
|
|
125
|
+
'&::before': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
127
|
+
content: ['var(--ak-renderer-annotation-startmarker)']
|
|
128
|
+
},
|
|
129
|
+
'&::after': {
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
131
|
+
content: ['var(--ak-renderer-annotation-endmarker)']
|
|
132
|
+
}
|
|
123
133
|
});
|
|
124
134
|
var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
125
135
|
var annotationParentIds = _ref.annotationParentIds,
|
|
@@ -223,14 +233,13 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
223
233
|
ref: id === currentSelectedAnnotationId ? markRef : undefined,
|
|
224
234
|
id: id
|
|
225
235
|
}, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
226
|
-
css: [markStyles, markStylesLayeringFix, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !(0, _platformFeatureFlags.fg)('platform_renderer_a11y_inline_comment_fix')
|
|
227
|
-
style: (0, _platformFeatureFlags.fg)('platform_renderer_a11y_inline_comment_fix') ? {
|
|
236
|
+
css: [markStyles, markStylesLayeringFix, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !isMobile() && ((0, _platformFeatureFlags.fg)('platform_renderer_a11y_inline_comment_fix') ? accessibilityStylesNew : accessibilityStylesOld), markStylesWithUpdatedShadow],
|
|
237
|
+
style: (0, _platformFeatureFlags.fg)('platform_renderer_a11y_inline_comment_fix') ? {
|
|
238
|
+
'--ak-renderer-annotation-startmarker': "\"".concat(intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart), "\""),
|
|
239
|
+
'--ak-renderer-annotation-endmarker': "\"".concat(intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd), "\"")
|
|
240
|
+
} : {
|
|
228
241
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
229
242
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
230
243
|
}
|
|
231
|
-
}),
|
|
232
|
-
css: accessibilityStylesNew
|
|
233
|
-
}, intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart)), children, (0, _react2.jsx)("span", {
|
|
234
|
-
css: accessibilityStylesNew
|
|
235
|
-
}, intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd))) : children);
|
|
244
|
+
}), children);
|
|
236
245
|
};
|
package/dist/es2019/consts.js
CHANGED
|
@@ -9,6 +9,7 @@ export const RendererCssClassName = {
|
|
|
9
9
|
EXTENSION_AS_INLINE: `${clPrefix}extension-as-inline`,
|
|
10
10
|
EXTENSION_CENTER_ALIGN: `${clPrefix}extension-center-align`,
|
|
11
11
|
EXTENSION_OVERFLOW_CONTAINER: `${clPrefix}extension-overflow-container`,
|
|
12
|
+
EXTENSION_INNER_WRAPPER: `${clPrefix}extension-inner-wrapper`,
|
|
12
13
|
/** Wrapper for center-aligned extensions/MBE; margin here so it participates in collapse */
|
|
13
14
|
STICKY_SAFE_CENTER_WRAPPER: `${clPrefix}sticky-safe-center-wrapper`,
|
|
14
15
|
/** Wrapper for center-aligned embed card (wide/full-width); margin here so it participates in collapse */
|
|
@@ -79,7 +79,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
79
79
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
80
80
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
81
81
|
,
|
|
82
|
-
className: overflowContainerClass
|
|
82
|
+
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
83
83
|
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
84
84
|
}, content));
|
|
85
85
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
@@ -109,7 +109,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
109
109
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
110
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
111
111
|
,
|
|
112
|
-
className: overflowContainerClass
|
|
112
|
+
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
113
113
|
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
114
114
|
}, content));
|
|
115
115
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
@@ -958,7 +958,7 @@ const oldExtensionAsInlineStyle = css({
|
|
|
958
958
|
overflowX: 'visible',
|
|
959
959
|
containerType: 'normal'
|
|
960
960
|
},
|
|
961
|
-
[`.${RendererCssClassName.EXTENSION_AS_INLINE}
|
|
961
|
+
[`.${RendererCssClassName.EXTENSION_AS_INLINE} .${RendererCssClassName.EXTENSION_INNER_WRAPPER}`]: {
|
|
962
962
|
display: 'inline-block'
|
|
963
963
|
}
|
|
964
964
|
});
|
|
@@ -976,7 +976,7 @@ const extensionAsInlineStyle = css({
|
|
|
976
976
|
overflowX: 'visible',
|
|
977
977
|
containerType: 'normal'
|
|
978
978
|
},
|
|
979
|
-
[`.${RendererCssClassName.EXTENSION_AS_INLINE}
|
|
979
|
+
[`.${RendererCssClassName.EXTENSION_AS_INLINE} .${RendererCssClassName.EXTENSION_INNER_WRAPPER}`]: {
|
|
980
980
|
display: 'inline-block'
|
|
981
981
|
}
|
|
982
982
|
});
|
|
@@ -2502,7 +2502,8 @@ const syncBlockStyles = css({
|
|
|
2502
2502
|
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2503
2503
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
2504
2504
|
marginTop: "var(--ds-space-075, 6px)",
|
|
2505
|
-
paddingBlock: "var(--ds-space-150, 12px)"
|
|
2505
|
+
paddingBlock: "var(--ds-space-150, 12px)",
|
|
2506
|
+
overflow: 'visible'
|
|
2506
2507
|
},
|
|
2507
2508
|
[`.${SyncBlockSharedCssClassName.renderer}`]: {
|
|
2508
2509
|
// First child node in syncBlock in editor is overridden with marginTop: 0, hence apply the same style in renderer for consistency
|
|
@@ -2525,17 +2526,6 @@ const syncBlockStyles = css({
|
|
|
2525
2526
|
boxShadow: `0 0 0 1px ${"var(--ds-border, #0B120E24)"}`
|
|
2526
2527
|
}
|
|
2527
2528
|
});
|
|
2528
|
-
const syncBlockOverflowStyles = css({
|
|
2529
|
-
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2530
|
-
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
2531
|
-
overflow: 'hidden'
|
|
2532
|
-
}
|
|
2533
|
-
});
|
|
2534
|
-
const syncBlockPatch2Styles = css({
|
|
2535
|
-
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2536
|
-
overflow: 'visible'
|
|
2537
|
-
}
|
|
2538
|
-
});
|
|
2539
2529
|
export const RendererStyleContainer = props => {
|
|
2540
2530
|
const {
|
|
2541
2531
|
onClick,
|
|
@@ -2583,7 +2573,7 @@ export const RendererStyleContainer = props => {
|
|
|
2583
2573
|
// this should be placed after baseOtherStyles
|
|
2584
2574
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2585
2575
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2586
|
-
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, editorExperiment('platform_synced_block', true) && syncBlockStyles,
|
|
2576
|
+
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, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2587
2577
|
"data-testid": testId
|
|
2588
2578
|
}, children);
|
|
2589
2579
|
};
|
|
@@ -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 = "
|
|
60
|
+
const packageVersion = "126.12.1";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { useMemo, useCallback
|
|
6
|
+
import { useMemo, useCallback } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
@@ -119,13 +119,23 @@ const accessibilityStylesOld = css({
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
const accessibilityStylesNew = css({
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
'&::before, &::after': {
|
|
123
|
+
clipPath: 'inset(100%)',
|
|
124
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
125
|
+
height: '1px',
|
|
126
|
+
overflow: 'hidden',
|
|
127
|
+
position: 'absolute',
|
|
128
|
+
whiteSpace: 'nowrap',
|
|
129
|
+
width: '1px'
|
|
130
|
+
},
|
|
131
|
+
'&::before': {
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
133
|
+
content: ['var(--ak-renderer-annotation-startmarker)']
|
|
134
|
+
},
|
|
135
|
+
'&::after': {
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
137
|
+
content: ['var(--ak-renderer-annotation-endmarker)']
|
|
138
|
+
}
|
|
129
139
|
});
|
|
130
140
|
export const MarkComponent = ({
|
|
131
141
|
annotationParentIds,
|
|
@@ -235,15 +245,14 @@ export const MarkComponent = ({
|
|
|
235
245
|
...accessibility,
|
|
236
246
|
...overriddenData,
|
|
237
247
|
...(!useBlockLevel && {
|
|
238
|
-
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !fg('platform_renderer_a11y_inline_comment_fix')
|
|
239
|
-
style: fg('platform_renderer_a11y_inline_comment_fix') ? {
|
|
248
|
+
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !isMobile() && (fg('platform_renderer_a11y_inline_comment_fix') ? accessibilityStylesNew : accessibilityStylesOld), markStylesWithUpdatedShadow],
|
|
249
|
+
style: fg('platform_renderer_a11y_inline_comment_fix') ? {
|
|
250
|
+
'--ak-renderer-annotation-startmarker': `"${intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart)}"`,
|
|
251
|
+
'--ak-renderer-annotation-endmarker': `"${intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)}"`
|
|
252
|
+
} : {
|
|
240
253
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
241
254
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
242
255
|
}
|
|
243
256
|
})
|
|
244
|
-
},
|
|
245
|
-
css: accessibilityStylesNew
|
|
246
|
-
}, intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart)), children, jsx("span", {
|
|
247
|
-
css: accessibilityStylesNew
|
|
248
|
-
}, intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd))) : children);
|
|
257
|
+
}, children);
|
|
249
258
|
};
|
package/dist/esm/consts.js
CHANGED
|
@@ -9,6 +9,7 @@ export var RendererCssClassName = {
|
|
|
9
9
|
EXTENSION_AS_INLINE: "".concat(clPrefix, "extension-as-inline"),
|
|
10
10
|
EXTENSION_CENTER_ALIGN: "".concat(clPrefix, "extension-center-align"),
|
|
11
11
|
EXTENSION_OVERFLOW_CONTAINER: "".concat(clPrefix, "extension-overflow-container"),
|
|
12
|
+
EXTENSION_INNER_WRAPPER: "".concat(clPrefix, "extension-inner-wrapper"),
|
|
12
13
|
/** Wrapper for center-aligned extensions/MBE; margin here so it participates in collapse */
|
|
13
14
|
STICKY_SAFE_CENTER_WRAPPER: "".concat(clPrefix, "sticky-safe-center-wrapper"),
|
|
14
15
|
/** Wrapper for center-aligned embed card (wide/full-width); margin here so it participates in collapse */
|
|
@@ -90,7 +90,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
90
90
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
91
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
92
92
|
,
|
|
93
|
-
className: overflowContainerClass,
|
|
93
|
+
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
94
94
|
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
95
95
|
}, content));
|
|
96
96
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
@@ -119,7 +119,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
119
119
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? options.tabIndex : undefined
|
|
120
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
121
121
|
,
|
|
122
|
-
className: overflowContainerClass,
|
|
122
|
+
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
123
123
|
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
124
124
|
}, content));
|
|
125
125
|
return centerAlignClass && expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) ? jsx("div", {
|
|
@@ -800,7 +800,7 @@ var oldExtensionAsInlineStyle = css(_defineProperty(_defineProperty(_definePrope
|
|
|
800
800
|
display: 'inline-block',
|
|
801
801
|
overflowX: 'visible',
|
|
802
802
|
containerType: 'normal'
|
|
803
|
-
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, "
|
|
803
|
+
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
804
804
|
display: 'inline-block'
|
|
805
805
|
}));
|
|
806
806
|
var extensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
@@ -813,7 +813,7 @@ var extensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty
|
|
|
813
813
|
display: 'inline-block',
|
|
814
814
|
overflowX: 'visible',
|
|
815
815
|
containerType: 'normal'
|
|
816
|
-
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, "
|
|
816
|
+
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(RendererCssClassName.EXTENSION_INNER_WRAPPER), {
|
|
817
817
|
display: 'inline-block'
|
|
818
818
|
}));
|
|
819
819
|
|
|
@@ -1939,7 +1939,8 @@ var denseStyles = css(_defineProperty(_defineProperty(_defineProperty({}, ".".co
|
|
|
1939
1939
|
var syncBlockStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
1940
1940
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
1941
1941
|
marginTop: "var(--ds-space-075, 6px)",
|
|
1942
|
-
paddingBlock: "var(--ds-space-150, 12px)"
|
|
1942
|
+
paddingBlock: "var(--ds-space-150, 12px)",
|
|
1943
|
+
overflow: 'visible'
|
|
1943
1944
|
}), ".".concat(SyncBlockSharedCssClassName.renderer), {
|
|
1944
1945
|
// First child node in syncBlock in editor is overridden with marginTop: 0, hence apply the same style in renderer for consistency
|
|
1945
1946
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1957,13 +1958,6 @@ var syncBlockStyles = css(_defineProperty(_defineProperty(_defineProperty(_defin
|
|
|
1957
1958
|
}), ".".concat(SyncBlockSharedCssClassName.loading), {
|
|
1958
1959
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #0B120E24)")
|
|
1959
1960
|
}));
|
|
1960
|
-
var syncBlockOverflowStyles = css(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
1961
|
-
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
1962
|
-
overflow: 'hidden'
|
|
1963
|
-
}));
|
|
1964
|
-
var syncBlockPatch2Styles = css(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
1965
|
-
overflow: 'visible'
|
|
1966
|
-
}));
|
|
1967
1961
|
export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
1968
1962
|
var onClick = props.onClick,
|
|
1969
1963
|
onMouseDown = props.onMouseDown,
|
|
@@ -2009,7 +2003,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2009
2003
|
// this should be placed after baseOtherStyles
|
|
2010
2004
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2011
2005
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2012
|
-
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, editorExperiment('platform_synced_block', true) && syncBlockStyles,
|
|
2006
|
+
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, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2013
2007
|
"data-testid": testId
|
|
2014
2008
|
}, children);
|
|
2015
2009
|
};
|
|
@@ -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 = "
|
|
65
|
+
var packageVersion = "126.12.1";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
* @jsx jsx
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { useMemo, useCallback
|
|
10
|
+
import { useMemo, useCallback } from 'react';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
@@ -109,13 +109,23 @@ var accessibilityStylesOld = css({
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
var accessibilityStylesNew = css({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
'&::before, &::after': {
|
|
113
|
+
clipPath: 'inset(100%)',
|
|
114
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
115
|
+
height: '1px',
|
|
116
|
+
overflow: 'hidden',
|
|
117
|
+
position: 'absolute',
|
|
118
|
+
whiteSpace: 'nowrap',
|
|
119
|
+
width: '1px'
|
|
120
|
+
},
|
|
121
|
+
'&::before': {
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
123
|
+
content: ['var(--ak-renderer-annotation-startmarker)']
|
|
124
|
+
},
|
|
125
|
+
'&::after': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
127
|
+
content: ['var(--ak-renderer-annotation-endmarker)']
|
|
128
|
+
}
|
|
119
129
|
});
|
|
120
130
|
export var MarkComponent = function MarkComponent(_ref) {
|
|
121
131
|
var annotationParentIds = _ref.annotationParentIds,
|
|
@@ -219,14 +229,13 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
219
229
|
ref: id === currentSelectedAnnotationId ? markRef : undefined,
|
|
220
230
|
id: id
|
|
221
231
|
}, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
222
|
-
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !fg('platform_renderer_a11y_inline_comment_fix')
|
|
223
|
-
style: fg('platform_renderer_a11y_inline_comment_fix') ? {
|
|
232
|
+
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, markStylesWithCommentsPanel, !isMobile() && (fg('platform_renderer_a11y_inline_comment_fix') ? accessibilityStylesNew : accessibilityStylesOld), markStylesWithUpdatedShadow],
|
|
233
|
+
style: fg('platform_renderer_a11y_inline_comment_fix') ? {
|
|
234
|
+
'--ak-renderer-annotation-startmarker': "\"".concat(intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart), "\""),
|
|
235
|
+
'--ak-renderer-annotation-endmarker': "\"".concat(intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd), "\"")
|
|
236
|
+
} : {
|
|
224
237
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
225
238
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
226
239
|
}
|
|
227
|
-
}),
|
|
228
|
-
css: accessibilityStylesNew
|
|
229
|
-
}, intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart)), children, jsx("span", {
|
|
230
|
-
css: accessibilityStylesNew
|
|
231
|
-
}, intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd))) : children);
|
|
240
|
+
}), children);
|
|
232
241
|
};
|
package/dist/types/consts.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const RendererCssClassName: {
|
|
|
5
5
|
EXTENSION_AS_INLINE: string;
|
|
6
6
|
EXTENSION_CENTER_ALIGN: string;
|
|
7
7
|
EXTENSION_OVERFLOW_CONTAINER: string;
|
|
8
|
+
EXTENSION_INNER_WRAPPER: string;
|
|
8
9
|
/** Wrapper for center-aligned extensions/MBE; margin here so it participates in collapse */
|
|
9
10
|
STICKY_SAFE_CENTER_WRAPPER: string;
|
|
10
11
|
/** Wrapper for center-aligned embed card (wide/full-width); margin here so it participates in collapse */
|
|
@@ -19,9 +19,6 @@ type MarkComponentProps = {
|
|
|
19
19
|
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
20
20
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
21
21
|
style?: {
|
|
22
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
23
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
24
|
-
} | {
|
|
25
22
|
'--ak-renderer-annotation-startmarker': string;
|
|
26
23
|
'--ak-renderer-annotation-endmarker': string;
|
|
27
24
|
} | undefined;
|
|
@@ -35,9 +32,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
35
32
|
} | {
|
|
36
33
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
37
34
|
style?: {
|
|
38
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
39
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
40
|
-
} | {
|
|
41
35
|
'--ak-renderer-annotation-startmarker': string;
|
|
42
36
|
'--ak-renderer-annotation-endmarker': string;
|
|
43
37
|
} | undefined;
|
|
@@ -53,9 +47,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
53
47
|
} | {
|
|
54
48
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
55
49
|
style?: {
|
|
56
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
57
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
58
|
-
} | {
|
|
59
50
|
'--ak-renderer-annotation-startmarker': string;
|
|
60
51
|
'--ak-renderer-annotation-endmarker': string;
|
|
61
52
|
} | undefined;
|
|
@@ -74,9 +65,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
74
65
|
} | {
|
|
75
66
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
76
67
|
style?: {
|
|
77
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
78
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
79
|
-
} | {
|
|
80
68
|
'--ak-renderer-annotation-startmarker': string;
|
|
81
69
|
'--ak-renderer-annotation-endmarker': string;
|
|
82
70
|
} | undefined;
|
|
@@ -97,9 +85,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
97
85
|
} | {
|
|
98
86
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
99
87
|
style?: {
|
|
100
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
101
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
102
|
-
} | {
|
|
103
88
|
'--ak-renderer-annotation-startmarker': string;
|
|
104
89
|
'--ak-renderer-annotation-endmarker': string;
|
|
105
90
|
} | undefined;
|
|
@@ -118,9 +103,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
118
103
|
} | {
|
|
119
104
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
120
105
|
style?: {
|
|
121
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
122
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
123
|
-
} | {
|
|
124
106
|
'--ak-renderer-annotation-startmarker': string;
|
|
125
107
|
'--ak-renderer-annotation-endmarker': string;
|
|
126
108
|
} | undefined;
|
|
@@ -5,6 +5,7 @@ export declare const RendererCssClassName: {
|
|
|
5
5
|
EXTENSION_AS_INLINE: string;
|
|
6
6
|
EXTENSION_CENTER_ALIGN: string;
|
|
7
7
|
EXTENSION_OVERFLOW_CONTAINER: string;
|
|
8
|
+
EXTENSION_INNER_WRAPPER: string;
|
|
8
9
|
/** Wrapper for center-aligned extensions/MBE; margin here so it participates in collapse */
|
|
9
10
|
STICKY_SAFE_CENTER_WRAPPER: string;
|
|
10
11
|
/** Wrapper for center-aligned embed card (wide/full-width); margin here so it participates in collapse */
|
|
@@ -19,9 +19,6 @@ type MarkComponentProps = {
|
|
|
19
19
|
export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
|
|
20
20
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
21
21
|
style?: {
|
|
22
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
23
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
24
|
-
} | {
|
|
25
22
|
'--ak-renderer-annotation-startmarker': string;
|
|
26
23
|
'--ak-renderer-annotation-endmarker': string;
|
|
27
24
|
} | undefined;
|
|
@@ -35,9 +32,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
35
32
|
} | {
|
|
36
33
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
37
34
|
style?: {
|
|
38
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
39
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
40
|
-
} | {
|
|
41
35
|
'--ak-renderer-annotation-startmarker': string;
|
|
42
36
|
'--ak-renderer-annotation-endmarker': string;
|
|
43
37
|
} | undefined;
|
|
@@ -53,9 +47,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
53
47
|
} | {
|
|
54
48
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
55
49
|
style?: {
|
|
56
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
57
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
58
|
-
} | {
|
|
59
50
|
'--ak-renderer-annotation-startmarker': string;
|
|
60
51
|
'--ak-renderer-annotation-endmarker': string;
|
|
61
52
|
} | undefined;
|
|
@@ -74,9 +65,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
74
65
|
} | {
|
|
75
66
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
76
67
|
style?: {
|
|
77
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
78
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
79
|
-
} | {
|
|
80
68
|
'--ak-renderer-annotation-startmarker': string;
|
|
81
69
|
'--ak-renderer-annotation-endmarker': string;
|
|
82
70
|
} | undefined;
|
|
@@ -97,9 +85,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
97
85
|
} | {
|
|
98
86
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
99
87
|
style?: {
|
|
100
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
101
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
102
|
-
} | {
|
|
103
88
|
'--ak-renderer-annotation-startmarker': string;
|
|
104
89
|
'--ak-renderer-annotation-endmarker': string;
|
|
105
90
|
} | undefined;
|
|
@@ -118,9 +103,6 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
118
103
|
} | {
|
|
119
104
|
css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
|
|
120
105
|
style?: {
|
|
121
|
-
'--ak-renderer-annotation-startmarker'?: undefined;
|
|
122
|
-
'--ak-renderer-annotation-endmarker'?: undefined;
|
|
123
|
-
} | {
|
|
124
106
|
'--ak-renderer-annotation-startmarker': string;
|
|
125
107
|
'--ak-renderer-annotation-endmarker': string;
|
|
126
108
|
} | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.12.
|
|
3
|
+
"version": "126.12.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,7 +57,7 @@
|
|
|
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": "^29.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^29.6.0",
|
|
61
61
|
"@atlaskit/tokens": "^11.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^111.
|
|
74
|
+
"@atlaskit/editor-common": "^111.19.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.2.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
@@ -249,9 +249,6 @@
|
|
|
249
249
|
},
|
|
250
250
|
"confluence_ttvc_inline_extensions": {
|
|
251
251
|
"type": "boolean"
|
|
252
|
-
},
|
|
253
|
-
"platform_synced_block_patch_2": {
|
|
254
|
-
"type": "boolean"
|
|
255
252
|
}
|
|
256
253
|
}
|
|
257
254
|
}
|