@atlaskit/renderer 124.17.8 → 124.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/afm-cc/tsconfig.json +6 -0
- package/afm-jira/tsconfig.json +6 -0
- package/afm-products/tsconfig.json +6 -0
- package/dist/cjs/react/marks/breakout.js +1 -1
- package/dist/cjs/react/nodes/extension.js +26 -10
- package/dist/cjs/react/nodes/table/colgroup.js +2 -2
- package/dist/cjs/react/nodes/table.js +3 -3
- package/dist/cjs/react/nodes/tableNew.js +4 -4
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/cjs/ui/Renderer/index.js +3 -3
- package/dist/es2019/react/marks/breakout.js +1 -1
- package/dist/es2019/react/nodes/extension.js +23 -8
- package/dist/es2019/react/nodes/table/colgroup.js +2 -2
- package/dist/es2019/react/nodes/table.js +3 -3
- package/dist/es2019/react/nodes/tableNew.js +4 -4
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/es2019/ui/Renderer/index.js +3 -3
- package/dist/esm/react/marks/breakout.js +1 -1
- package/dist/esm/react/nodes/extension.js +23 -8
- package/dist/esm/react/nodes/table/colgroup.js +2 -2
- package/dist/esm/react/nodes/table.js +3 -3
- package/dist/esm/react/nodes/tableNew.js +4 -4
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/esm/ui/Renderer/index.js +3 -3
- package/dist/types/analytics/events.d.ts +4 -1
- package/dist/types/react/nodes/extension.d.ts +4 -0
- package/dist/types/ui/annotations/element/mark.d.ts +12 -12
- package/dist/types-ts4.5/analytics/events.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/extension.d.ts +4 -0
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +12 -12
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5f95a3d8edc0c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f95a3d8edc0c) -
|
|
8
|
+
EDITOR-3356 fix macro renderer syle inside layout
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 124.18.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`8677e7b660127`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8677e7b660127) -
|
|
19
|
+
EDITOR-3792 Rollup max width changes previously gated with editor_tinymce_full_width_mode into
|
|
20
|
+
combined frontend/backend flag confluence_max_width_content_appearance
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 124.17.8
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"../src/**/stories/**/*"
|
|
25
25
|
],
|
|
26
26
|
"references": [
|
|
27
|
+
{
|
|
28
|
+
"path": "../../adf-schema/afm-cc/tsconfig.json"
|
|
29
|
+
},
|
|
27
30
|
{
|
|
28
31
|
"path": "../../adf-utils/afm-cc/tsconfig.json"
|
|
29
32
|
},
|
|
@@ -51,6 +54,9 @@
|
|
|
51
54
|
{
|
|
52
55
|
"path": "../../editor-palette/afm-cc/tsconfig.json"
|
|
53
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../editor-prosemirror/afm-cc/tsconfig.json"
|
|
59
|
+
},
|
|
54
60
|
{
|
|
55
61
|
"path": "../../editor-shared-styles/afm-cc/tsconfig.json"
|
|
56
62
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"../src/**/stories/**/*"
|
|
25
25
|
],
|
|
26
26
|
"references": [
|
|
27
|
+
{
|
|
28
|
+
"path": "../../adf-schema/afm-jira/tsconfig.json"
|
|
29
|
+
},
|
|
27
30
|
{
|
|
28
31
|
"path": "../../adf-utils/afm-jira/tsconfig.json"
|
|
29
32
|
},
|
|
@@ -51,6 +54,9 @@
|
|
|
51
54
|
{
|
|
52
55
|
"path": "../../editor-palette/afm-jira/tsconfig.json"
|
|
53
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../editor-prosemirror/afm-jira/tsconfig.json"
|
|
59
|
+
},
|
|
54
60
|
{
|
|
55
61
|
"path": "../../editor-shared-styles/afm-jira/tsconfig.json"
|
|
56
62
|
},
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"../src/**/stories/**/*"
|
|
25
25
|
],
|
|
26
26
|
"references": [
|
|
27
|
+
{
|
|
28
|
+
"path": "../../adf-schema/afm-products/tsconfig.json"
|
|
29
|
+
},
|
|
27
30
|
{
|
|
28
31
|
"path": "../../adf-utils/afm-products/tsconfig.json"
|
|
29
32
|
},
|
|
@@ -51,6 +54,9 @@
|
|
|
51
54
|
{
|
|
52
55
|
"path": "../../editor-palette/afm-products/tsconfig.json"
|
|
53
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../editor-prosemirror/afm-products/tsconfig.json"
|
|
59
|
+
},
|
|
54
60
|
{
|
|
55
61
|
"path": "../../editor-shared-styles/afm-products/tsconfig.json"
|
|
56
62
|
},
|
|
@@ -27,7 +27,7 @@ var getWidth = function getWidth(width, mode) {
|
|
|
27
27
|
if ((0, _experiments.editorExperiment)('advanced_layouts', true) && width) {
|
|
28
28
|
return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
29
29
|
} else {
|
|
30
|
-
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
30
|
+
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
31
31
|
if (mode === 'max' || typeof width === 'number' && width >= _editorSharedStyles.akEditorFullWidthLayoutWidth) {
|
|
32
32
|
return "min(".concat(_editorSharedStyles.akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
33
33
|
}
|
|
@@ -6,13 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.renderExtension = exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react =
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _react2 = _interopRequireDefault(require("react"));
|
|
10
11
|
var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRenderer"));
|
|
11
12
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
14
|
var _consts = require("../../consts");
|
|
14
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
16
|
var _breakout = require("../utils/breakout");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
* @jsx jsx
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
|
+
|
|
16
25
|
var viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
17
26
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
18
27
|
var macroHeights = {
|
|
@@ -34,6 +43,9 @@ var getViewportSize = function getViewportSize(extensionId, extensionViewportSiz
|
|
|
34
43
|
return macroHeights[viewportSize];
|
|
35
44
|
}
|
|
36
45
|
};
|
|
46
|
+
var containerStyle = (0, _react.css)({
|
|
47
|
+
containerType: 'inline-size'
|
|
48
|
+
});
|
|
37
49
|
var renderExtension = exports.renderExtension = function renderExtension(content, layout) {
|
|
38
50
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
39
51
|
var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
|
|
@@ -57,7 +69,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
57
69
|
var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
58
70
|
var extensionHeight = nodeHeight || viewportSize;
|
|
59
71
|
if ((0, _expValEquals.expValEquals)('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
60
|
-
return
|
|
72
|
+
return (0, _react.jsx)("div", {
|
|
61
73
|
ref: options.handleRef
|
|
62
74
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
63
75
|
,
|
|
@@ -72,13 +84,15 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
72
84
|
"data-local-id": localId,
|
|
73
85
|
"data-testid": "extension--wrapper",
|
|
74
86
|
"data-node-type": "extension"
|
|
75
|
-
},
|
|
76
|
-
|
|
87
|
+
}, (0, _react.jsx)("div", {
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
89
|
+
className: overflowContainerClass,
|
|
90
|
+
css: [(0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
77
91
|
}, content));
|
|
78
92
|
}
|
|
79
|
-
return
|
|
93
|
+
return (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref2) {
|
|
80
94
|
var width = _ref2.width;
|
|
81
|
-
return
|
|
95
|
+
return (0, _react.jsx)("div", {
|
|
82
96
|
ref: options.handleRef
|
|
83
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
84
98
|
,
|
|
@@ -91,8 +105,10 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
91
105
|
},
|
|
92
106
|
"data-layout": layout,
|
|
93
107
|
"data-local-id": localId
|
|
94
|
-
},
|
|
95
|
-
|
|
108
|
+
}, (0, _react.jsx)("div", {
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
110
|
+
className: overflowContainerClass,
|
|
111
|
+
css: [(0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
96
112
|
}, content));
|
|
97
113
|
});
|
|
98
114
|
};
|
|
@@ -108,7 +124,7 @@ var Extension = function Extension(props) {
|
|
|
108
124
|
parameters = props.parameters,
|
|
109
125
|
nodeHeight = props.nodeHeight,
|
|
110
126
|
localId = props.localId;
|
|
111
|
-
return
|
|
127
|
+
return (0, _react.jsx)(_ExtensionRenderer.default
|
|
112
128
|
// Ignored via go/ees005
|
|
113
129
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
114
130
|
, (0, _extends2.default)({}, props, {
|
|
@@ -117,7 +133,7 @@ var Extension = function Extension(props) {
|
|
|
117
133
|
var result = _ref3.result;
|
|
118
134
|
try {
|
|
119
135
|
// Return the result directly if it's a valid JSX.Element
|
|
120
|
-
if (result && /*#__PURE__*/
|
|
136
|
+
if (result && /*#__PURE__*/_react2.default.isValidElement(result)) {
|
|
121
137
|
return renderExtension(result, layout, {
|
|
122
138
|
isTopLevel: path.length < 1,
|
|
123
139
|
handleRef: handleRef,
|
|
@@ -234,12 +234,12 @@ var Colgroup = exports.Colgroup = function Colgroup(props) {
|
|
|
234
234
|
}
|
|
235
235
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
236
236
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
237
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment', true, {
|
|
237
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment', true, {
|
|
238
238
|
exposure: true
|
|
239
239
|
}) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment_jira', true, {
|
|
240
240
|
exposure: true
|
|
241
241
|
}),
|
|
242
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
242
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)))
|
|
243
243
|
}));
|
|
244
244
|
if (!colStyles) {
|
|
245
245
|
return null;
|
|
@@ -457,13 +457,13 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
457
457
|
var maxWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
458
458
|
var commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
459
459
|
var isCommentAppearanceAndTableAlignmentEnabled = (0, _appearance.isCommentAppearance)(rendererAppearance) && allowTableAlignment;
|
|
460
|
-
var lineLength = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLength : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
461
|
-
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
460
|
+
var lineLength = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLength : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
461
|
+
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
462
462
|
|
|
463
463
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
464
464
|
var fixTableSSRResizing = false;
|
|
465
465
|
var tableWidthNew = fixTableSSRResizing ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : tableWidth;
|
|
466
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && (0, _appearance.isMaxWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
466
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && (0, _appearance.isMaxWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
467
467
|
var leftCSS;
|
|
468
468
|
if (shouldCalculateLeftForAlignment) {
|
|
469
469
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -405,7 +405,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
405
405
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(_style.FullPagePadding, "px * 2");
|
|
406
406
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
407
407
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
408
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
408
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
409
409
|
return "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
410
410
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
411
411
|
return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -424,9 +424,9 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
424
424
|
var fullWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
425
425
|
var maxWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
426
426
|
var isCommentAppearanceAndTableAlignmentEnabled = (0, _appearance.isCommentAppearance)(rendererAppearance) && allowTableAlignment;
|
|
427
|
-
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
427
|
+
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
428
428
|
var tableWidthNew = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
429
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
429
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
430
430
|
var leftCSS;
|
|
431
431
|
if (shouldCalculateLeftForAlignment) {
|
|
432
432
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -455,7 +455,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
455
455
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
456
456
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
457
457
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
458
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
458
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
459
459
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
460
460
|
}
|
|
461
461
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -1669,13 +1669,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1669
1669
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1670
1670
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1671
1671
|
},
|
|
1672
|
-
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, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !(0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
1672
|
+
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, !(0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
1673
1673
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1674
1674
|
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,
|
|
1675
1675
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1676
1676
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && (0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1677
1677
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1678
|
-
(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)) && 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],
|
|
1678
|
+
(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],
|
|
1679
1679
|
"data-testid": testId
|
|
1680
1680
|
}, children)
|
|
1681
1681
|
);
|
|
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "124.
|
|
72
|
+
var packageVersion = "124.18.0";
|
|
73
73
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -721,7 +721,7 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
721
721
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
722
722
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
723
723
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
724
|
-
return (appearance === 'full-page' || appearance === 'full-width' || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('editor_tinymce_full_width_mode', 'isEnabled', true) && appearance === 'max') &&
|
|
724
|
+
return (appearance === 'full-page' || appearance === 'full-width' || ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && appearance === 'max') &&
|
|
725
725
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
726
726
|
// Make sure only the root renderer is set to be query container.
|
|
727
727
|
isTopLevelRenderer && allowRendererContainerStyles && (0, _platformFeatureFlags.fg)('platform-ssr-table-resize') ? (0, _react2.jsx)("div", {
|
|
@@ -783,7 +783,7 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
783
783
|
var innerRef = props.innerRef || localRef;
|
|
784
784
|
|
|
785
785
|
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
786
|
-
if (props.appearance === 'max' && !(0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
786
|
+
if (props.appearance === 'max' && !(0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && !(0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
787
787
|
props.appearance = 'full-width';
|
|
788
788
|
}
|
|
789
789
|
if (!allowAnnotations) {
|
|
@@ -19,7 +19,7 @@ const getWidth = (width, mode) => {
|
|
|
19
19
|
if (editorExperiment('advanced_layouts', true) && width) {
|
|
20
20
|
return `min(${width}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
21
21
|
} else {
|
|
22
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
22
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
23
23
|
if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
|
|
24
24
|
return `min(${akEditorMaxLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
25
25
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
+
import { jsx, css } from '@emotion/react';
|
|
2
9
|
import React from 'react';
|
|
3
10
|
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
4
11
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
@@ -6,6 +13,7 @@ import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
|
6
13
|
import { RendererCssClassName } from '../../consts';
|
|
7
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
15
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
17
|
const viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
10
18
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
11
19
|
const macroHeights = {
|
|
@@ -25,6 +33,9 @@ const getViewportSize = (extensionId, extensionViewportSizes) => {
|
|
|
25
33
|
return macroHeights[viewportSize];
|
|
26
34
|
}
|
|
27
35
|
};
|
|
36
|
+
const containerStyle = css({
|
|
37
|
+
containerType: 'inline-size'
|
|
38
|
+
});
|
|
28
39
|
export const renderExtension = (content, layout, options = {}, removeOverflow, extensionId, extensionViewportSizes, nodeHeight, localId) => {
|
|
29
40
|
const overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
30
41
|
|
|
@@ -42,7 +53,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
42
53
|
const viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
43
54
|
const extensionHeight = nodeHeight || viewportSize;
|
|
44
55
|
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
45
|
-
return
|
|
56
|
+
return jsx("div", {
|
|
46
57
|
ref: options.handleRef
|
|
47
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
59
|
,
|
|
@@ -57,13 +68,15 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
57
68
|
"data-local-id": localId,
|
|
58
69
|
"data-testid": "extension--wrapper",
|
|
59
70
|
"data-node-type": "extension"
|
|
60
|
-
},
|
|
61
|
-
|
|
71
|
+
}, jsx("div", {
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
73
|
+
className: overflowContainerClass,
|
|
74
|
+
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
62
75
|
}, content));
|
|
63
76
|
}
|
|
64
|
-
return
|
|
77
|
+
return jsx(WidthConsumer, null, ({
|
|
65
78
|
width
|
|
66
|
-
}) =>
|
|
79
|
+
}) => jsx("div", {
|
|
67
80
|
ref: options.handleRef
|
|
68
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
69
82
|
,
|
|
@@ -76,8 +89,10 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
76
89
|
},
|
|
77
90
|
"data-layout": layout,
|
|
78
91
|
"data-local-id": localId
|
|
79
|
-
},
|
|
80
|
-
|
|
92
|
+
}, jsx("div", {
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
94
|
+
className: overflowContainerClass,
|
|
95
|
+
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
81
96
|
}, content)));
|
|
82
97
|
};
|
|
83
98
|
const Extension = props => {
|
|
@@ -92,7 +107,7 @@ const Extension = props => {
|
|
|
92
107
|
nodeHeight,
|
|
93
108
|
localId
|
|
94
109
|
} = props;
|
|
95
|
-
return
|
|
110
|
+
return jsx(ExtensionRenderer
|
|
96
111
|
// Ignored via go/ees005
|
|
97
112
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
98
113
|
, _extends({}, props, {
|
|
@@ -223,12 +223,12 @@ export const Colgroup = props => {
|
|
|
223
223
|
const colStyles = renderScaleDownColgroup({
|
|
224
224
|
...props,
|
|
225
225
|
isTopLevelRenderer,
|
|
226
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
226
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
227
227
|
exposure: true
|
|
228
228
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
229
229
|
exposure: true
|
|
230
230
|
}),
|
|
231
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
231
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)))
|
|
232
232
|
});
|
|
233
233
|
if (!colStyles) {
|
|
234
234
|
return null;
|
|
@@ -400,13 +400,13 @@ export class TableContainer extends React.Component {
|
|
|
400
400
|
const maxWidthLineLengthCSS = `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
401
401
|
const commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
402
402
|
const isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
403
|
-
const lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
404
|
-
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
403
|
+
const lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
404
|
+
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
405
405
|
|
|
406
406
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
407
407
|
const fixTableSSRResizing = false;
|
|
408
408
|
const tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
409
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
409
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
410
410
|
let leftCSS;
|
|
411
411
|
if (shouldCalculateLeftForAlignment) {
|
|
412
412
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -349,7 +349,7 @@ export class TableContainer extends React.Component {
|
|
|
349
349
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : `100cqw - ${FullPagePadding}px * 2`;
|
|
350
350
|
const renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : `100cqw`;
|
|
351
351
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
352
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
352
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
353
353
|
return `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
354
354
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
355
355
|
return `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
@@ -368,9 +368,9 @@ export class TableContainer extends React.Component {
|
|
|
368
368
|
const fullWidthLineLengthCSS = `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
369
369
|
const maxWidthLineLengthCSS = `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
370
370
|
const isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
371
|
-
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
371
|
+
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
372
372
|
const tableWidthNew = getTableContainerWidth(tableNode);
|
|
373
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
373
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
374
374
|
let leftCSS;
|
|
375
375
|
if (shouldCalculateLeftForAlignment) {
|
|
376
376
|
leftCSS = `(${tableWidthCSS} - ${lineLengthCSS}) / 2`;
|
|
@@ -399,7 +399,7 @@ export class TableContainer extends React.Component {
|
|
|
399
399
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
400
400
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
401
401
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
402
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
402
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
403
403
|
finalTableContainerWidth = allowTableResizing ? `calc(${tableWidthCSS})` : 'inherit';
|
|
404
404
|
}
|
|
405
405
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -2097,13 +2097,13 @@ export const RendererStyleContainer = props => {
|
|
|
2097
2097
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
2098
2098
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
2099
2099
|
},
|
|
2100
|
-
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)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
2100
|
+
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, !fg('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
2101
2101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2102
2102
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2103
2103
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2104
2104
|
fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
2105
2105
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2106
|
-
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)) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles],
|
|
2106
|
+
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],
|
|
2107
2107
|
"data-testid": testId
|
|
2108
2108
|
}, children)
|
|
2109
2109
|
);
|
|
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
55
55
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const packageName = "@atlaskit/renderer";
|
|
58
|
-
const packageVersion = "124.
|
|
58
|
+
const packageVersion = "124.18.0";
|
|
59
59
|
const setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size'
|
|
@@ -707,7 +707,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
707
707
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
708
708
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
709
709
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
710
|
-
return (appearance === 'full-page' || appearance === 'full-width' || expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) && appearance === 'max') &&
|
|
710
|
+
return (appearance === 'full-page' || appearance === 'full-width' || (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && appearance === 'max') &&
|
|
711
711
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
712
712
|
// Make sure only the root renderer is set to be query container.
|
|
713
713
|
isTopLevelRenderer && allowRendererContainerStyles && fg('platform-ssr-table-resize') ? jsx("div", {
|
|
@@ -770,7 +770,7 @@ const RendererWithAnnotationSelection = props => {
|
|
|
770
770
|
const innerRef = props.innerRef || localRef;
|
|
771
771
|
|
|
772
772
|
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
773
|
-
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
773
|
+
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && !expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
774
774
|
props.appearance = 'full-width';
|
|
775
775
|
}
|
|
776
776
|
if (!allowAnnotations) {
|
|
@@ -19,7 +19,7 @@ var getWidth = function getWidth(width, mode) {
|
|
|
19
19
|
if (editorExperiment('advanced_layouts', true) && width) {
|
|
20
20
|
return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
21
21
|
} else {
|
|
22
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
22
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
23
23
|
if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
|
|
24
24
|
return "min(".concat(akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
25
25
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
+
import { jsx, css } from '@emotion/react';
|
|
2
9
|
import React from 'react';
|
|
3
10
|
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
4
11
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
@@ -6,6 +13,7 @@ import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
|
6
13
|
import { RendererCssClassName } from '../../consts';
|
|
7
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
15
|
import { calcBreakoutWidthCss } from '../utils/breakout';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
17
|
var viewportSizes = ['small', 'medium', 'default', 'large', 'xlarge'];
|
|
10
18
|
// Mirrors sizes from https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/browse/platform/packages/forge/xen-editor-provider/src/render/renderers/ForgeUIExtension.tsx
|
|
11
19
|
var macroHeights = {
|
|
@@ -27,6 +35,9 @@ var getViewportSize = function getViewportSize(extensionId, extensionViewportSiz
|
|
|
27
35
|
return macroHeights[viewportSize];
|
|
28
36
|
}
|
|
29
37
|
};
|
|
38
|
+
var containerStyle = css({
|
|
39
|
+
containerType: 'inline-size'
|
|
40
|
+
});
|
|
30
41
|
export var renderExtension = function renderExtension(content, layout) {
|
|
31
42
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
32
43
|
var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
|
|
@@ -50,7 +61,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
50
61
|
var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
|
|
51
62
|
var extensionHeight = nodeHeight || viewportSize;
|
|
52
63
|
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
53
|
-
return
|
|
64
|
+
return jsx("div", {
|
|
54
65
|
ref: options.handleRef
|
|
55
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
67
|
,
|
|
@@ -65,13 +76,15 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
65
76
|
"data-local-id": localId,
|
|
66
77
|
"data-testid": "extension--wrapper",
|
|
67
78
|
"data-node-type": "extension"
|
|
68
|
-
},
|
|
69
|
-
|
|
79
|
+
}, jsx("div", {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
81
|
+
className: overflowContainerClass,
|
|
82
|
+
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
70
83
|
}, content));
|
|
71
84
|
}
|
|
72
|
-
return
|
|
85
|
+
return jsx(WidthConsumer, null, function (_ref2) {
|
|
73
86
|
var width = _ref2.width;
|
|
74
|
-
return
|
|
87
|
+
return jsx("div", {
|
|
75
88
|
ref: options.handleRef
|
|
76
89
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
77
90
|
,
|
|
@@ -84,8 +97,10 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
84
97
|
},
|
|
85
98
|
"data-layout": layout,
|
|
86
99
|
"data-local-id": localId
|
|
87
|
-
},
|
|
88
|
-
|
|
100
|
+
}, jsx("div", {
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
102
|
+
className: overflowContainerClass,
|
|
103
|
+
css: [fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
89
104
|
}, content));
|
|
90
105
|
});
|
|
91
106
|
};
|
|
@@ -101,7 +116,7 @@ var Extension = function Extension(props) {
|
|
|
101
116
|
parameters = props.parameters,
|
|
102
117
|
nodeHeight = props.nodeHeight,
|
|
103
118
|
localId = props.localId;
|
|
104
|
-
return
|
|
119
|
+
return jsx(ExtensionRenderer
|
|
105
120
|
// Ignored via go/ees005
|
|
106
121
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
107
122
|
, _extends({}, props, {
|
|
@@ -228,12 +228,12 @@ export var Colgroup = function Colgroup(props) {
|
|
|
228
228
|
}
|
|
229
229
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
230
230
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
231
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
231
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
232
232
|
exposure: true
|
|
233
233
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
234
234
|
exposure: true
|
|
235
235
|
}),
|
|
236
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
236
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)))
|
|
237
237
|
}));
|
|
238
238
|
if (!colStyles) {
|
|
239
239
|
return null;
|
|
@@ -450,13 +450,13 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
450
450
|
var maxWidthLineLengthCSS = "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
451
451
|
var commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
452
452
|
var isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
453
|
-
var lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
454
|
-
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
453
|
+
var lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
454
|
+
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
455
455
|
|
|
456
456
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
457
457
|
var fixTableSSRResizing = false;
|
|
458
458
|
var tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
459
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
459
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
460
460
|
var leftCSS;
|
|
461
461
|
if (shouldCalculateLeftForAlignment) {
|
|
462
462
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -399,7 +399,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
399
399
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(FullPagePadding, "px * 2");
|
|
400
400
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
401
401
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
402
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
402
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
403
403
|
return "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
404
404
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
405
405
|
return "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -418,9 +418,9 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
418
418
|
var fullWidthLineLengthCSS = "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
419
419
|
var maxWidthLineLengthCSS = "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
420
420
|
var isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
421
|
-
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
421
|
+
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
422
422
|
var tableWidthNew = getTableContainerWidth(tableNode);
|
|
423
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
423
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
424
424
|
var leftCSS;
|
|
425
425
|
if (shouldCalculateLeftForAlignment) {
|
|
426
426
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -449,7 +449,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
449
449
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
450
450
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
451
451
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
452
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
452
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) {
|
|
453
453
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
454
454
|
}
|
|
455
455
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -1662,13 +1662,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1662
1662
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1663
1663
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1664
1664
|
},
|
|
1665
|
-
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)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
1665
|
+
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, !fg('platform_editor_ai_generic_prep_for_aifc_2') && telepointerStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && 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) &&
|
|
1666
1666
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1667
1667
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1668
1668
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1669
1669
|
fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1670
1670
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1671
|
-
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)) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, expValEquals('platform_synced_block', 'isEnabled', true) && syncBlockStyles],
|
|
1671
|
+
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],
|
|
1672
1672
|
"data-testid": testId
|
|
1673
1673
|
}, children)
|
|
1674
1674
|
);
|
|
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var packageName = "@atlaskit/renderer";
|
|
63
|
-
var packageVersion = "124.
|
|
63
|
+
var packageVersion = "124.18.0";
|
|
64
64
|
var setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
|
@@ -712,7 +712,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
712
712
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
713
713
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
714
714
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
715
|
-
return (appearance === 'full-page' || appearance === 'full-width' || expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) && appearance === 'max') &&
|
|
715
|
+
return (appearance === 'full-page' || appearance === 'full-width' || (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && appearance === 'max') &&
|
|
716
716
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
717
717
|
// Make sure only the root renderer is set to be query container.
|
|
718
718
|
isTopLevelRenderer && allowRendererContainerStyles && fg('platform-ssr-table-resize') ? jsx("div", {
|
|
@@ -774,7 +774,7 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
774
774
|
var innerRef = props.innerRef || localRef;
|
|
775
775
|
|
|
776
776
|
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
777
|
-
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
777
|
+
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && !expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
778
778
|
props.appearance = 'full-width';
|
|
779
779
|
}
|
|
780
780
|
if (!allowAnnotations) {
|
|
@@ -148,6 +148,9 @@ type SyncedBlockFetchErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNC
|
|
|
148
148
|
type SyncedBlockGetSourceInfoErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_GET_SOURCE_INFO, {
|
|
149
149
|
error: string;
|
|
150
150
|
}>;
|
|
151
|
-
|
|
151
|
+
type ReferenceSyncedBlockUpdateErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.REFERENCE_SYNCED_BLOCK_UPDATE, {
|
|
152
|
+
error: string;
|
|
153
|
+
}>;
|
|
154
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent | SyncedBlockFetchErrorAEP | SyncedBlockGetSourceInfoErrorAEP | ReferenceSyncedBlockUpdateErrorAEP;
|
|
152
155
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
153
156
|
export {};
|
|
@@ -22,10 +22,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
22
22
|
'--ak-renderer-annotation-startmarker': string;
|
|
23
23
|
'--ak-renderer-annotation-endmarker': string;
|
|
24
24
|
} | undefined;
|
|
25
|
-
'data-mark-type': string;
|
|
26
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
27
25
|
'data-id': AnnotationId;
|
|
28
26
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
27
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
28
|
+
'data-mark-type': string;
|
|
29
29
|
'aria-disabled': boolean;
|
|
30
30
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
31
31
|
id: string;
|
|
@@ -38,9 +38,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
38
38
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
39
39
|
'data-has-focus': boolean;
|
|
40
40
|
'data-is-hovered': boolean;
|
|
41
|
-
'data-mark-type': string;
|
|
42
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
43
41
|
'data-id': AnnotationId;
|
|
42
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
43
|
+
'data-mark-type': string;
|
|
44
44
|
'aria-disabled': boolean;
|
|
45
45
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
46
46
|
id: string;
|
|
@@ -50,10 +50,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
50
50
|
'--ak-renderer-annotation-startmarker': string;
|
|
51
51
|
'--ak-renderer-annotation-endmarker': string;
|
|
52
52
|
} | undefined;
|
|
53
|
-
'data-mark-type': string;
|
|
54
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
55
53
|
'data-id': AnnotationId;
|
|
56
54
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
55
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
56
|
+
'data-mark-type': string;
|
|
57
57
|
role?: undefined;
|
|
58
58
|
tabIndex?: undefined;
|
|
59
59
|
onKeyDown?: undefined;
|
|
@@ -71,9 +71,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
71
71
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
72
72
|
'data-has-focus': boolean;
|
|
73
73
|
'data-is-hovered': boolean;
|
|
74
|
-
'data-mark-type': string;
|
|
75
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
76
74
|
'data-id': AnnotationId;
|
|
75
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
76
|
+
'data-mark-type': string;
|
|
77
77
|
role?: undefined;
|
|
78
78
|
tabIndex?: undefined;
|
|
79
79
|
onKeyDown?: undefined;
|
|
@@ -88,10 +88,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
88
88
|
'--ak-renderer-annotation-startmarker': string;
|
|
89
89
|
'--ak-renderer-annotation-endmarker': string;
|
|
90
90
|
} | undefined;
|
|
91
|
-
'data-mark-type': string;
|
|
92
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
93
91
|
'data-id': AnnotationId;
|
|
94
92
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
93
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
94
|
+
'data-mark-type': string;
|
|
95
95
|
role: string;
|
|
96
96
|
tabIndex: number;
|
|
97
97
|
onKeyDown: (evt: KeyboardEvent) => void;
|
|
@@ -109,9 +109,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
109
109
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
110
110
|
'data-has-focus': boolean;
|
|
111
111
|
'data-is-hovered': boolean;
|
|
112
|
-
'data-mark-type': string;
|
|
113
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
114
112
|
'data-id': AnnotationId;
|
|
113
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
114
|
+
'data-mark-type': string;
|
|
115
115
|
role: string;
|
|
116
116
|
tabIndex: number;
|
|
117
117
|
onKeyDown: (evt: KeyboardEvent) => void;
|
|
@@ -148,6 +148,9 @@ type SyncedBlockFetchErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNC
|
|
|
148
148
|
type SyncedBlockGetSourceInfoErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_GET_SOURCE_INFO, {
|
|
149
149
|
error: string;
|
|
150
150
|
}>;
|
|
151
|
-
|
|
151
|
+
type ReferenceSyncedBlockUpdateErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.REFERENCE_SYNCED_BLOCK_UPDATE, {
|
|
152
|
+
error: string;
|
|
153
|
+
}>;
|
|
154
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent | SyncedBlockFetchErrorAEP | SyncedBlockGetSourceInfoErrorAEP | ReferenceSyncedBlockUpdateErrorAEP;
|
|
152
155
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
153
156
|
export {};
|
|
@@ -22,10 +22,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
22
22
|
'--ak-renderer-annotation-startmarker': string;
|
|
23
23
|
'--ak-renderer-annotation-endmarker': string;
|
|
24
24
|
} | undefined;
|
|
25
|
-
'data-mark-type': string;
|
|
26
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
27
25
|
'data-id': AnnotationId;
|
|
28
26
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
27
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
28
|
+
'data-mark-type': string;
|
|
29
29
|
'aria-disabled': boolean;
|
|
30
30
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
31
31
|
id: string;
|
|
@@ -38,9 +38,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
38
38
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
39
39
|
'data-has-focus': boolean;
|
|
40
40
|
'data-is-hovered': boolean;
|
|
41
|
-
'data-mark-type': string;
|
|
42
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
43
41
|
'data-id': AnnotationId;
|
|
42
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
43
|
+
'data-mark-type': string;
|
|
44
44
|
'aria-disabled': boolean;
|
|
45
45
|
ref: ((node: HTMLElement | null) => void) | undefined;
|
|
46
46
|
id: string;
|
|
@@ -50,10 +50,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
50
50
|
'--ak-renderer-annotation-startmarker': string;
|
|
51
51
|
'--ak-renderer-annotation-endmarker': string;
|
|
52
52
|
} | undefined;
|
|
53
|
-
'data-mark-type': string;
|
|
54
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
55
53
|
'data-id': AnnotationId;
|
|
56
54
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
55
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
56
|
+
'data-mark-type': string;
|
|
57
57
|
role?: undefined;
|
|
58
58
|
tabIndex?: undefined;
|
|
59
59
|
onKeyDown?: undefined;
|
|
@@ -71,9 +71,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
71
71
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
72
72
|
'data-has-focus': boolean;
|
|
73
73
|
'data-is-hovered': boolean;
|
|
74
|
-
'data-mark-type': string;
|
|
75
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
76
74
|
'data-id': AnnotationId;
|
|
75
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
76
|
+
'data-mark-type': string;
|
|
77
77
|
role?: undefined;
|
|
78
78
|
tabIndex?: undefined;
|
|
79
79
|
onKeyDown?: undefined;
|
|
@@ -88,10 +88,10 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
88
88
|
'--ak-renderer-annotation-startmarker': string;
|
|
89
89
|
'--ak-renderer-annotation-endmarker': string;
|
|
90
90
|
} | undefined;
|
|
91
|
-
'data-mark-type': string;
|
|
92
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
93
91
|
'data-id': AnnotationId;
|
|
94
92
|
'data-mark-annotation-state'?: AnnotationMarkStates;
|
|
93
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
94
|
+
'data-mark-type': string;
|
|
95
95
|
role: string;
|
|
96
96
|
tabIndex: number;
|
|
97
97
|
onKeyDown: (evt: KeyboardEvent) => void;
|
|
@@ -109,9 +109,9 @@ export declare const MarkComponent: ({ annotationParentIds, children, dataAttrib
|
|
|
109
109
|
'data-mark-annotation-state': AnnotationMarkStates;
|
|
110
110
|
'data-has-focus': boolean;
|
|
111
111
|
'data-is-hovered': boolean;
|
|
112
|
-
'data-mark-type': string;
|
|
113
|
-
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
114
112
|
'data-id': AnnotationId;
|
|
113
|
+
'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
|
|
114
|
+
'data-mark-type': string;
|
|
115
115
|
role: string;
|
|
116
116
|
tabIndex: number;
|
|
117
117
|
onKeyDown: (evt: KeyboardEvent) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.
|
|
3
|
+
"version": "124.19.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-schema": "^51.5.
|
|
26
|
+
"@atlaskit/adf-schema": "^51.5.0",
|
|
27
27
|
"@atlaskit/adf-utils": "^19.26.0",
|
|
28
28
|
"@atlaskit/afm-i18n-platform-editor-renderer": "2.10.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^9.1.0",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"@atlaskit/code": "^17.4.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
37
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
39
39
|
"@atlaskit/emoji": "^69.9.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
41
|
-
"@atlaskit/icon": "^29.
|
|
41
|
+
"@atlaskit/icon": "^29.1.0",
|
|
42
42
|
"@atlaskit/link": "^3.2.0",
|
|
43
43
|
"@atlaskit/link-datasource": "^4.30.0",
|
|
44
44
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
45
45
|
"@atlaskit/linking-common": "^9.9.0",
|
|
46
|
-
"@atlaskit/media-card": "^79.
|
|
46
|
+
"@atlaskit/media-card": "^79.10.0",
|
|
47
47
|
"@atlaskit/media-client": "^35.7.0",
|
|
48
48
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
49
49
|
"@atlaskit/media-common": "^12.3.0",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
55
|
"@atlaskit/react-ufo": "^4.15.0",
|
|
56
|
-
"@atlaskit/smart-card": "^43.
|
|
56
|
+
"@atlaskit/smart-card": "^43.15.0",
|
|
57
57
|
"@atlaskit/status": "^3.0.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^15.10.0",
|
|
61
61
|
"@atlaskit/tokens": "^8.4.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.11.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": "^110.
|
|
74
|
+
"@atlaskit/editor-common": "^110.42.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.0.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
@@ -247,6 +247,9 @@
|
|
|
247
247
|
},
|
|
248
248
|
"platform-custom-icon-migration": {
|
|
249
249
|
"type": "boolean"
|
|
250
|
+
},
|
|
251
|
+
"platform_fix_macro_renders_in_layouts": {
|
|
252
|
+
"type": "boolean"
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
255
|
}
|