@atlaskit/renderer 126.2.1 → 126.2.3
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 +18 -0
- package/dist/cjs/react/nodes/extension.js +7 -5
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +10 -37
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/extension.js +7 -6
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +8 -35
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/extension.js +7 -5
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +10 -37
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/extension.d.ts +2 -1
- package/dist/types-ts4.5/react/nodes/extension.d.ts +2 -1
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dac15aa628811`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dac15aa628811) -
|
|
8
|
+
[ux] fix wrapped media/embed link is displayed out of border in synced block
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 126.2.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`a90e1c030d692`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a90e1c030d692) -
|
|
16
|
+
Fix display of inline insert excerpt macro width in Confluence
|
|
17
|
+
- [`5c3f8d87c2290`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c3f8d87c2290) -
|
|
18
|
+
Cleanup general AIFC bug fix feature gate
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 126.2.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -55,6 +55,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
55
55
|
var localId = arguments.length > 7 ? arguments[7] : undefined;
|
|
56
56
|
var shouldDisplayExtensionAsInline = arguments.length > 8 ? arguments[8] : undefined;
|
|
57
57
|
var node = arguments.length > 9 ? arguments[9] : undefined;
|
|
58
|
+
var isInsideOfInlineExtension = arguments.length > 10 ? arguments[10] : undefined;
|
|
58
59
|
var overflowContainerClass = !removeOverflow ? _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
59
60
|
|
|
60
61
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -94,7 +95,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
94
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
95
96
|
,
|
|
96
97
|
className: overflowContainerClass,
|
|
97
|
-
css: [(0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
98
|
+
css: [!(isInsideOfInlineExtension && (0, _expValEquals.expValEquals)('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
98
99
|
}, content));
|
|
99
100
|
}
|
|
100
101
|
return (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref2) {
|
|
@@ -117,7 +118,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
117
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
118
119
|
,
|
|
119
120
|
className: overflowContainerClass,
|
|
120
|
-
css: [(0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
121
|
+
css: [!(isInsideOfInlineExtension && (0, _expValEquals.expValEquals)('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
121
122
|
}, content));
|
|
122
123
|
});
|
|
123
124
|
};
|
|
@@ -132,7 +133,8 @@ var Extension = function Extension(props) {
|
|
|
132
133
|
extensionViewportSizes = props.extensionViewportSizes,
|
|
133
134
|
parameters = props.parameters,
|
|
134
135
|
nodeHeight = props.nodeHeight,
|
|
135
|
-
localId = props.localId
|
|
136
|
+
localId = props.localId,
|
|
137
|
+
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
136
138
|
return (0, _react.jsx)(_ExtensionRenderer.default
|
|
137
139
|
// Ignored via go/ees005
|
|
138
140
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -148,7 +150,7 @@ var Extension = function Extension(props) {
|
|
|
148
150
|
handleRef: handleRef,
|
|
149
151
|
shadowClassNames: shadowClassNames,
|
|
150
152
|
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
151
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
153
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
152
154
|
}
|
|
153
155
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
154
156
|
} catch (e) {
|
|
@@ -161,7 +163,7 @@ var Extension = function Extension(props) {
|
|
|
161
163
|
handleRef: handleRef,
|
|
162
164
|
shadowClassNames: shadowClassNames,
|
|
163
165
|
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
164
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
166
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
165
167
|
});
|
|
166
168
|
};
|
|
167
169
|
var _default_1 = (0, _ui.overflowShadow)(Extension, {
|
|
@@ -29,7 +29,7 @@ var _getBaseFontSize = require("./get-base-font-size");
|
|
|
29
29
|
var _emoji = require("@atlaskit/editor-common/emoji");
|
|
30
30
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
31
31
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
32
|
-
var _css,
|
|
32
|
+
var _css, _css7;
|
|
33
33
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles */
|
|
34
34
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
35
35
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -222,37 +222,6 @@ var rendererFullWidthStylesForTableResizing = (0, _react.css)({
|
|
|
222
222
|
width: '100% !important'
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
|
-
|
|
226
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
227
|
-
var telepointerStyles = (0, _react.css)((0, _defineProperty2.default)({}, "#".concat(TELEPOINTER_ID), {
|
|
228
|
-
display: 'inline-block',
|
|
229
|
-
position: 'relative',
|
|
230
|
-
width: '1.5px',
|
|
231
|
-
height: '25px',
|
|
232
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)",
|
|
233
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
234
|
-
'&::after': {
|
|
235
|
-
content: '"AI"',
|
|
236
|
-
position: 'absolute',
|
|
237
|
-
display: 'block',
|
|
238
|
-
top: 0,
|
|
239
|
-
left: 0,
|
|
240
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
241
|
-
fontSize: '10px',
|
|
242
|
-
fontWeight: "var(--ds-font-weight-bold, 653)",
|
|
243
|
-
width: '12.5px',
|
|
244
|
-
height: '13px',
|
|
245
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
246
|
-
paddingTop: '1px',
|
|
247
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
248
|
-
paddingLeft: '1.5px',
|
|
249
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
250
|
-
lineHeight: 'initial',
|
|
251
|
-
borderRadius: "0px ".concat("var(--ds-radius-xsmall, 2px)", " ", "var(--ds-radius-xsmall, 2px)", " 0px"),
|
|
252
|
-
color: "var(--ds-text-inverse, white)",
|
|
253
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)"
|
|
254
|
-
}
|
|
255
|
-
}));
|
|
256
225
|
var rovoTelepointerStyles = (0, _react.css)((0, _defineProperty2.default)({}, "#".concat(TELEPOINTER_ID), {
|
|
257
226
|
display: 'inline-block',
|
|
258
227
|
position: 'relative',
|
|
@@ -590,13 +559,13 @@ var paragraphSharedStyleScaledMargin = (0, _react.css)({
|
|
|
590
559
|
letterSpacing: '-0.005em'
|
|
591
560
|
}
|
|
592
561
|
});
|
|
593
|
-
var listsSharedStyles = (0, _react.css)((
|
|
562
|
+
var listsSharedStyles = (0, _react.css)((_css7 = {
|
|
594
563
|
/* =============== INDENTATION SPACING ========= */
|
|
595
564
|
'ul, ol': {
|
|
596
565
|
boxSizing: 'border-box',
|
|
597
566
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_styles.listItemCounterPadding, "px)")
|
|
598
567
|
}
|
|
599
|
-
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
568
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css7, "".concat(_adfSchema.orderedListSelector, ", ").concat(_adfSchema.bulletListSelector), {
|
|
600
569
|
/*
|
|
601
570
|
Ensures list item content adheres to the list's margin instead
|
|
602
571
|
of filling the entire block row. This is important to allow
|
|
@@ -628,7 +597,7 @@ var listsSharedStyles = (0, _react.css)((_css8 = {
|
|
|
628
597
|
listStyleType: 'lower-alpha'
|
|
629
598
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
630
599
|
listStyleType: 'lower-roman'
|
|
631
|
-
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
600
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css7, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
632
601
|
listStyleType: 'disc'
|
|
633
602
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
634
603
|
listStyleType: 'circle'
|
|
@@ -1662,6 +1631,10 @@ var syncBlockStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineP
|
|
|
1662
1631
|
}), ".".concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1663
1632
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #0B120E24)")
|
|
1664
1633
|
}));
|
|
1634
|
+
var syncBlockOverflowStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.error, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1635
|
+
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
1636
|
+
overflow: 'hidden'
|
|
1637
|
+
}));
|
|
1665
1638
|
var RendererStyleContainer = exports.RendererStyleContainer = function RendererStyleContainer(props) {
|
|
1666
1639
|
var onClick = props.onClick,
|
|
1667
1640
|
onMouseDown = props.onMouseDown,
|
|
@@ -1700,7 +1673,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1700
1673
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1701
1674
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1702
1675
|
},
|
|
1703
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (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))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles,
|
|
1676
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (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))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
1704
1677
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1705
1678
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1706
1679
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -1708,7 +1681,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1708
1681
|
// this should be placed after baseOtherStyles
|
|
1709
1682
|
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1710
1683
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1711
|
-
(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, 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],
|
|
1684
|
+
(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, 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) && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') && syncBlockOverflowStyles],
|
|
1712
1685
|
"data-testid": testId
|
|
1713
1686
|
}, children)
|
|
1714
1687
|
);
|
|
@@ -70,7 +70,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
72
72
|
var packageName = "@atlaskit/renderer";
|
|
73
|
-
var packageVersion = "
|
|
73
|
+
var packageVersion = "0.0.0-development";
|
|
74
74
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
75
75
|
containerName: 'ak-renderer-wrapper',
|
|
76
76
|
containerType: 'inline-size'
|
|
@@ -36,7 +36,7 @@ const getViewportSize = (extensionId, extensionViewportSizes) => {
|
|
|
36
36
|
const containerStyle = css({
|
|
37
37
|
containerType: 'inline-size'
|
|
38
38
|
});
|
|
39
|
-
export const renderExtension = (content, layout, options = {}, removeOverflow, extensionId, extensionViewportSizes, nodeHeight, localId, shouldDisplayExtensionAsInline, node) => {
|
|
39
|
+
export const renderExtension = (content, layout, options = {}, removeOverflow, extensionId, extensionViewportSizes, nodeHeight, localId, shouldDisplayExtensionAsInline, node, isInsideOfInlineExtension) => {
|
|
40
40
|
const overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
41
41
|
|
|
42
42
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -76,7 +76,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
76
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
77
77
|
,
|
|
78
78
|
className: overflowContainerClass,
|
|
79
|
-
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
79
|
+
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
80
80
|
}, content));
|
|
81
81
|
}
|
|
82
82
|
return jsx(WidthConsumer, null, ({
|
|
@@ -99,7 +99,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
99
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
100
100
|
,
|
|
101
101
|
className: overflowContainerClass,
|
|
102
|
-
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
102
|
+
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
103
103
|
}, content)));
|
|
104
104
|
};
|
|
105
105
|
const Extension = props => {
|
|
@@ -112,7 +112,8 @@ const Extension = props => {
|
|
|
112
112
|
extensionViewportSizes,
|
|
113
113
|
parameters,
|
|
114
114
|
nodeHeight,
|
|
115
|
-
localId
|
|
115
|
+
localId,
|
|
116
|
+
isInsideOfInlineExtension
|
|
116
117
|
} = props;
|
|
117
118
|
return jsx(ExtensionRenderer
|
|
118
119
|
// Ignored via go/ees005
|
|
@@ -130,7 +131,7 @@ const Extension = props => {
|
|
|
130
131
|
handleRef,
|
|
131
132
|
shadowClassNames,
|
|
132
133
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
133
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
134
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
134
135
|
}
|
|
135
136
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
136
137
|
} catch (e) {
|
|
@@ -143,7 +144,7 @@ const Extension = props => {
|
|
|
143
144
|
handleRef,
|
|
144
145
|
shadowClassNames,
|
|
145
146
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
146
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
147
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
147
148
|
});
|
|
148
149
|
};
|
|
149
150
|
const _default_1 = overflowShadow(Extension, {
|
|
@@ -296,39 +296,6 @@ const rendererFullWidthStylesForTableResizing = css({
|
|
|
296
296
|
width: '100% !important'
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
|
-
|
|
300
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
301
|
-
const telepointerStyles = css({
|
|
302
|
-
[`#${TELEPOINTER_ID}`]: {
|
|
303
|
-
display: 'inline-block',
|
|
304
|
-
position: 'relative',
|
|
305
|
-
width: '1.5px',
|
|
306
|
-
height: '25px',
|
|
307
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)",
|
|
308
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
309
|
-
'&::after': {
|
|
310
|
-
content: '"AI"',
|
|
311
|
-
position: 'absolute',
|
|
312
|
-
display: 'block',
|
|
313
|
-
top: 0,
|
|
314
|
-
left: 0,
|
|
315
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
316
|
-
fontSize: '10px',
|
|
317
|
-
fontWeight: "var(--ds-font-weight-bold, 653)",
|
|
318
|
-
width: '12.5px',
|
|
319
|
-
height: '13px',
|
|
320
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
321
|
-
paddingTop: '1px',
|
|
322
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
323
|
-
paddingLeft: '1.5px',
|
|
324
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
325
|
-
lineHeight: 'initial',
|
|
326
|
-
borderRadius: `0px ${"var(--ds-radius-xsmall, 2px)"} ${"var(--ds-radius-xsmall, 2px)"} 0px`,
|
|
327
|
-
color: "var(--ds-text-inverse, white)",
|
|
328
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)"
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
299
|
const rovoTelepointerStyles = css({
|
|
333
300
|
[`#${TELEPOINTER_ID}`]: {
|
|
334
301
|
display: 'inline-block',
|
|
@@ -2091,6 +2058,12 @@ const syncBlockStyles = css({
|
|
|
2091
2058
|
boxShadow: `0 0 0 1px ${"var(--ds-border, #0B120E24)"}`
|
|
2092
2059
|
}
|
|
2093
2060
|
});
|
|
2061
|
+
const syncBlockOverflowStyles = css({
|
|
2062
|
+
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2063
|
+
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
2064
|
+
overflow: 'hidden'
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2094
2067
|
export const RendererStyleContainer = props => {
|
|
2095
2068
|
const {
|
|
2096
2069
|
onClick,
|
|
@@ -2131,7 +2104,7 @@ export const RendererStyleContainer = props => {
|
|
|
2131
2104
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
2132
2105
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
2133
2106
|
},
|
|
2134
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles,
|
|
2107
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
2135
2108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2136
2109
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2137
2110
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -2139,7 +2112,7 @@ export const RendererStyleContainer = props => {
|
|
|
2139
2112
|
// this should be placed after baseOtherStyles
|
|
2140
2113
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
2141
2114
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2142
|
-
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, 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],
|
|
2115
|
+
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, 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) && fg('platform_synced_block_dogfooding') && syncBlockOverflowStyles],
|
|
2143
2116
|
"data-testid": testId
|
|
2144
2117
|
}, children)
|
|
2145
2118
|
);
|
|
@@ -56,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
58
58
|
const packageName = "@atlaskit/renderer";
|
|
59
|
-
const packageVersion = "
|
|
59
|
+
const packageVersion = "0.0.0-development";
|
|
60
60
|
const setAsQueryContainerStyles = css({
|
|
61
61
|
containerName: 'ak-renderer-wrapper',
|
|
62
62
|
containerType: 'inline-size'
|
|
@@ -47,6 +47,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
47
47
|
var localId = arguments.length > 7 ? arguments[7] : undefined;
|
|
48
48
|
var shouldDisplayExtensionAsInline = arguments.length > 8 ? arguments[8] : undefined;
|
|
49
49
|
var node = arguments.length > 9 ? arguments[9] : undefined;
|
|
50
|
+
var isInsideOfInlineExtension = arguments.length > 10 ? arguments[10] : undefined;
|
|
50
51
|
var overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
51
52
|
|
|
52
53
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -86,7 +87,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
86
87
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
87
88
|
,
|
|
88
89
|
className: overflowContainerClass,
|
|
89
|
-
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
90
|
+
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
90
91
|
}, content));
|
|
91
92
|
}
|
|
92
93
|
return jsx(WidthConsumer, null, function (_ref2) {
|
|
@@ -109,7 +110,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
109
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
110
111
|
,
|
|
111
112
|
className: overflowContainerClass,
|
|
112
|
-
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
113
|
+
css: [!(isInsideOfInlineExtension && expValEquals('confluence_inline_insert_excerpt_width_bugfix', 'isEnabled', true)) && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
113
114
|
}, content));
|
|
114
115
|
});
|
|
115
116
|
};
|
|
@@ -124,7 +125,8 @@ var Extension = function Extension(props) {
|
|
|
124
125
|
extensionViewportSizes = props.extensionViewportSizes,
|
|
125
126
|
parameters = props.parameters,
|
|
126
127
|
nodeHeight = props.nodeHeight,
|
|
127
|
-
localId = props.localId
|
|
128
|
+
localId = props.localId,
|
|
129
|
+
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
128
130
|
return jsx(ExtensionRenderer
|
|
129
131
|
// Ignored via go/ees005
|
|
130
132
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -140,7 +142,7 @@ var Extension = function Extension(props) {
|
|
|
140
142
|
handleRef: handleRef,
|
|
141
143
|
shadowClassNames: shadowClassNames,
|
|
142
144
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
143
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
145
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
144
146
|
}
|
|
145
147
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
146
148
|
} catch (e) {
|
|
@@ -153,7 +155,7 @@ var Extension = function Extension(props) {
|
|
|
153
155
|
handleRef: handleRef,
|
|
154
156
|
shadowClassNames: shadowClassNames,
|
|
155
157
|
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
156
|
-
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined);
|
|
158
|
+
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
157
159
|
});
|
|
158
160
|
};
|
|
159
161
|
var _default_1 = overflowShadow(Extension, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css,
|
|
2
|
+
var _css, _css7;
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles */
|
|
4
4
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
5
5
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -215,37 +215,6 @@ var rendererFullWidthStylesForTableResizing = css({
|
|
|
215
215
|
width: '100% !important'
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
|
-
|
|
219
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
220
|
-
var telepointerStyles = css(_defineProperty({}, "#".concat(TELEPOINTER_ID), {
|
|
221
|
-
display: 'inline-block',
|
|
222
|
-
position: 'relative',
|
|
223
|
-
width: '1.5px',
|
|
224
|
-
height: '25px',
|
|
225
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)",
|
|
226
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
227
|
-
'&::after': {
|
|
228
|
-
content: '"AI"',
|
|
229
|
-
position: 'absolute',
|
|
230
|
-
display: 'block',
|
|
231
|
-
top: 0,
|
|
232
|
-
left: 0,
|
|
233
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
234
|
-
fontSize: '10px',
|
|
235
|
-
fontWeight: "var(--ds-font-weight-bold, 653)",
|
|
236
|
-
width: '12.5px',
|
|
237
|
-
height: '13px',
|
|
238
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
239
|
-
paddingTop: '1px',
|
|
240
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
241
|
-
paddingLeft: '1.5px',
|
|
242
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
243
|
-
lineHeight: 'initial',
|
|
244
|
-
borderRadius: "0px ".concat("var(--ds-radius-xsmall, 2px)", " ", "var(--ds-radius-xsmall, 2px)", " 0px"),
|
|
245
|
-
color: "var(--ds-text-inverse, white)",
|
|
246
|
-
backgroundColor: "var(--ds-background-brand-bold, #1868DB)"
|
|
247
|
-
}
|
|
248
|
-
}));
|
|
249
218
|
var rovoTelepointerStyles = css(_defineProperty({}, "#".concat(TELEPOINTER_ID), {
|
|
250
219
|
display: 'inline-block',
|
|
251
220
|
position: 'relative',
|
|
@@ -583,13 +552,13 @@ var paragraphSharedStyleScaledMargin = css({
|
|
|
583
552
|
letterSpacing: '-0.005em'
|
|
584
553
|
}
|
|
585
554
|
});
|
|
586
|
-
var listsSharedStyles = css((
|
|
555
|
+
var listsSharedStyles = css((_css7 = {
|
|
587
556
|
/* =============== INDENTATION SPACING ========= */
|
|
588
557
|
'ul, ol': {
|
|
589
558
|
boxSizing: 'border-box',
|
|
590
559
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(listItemCounterPadding, "px)")
|
|
591
560
|
}
|
|
592
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
561
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css7, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
|
|
593
562
|
/*
|
|
594
563
|
Ensures list item content adheres to the list's margin instead
|
|
595
564
|
of filling the entire block row. This is important to allow
|
|
@@ -621,7 +590,7 @@ var listsSharedStyles = css((_css8 = {
|
|
|
621
590
|
listStyleType: 'lower-alpha'
|
|
622
591
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
623
592
|
listStyleType: 'lower-roman'
|
|
624
|
-
}), _defineProperty(_defineProperty(_defineProperty(
|
|
593
|
+
}), _defineProperty(_defineProperty(_defineProperty(_css7, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
625
594
|
listStyleType: 'disc'
|
|
626
595
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
627
596
|
listStyleType: 'circle'
|
|
@@ -1655,6 +1624,10 @@ var syncBlockStyles = css(_defineProperty(_defineProperty(_defineProperty(_defin
|
|
|
1655
1624
|
}), ".".concat(SyncBlockSharedCssClassName.loading), {
|
|
1656
1625
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #0B120E24)")
|
|
1657
1626
|
}));
|
|
1627
|
+
var syncBlockOverflowStyles = css(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
1628
|
+
// Contain floated elements (wrap-left/wrap-right) within synced block borders
|
|
1629
|
+
overflow: 'hidden'
|
|
1630
|
+
}));
|
|
1658
1631
|
export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
1659
1632
|
var onClick = props.onClick,
|
|
1660
1633
|
onMouseDown = props.onMouseDown,
|
|
@@ -1693,7 +1666,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1693
1666
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1694
1667
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1695
1668
|
},
|
|
1696
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles,
|
|
1669
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
1697
1670
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1698
1671
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1699
1672
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
@@ -1701,7 +1674,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1701
1674
|
// this should be placed after baseOtherStyles
|
|
1702
1675
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1703
1676
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1704
|
-
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, 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],
|
|
1677
|
+
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, 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) && fg('platform_synced_block_dogfooding') && syncBlockOverflowStyles],
|
|
1705
1678
|
"data-testid": testId
|
|
1706
1679
|
}, children)
|
|
1707
1680
|
);
|
|
@@ -61,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
63
63
|
var packageName = "@atlaskit/renderer";
|
|
64
|
-
var packageVersion = "
|
|
64
|
+
var packageVersion = "0.0.0-development";
|
|
65
65
|
var setAsQueryContainerStyles = css({
|
|
66
66
|
containerName: 'ak-renderer-wrapper',
|
|
67
67
|
containerType: 'inline-size'
|
|
@@ -14,6 +14,7 @@ interface Props {
|
|
|
14
14
|
extensionKey: string;
|
|
15
15
|
extensionType: string;
|
|
16
16
|
extensionViewportSizes?: ExtensionViewportSize[];
|
|
17
|
+
isInsideOfInlineExtension?: boolean;
|
|
17
18
|
layout?: ExtensionLayout;
|
|
18
19
|
localId?: string;
|
|
19
20
|
marks?: PMMark[];
|
|
@@ -31,7 +32,7 @@ type AllOrNone<T> = T | {
|
|
|
31
32
|
type RenderExtensionOptions = {
|
|
32
33
|
isTopLevel?: boolean;
|
|
33
34
|
} & AllOrNone<OverflowShadowProps>;
|
|
34
|
-
export declare const renderExtension: (content: any, layout: string, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters
|
|
35
|
+
export declare const renderExtension: (content: any, layout: string, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters>, isInsideOfInlineExtension?: boolean) => React.JSX.Element;
|
|
35
36
|
declare const _default_1: {
|
|
36
37
|
new (props: Props & OverflowShadowProps): {
|
|
37
38
|
calcOverflowDiff: () => number;
|
|
@@ -14,6 +14,7 @@ interface Props {
|
|
|
14
14
|
extensionKey: string;
|
|
15
15
|
extensionType: string;
|
|
16
16
|
extensionViewportSizes?: ExtensionViewportSize[];
|
|
17
|
+
isInsideOfInlineExtension?: boolean;
|
|
17
18
|
layout?: ExtensionLayout;
|
|
18
19
|
localId?: string;
|
|
19
20
|
marks?: PMMark[];
|
|
@@ -31,7 +32,7 @@ type AllOrNone<T> = T | {
|
|
|
31
32
|
type RenderExtensionOptions = {
|
|
32
33
|
isTopLevel?: boolean;
|
|
33
34
|
} & AllOrNone<OverflowShadowProps>;
|
|
34
|
-
export declare const renderExtension: (content: any, layout: string, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters
|
|
35
|
+
export declare const renderExtension: (content: any, layout: string, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters>, isInsideOfInlineExtension?: boolean) => React.JSX.Element;
|
|
35
36
|
declare const _default_1: {
|
|
36
37
|
new (props: Props & OverflowShadowProps): {
|
|
37
38
|
calcOverflowDiff: () => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.2.
|
|
3
|
+
"version": "126.2.3",
|
|
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": "^
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^17.0.0",
|
|
61
61
|
"@atlaskit/tokens": "^10.1.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"@atlaskit/mention": "^24.4.0",
|
|
91
91
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
92
92
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|
|
93
|
-
"@atlaskit/profilecard": "^24.
|
|
94
|
-
"@atlaskit/util-data-test": "^18.
|
|
93
|
+
"@atlaskit/profilecard": "^24.34.0",
|
|
94
|
+
"@atlaskit/util-data-test": "^18.5.0",
|
|
95
95
|
"@atlassian/a11y-jest-testing": "^0.8.0",
|
|
96
96
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
97
97
|
"@testing-library/react": "^16.3.0",
|
|
@@ -132,9 +132,6 @@
|
|
|
132
132
|
"platform-ssr-table-resize": {
|
|
133
133
|
"type": "boolean"
|
|
134
134
|
},
|
|
135
|
-
"platform_editor_ai_generic_prep_for_aifc_2": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
135
|
"platform_fix_nested_num_column_scaling": {
|
|
139
136
|
"type": "boolean"
|
|
140
137
|
},
|
|
@@ -248,6 +245,12 @@
|
|
|
248
245
|
},
|
|
249
246
|
"platform_editor_table_fixed_column_width_prop": {
|
|
250
247
|
"type": "boolean"
|
|
248
|
+
},
|
|
249
|
+
"confluence_inline_insert_excerpt_width_bugfix": {
|
|
250
|
+
"type": "boolean"
|
|
251
|
+
},
|
|
252
|
+
"platform_synced_block_dogfooding": {
|
|
253
|
+
"type": "boolean"
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
256
|
}
|