@atlaskit/renderer 128.9.0 → 128.9.1
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 +11 -0
- package/dist/cjs/react/nodes/inlineCard.js +17 -0
- package/dist/cjs/react/nodes/table/colgroup.js +131 -13
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +9 -2
- package/dist/cjs/ui/Renderer/index.js +12 -4
- package/dist/es2019/react/nodes/inlineCard.js +18 -1
- package/dist/es2019/react/nodes/table/colgroup.js +116 -12
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +9 -2
- package/dist/es2019/ui/Renderer/index.js +13 -4
- package/dist/esm/react/nodes/inlineCard.js +18 -1
- package/dist/esm/react/nodes/table/colgroup.js +129 -13
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +9 -2
- package/dist/esm/ui/Renderer/index.js +12 -4
- package/dist/types/ui/Renderer/RendererStyleContainer.d.ts +2 -0
- package/dist/types-ts4.5/ui/Renderer/RendererStyleContainer.d.ts +2 -0
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 128.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`571ae3a14ac53`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/571ae3a14ac53) -
|
|
8
|
+
Refresh cache for an inline smart card in renderer if it's not been fetched before
|
|
9
|
+
- [`eaf073b7563c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eaf073b7563c8) -
|
|
10
|
+
Fix nested table column overflow in syncBlock by using saved table width as scaling target,
|
|
11
|
+
aligning with bodiedSyncBlock behaviour
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 128.9.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -22,6 +22,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
23
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
24
24
|
var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
|
|
25
|
+
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
25
26
|
var _fallback = require("./fallback");
|
|
26
27
|
var _SmartCardStorage = require("../../ui/SmartCardStorage");
|
|
27
28
|
var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
@@ -154,6 +155,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
154
155
|
onSetLinkTarget = props.onSetLinkTarget;
|
|
155
156
|
var portal = (0, _PortalContext.usePortal)(props);
|
|
156
157
|
var cardContext = (0, _linkProvider.useSmartCardContext)();
|
|
158
|
+
var provider = (0, _providerFactory.useProvider)('cardProvider');
|
|
157
159
|
var SuspenseWrapperForUrl = smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.SuspenseWrapperForUrl;
|
|
158
160
|
|
|
159
161
|
// Helper fn to conditionally wrap cards when suspense boundary is passed in via product
|
|
@@ -204,6 +206,21 @@ var InlineCard = function InlineCard(props) {
|
|
|
204
206
|
throw err;
|
|
205
207
|
}
|
|
206
208
|
};
|
|
209
|
+
(0, _react.useEffect)(function () {
|
|
210
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true) && url) {
|
|
211
|
+
// Refresh cache in the background
|
|
212
|
+
provider === null || provider === void 0 || provider.then(function (providerInstance) {
|
|
213
|
+
var _refreshCache, _ref5;
|
|
214
|
+
(_refreshCache = (_ref5 = providerInstance).refreshCache) === null || _refreshCache === void 0 || _refreshCache.call(_ref5, {
|
|
215
|
+
// It's ok to cast any resourceUrl to inlineCard here, because only URL is important for the request.
|
|
216
|
+
type: 'inlineCard',
|
|
217
|
+
attrs: {
|
|
218
|
+
url: url
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}, [provider, url]);
|
|
207
224
|
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
208
225
|
if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !(0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
209
226
|
exposure: true
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.colWidthSum = exports.Colgroup = void 0;
|
|
8
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
|
+
var _ui = require("@atlaskit/editor-common/ui");
|
|
11
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
15
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
@@ -15,6 +17,7 @@ var _useFeatureFlags = require("../../../use-feature-flags");
|
|
|
15
17
|
var _rendererContext = require("../../../renderer-context");
|
|
16
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
19
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
23
|
// we allow scaling down column widths by no more than 30%
|
|
@@ -32,7 +35,8 @@ var isTableColumnResized = function isTableColumnResized(columnWidths) {
|
|
|
32
35
|
var fixColumnWidth = function fixColumnWidth(_ref) {
|
|
33
36
|
var columnWidth = _ref.columnWidth,
|
|
34
37
|
zeroWidthColumnsCount = _ref.zeroWidthColumnsCount,
|
|
35
|
-
scaleDownPercent = _ref.scaleDownPercent
|
|
38
|
+
scaleDownPercent = _ref.scaleDownPercent,
|
|
39
|
+
skipMinWidth = _ref.skipMinWidth;
|
|
36
40
|
if (columnWidth === 0) {
|
|
37
41
|
return columnWidth;
|
|
38
42
|
}
|
|
@@ -40,11 +44,14 @@ var fixColumnWidth = function fixColumnWidth(_ref) {
|
|
|
40
44
|
// If the tables total width (including no zero widths col or cols without width) is less than the current layout
|
|
41
45
|
// We scale up the columns to meet the minimum of the table layout.
|
|
42
46
|
if (zeroWidthColumnsCount === 0 && scaleDownPercent) {
|
|
43
|
-
|
|
47
|
+
var scaled = Math.floor((1 - scaleDownPercent) * columnWidth);
|
|
48
|
+
return skipMinWidth ? scaled : Math.max(scaled, _styles.tableCellMinWidth);
|
|
44
49
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
var adjusted = columnWidth - _styles.tableCellBorderWidth;
|
|
51
|
+
if (skipMinWidth) {
|
|
52
|
+
return adjusted;
|
|
53
|
+
}
|
|
54
|
+
return Math.max(adjusted, zeroWidthColumnsCount ? _editorSharedStyles.akEditorTableLegacyCellMinWidth : _styles.tableCellMinWidth);
|
|
48
55
|
};
|
|
49
56
|
var calcScalePercent = function calcScalePercent(_ref2) {
|
|
50
57
|
var renderWidth = _ref2.renderWidth,
|
|
@@ -63,6 +70,93 @@ var colWidthSum = exports.colWidthSum = function colWidthSum(columnWidths) {
|
|
|
63
70
|
return curr + prev;
|
|
64
71
|
}, 0);
|
|
65
72
|
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Returns the data-column available width: total width minus the fixed number column if enabled.
|
|
76
|
+
*/
|
|
77
|
+
var getDataColumnWidth = function getDataColumnWidth(totalWidth, isNumberColumnEnabled) {
|
|
78
|
+
return isNumberColumnEnabled ? totalWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : totalWidth;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Scales column widths proportionally to fit within availableWidth, matching the editor's
|
|
83
|
+
* scaleTableTo(): floors each column to the nearest pixel, then redistributes any rounding
|
|
84
|
+
* remainder to the first column that can absorb it without going below tableCellMinWidth.
|
|
85
|
+
*/
|
|
86
|
+
var scaleColumnsToWidth = function scaleColumnsToWidth(columnWidths, availableWidth) {
|
|
87
|
+
var rawTotalWidth = columnWidths.reduce(function (sum, w) {
|
|
88
|
+
return sum + w;
|
|
89
|
+
}, 0);
|
|
90
|
+
var scaleFactor = availableWidth / rawTotalWidth;
|
|
91
|
+
var scaledWidths = columnWidths.map(function (colWidth) {
|
|
92
|
+
return Math.max(Math.floor(colWidth * scaleFactor), _styles.tableCellMinWidth);
|
|
93
|
+
});
|
|
94
|
+
var totalScaled = scaledWidths.reduce(function (sum, w) {
|
|
95
|
+
return sum + w;
|
|
96
|
+
}, 0);
|
|
97
|
+
var diff = availableWidth - totalScaled;
|
|
98
|
+
if (diff !== 0 && Math.abs(diff) < _styles.tableCellMinWidth) {
|
|
99
|
+
for (var i = 0; i < scaledWidths.length; i++) {
|
|
100
|
+
if (scaledWidths[i] + diff > _styles.tableCellMinWidth) {
|
|
101
|
+
scaledWidths[i] += diff;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return scaledWidths.map(function (width) {
|
|
107
|
+
return {
|
|
108
|
+
width: "".concat(width, "px")
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Computes column widths for tables inside sync blocks, matching the editor's scaleTableTo() exactly.
|
|
115
|
+
* Returns null if the flag is off or not inside a sync block.
|
|
116
|
+
*
|
|
117
|
+
* For nested tables (isInsideOfTable=true, gated by platform_synced_block_patch_9), we use
|
|
118
|
+
* getTableContainerWidth(tableNode) as the reference — the width the editor saved, which already
|
|
119
|
+
* accounts for the parent cell's available space (colwidth minus tableCellPadding * 2).
|
|
120
|
+
* This matches bodiedSyncBlock where isRendererNested=false, so renderScaleDownColgroup uses
|
|
121
|
+
* getTableContainerWidth(tableNode). For syncBlock the nested renderer has isRendererNested=true,
|
|
122
|
+
* which incorrectly overrides tableContainerWidth with renderWidth (the full container), causing
|
|
123
|
+
* overflow by 2 * tableCellPadding (16px).
|
|
124
|
+
*/
|
|
125
|
+
var renderSyncBlockColgroup = function renderSyncBlockColgroup(_ref3) {
|
|
126
|
+
var isInsideOfSyncBlock = _ref3.isInsideOfSyncBlock,
|
|
127
|
+
isInsideOfTable = _ref3.isInsideOfTable,
|
|
128
|
+
tableNode = _ref3.tableNode,
|
|
129
|
+
columnWidths = _ref3.columnWidths,
|
|
130
|
+
isNumberColumnEnabled = _ref3.isNumberColumnEnabled,
|
|
131
|
+
renderWidthProp = _ref3.renderWidth,
|
|
132
|
+
contextWidth = _ref3.contextWidth;
|
|
133
|
+
if (!isInsideOfSyncBlock || !(0, _platformFeatureFlags.fg)('platform_synced_block_patch_9')) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
var rawTotalWidth = columnWidths.reduce(function (sum, w) {
|
|
137
|
+
return sum + w;
|
|
138
|
+
}, 0);
|
|
139
|
+
if (isInsideOfTable) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// SSR / first render before WidthContext measures. Output % of original ADF proportions so
|
|
144
|
+
// columns are stable — the CSS container query (100cqw) handles actual scaling width.
|
|
145
|
+
if (contextWidth <= 0 && renderWidthProp <= 0) {
|
|
146
|
+
var fullTableWidth = isNumberColumnEnabled ? rawTotalWidth + _editorSharedStyles.akEditorTableNumberColumnWidth : rawTotalWidth;
|
|
147
|
+
return columnWidths.map(function (colWidth) {
|
|
148
|
+
return {
|
|
149
|
+
width: "".concat(colWidth / fullTableWidth * 100, "%")
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// contextWidth measures the sync block content area. Subtract 2 to match the editor's
|
|
155
|
+
// getParentNodeWidth() border offset. Fall back to renderWidthProp for the non-CSS path.
|
|
156
|
+
var effectiveRenderWidth = contextWidth > 0 ? contextWidth - 2 : renderWidthProp;
|
|
157
|
+
var availableWidth = getDataColumnWidth(effectiveRenderWidth, isNumberColumnEnabled);
|
|
158
|
+
return scaleColumnsToWidth(columnWidths, availableWidth);
|
|
159
|
+
};
|
|
66
160
|
var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
67
161
|
var _props$tableNode;
|
|
68
162
|
var columnWidths = props.columnWidths,
|
|
@@ -76,7 +170,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
76
170
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
77
171
|
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
78
172
|
allowTableResizing = props.allowTableResizing,
|
|
79
|
-
isTopLevelRenderer = props.isTopLevelRenderer
|
|
173
|
+
isTopLevelRenderer = props.isTopLevelRenderer,
|
|
174
|
+
isInsideOfSyncBlock = props.isInsideOfSyncBlock;
|
|
175
|
+
var skipMinWidth = (0, _platformFeatureFlags.fg)('platform_synced_block_patch_9') && !!(isInsideOfTable && isInsideOfSyncBlock);
|
|
80
176
|
if (!columnWidths || columnWidths.every(function (width) {
|
|
81
177
|
return width === 0;
|
|
82
178
|
}) && (0, _platformFeatureFlags.fg)('platform_editor_numbered_column_in_include')) {
|
|
@@ -183,7 +279,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
183
279
|
return fixColumnWidth({
|
|
184
280
|
columnWidth: width,
|
|
185
281
|
zeroWidthColumnsCount: zeroWidthColumnsCount,
|
|
186
|
-
scaleDownPercent: scaleDownPercent
|
|
282
|
+
scaleDownPercent: scaleDownPercent,
|
|
283
|
+
skipMinWidth: skipMinWidth
|
|
187
284
|
}) || cellMinWidth;
|
|
188
285
|
});
|
|
189
286
|
var sumFixedColumnWidths = colWidthSum(fixedColWidths);
|
|
@@ -210,7 +307,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
210
307
|
var width = fixColumnWidth({
|
|
211
308
|
columnWidth: colWidth,
|
|
212
309
|
zeroWidthColumnsCount: zeroWidthColumnsCount,
|
|
213
|
-
scaleDownPercent: scaleDownPercent
|
|
310
|
+
scaleDownPercent: scaleDownPercent,
|
|
311
|
+
skipMinWidth: skipMinWidth
|
|
214
312
|
}) || cellMinWidth;
|
|
215
313
|
var style = width ? {
|
|
216
314
|
width: "".concat(width, "px")
|
|
@@ -219,18 +317,38 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
219
317
|
});
|
|
220
318
|
};
|
|
221
319
|
var Colgroup = exports.Colgroup = function Colgroup(props) {
|
|
222
|
-
var
|
|
320
|
+
var _ref4, _renderSyncBlockColgr;
|
|
223
321
|
var _useRendererContext = (0, _rendererContext.useRendererContext)(),
|
|
224
|
-
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer
|
|
322
|
+
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer,
|
|
323
|
+
nestedRendererType = _useRendererContext.nestedRendererType;
|
|
225
324
|
var columnWidths = props.columnWidths,
|
|
226
325
|
isNumberColumnEnabled = props.isNumberColumnEnabled;
|
|
326
|
+
var _useContext = (0, _react.useContext)(_ui.WidthContext),
|
|
327
|
+
contextWidth = _useContext.width;
|
|
227
328
|
var flags = (0, _useFeatureFlags.useFeatureFlags)();
|
|
228
329
|
if (!columnWidths) {
|
|
229
330
|
return null;
|
|
230
331
|
}
|
|
231
|
-
var isTableFixedColumnWidthsOptionEnabled = (
|
|
232
|
-
|
|
332
|
+
var isTableFixedColumnWidthsOptionEnabled = (_ref4 = (0, _platformFeatureFlags.fg)('platform_editor_table_fixed_column_width_prop') ? props.allowFixedColumnWidthOption : flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
333
|
+
|
|
334
|
+
// For referenced sync blocks, nestedRendererType='syncedBlock' is set via RendererContextProvider
|
|
335
|
+
// in AKRendererWrapper. ReactSerializer is a class and cannot read React context, so we detect
|
|
336
|
+
// it here in the Colgroup component via useRendererContext() instead of prop-drilling.
|
|
337
|
+
var isInsideOfSyncBlock = nestedRendererType === 'syncedBlock';
|
|
338
|
+
|
|
339
|
+
// renderSyncBlockColgroup returns null when not applicable (flag off, SSR, not a sync block),
|
|
340
|
+
// in which case ?? falls back to the standard renderScaleDownColgroup path.
|
|
341
|
+
var colStyles = (_renderSyncBlockColgr = renderSyncBlockColgroup({
|
|
342
|
+
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
343
|
+
isInsideOfTable: !!props.isInsideOfTable,
|
|
344
|
+
tableNode: props.tableNode,
|
|
345
|
+
columnWidths: columnWidths,
|
|
346
|
+
isNumberColumnEnabled: !!isNumberColumnEnabled,
|
|
347
|
+
renderWidth: props.renderWidth,
|
|
348
|
+
contextWidth: contextWidth
|
|
349
|
+
})) !== null && _renderSyncBlockColgr !== void 0 ? _renderSyncBlockColgr : renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
233
350
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
351
|
+
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
234
352
|
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, {
|
|
235
353
|
exposure: true
|
|
236
354
|
}) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment_jira', true, {
|
|
@@ -1605,6 +1605,7 @@ var rendererTableSortableColumnStyles = (0, _react.css)((0, _defineProperty2.def
|
|
|
1605
1605
|
width: '100%',
|
|
1606
1606
|
height: '100%',
|
|
1607
1607
|
padding: "".concat(_styles.tableCellPadding, "px"),
|
|
1608
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-shape
|
|
1608
1609
|
borderWidth: '1.5px',
|
|
1609
1610
|
borderStyle: 'solid',
|
|
1610
1611
|
borderColor: "transparent",
|
|
@@ -1987,6 +1988,11 @@ var denseStyles = (0, _react.css)((0, _defineProperty2.default)((0, _definePrope
|
|
|
1987
1988
|
marginTop: RENDERER_LIST_DENSE_GAP
|
|
1988
1989
|
}
|
|
1989
1990
|
}));
|
|
1991
|
+
var syncBlockRendererStyles = (0, _react.css)({
|
|
1992
|
+
margin: 0,
|
|
1993
|
+
maxWidth: 'none',
|
|
1994
|
+
padding: 0
|
|
1995
|
+
});
|
|
1990
1996
|
var syncBlockStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.error, ", .").concat(_syncBlock.SyncBlockSharedCssClassName.loading), {
|
|
1991
1997
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
1992
1998
|
marginTop: "var(--ds-space-075, 6px)",
|
|
@@ -2019,7 +2025,8 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2019
2025
|
useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
|
|
2020
2026
|
children = props.children,
|
|
2021
2027
|
innerRef = props.innerRef,
|
|
2022
|
-
testId = props.testId
|
|
2028
|
+
testId = props.testId,
|
|
2029
|
+
isInsideSyncBlock = props.isInsideSyncBlock;
|
|
2023
2030
|
var isAdvancedLayoutsOn = (0, _experiments.editorExperiment)('advanced_layouts', true);
|
|
2024
2031
|
var isPreviewPanelResponsivenessOn = (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
2025
2032
|
exposure: true
|
|
@@ -2053,7 +2060,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2053
2060
|
// this should be placed after baseOtherStyles
|
|
2054
2061
|
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2055
2062
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2056
|
-
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, (0, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2063
|
+
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, (0, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && isInsideSyncBlock && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_9') ? syncBlockRendererStyles : null],
|
|
2057
2064
|
"data-testid": testId
|
|
2058
2065
|
}, children);
|
|
2059
2066
|
};
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "128.
|
|
74
|
+
var packageVersion = "128.9.0";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -199,10 +199,15 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
|
|
|
199
199
|
var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(featureFlags);
|
|
200
200
|
return {
|
|
201
201
|
featureFlags: normalizedFeatureFlags,
|
|
202
|
-
isTopLevelRenderer: isTopLevelRenderer === undefined
|
|
202
|
+
isTopLevelRenderer: isTopLevelRenderer === undefined,
|
|
203
|
+
// Propagate nestedRendererType into the inner RendererContextProvider so that
|
|
204
|
+
// React components inside the renderer (e.g. Colgroup) can read it via
|
|
205
|
+
// useRendererContext(). Without this, the inner provider overwrites the outer
|
|
206
|
+
// AKRendererWrapper context and nestedRendererType becomes undefined.
|
|
207
|
+
nestedRendererType: nestedRendererType
|
|
203
208
|
};
|
|
204
209
|
};
|
|
205
|
-
}, []);
|
|
210
|
+
}, [nestedRendererType]);
|
|
206
211
|
var fireAnalyticsEventOld = (0, _react.useCallback)(function (event) {
|
|
207
212
|
var createAnalyticsEvent = props.createAnalyticsEvent;
|
|
208
213
|
if (createAnalyticsEvent) {
|
|
@@ -627,6 +632,8 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
627
632
|
return telepointer;
|
|
628
633
|
};
|
|
629
634
|
var initialUpdate = _react.default.useRef(true);
|
|
635
|
+
var _useRendererContext3 = (0, _rendererContext.useRendererContext)(),
|
|
636
|
+
nestedRendererType = _useRendererContext3.nestedRendererType;
|
|
630
637
|
(0, _react.useEffect)(function () {
|
|
631
638
|
// We must check if window is defined, if it isn't we are in a SSR environment
|
|
632
639
|
// and we don't want to add the telepointer
|
|
@@ -724,7 +731,8 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
724
731
|
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
725
732
|
allowAnnotations: props.allowAnnotations,
|
|
726
733
|
allowTableResizing: allowTableResizing,
|
|
727
|
-
allowRendererContainerStyles: allowRendererContainerStyles
|
|
734
|
+
allowRendererContainerStyles: allowRendererContainerStyles,
|
|
735
|
+
isInsideSyncBlock: nestedRendererType === 'syncedBlock'
|
|
728
736
|
}, children))));
|
|
729
737
|
|
|
730
738
|
// We can only make the wrapper div query container when we have a known width.
|
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
/* eslint-disable jsdoc/check-tag-names */
|
|
7
|
-
import { Fragment, useState, useMemo } from 'react';
|
|
7
|
+
import { Fragment, useState, useMemo, useEffect } from 'react';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
@@ -20,6 +20,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
21
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
22
22
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
23
|
+
import { useProvider } from '@atlaskit/editor-common/provider-factory';
|
|
23
24
|
import { CardErrorBoundary } from './fallback';
|
|
24
25
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
25
26
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
@@ -139,6 +140,7 @@ const InlineCard = props => {
|
|
|
139
140
|
} = props;
|
|
140
141
|
const portal = usePortal(props);
|
|
141
142
|
const cardContext = useSmartCardContext();
|
|
143
|
+
const provider = useProvider('cardProvider');
|
|
142
144
|
const SuspenseWrapperForUrl = smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.SuspenseWrapperForUrl;
|
|
143
145
|
|
|
144
146
|
// Helper fn to conditionally wrap cards when suspense boundary is passed in via product
|
|
@@ -189,6 +191,21 @@ const InlineCard = props => {
|
|
|
189
191
|
throw err;
|
|
190
192
|
}
|
|
191
193
|
};
|
|
194
|
+
useEffect(() => {
|
|
195
|
+
if (expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && url) {
|
|
196
|
+
// Refresh cache in the background
|
|
197
|
+
provider === null || provider === void 0 ? void 0 : provider.then(providerInstance => {
|
|
198
|
+
var _refreshCache, _ref;
|
|
199
|
+
(_refreshCache = (_ref = providerInstance).refreshCache) === null || _refreshCache === void 0 ? void 0 : _refreshCache.call(_ref, {
|
|
200
|
+
// It's ok to cast any resourceUrl to inlineCard here, because only URL is important for the request.
|
|
201
|
+
type: 'inlineCard',
|
|
202
|
+
attrs: {
|
|
203
|
+
url
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}, [provider, url]);
|
|
192
209
|
const MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
193
210
|
if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
194
211
|
exposure: true
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { WidthContext } from '@atlaskit/editor-common/ui';
|
|
3
4
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
6
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
@@ -21,7 +22,8 @@ const isTableColumnResized = columnWidths => {
|
|
|
21
22
|
const fixColumnWidth = ({
|
|
22
23
|
columnWidth,
|
|
23
24
|
zeroWidthColumnsCount,
|
|
24
|
-
scaleDownPercent
|
|
25
|
+
scaleDownPercent,
|
|
26
|
+
skipMinWidth
|
|
25
27
|
}) => {
|
|
26
28
|
if (columnWidth === 0) {
|
|
27
29
|
return columnWidth;
|
|
@@ -30,11 +32,14 @@ const fixColumnWidth = ({
|
|
|
30
32
|
// If the tables total width (including no zero widths col or cols without width) is less than the current layout
|
|
31
33
|
// We scale up the columns to meet the minimum of the table layout.
|
|
32
34
|
if (zeroWidthColumnsCount === 0 && scaleDownPercent) {
|
|
33
|
-
|
|
35
|
+
const scaled = Math.floor((1 - scaleDownPercent) * columnWidth);
|
|
36
|
+
return skipMinWidth ? scaled : Math.max(scaled, tableCellMinWidth);
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
const adjusted = columnWidth - tableCellBorderWidth;
|
|
39
|
+
if (skipMinWidth) {
|
|
40
|
+
return adjusted;
|
|
41
|
+
}
|
|
42
|
+
return Math.max(adjusted, zeroWidthColumnsCount ? akEditorTableLegacyCellMinWidth : tableCellMinWidth);
|
|
38
43
|
};
|
|
39
44
|
const calcScalePercent = ({
|
|
40
45
|
renderWidth,
|
|
@@ -50,6 +55,80 @@ const calcScalePercent = ({
|
|
|
50
55
|
return diffPercent < maxScale ? isNumberColumnEnabled ? 1 - numColumnScalePercent : diffPercent : maxScale;
|
|
51
56
|
};
|
|
52
57
|
export const colWidthSum = columnWidths => columnWidths.reduce((prev, curr) => curr + prev, 0);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns the data-column available width: total width minus the fixed number column if enabled.
|
|
61
|
+
*/
|
|
62
|
+
const getDataColumnWidth = (totalWidth, isNumberColumnEnabled) => isNumberColumnEnabled ? totalWidth - akEditorTableNumberColumnWidth : totalWidth;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Scales column widths proportionally to fit within availableWidth, matching the editor's
|
|
66
|
+
* scaleTableTo(): floors each column to the nearest pixel, then redistributes any rounding
|
|
67
|
+
* remainder to the first column that can absorb it without going below tableCellMinWidth.
|
|
68
|
+
*/
|
|
69
|
+
const scaleColumnsToWidth = (columnWidths, availableWidth) => {
|
|
70
|
+
const rawTotalWidth = columnWidths.reduce((sum, w) => sum + w, 0);
|
|
71
|
+
const scaleFactor = availableWidth / rawTotalWidth;
|
|
72
|
+
const scaledWidths = columnWidths.map(colWidth => Math.max(Math.floor(colWidth * scaleFactor), tableCellMinWidth));
|
|
73
|
+
const totalScaled = scaledWidths.reduce((sum, w) => sum + w, 0);
|
|
74
|
+
const diff = availableWidth - totalScaled;
|
|
75
|
+
if (diff !== 0 && Math.abs(diff) < tableCellMinWidth) {
|
|
76
|
+
for (let i = 0; i < scaledWidths.length; i++) {
|
|
77
|
+
if (scaledWidths[i] + diff > tableCellMinWidth) {
|
|
78
|
+
scaledWidths[i] += diff;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return scaledWidths.map(width => ({
|
|
84
|
+
width: `${width}px`
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Computes column widths for tables inside sync blocks, matching the editor's scaleTableTo() exactly.
|
|
90
|
+
* Returns null if the flag is off or not inside a sync block.
|
|
91
|
+
*
|
|
92
|
+
* For nested tables (isInsideOfTable=true, gated by platform_synced_block_patch_9), we use
|
|
93
|
+
* getTableContainerWidth(tableNode) as the reference — the width the editor saved, which already
|
|
94
|
+
* accounts for the parent cell's available space (colwidth minus tableCellPadding * 2).
|
|
95
|
+
* This matches bodiedSyncBlock where isRendererNested=false, so renderScaleDownColgroup uses
|
|
96
|
+
* getTableContainerWidth(tableNode). For syncBlock the nested renderer has isRendererNested=true,
|
|
97
|
+
* which incorrectly overrides tableContainerWidth with renderWidth (the full container), causing
|
|
98
|
+
* overflow by 2 * tableCellPadding (16px).
|
|
99
|
+
*/
|
|
100
|
+
const renderSyncBlockColgroup = ({
|
|
101
|
+
isInsideOfSyncBlock,
|
|
102
|
+
isInsideOfTable,
|
|
103
|
+
tableNode,
|
|
104
|
+
columnWidths,
|
|
105
|
+
isNumberColumnEnabled,
|
|
106
|
+
renderWidth: renderWidthProp,
|
|
107
|
+
contextWidth
|
|
108
|
+
}) => {
|
|
109
|
+
if (!isInsideOfSyncBlock || !fg('platform_synced_block_patch_9')) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const rawTotalWidth = columnWidths.reduce((sum, w) => sum + w, 0);
|
|
113
|
+
if (isInsideOfTable) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// SSR / first render before WidthContext measures. Output % of original ADF proportions so
|
|
118
|
+
// columns are stable — the CSS container query (100cqw) handles actual scaling width.
|
|
119
|
+
if (contextWidth <= 0 && renderWidthProp <= 0) {
|
|
120
|
+
const fullTableWidth = isNumberColumnEnabled ? rawTotalWidth + akEditorTableNumberColumnWidth : rawTotalWidth;
|
|
121
|
+
return columnWidths.map(colWidth => ({
|
|
122
|
+
width: `${colWidth / fullTableWidth * 100}%`
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// contextWidth measures the sync block content area. Subtract 2 to match the editor's
|
|
127
|
+
// getParentNodeWidth() border offset. Fall back to renderWidthProp for the non-CSS path.
|
|
128
|
+
const effectiveRenderWidth = contextWidth > 0 ? contextWidth - 2 : renderWidthProp;
|
|
129
|
+
const availableWidth = getDataColumnWidth(effectiveRenderWidth, isNumberColumnEnabled);
|
|
130
|
+
return scaleColumnsToWidth(columnWidths, availableWidth);
|
|
131
|
+
};
|
|
53
132
|
const renderScaleDownColgroup = props => {
|
|
54
133
|
var _props$tableNode;
|
|
55
134
|
const {
|
|
@@ -64,8 +143,10 @@ const renderScaleDownColgroup = props => {
|
|
|
64
143
|
isTableScalingEnabled,
|
|
65
144
|
isTableFixedColumnWidthsOptionEnabled,
|
|
66
145
|
allowTableResizing,
|
|
67
|
-
isTopLevelRenderer
|
|
146
|
+
isTopLevelRenderer,
|
|
147
|
+
isInsideOfSyncBlock
|
|
68
148
|
} = props;
|
|
149
|
+
const skipMinWidth = fg('platform_synced_block_patch_9') && !!(isInsideOfTable && isInsideOfSyncBlock);
|
|
69
150
|
if (!columnWidths || columnWidths.every(width => width === 0) && fg('platform_editor_numbered_column_in_include')) {
|
|
70
151
|
return [];
|
|
71
152
|
}
|
|
@@ -169,7 +250,8 @@ const renderScaleDownColgroup = props => {
|
|
|
169
250
|
const fixedColWidths = targetWidths.map(width => fixColumnWidth({
|
|
170
251
|
columnWidth: width,
|
|
171
252
|
zeroWidthColumnsCount,
|
|
172
|
-
scaleDownPercent
|
|
253
|
+
scaleDownPercent,
|
|
254
|
+
skipMinWidth
|
|
173
255
|
}) || cellMinWidth);
|
|
174
256
|
const sumFixedColumnWidths = colWidthSum(fixedColWidths);
|
|
175
257
|
return fixedColWidths.map(colWidth => {
|
|
@@ -195,7 +277,8 @@ const renderScaleDownColgroup = props => {
|
|
|
195
277
|
const width = fixColumnWidth({
|
|
196
278
|
columnWidth: colWidth,
|
|
197
279
|
zeroWidthColumnsCount,
|
|
198
|
-
scaleDownPercent
|
|
280
|
+
scaleDownPercent,
|
|
281
|
+
skipMinWidth
|
|
199
282
|
}) || cellMinWidth;
|
|
200
283
|
const style = width ? {
|
|
201
284
|
width: `${width}px`
|
|
@@ -204,22 +287,43 @@ const renderScaleDownColgroup = props => {
|
|
|
204
287
|
});
|
|
205
288
|
};
|
|
206
289
|
export const Colgroup = props => {
|
|
207
|
-
var _ref;
|
|
290
|
+
var _ref, _renderSyncBlockColgr;
|
|
208
291
|
const {
|
|
209
|
-
isTopLevelRenderer
|
|
292
|
+
isTopLevelRenderer,
|
|
293
|
+
nestedRendererType
|
|
210
294
|
} = useRendererContext();
|
|
211
295
|
const {
|
|
212
296
|
columnWidths,
|
|
213
297
|
isNumberColumnEnabled
|
|
214
298
|
} = props;
|
|
299
|
+
const {
|
|
300
|
+
width: contextWidth
|
|
301
|
+
} = useContext(WidthContext);
|
|
215
302
|
const flags = useFeatureFlags();
|
|
216
303
|
if (!columnWidths) {
|
|
217
304
|
return null;
|
|
218
305
|
}
|
|
219
306
|
const isTableFixedColumnWidthsOptionEnabled = (_ref = fg('platform_editor_table_fixed_column_width_prop') ? props.allowFixedColumnWidthOption : flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) !== null && _ref !== void 0 ? _ref : false;
|
|
220
|
-
|
|
307
|
+
|
|
308
|
+
// For referenced sync blocks, nestedRendererType='syncedBlock' is set via RendererContextProvider
|
|
309
|
+
// in AKRendererWrapper. ReactSerializer is a class and cannot read React context, so we detect
|
|
310
|
+
// it here in the Colgroup component via useRendererContext() instead of prop-drilling.
|
|
311
|
+
const isInsideOfSyncBlock = nestedRendererType === 'syncedBlock';
|
|
312
|
+
|
|
313
|
+
// renderSyncBlockColgroup returns null when not applicable (flag off, SSR, not a sync block),
|
|
314
|
+
// in which case ?? falls back to the standard renderScaleDownColgroup path.
|
|
315
|
+
const colStyles = (_renderSyncBlockColgr = renderSyncBlockColgroup({
|
|
316
|
+
isInsideOfSyncBlock,
|
|
317
|
+
isInsideOfTable: !!props.isInsideOfTable,
|
|
318
|
+
tableNode: props.tableNode,
|
|
319
|
+
columnWidths,
|
|
320
|
+
isNumberColumnEnabled: !!isNumberColumnEnabled,
|
|
321
|
+
renderWidth: props.renderWidth,
|
|
322
|
+
contextWidth
|
|
323
|
+
})) !== null && _renderSyncBlockColgr !== void 0 ? _renderSyncBlockColgr : renderScaleDownColgroup({
|
|
221
324
|
...props,
|
|
222
325
|
isTopLevelRenderer,
|
|
326
|
+
isInsideOfSyncBlock,
|
|
223
327
|
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, {
|
|
224
328
|
exposure: true
|
|
225
329
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
@@ -2043,6 +2043,7 @@ const rendererTableSortableColumnStyles = css({
|
|
|
2043
2043
|
width: '100%',
|
|
2044
2044
|
height: '100%',
|
|
2045
2045
|
padding: `${tableCellPadding}px`,
|
|
2046
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-shape
|
|
2046
2047
|
borderWidth: '1.5px',
|
|
2047
2048
|
borderStyle: 'solid',
|
|
2048
2049
|
borderColor: `transparent`,
|
|
@@ -2524,6 +2525,11 @@ const denseStyles = css({
|
|
|
2524
2525
|
}
|
|
2525
2526
|
}
|
|
2526
2527
|
});
|
|
2528
|
+
const syncBlockRendererStyles = css({
|
|
2529
|
+
margin: 0,
|
|
2530
|
+
maxWidth: 'none',
|
|
2531
|
+
padding: 0
|
|
2532
|
+
});
|
|
2527
2533
|
const syncBlockStyles = css({
|
|
2528
2534
|
[`.${SyncBlockSharedCssClassName.renderer}, .${BodiedSyncBlockSharedCssClassName.renderer}, .${SyncBlockSharedCssClassName.error}, .${SyncBlockSharedCssClassName.loading}`]: {
|
|
2529
2535
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
@@ -2563,7 +2569,8 @@ export const RendererStyleContainer = props => {
|
|
|
2563
2569
|
useBlockRenderForCodeBlock,
|
|
2564
2570
|
children,
|
|
2565
2571
|
innerRef,
|
|
2566
|
-
testId
|
|
2572
|
+
testId,
|
|
2573
|
+
isInsideSyncBlock
|
|
2567
2574
|
} = props;
|
|
2568
2575
|
const isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
2569
2576
|
const isPreviewPanelResponsivenessOn = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
@@ -2600,7 +2607,7 @@ export const RendererStyleContainer = props => {
|
|
|
2600
2607
|
// this should be placed after baseOtherStyles
|
|
2601
2608
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2602
2609
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2603
|
-
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2610
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null],
|
|
2604
2611
|
"data-testid": testId
|
|
2605
2612
|
}, children);
|
|
2606
2613
|
};
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "128.
|
|
60
|
+
const packageVersion = "128.9.0";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -187,9 +187,14 @@ export const RendererFunctionalComponent = props => {
|
|
|
187
187
|
const normalizedFeatureFlags = normalizeFeatureFlags(featureFlags);
|
|
188
188
|
return {
|
|
189
189
|
featureFlags: normalizedFeatureFlags,
|
|
190
|
-
isTopLevelRenderer: isTopLevelRenderer === undefined
|
|
190
|
+
isTopLevelRenderer: isTopLevelRenderer === undefined,
|
|
191
|
+
// Propagate nestedRendererType into the inner RendererContextProvider so that
|
|
192
|
+
// React components inside the renderer (e.g. Colgroup) can read it via
|
|
193
|
+
// useRendererContext(). Without this, the inner provider overwrites the outer
|
|
194
|
+
// AKRendererWrapper context and nestedRendererType becomes undefined.
|
|
195
|
+
nestedRendererType
|
|
191
196
|
};
|
|
192
|
-
}, []);
|
|
197
|
+
}, [nestedRendererType]);
|
|
193
198
|
const fireAnalyticsEventOld = useCallback(event => {
|
|
194
199
|
const {
|
|
195
200
|
createAnalyticsEvent
|
|
@@ -615,6 +620,9 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
615
620
|
return telepointer;
|
|
616
621
|
};
|
|
617
622
|
const initialUpdate = React.useRef(true);
|
|
623
|
+
const {
|
|
624
|
+
nestedRendererType
|
|
625
|
+
} = useRendererContext();
|
|
618
626
|
useEffect(() => {
|
|
619
627
|
// We must check if window is defined, if it isn't we are in a SSR environment
|
|
620
628
|
// and we don't want to add the telepointer
|
|
@@ -710,7 +718,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
710
718
|
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
711
719
|
allowAnnotations: props.allowAnnotations,
|
|
712
720
|
allowTableResizing: allowTableResizing,
|
|
713
|
-
allowRendererContainerStyles: allowRendererContainerStyles
|
|
721
|
+
allowRendererContainerStyles: allowRendererContainerStyles,
|
|
722
|
+
isInsideSyncBlock: nestedRendererType === 'syncedBlock'
|
|
714
723
|
}, children))));
|
|
715
724
|
|
|
716
725
|
// We can only make the wrapper div query container when we have a known width.
|
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
7
|
/* eslint-disable jsdoc/check-tag-names */
|
|
8
|
-
import { Fragment, useState, useMemo } from 'react';
|
|
8
|
+
import { Fragment, useState, useMemo, useEffect } from 'react';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
11
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
@@ -21,6 +21,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
21
21
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
22
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
23
23
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
24
|
+
import { useProvider } from '@atlaskit/editor-common/provider-factory';
|
|
24
25
|
import { CardErrorBoundary } from './fallback';
|
|
25
26
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
26
27
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
@@ -145,6 +146,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
145
146
|
onSetLinkTarget = props.onSetLinkTarget;
|
|
146
147
|
var portal = usePortal(props);
|
|
147
148
|
var cardContext = useSmartCardContext();
|
|
149
|
+
var provider = useProvider('cardProvider');
|
|
148
150
|
var SuspenseWrapperForUrl = smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.SuspenseWrapperForUrl;
|
|
149
151
|
|
|
150
152
|
// Helper fn to conditionally wrap cards when suspense boundary is passed in via product
|
|
@@ -195,6 +197,21 @@ var InlineCard = function InlineCard(props) {
|
|
|
195
197
|
throw err;
|
|
196
198
|
}
|
|
197
199
|
};
|
|
200
|
+
useEffect(function () {
|
|
201
|
+
if (expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && url) {
|
|
202
|
+
// Refresh cache in the background
|
|
203
|
+
provider === null || provider === void 0 || provider.then(function (providerInstance) {
|
|
204
|
+
var _refreshCache, _ref5;
|
|
205
|
+
(_refreshCache = (_ref5 = providerInstance).refreshCache) === null || _refreshCache === void 0 || _refreshCache.call(_ref5, {
|
|
206
|
+
// It's ok to cast any resourceUrl to inlineCard here, because only URL is important for the request.
|
|
207
|
+
type: 'inlineCard',
|
|
208
|
+
attrs: {
|
|
209
|
+
url: url
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}, [provider, url]);
|
|
198
215
|
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
199
216
|
if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
|
|
200
217
|
exposure: true
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
5
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { WidthContext } from '@atlaskit/editor-common/ui';
|
|
6
7
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
7
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
9
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
@@ -26,7 +27,8 @@ var isTableColumnResized = function isTableColumnResized(columnWidths) {
|
|
|
26
27
|
var fixColumnWidth = function fixColumnWidth(_ref) {
|
|
27
28
|
var columnWidth = _ref.columnWidth,
|
|
28
29
|
zeroWidthColumnsCount = _ref.zeroWidthColumnsCount,
|
|
29
|
-
scaleDownPercent = _ref.scaleDownPercent
|
|
30
|
+
scaleDownPercent = _ref.scaleDownPercent,
|
|
31
|
+
skipMinWidth = _ref.skipMinWidth;
|
|
30
32
|
if (columnWidth === 0) {
|
|
31
33
|
return columnWidth;
|
|
32
34
|
}
|
|
@@ -34,11 +36,14 @@ var fixColumnWidth = function fixColumnWidth(_ref) {
|
|
|
34
36
|
// If the tables total width (including no zero widths col or cols without width) is less than the current layout
|
|
35
37
|
// We scale up the columns to meet the minimum of the table layout.
|
|
36
38
|
if (zeroWidthColumnsCount === 0 && scaleDownPercent) {
|
|
37
|
-
|
|
39
|
+
var scaled = Math.floor((1 - scaleDownPercent) * columnWidth);
|
|
40
|
+
return skipMinWidth ? scaled : Math.max(scaled, tableCellMinWidth);
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
var adjusted = columnWidth - tableCellBorderWidth;
|
|
43
|
+
if (skipMinWidth) {
|
|
44
|
+
return adjusted;
|
|
45
|
+
}
|
|
46
|
+
return Math.max(adjusted, zeroWidthColumnsCount ? akEditorTableLegacyCellMinWidth : tableCellMinWidth);
|
|
42
47
|
};
|
|
43
48
|
var calcScalePercent = function calcScalePercent(_ref2) {
|
|
44
49
|
var renderWidth = _ref2.renderWidth,
|
|
@@ -57,6 +62,93 @@ export var colWidthSum = function colWidthSum(columnWidths) {
|
|
|
57
62
|
return curr + prev;
|
|
58
63
|
}, 0);
|
|
59
64
|
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Returns the data-column available width: total width minus the fixed number column if enabled.
|
|
68
|
+
*/
|
|
69
|
+
var getDataColumnWidth = function getDataColumnWidth(totalWidth, isNumberColumnEnabled) {
|
|
70
|
+
return isNumberColumnEnabled ? totalWidth - akEditorTableNumberColumnWidth : totalWidth;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Scales column widths proportionally to fit within availableWidth, matching the editor's
|
|
75
|
+
* scaleTableTo(): floors each column to the nearest pixel, then redistributes any rounding
|
|
76
|
+
* remainder to the first column that can absorb it without going below tableCellMinWidth.
|
|
77
|
+
*/
|
|
78
|
+
var scaleColumnsToWidth = function scaleColumnsToWidth(columnWidths, availableWidth) {
|
|
79
|
+
var rawTotalWidth = columnWidths.reduce(function (sum, w) {
|
|
80
|
+
return sum + w;
|
|
81
|
+
}, 0);
|
|
82
|
+
var scaleFactor = availableWidth / rawTotalWidth;
|
|
83
|
+
var scaledWidths = columnWidths.map(function (colWidth) {
|
|
84
|
+
return Math.max(Math.floor(colWidth * scaleFactor), tableCellMinWidth);
|
|
85
|
+
});
|
|
86
|
+
var totalScaled = scaledWidths.reduce(function (sum, w) {
|
|
87
|
+
return sum + w;
|
|
88
|
+
}, 0);
|
|
89
|
+
var diff = availableWidth - totalScaled;
|
|
90
|
+
if (diff !== 0 && Math.abs(diff) < tableCellMinWidth) {
|
|
91
|
+
for (var i = 0; i < scaledWidths.length; i++) {
|
|
92
|
+
if (scaledWidths[i] + diff > tableCellMinWidth) {
|
|
93
|
+
scaledWidths[i] += diff;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return scaledWidths.map(function (width) {
|
|
99
|
+
return {
|
|
100
|
+
width: "".concat(width, "px")
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Computes column widths for tables inside sync blocks, matching the editor's scaleTableTo() exactly.
|
|
107
|
+
* Returns null if the flag is off or not inside a sync block.
|
|
108
|
+
*
|
|
109
|
+
* For nested tables (isInsideOfTable=true, gated by platform_synced_block_patch_9), we use
|
|
110
|
+
* getTableContainerWidth(tableNode) as the reference — the width the editor saved, which already
|
|
111
|
+
* accounts for the parent cell's available space (colwidth minus tableCellPadding * 2).
|
|
112
|
+
* This matches bodiedSyncBlock where isRendererNested=false, so renderScaleDownColgroup uses
|
|
113
|
+
* getTableContainerWidth(tableNode). For syncBlock the nested renderer has isRendererNested=true,
|
|
114
|
+
* which incorrectly overrides tableContainerWidth with renderWidth (the full container), causing
|
|
115
|
+
* overflow by 2 * tableCellPadding (16px).
|
|
116
|
+
*/
|
|
117
|
+
var renderSyncBlockColgroup = function renderSyncBlockColgroup(_ref3) {
|
|
118
|
+
var isInsideOfSyncBlock = _ref3.isInsideOfSyncBlock,
|
|
119
|
+
isInsideOfTable = _ref3.isInsideOfTable,
|
|
120
|
+
tableNode = _ref3.tableNode,
|
|
121
|
+
columnWidths = _ref3.columnWidths,
|
|
122
|
+
isNumberColumnEnabled = _ref3.isNumberColumnEnabled,
|
|
123
|
+
renderWidthProp = _ref3.renderWidth,
|
|
124
|
+
contextWidth = _ref3.contextWidth;
|
|
125
|
+
if (!isInsideOfSyncBlock || !fg('platform_synced_block_patch_9')) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
var rawTotalWidth = columnWidths.reduce(function (sum, w) {
|
|
129
|
+
return sum + w;
|
|
130
|
+
}, 0);
|
|
131
|
+
if (isInsideOfTable) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// SSR / first render before WidthContext measures. Output % of original ADF proportions so
|
|
136
|
+
// columns are stable — the CSS container query (100cqw) handles actual scaling width.
|
|
137
|
+
if (contextWidth <= 0 && renderWidthProp <= 0) {
|
|
138
|
+
var fullTableWidth = isNumberColumnEnabled ? rawTotalWidth + akEditorTableNumberColumnWidth : rawTotalWidth;
|
|
139
|
+
return columnWidths.map(function (colWidth) {
|
|
140
|
+
return {
|
|
141
|
+
width: "".concat(colWidth / fullTableWidth * 100, "%")
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// contextWidth measures the sync block content area. Subtract 2 to match the editor's
|
|
147
|
+
// getParentNodeWidth() border offset. Fall back to renderWidthProp for the non-CSS path.
|
|
148
|
+
var effectiveRenderWidth = contextWidth > 0 ? contextWidth - 2 : renderWidthProp;
|
|
149
|
+
var availableWidth = getDataColumnWidth(effectiveRenderWidth, isNumberColumnEnabled);
|
|
150
|
+
return scaleColumnsToWidth(columnWidths, availableWidth);
|
|
151
|
+
};
|
|
60
152
|
var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
61
153
|
var _props$tableNode;
|
|
62
154
|
var columnWidths = props.columnWidths,
|
|
@@ -70,7 +162,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
70
162
|
isTableScalingEnabled = props.isTableScalingEnabled,
|
|
71
163
|
isTableFixedColumnWidthsOptionEnabled = props.isTableFixedColumnWidthsOptionEnabled,
|
|
72
164
|
allowTableResizing = props.allowTableResizing,
|
|
73
|
-
isTopLevelRenderer = props.isTopLevelRenderer
|
|
165
|
+
isTopLevelRenderer = props.isTopLevelRenderer,
|
|
166
|
+
isInsideOfSyncBlock = props.isInsideOfSyncBlock;
|
|
167
|
+
var skipMinWidth = fg('platform_synced_block_patch_9') && !!(isInsideOfTable && isInsideOfSyncBlock);
|
|
74
168
|
if (!columnWidths || columnWidths.every(function (width) {
|
|
75
169
|
return width === 0;
|
|
76
170
|
}) && fg('platform_editor_numbered_column_in_include')) {
|
|
@@ -177,7 +271,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
177
271
|
return fixColumnWidth({
|
|
178
272
|
columnWidth: width,
|
|
179
273
|
zeroWidthColumnsCount: zeroWidthColumnsCount,
|
|
180
|
-
scaleDownPercent: scaleDownPercent
|
|
274
|
+
scaleDownPercent: scaleDownPercent,
|
|
275
|
+
skipMinWidth: skipMinWidth
|
|
181
276
|
}) || cellMinWidth;
|
|
182
277
|
});
|
|
183
278
|
var sumFixedColumnWidths = colWidthSum(fixedColWidths);
|
|
@@ -204,7 +299,8 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
204
299
|
var width = fixColumnWidth({
|
|
205
300
|
columnWidth: colWidth,
|
|
206
301
|
zeroWidthColumnsCount: zeroWidthColumnsCount,
|
|
207
|
-
scaleDownPercent: scaleDownPercent
|
|
302
|
+
scaleDownPercent: scaleDownPercent,
|
|
303
|
+
skipMinWidth: skipMinWidth
|
|
208
304
|
}) || cellMinWidth;
|
|
209
305
|
var style = width ? {
|
|
210
306
|
width: "".concat(width, "px")
|
|
@@ -213,18 +309,38 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
213
309
|
});
|
|
214
310
|
};
|
|
215
311
|
export var Colgroup = function Colgroup(props) {
|
|
216
|
-
var
|
|
312
|
+
var _ref4, _renderSyncBlockColgr;
|
|
217
313
|
var _useRendererContext = useRendererContext(),
|
|
218
|
-
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer
|
|
314
|
+
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer,
|
|
315
|
+
nestedRendererType = _useRendererContext.nestedRendererType;
|
|
219
316
|
var columnWidths = props.columnWidths,
|
|
220
317
|
isNumberColumnEnabled = props.isNumberColumnEnabled;
|
|
318
|
+
var _useContext = useContext(WidthContext),
|
|
319
|
+
contextWidth = _useContext.width;
|
|
221
320
|
var flags = useFeatureFlags();
|
|
222
321
|
if (!columnWidths) {
|
|
223
322
|
return null;
|
|
224
323
|
}
|
|
225
|
-
var isTableFixedColumnWidthsOptionEnabled = (
|
|
226
|
-
|
|
324
|
+
var isTableFixedColumnWidthsOptionEnabled = (_ref4 = fg('platform_editor_table_fixed_column_width_prop') ? props.allowFixedColumnWidthOption : flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
325
|
+
|
|
326
|
+
// For referenced sync blocks, nestedRendererType='syncedBlock' is set via RendererContextProvider
|
|
327
|
+
// in AKRendererWrapper. ReactSerializer is a class and cannot read React context, so we detect
|
|
328
|
+
// it here in the Colgroup component via useRendererContext() instead of prop-drilling.
|
|
329
|
+
var isInsideOfSyncBlock = nestedRendererType === 'syncedBlock';
|
|
330
|
+
|
|
331
|
+
// renderSyncBlockColgroup returns null when not applicable (flag off, SSR, not a sync block),
|
|
332
|
+
// in which case ?? falls back to the standard renderScaleDownColgroup path.
|
|
333
|
+
var colStyles = (_renderSyncBlockColgr = renderSyncBlockColgroup({
|
|
334
|
+
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
335
|
+
isInsideOfTable: !!props.isInsideOfTable,
|
|
336
|
+
tableNode: props.tableNode,
|
|
337
|
+
columnWidths: columnWidths,
|
|
338
|
+
isNumberColumnEnabled: !!isNumberColumnEnabled,
|
|
339
|
+
renderWidth: props.renderWidth,
|
|
340
|
+
contextWidth: contextWidth
|
|
341
|
+
})) !== null && _renderSyncBlockColgr !== void 0 ? _renderSyncBlockColgr : renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
227
342
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
343
|
+
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
228
344
|
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, {
|
|
229
345
|
exposure: true
|
|
230
346
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
@@ -1598,6 +1598,7 @@ var rendererTableSortableColumnStyles = css(_defineProperty({}, ".".concat(Rende
|
|
|
1598
1598
|
width: '100%',
|
|
1599
1599
|
height: '100%',
|
|
1600
1600
|
padding: "".concat(tableCellPadding, "px"),
|
|
1601
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-shape
|
|
1601
1602
|
borderWidth: '1.5px',
|
|
1602
1603
|
borderStyle: 'solid',
|
|
1603
1604
|
borderColor: "transparent",
|
|
@@ -1980,6 +1981,11 @@ var denseStyles = css(_defineProperty(_defineProperty(_defineProperty({}, ".".co
|
|
|
1980
1981
|
marginTop: RENDERER_LIST_DENSE_GAP
|
|
1981
1982
|
}
|
|
1982
1983
|
}));
|
|
1984
|
+
var syncBlockRendererStyles = css({
|
|
1985
|
+
margin: 0,
|
|
1986
|
+
maxWidth: 'none',
|
|
1987
|
+
padding: 0
|
|
1988
|
+
});
|
|
1983
1989
|
var syncBlockStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer, ", .").concat(BodiedSyncBlockSharedCssClassName.renderer, ", .").concat(SyncBlockSharedCssClassName.error, ", .").concat(SyncBlockSharedCssClassName.loading), {
|
|
1984
1990
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
1985
1991
|
marginTop: "var(--ds-space-075, 6px)",
|
|
@@ -2012,7 +2018,8 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2012
2018
|
useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
|
|
2013
2019
|
children = props.children,
|
|
2014
2020
|
innerRef = props.innerRef,
|
|
2015
|
-
testId = props.testId
|
|
2021
|
+
testId = props.testId,
|
|
2022
|
+
isInsideSyncBlock = props.isInsideSyncBlock;
|
|
2016
2023
|
var isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
2017
2024
|
var isPreviewPanelResponsivenessOn = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
2018
2025
|
exposure: true
|
|
@@ -2046,7 +2053,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2046
2053
|
// this should be placed after baseOtherStyles
|
|
2047
2054
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2048
2055
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2049
|
-
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles],
|
|
2056
|
+
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, centerWrapperStyles, editorExperiment('platform_synced_block', true) && isInsideSyncBlock && fg('platform_synced_block_patch_9') ? syncBlockRendererStyles : null],
|
|
2050
2057
|
"data-testid": testId
|
|
2051
2058
|
}, children);
|
|
2052
2059
|
};
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "128.
|
|
65
|
+
var packageVersion = "128.9.0";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -190,10 +190,15 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
|
|
|
190
190
|
var normalizedFeatureFlags = normalizeFeatureFlags(featureFlags);
|
|
191
191
|
return {
|
|
192
192
|
featureFlags: normalizedFeatureFlags,
|
|
193
|
-
isTopLevelRenderer: isTopLevelRenderer === undefined
|
|
193
|
+
isTopLevelRenderer: isTopLevelRenderer === undefined,
|
|
194
|
+
// Propagate nestedRendererType into the inner RendererContextProvider so that
|
|
195
|
+
// React components inside the renderer (e.g. Colgroup) can read it via
|
|
196
|
+
// useRendererContext(). Without this, the inner provider overwrites the outer
|
|
197
|
+
// AKRendererWrapper context and nestedRendererType becomes undefined.
|
|
198
|
+
nestedRendererType: nestedRendererType
|
|
194
199
|
};
|
|
195
200
|
};
|
|
196
|
-
}, []);
|
|
201
|
+
}, [nestedRendererType]);
|
|
197
202
|
var fireAnalyticsEventOld = useCallback(function (event) {
|
|
198
203
|
var createAnalyticsEvent = props.createAnalyticsEvent;
|
|
199
204
|
if (createAnalyticsEvent) {
|
|
@@ -618,6 +623,8 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
618
623
|
return telepointer;
|
|
619
624
|
};
|
|
620
625
|
var initialUpdate = React.useRef(true);
|
|
626
|
+
var _useRendererContext3 = useRendererContext(),
|
|
627
|
+
nestedRendererType = _useRendererContext3.nestedRendererType;
|
|
621
628
|
useEffect(function () {
|
|
622
629
|
// We must check if window is defined, if it isn't we are in a SSR environment
|
|
623
630
|
// and we don't want to add the telepointer
|
|
@@ -715,7 +722,8 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
715
722
|
useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
|
|
716
723
|
allowAnnotations: props.allowAnnotations,
|
|
717
724
|
allowTableResizing: allowTableResizing,
|
|
718
|
-
allowRendererContainerStyles: allowRendererContainerStyles
|
|
725
|
+
allowRendererContainerStyles: allowRendererContainerStyles,
|
|
726
|
+
isInsideSyncBlock: nestedRendererType === 'syncedBlock'
|
|
719
727
|
}, children))));
|
|
720
728
|
|
|
721
729
|
// We can only make the wrapper div query container when we have a known width.
|
|
@@ -6,7 +6,9 @@ import { jsx } from '@emotion/react';
|
|
|
6
6
|
import type { RendererWrapperProps } from './index';
|
|
7
7
|
export declare const textHighlightPaddingStyles: import("@emotion/utils").SerializedStyles;
|
|
8
8
|
type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'contentMode' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children' | 'allowRendererContainerStyles'> & {
|
|
9
|
+
isInsideSyncBlock?: boolean;
|
|
9
10
|
testId?: string;
|
|
11
|
+
isInsideOfSyncBlock?: boolean;
|
|
10
12
|
};
|
|
11
13
|
export declare const RendererStyleContainer: (props: RendererStyleContainerProps) => jsx.JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -6,7 +6,9 @@ import { jsx } from '@emotion/react';
|
|
|
6
6
|
import type { RendererWrapperProps } from './index';
|
|
7
7
|
export declare const textHighlightPaddingStyles: import("@emotion/utils").SerializedStyles;
|
|
8
8
|
type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'contentMode' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children' | 'allowRendererContainerStyles'> & {
|
|
9
|
+
isInsideSyncBlock?: boolean;
|
|
9
10
|
testId?: string;
|
|
11
|
+
isInsideOfSyncBlock?: boolean;
|
|
10
12
|
};
|
|
11
13
|
export declare const RendererStyleContainer: (props: RendererStyleContainerProps) => jsx.JSX.Element;
|
|
12
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "128.9.
|
|
3
|
+
"version": "128.9.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
55
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
57
|
-
"@atlaskit/react-ufo": "^5.
|
|
58
|
-
"@atlaskit/smart-card": "^43.
|
|
57
|
+
"@atlaskit/react-ufo": "^5.11.0",
|
|
58
|
+
"@atlaskit/smart-card": "^43.31.0",
|
|
59
59
|
"@atlaskit/status": "^3.2.0",
|
|
60
60
|
"@atlaskit/task-decision": "^19.3.0",
|
|
61
61
|
"@atlaskit/theme": "^22.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^54.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^54.4.0",
|
|
63
63
|
"@atlaskit/tokens": "^11.4.0",
|
|
64
64
|
"@atlaskit/tooltip": "^21.1.0",
|
|
65
65
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^112.
|
|
76
|
+
"@atlaskit/editor-common": "^112.18.0",
|
|
77
77
|
"@atlaskit/link-provider": "^4.3.0",
|
|
78
78
|
"@atlaskit/media-core": "^37.0.0",
|
|
79
79
|
"react": "^18.2.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@atlaskit/mention": "^24.6.0",
|
|
93
93
|
"@atlaskit/modal-dialog": "^14.14.0",
|
|
94
94
|
"@atlaskit/navigation-system": "^7.1.0",
|
|
95
|
-
"@atlaskit/profilecard": "^24.
|
|
95
|
+
"@atlaskit/profilecard": "^24.47.0",
|
|
96
96
|
"@atlaskit/side-nav-items": "^1.12.0",
|
|
97
97
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
98
98
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
@@ -235,6 +235,9 @@
|
|
|
235
235
|
"platform_editor_table_fixed_column_width_prop": {
|
|
236
236
|
"type": "boolean"
|
|
237
237
|
},
|
|
238
|
+
"platform_synced_block_patch_9": {
|
|
239
|
+
"type": "boolean"
|
|
240
|
+
},
|
|
238
241
|
"confluence_ttvc_inline_extensions": {
|
|
239
242
|
"type": "boolean"
|
|
240
243
|
},
|