@atlaskit/editor-plugin-table 26.0.9 → 26.1.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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 26.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2d23b40eed4f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d23b40eed4f0) -
8
+ Add gated content-visibility:auto to tables, expands and media singles to improve editor rendering
9
+ performance on large documents. Applied only to nodes whose rendered size can be estimated closely
10
+ — structurally (row/child counts) for tables and expands, and from the media's own dimensions and
11
+ the renderer's width calculation for media singles. Behind the
12
+ cc_editor_limited_mode_perf_improvements experiment and only active when limited mode is enabled
13
+ for the document (shared large-document detection with the limited-mode plugin).
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
19
+ ## 26.0.10
20
+
21
+ ### Patch Changes
22
+
23
+ - [`3abf1a11015f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3abf1a11015f2) -
24
+ Clean up feature gate `platform_editor_table_q4_patch_2`
25
+ - [`2f8a5739a1726`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f8a5739a1726) -
26
+ Clean up feature gate `platform_editor_table_nested_renderer_fix`
27
+ - Updated dependencies
28
+
3
29
  ## 26.0.9
4
30
 
5
31
  ### Patch Changes
@@ -18,6 +18,7 @@ var _coreUtils = require("@atlaskit/editor-common/core-utils");
18
18
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
19
19
  var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
20
20
  var _table = require("@atlaskit/editor-common/table");
21
+ var _contentVisibility = require("@atlaskit/editor-common/utils/content-visibility");
21
22
  var _model = require("@atlaskit/editor-prosemirror/model");
22
23
  var _state = require("@atlaskit/editor-prosemirror/state");
23
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
@@ -74,6 +75,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
74
75
  _this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
75
76
  // @portal-render-immediately
76
77
  true]);
78
+ (0, _defineProperty2.default)(_this, "isNestedTable", false);
77
79
  (0, _defineProperty2.default)(_this, "getNode", function () {
78
80
  return _this.node;
79
81
  });
@@ -115,6 +117,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
115
117
  var tableElement = rendered.dom.querySelector('table');
116
118
  this.table = tableElement ? tableElement : rendered.dom;
117
119
  this.renderedDOM = rendered.dom;
120
+ this.isNestedTable = isNested;
121
+ this.updateContentVisibility();
118
122
  var allowFixedColumnWidthOption = ((_this$reactComponentP5 = this.reactComponentProps) === null || _this$reactComponentP5 === void 0 ? void 0 : _this$reactComponentP5.allowFixedColumnWidthOption) || false;
119
123
  if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.isTableScalingEnabled) || (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.isTableScalingEnabled && allowFixedColumnWidthOption && this.node.attrs.displayMode === 'fixed') {
120
124
  var tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos(), this.reactComponentProps.allowTableResizing);
@@ -264,6 +268,35 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
264
268
  }
265
269
  }
266
270
  }
271
+ }, {
272
+ key: "updateContentVisibility",
273
+ value: function updateContentVisibility() {
274
+ var _this$reactComponentP9,
275
+ _limitedMode$sharedSt,
276
+ _this4 = this;
277
+ if (this.isNestedTable || !this.table) {
278
+ return;
279
+ }
280
+ // Read limited mode from the nodeView's own `this.view.state` via the plugin key exposed on
281
+ // the (already-typed) shared state, NOT `currentState().enabled`: during initial EditorView
282
+ // construction the injection API's editor state is undefined, so `.enabled` reads a stale false.
283
+ var limitedMode = (_this$reactComponentP9 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP9 === void 0 ? void 0 : _this$reactComponentP9.limitedMode;
284
+ var enabled = Boolean(limitedMode === null || limitedMode === void 0 || (_limitedMode$sharedSt = limitedMode.sharedState.currentState()) === null || _limitedMode$sharedSt === void 0 || (_limitedMode$sharedSt = _limitedMode$sharedSt.limitedModePluginKey) === null || _limitedMode$sharedSt === void 0 || (_limitedMode$sharedSt = _limitedMode$sharedSt.getState(this.view.state)) === null || _limitedMode$sharedSt === void 0 ? void 0 : _limitedMode$sharedSt.documentSizeBreachesThreshold);
285
+ var applied = (0, _contentVisibility.applyContentVisibility)(this.table, enabled, function () {
286
+ return {
287
+ // The `<table>` is content-sized (`display: table`), so it needs an explicit intrinsic
288
+ // width or it collapses to 0 wide while contained. `getTableContainerWidth` covers
289
+ // wide/full-width tables; explicit inline widths (resizable tables) simply override it.
290
+ width: (0, _nodeWidth.getTableContainerWidth)(_this4.node),
291
+ height: (0, _contentVisibility.estimateTableIntrinsicHeight)(_this4.node)
292
+ };
293
+ });
294
+ // Marker for the shared table CSS: when content-visibility (→ contain: paint) is actually
295
+ // applied, it pulls the `::after` outer-border overlay from `inset: -0.5px` to `inset: 0` so
296
+ // paint clipping doesn't shave the border. Keyed off the real applied style so it stays in
297
+ // sync with the gate inside applyContentVisibility.
298
+ this.table.toggleAttribute('data-content-visibility', applied);
299
+ }
267
300
  }, {
268
301
  key: "update",
269
302
  value: function update(node, decorations, innerDecorations, validUpdate) {
@@ -272,6 +305,9 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
272
305
  // Keep the rounded-corner edge attrs in sync with structural changes (rows/columns
273
306
  // added, removed, merged, or reordered via drag-and-drop) that the cells themselves
274
307
  // can miss.
308
+ if (didUpdate) {
309
+ this.updateContentVisibility();
310
+ }
275
311
  if (didUpdate && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true)) {
276
312
  var _this$roundedTableEdg;
277
313
  (_this$roundedTableEdg = this.roundedTableEdges) === null || _this$roundedTableEdg === void 0 || _this$roundedTableEdg.handleUpdate(node);
@@ -17,7 +17,6 @@ var _utils = require("@atlaskit/editor-common/utils");
17
17
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
18
18
  var _editorTables = require("@atlaskit/editor-tables");
19
19
  var _utils3 = require("@atlaskit/editor-tables/utils");
20
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  var _tableNodeViews = require("../nodeviews/table-node-views");
23
22
  var _plugin = require("../pm-plugins/decorations/plugin");
@@ -143,7 +142,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
143
142
  var _pluginInjectionApi$e;
144
143
  var domAtPos = editorView.domAtPos.bind(editorView);
145
144
  editorViewRef = editorView;
146
- var contentModeSizeTableId = null;
147
145
  var hasMeasuredContentModeTables = false;
148
146
  var focusListenerBinding = null;
149
147
  if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && (0, _isContentModeSupported.isContentModeSupported)({
@@ -154,23 +152,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
154
152
  focusListenerBinding = (0, _bindEventListener.bind)(editorView.dom, {
155
153
  type: 'focus',
156
154
  listener: function listener() {
157
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_nested_renderer_fix')) {
158
- if (hasMeasuredContentModeTables || contentModeSizeTableId) {
159
- return;
160
- }
161
- hasMeasuredContentModeTables = true;
162
- (0, _applyMeasuredWidthToAllTables.applyMeasuredWidthToAllTables)(editorView, pluginInjectionApi);
163
- return;
164
- }
165
- if (contentModeSizeTableId) {
155
+ if (hasMeasuredContentModeTables) {
166
156
  return;
167
157
  }
168
- contentModeSizeTableId = requestAnimationFrame(function () {
169
- if (!editorViewRef) {
170
- return;
171
- }
172
- (0, _applyMeasuredWidthToAllTables.applyMeasuredWidthToAllTables)(editorViewRef, pluginInjectionApi);
173
- });
158
+ hasMeasuredContentModeTables = true;
159
+ (0, _applyMeasuredWidthToAllTables.applyMeasuredWidthToAllTables)(editorView, pluginInjectionApi);
174
160
  },
175
161
  options: {
176
162
  once: true
@@ -239,7 +225,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
239
225
  }
240
226
  },
241
227
  destroy: function destroy() {
242
- contentModeSizeTableId && cancelAnimationFrame(contentModeSizeTableId);
243
228
  focusListenerBinding && focusListenerBinding();
244
229
  }
245
230
  };
@@ -84,9 +84,9 @@ var baseTableStylesWithoutSharedStyle = function baseTableStylesWithoutSharedSty
84
84
  // height = paddingTop (=calc(space.400 - 1px)) + paddingBottom (=space.200) + DRAG_HANDLE_HEIGHT
85
85
  // width = DRAG_HANDLE_WIDTH + paddingRight('space.150')
86
86
  ".".concat(_types.TableCssClassName.TABLE_CONTAINER, ".").concat(_types.TableCssClassName.TABLE_STICKY, ":has(tr.sticky)::before {\n\t\t\tcontent: ' ';\n\t\t\tposition: sticky;\n\t\t\tpointer-events: none;\n\t\t\ttop: 0;\n\t\t\tfloat: left;\n\t\t\ttransform: translateX(calc(-1 * (").concat(_styles.DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", ")));\n\t\t\tmargin-bottom: calc(-1 * (", "var(--ds-space-400, 32px)", " - 1px + ", "var(--ds-space-200, 16px)", " + ", "var(--ds-space-300, 24px)", "));\n\t\t\theight: calc(", "var(--ds-space-400, 32px)", " - 1px + ", "var(--ds-space-200, 16px)", " + ", "var(--ds-space-300, 24px)", ");\n\t\t\twidth: calc(").concat(_styles.DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", ");\n\t\t\tbackground: linear-gradient(\n\t\t\t\tto bottom,\n\t\t\t\t").concat((0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", " 90%,\n\t\t\t\ttransparent\n\t\t\t);\n\t\t\tz-index: ").concat(_consts3.rowControlsZIndex + 5, ";\n\t\t}\n\t\t").concat((0, _platformFeatureFlags.fg)('platform_editor_col_insert_patch_1') ? // Shift the mask left by the numbered column width so it sits to the left of it.
87
- ".".concat(_types.TableCssClassName.TABLE_CONTAINER, ".").concat(_types.TableCssClassName.TABLE_STICKY, "[data-number-column='true']:has(tr.sticky)::before {\n\t\t\ttransform: translateX(calc(-1 * (").concat(_styles.DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", " + ").concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px)));\n\t\t}") : "") : "", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts3.resizeHandlerAreaWidth - _consts3.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts3.resizeHandlerAreaWidth - _consts3.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _editorSharedStyles.akEditorSmallZIndex : "calc(".concat(_editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex, " - 5)"), _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(_consts3.nativeStickyHeaderZIndex, ";") : '', _consts3.tableBorderColor, _consts3.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_HEADER_CELL, _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, _styles.tableMarginTop, _consts3.stickyRowZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.tableColumnControlsHeight, _consts3.aboveNativeStickyHeaderZIndex, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_12', 'isEnabled', true) ? "\n\t\t\t.".concat(_types.TableCssClassName.TABLE_CONTAINER, ":has(> .").concat(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ")\n\t\t\t\t> .").concat(_types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, " {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t") : "\n\t\t\t.".concat(_types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, ":has(~ .").concat(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ") {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t"), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.belowNativeStickyHeaderZIndex, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _consts3.tableColumnControlsHeight, _types.TableCssClassName.NATIVE_STICKY, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, _types.TableCssClassName.WITH_CONTROLS, _consts3.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableControlsSpacing, _types.TableCssClassName.CORNER_CONTROLS, _consts3.tableControlsSpacing - _consts3.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, _consts3.tablePadding, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts3.tablePadding, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_CHROMELESS, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _consts3.tablePadding, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_CHROMELESS, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.tablePadding - 1, _styles.TableSharedCssClassName.TABLE_LEFT_BORDER, _styles.TableSharedCssClassName.TABLE_RIGHT_BORDER, _types.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(), (0, _uiStyles.rowControlsWrapperDotStyle)(), _types.TableCssClassName.CORNER_CONTROLS, _consts3.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)("\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableToolbarSize + 1, _consts3.tableToolbarSize + 1, _consts3.tableBorderColor, _consts3.tableBorderRadiusSize, _consts3.tableHeaderCellBackgroundColor, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableBorderSelectedColor, _consts3.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableBorderSelectedColor, _consts3.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts3.tableBorderDeleteColor, _consts3.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts3.tableToolbarSize, (0, _uiStyles.InsertMarker)("\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts3.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)("\n border-bottom: 1px solid ".concat(_consts3.tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts3.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.rowControlsZIndex + 4, _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types.TableCssClassName.DRAG_COLUMN_CONTROLS, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _consts3.tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", _consts3.resizeHandlerZIndex, _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, _consts3.tableColumnControlsHeight, _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types.TableCssClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, _types.TableCssClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.DRAG_HANDLE_DISABLED, _types.TableCssClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", _types.TableCssClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-icon-subtle, #505258)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-border-focused, #4688EC)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-background-accent-red-subtler-pressed, #FD9891)", "var(--ds-border-inverse, #FFFFFF)", (0, _uiStyles.floatingColumnControls)(), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableBorderColor, (0, _editorSharedStyles.relativeSizeToBaseFontSize)(10), (0, _editorSharedStyles.relativeSizeToBaseFontSize)(14), _consts3.tableHeaderCellBackgroundColor, _consts3.tableTextColor, _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableBorderColor, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? "/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " {\n\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN, " {\n\t\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\t").concat(numberedColumnButtonSelectedStyles, "\n\t\t\t\t").concat(_selection.hideNativeBrowserTextSelectionStyles, "\n\t\t\t}\n\t\t}\n\t}") : '', _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts3.tableToolbarDeleteColor, _consts3.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorUnitZIndex, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? ".tableView-content-wrap.danger {\n\t\t:not(.".concat(_types.TableCssClassName.IS_RESIZING, ") .").concat(_types.TableCssClassName.WITH_CONTROLS, " {\n\t\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\tbackground-color: ").concat(_consts3.tableToolbarDeleteColor, ";\n\t\t\t\tborder: 1px solid ").concat(_consts3.tableBorderDeleteColor, ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", "var(--ds-text-danger, #AE2E24)", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ").concat(_editorSharedStyles.akEditorUnitZIndex, ";\n\t\t\t}\n\t\t}\n\t}") : '', _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell borders handled by ::after overlay in rounded mode. */ : "border: 1px solid ".concat(_consts3.tableBorderSelectedColor, ";"), _types.TableCssClassName.SELECTED_CELL, _consts3.tableCellSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell border colors are handled by the ::after overlay in rounded mode. */ : "border-left-color: ".concat(_consts3.tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(_consts3.tableBorderDeleteColor, ";"), _consts3.tableBorderDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, _consts3.tableBorderSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _roundedTableStyles.roundedTableOverrides)() : '', _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _styles.tableMarginTop, _consts3.tableToolbarSize + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(_styles.tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(_consts3.tableToolbarSize + 1, "px;\n\t\t") : "\n\t\t\t/* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n\t\t\ttop: ".concat(_styles.tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(_consts3.tableToolbarSize, "px;\n\t\t"), _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts3.nativeStickyHeaderZIndex + 1, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Leave a 1px gap so the sticky header row's top border stays visible. */\n\t\ttranslate: 0 -1px;" : "", _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.dragRowControlsWidth, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.dragRowControlsWidth, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts3.nativeStickyHeaderZIndex - 1, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px") : "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth - 1, "px"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'calc(100% + 2px)' : '100%', (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "-".concat(_editorSharedStyles.akEditorTableNumberColumnWidth + 1, "px") : "-".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_table_q4_patch_2') ? // Anchor the mask with an explicit `top` so `vertical-align` (data-valign) on the cell
87
+ ".".concat(_types.TableCssClassName.TABLE_CONTAINER, ".").concat(_types.TableCssClassName.TABLE_STICKY, "[data-number-column='true']:has(tr.sticky)::before {\n\t\t\ttransform: translateX(calc(-1 * (").concat(_styles.DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", " + ").concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px)));\n\t\t}") : "") : "", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts3.resizeHandlerAreaWidth - _consts3.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts3.resizeHandlerAreaWidth - _consts3.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _editorSharedStyles.akEditorSmallZIndex : "calc(".concat(_editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex, " - 5)"), _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(_consts3.nativeStickyHeaderZIndex, ";") : '', _consts3.tableBorderColor, _consts3.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_HEADER_CELL, _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, _styles.tableMarginTop, _consts3.stickyRowZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.tableColumnControlsHeight, _consts3.aboveNativeStickyHeaderZIndex, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_12', 'isEnabled', true) ? "\n\t\t\t.".concat(_types.TableCssClassName.TABLE_CONTAINER, ":has(> .").concat(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ")\n\t\t\t\t> .").concat(_types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, " {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t") : "\n\t\t\t.".concat(_types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, ":has(~ .").concat(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ") {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t"), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.belowNativeStickyHeaderZIndex, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _consts3.tableColumnControlsHeight, _types.TableCssClassName.NATIVE_STICKY, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NATIVE_STICKY, _styles.tableMarginTop, _types.TableCssClassName.WITH_CONTROLS, _consts3.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableControlsSpacing, _types.TableCssClassName.CORNER_CONTROLS, _consts3.tableControlsSpacing - _consts3.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, _consts3.tablePadding, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts3.tablePadding, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_CHROMELESS, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _consts3.tablePadding, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_CHROMELESS, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.tablePadding - 1, _styles.TableSharedCssClassName.TABLE_LEFT_BORDER, _styles.TableSharedCssClassName.TABLE_RIGHT_BORDER, _types.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(), (0, _uiStyles.rowControlsWrapperDotStyle)(), _types.TableCssClassName.CORNER_CONTROLS, _consts3.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)("\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableToolbarSize + 1, _consts3.tableToolbarSize + 1, _consts3.tableBorderColor, _consts3.tableBorderRadiusSize, _consts3.tableHeaderCellBackgroundColor, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableBorderSelectedColor, _consts3.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts3.tableBorderSelectedColor, _consts3.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts3.tableBorderDeleteColor, _consts3.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts3.tableToolbarSize, (0, _uiStyles.InsertMarker)("\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts3.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)("\n border-bottom: 1px solid ".concat(_consts3.tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts3.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types.TableCssClassName.DRAG_ROW_CONTROLS, _consts3.rowControlsZIndex + 4, _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types.TableCssClassName.DRAG_COLUMN_CONTROLS, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _consts3.tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", _consts3.resizeHandlerZIndex, _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, _consts3.tableColumnControlsHeight, _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types.TableCssClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, _types.TableCssClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.DRAG_HANDLE_DISABLED, _types.TableCssClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", _types.TableCssClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-icon-subtle, #505258)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-border-focused, #4688EC)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-background-accent-red-subtler-pressed, #FD9891)", "var(--ds-border-inverse, #FFFFFF)", (0, _uiStyles.floatingColumnControls)(), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableBorderColor, (0, _editorSharedStyles.relativeSizeToBaseFontSize)(10), (0, _editorSharedStyles.relativeSizeToBaseFontSize)(14), _consts3.tableHeaderCellBackgroundColor, _consts3.tableTextColor, _consts3.tableBorderColor, _consts3.tableBorderColor, _types.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts3.tableBorderColor, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? "/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " {\n\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN, " {\n\t\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\t").concat(numberedColumnButtonSelectedStyles, "\n\t\t\t\t").concat(_selection.hideNativeBrowserTextSelectionStyles, "\n\t\t\t}\n\t\t}\n\t}") : '', _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts3.tableToolbarDeleteColor, _consts3.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorUnitZIndex, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? ".tableView-content-wrap.danger {\n\t\t:not(.".concat(_types.TableCssClassName.IS_RESIZING, ") .").concat(_types.TableCssClassName.WITH_CONTROLS, " {\n\t\t\t.").concat(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\tbackground-color: ").concat(_consts3.tableToolbarDeleteColor, ";\n\t\t\t\tborder: 1px solid ").concat(_consts3.tableBorderDeleteColor, ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", "var(--ds-text-danger, #AE2E24)", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ").concat(_editorSharedStyles.akEditorUnitZIndex, ";\n\t\t\t}\n\t\t}\n\t}") : '', _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell borders handled by ::after overlay in rounded mode. */ : "border: 1px solid ".concat(_consts3.tableBorderSelectedColor, ";"), _types.TableCssClassName.SELECTED_CELL, _consts3.tableCellSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell border colors are handled by the ::after overlay in rounded mode. */ : "border-left-color: ".concat(_consts3.tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(_consts3.tableBorderDeleteColor, ";"), _consts3.tableBorderDeleteColor, _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, _consts3.tableBorderSelectedColor, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), _editorSharedStyles.akEditorUnitZIndex * 100, _consts3.tableCellDeleteColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _roundedTableStyles.roundedTableOverrides)() : '', _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _styles.tableMarginTop, _consts3.tableToolbarSize + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(_styles.tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(_consts3.tableToolbarSize + 1, "px;\n\t\t") : "\n\t\t\t/* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n\t\t\ttop: ".concat(_styles.tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(_consts3.tableToolbarSize, "px;\n\t\t"), _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts3.nativeStickyHeaderZIndex + 1, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Leave a 1px gap so the sticky header row's top border stays visible. */\n\t\ttranslate: 0 -1px;" : "", _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.dragRowControlsWidth, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts3.dragRowControlsWidth, _styles.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts3.nativeStickyHeaderZIndex - 1, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px") : "".concat(_editorSharedStyles.akEditorTableNumberColumnWidth - 1, "px"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'calc(100% + 2px)' : '100%', (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "-".concat(_editorSharedStyles.akEditorTableNumberColumnWidth + 1, "px") : "-".concat(_editorSharedStyles.akEditorTableNumberColumnWidth, "px"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? // Anchor the mask with an explicit `top` so `vertical-align` (data-valign) on the cell
88
88
  // doesn't shift it; the calc reproduces the previous top-aligned offset.
89
- "top: calc(".concat("var(--ds-space-100, 8px)", " - ", _consts3.stickyRowOffsetTop + 1, "px);") : "margin-top: -".concat(_consts3.stickyRowOffsetTop + 1, "px;") : "margin-top: -".concat(_consts3.stickyRowOffsetTop, "px;"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : "0.5px solid ".concat(_consts3.tableBorderColor), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "1px solid ".concat(_consts3.tableBorderColor) : 'none', (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom: 1px solid ".concat(_consts3.tableBorderColor, ";") : "", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", _consts3.tableBorderColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_SELECTED, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _consts3.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts3.tableBorderSelectedColor, ";") : '', _consts3.tableBorderSelectedColor, _consts3.tableHeaderCellSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_SELECTED, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.COLUMN_SELECTED, _consts3.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts3.tableBorderSelectedColor) : '', _consts3.tableBorderSelectedColor, _consts3.tableHeaderCellSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.COLUMN_SELECTED, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_table_q4_patch_2') ? // Recolour the corner edges to the delete border and composite the translucent danger
89
+ "top: calc(".concat("var(--ds-space-100, 8px)", " - ", _consts3.stickyRowOffsetTop + 1, "px);") : "margin-top: -".concat(_consts3.stickyRowOffsetTop, "px;"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : "0.5px solid ".concat(_consts3.tableBorderColor), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "1px solid ".concat(_consts3.tableBorderColor) : 'none', (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom: 1px solid ".concat(_consts3.tableBorderColor, ";") : "", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", _consts3.tableBorderColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_SELECTED, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _consts3.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts3.tableBorderSelectedColor, ";") : '', _consts3.tableBorderSelectedColor, _consts3.tableHeaderCellSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_SELECTED, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.COLUMN_SELECTED, _consts3.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts3.tableBorderSelectedColor) : '', _consts3.tableBorderSelectedColor, _consts3.tableHeaderCellSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.COLUMN_SELECTED, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? // Recolour the corner edges to the delete border and composite the translucent danger
90
90
  // fill over the mask's gray so it matches the adjacent cells instead of reading as transparent.
91
91
  "border-left: 1px solid ".concat(_consts3.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-top: 1px solid ").concat(_consts3.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-bottom: 1px solid ").concat(_consts3.tableBorderDeleteColor, ";\n\t\t\t\t\t\tbackground-color: ", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", ";\n\t\t\t\t\t\tbackground-image: linear-gradient(").concat(_consts3.tableCellDeleteColor, ", ").concat(_consts3.tableCellDeleteColor, ");") : "border-left: unset;\n\t\t\t\t\tborder-top: unset;\n\t\t\t\t\tbackground: ".concat(_consts3.tableCellDeleteColor, ";"), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_SELECTED, _types.TableCssClassName.HOVERED_DELETE_BUTTON, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.HOVERED_DELETE_BUTTON, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.COLUMN_SELECTED, _consts3.tableBorderDeleteColor, _consts3.tableBorderDeleteColor, _consts3.tableCellDeleteColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _types.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _styles.tableMarginTop, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex - 4, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') ? ".".concat(_types.TableCssClassName.TABLE_CONTAINER, ".").concat(_types.TableCssClassName.WITH_CONTROLS, ":has(tr.sticky) .").concat(_types.TableCssClassName.NUMBERED_COLUMN, " .").concat(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, ":first-of-type {\n\t\t\tbox-shadow: 0 -5px 0 1px ").concat(_consts3.tableBorderColor, ";\n\t\t}") : "", _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
92
92
  };
@@ -4,6 +4,7 @@ import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
4
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
5
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
6
6
  import { isTableInContentMode } from '@atlaskit/editor-common/table';
7
+ import { applyContentVisibility, estimateTableIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
7
8
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
8
9
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
9
10
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
@@ -55,6 +56,7 @@ export default class TableView extends ReactNodeView {
55
56
  super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
56
57
  // @portal-render-immediately
57
58
  true);
59
+ _defineProperty(this, "isNestedTable", false);
58
60
  _defineProperty(this, "getNode", () => {
59
61
  return this.node;
60
62
  });
@@ -88,6 +90,8 @@ export default class TableView extends ReactNodeView {
88
90
  const tableElement = rendered.dom.querySelector('table');
89
91
  this.table = tableElement ? tableElement : rendered.dom;
90
92
  this.renderedDOM = rendered.dom;
93
+ this.isNestedTable = isNested;
94
+ this.updateContentVisibility();
91
95
  const allowFixedColumnWidthOption = ((_this$reactComponentP5 = this.reactComponentProps) === null || _this$reactComponentP5 === void 0 ? void 0 : _this$reactComponentP5.allowFixedColumnWidthOption) || false;
92
96
  if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.isTableScalingEnabled) || (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.isTableScalingEnabled && allowFixedColumnWidthOption && this.node.attrs.displayMode === 'fixed') {
93
97
  const tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos(), this.reactComponentProps.allowTableResizing);
@@ -229,12 +233,38 @@ export default class TableView extends ReactNodeView {
229
233
  }
230
234
  }
231
235
  }
236
+ updateContentVisibility() {
237
+ var _this$reactComponentP9, _limitedMode$sharedSt, _limitedMode$sharedSt2, _limitedMode$sharedSt3;
238
+ if (this.isNestedTable || !this.table) {
239
+ return;
240
+ }
241
+ // Read limited mode from the nodeView's own `this.view.state` via the plugin key exposed on
242
+ // the (already-typed) shared state, NOT `currentState().enabled`: during initial EditorView
243
+ // construction the injection API's editor state is undefined, so `.enabled` reads a stale false.
244
+ const limitedMode = (_this$reactComponentP9 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP9 === void 0 ? void 0 : _this$reactComponentP9.limitedMode;
245
+ const enabled = Boolean(limitedMode === null || limitedMode === void 0 ? void 0 : (_limitedMode$sharedSt = limitedMode.sharedState.currentState()) === null || _limitedMode$sharedSt === void 0 ? void 0 : (_limitedMode$sharedSt2 = _limitedMode$sharedSt.limitedModePluginKey) === null || _limitedMode$sharedSt2 === void 0 ? void 0 : (_limitedMode$sharedSt3 = _limitedMode$sharedSt2.getState(this.view.state)) === null || _limitedMode$sharedSt3 === void 0 ? void 0 : _limitedMode$sharedSt3.documentSizeBreachesThreshold);
246
+ const applied = applyContentVisibility(this.table, enabled, () => ({
247
+ // The `<table>` is content-sized (`display: table`), so it needs an explicit intrinsic
248
+ // width or it collapses to 0 wide while contained. `getTableContainerWidth` covers
249
+ // wide/full-width tables; explicit inline widths (resizable tables) simply override it.
250
+ width: getTableContainerWidth(this.node),
251
+ height: estimateTableIntrinsicHeight(this.node)
252
+ }));
253
+ // Marker for the shared table CSS: when content-visibility (→ contain: paint) is actually
254
+ // applied, it pulls the `::after` outer-border overlay from `inset: -0.5px` to `inset: 0` so
255
+ // paint clipping doesn't shave the border. Keyed off the real applied style so it stays in
256
+ // sync with the gate inside applyContentVisibility.
257
+ this.table.toggleAttribute('data-content-visibility', applied);
258
+ }
232
259
  update(node, decorations, innerDecorations, validUpdate) {
233
260
  const didUpdate = super.update(node, decorations, innerDecorations, validUpdate);
234
261
 
235
262
  // Keep the rounded-corner edge attrs in sync with structural changes (rows/columns
236
263
  // added, removed, merged, or reordered via drag-and-drop) that the cells themselves
237
264
  // can miss.
265
+ if (didUpdate) {
266
+ this.updateContentVisibility();
267
+ }
238
268
  if (didUpdate && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true)) {
239
269
  var _this$roundedTableEdg;
240
270
  (_this$roundedTableEdg = this.roundedTableEdges) === null || _this$roundedTableEdg === void 0 ? void 0 : _this$roundedTableEdg.handleUpdate(node);
@@ -9,7 +9,6 @@ import { closestElement } from '@atlaskit/editor-common/utils';
9
9
  import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
10
10
  import { TableMap } from '@atlaskit/editor-tables';
11
11
  import { findTable } from '@atlaskit/editor-tables/utils';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
13
  import { tableCellView, tableHeaderView, tableRowView, tableView } from '../nodeviews/table-node-views';
15
14
  import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
@@ -128,7 +127,6 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
128
127
  var _pluginInjectionApi$e, _pluginInjectionApi$e2;
129
128
  const domAtPos = editorView.domAtPos.bind(editorView);
130
129
  editorViewRef = editorView;
131
- let contentModeSizeTableId = null;
132
130
  let hasMeasuredContentModeTables = false;
133
131
  let focusListenerBinding = null;
134
132
  if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 ? void 0 : (_pluginInjectionApi$e2 = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.mode) !== 'view' && isContentModeSupported({
@@ -139,23 +137,11 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
139
137
  focusListenerBinding = bind(editorView.dom, {
140
138
  type: 'focus',
141
139
  listener: () => {
142
- if (fg('platform_editor_table_nested_renderer_fix')) {
143
- if (hasMeasuredContentModeTables || contentModeSizeTableId) {
144
- return;
145
- }
146
- hasMeasuredContentModeTables = true;
147
- applyMeasuredWidthToAllTables(editorView, pluginInjectionApi);
148
- return;
149
- }
150
- if (contentModeSizeTableId) {
140
+ if (hasMeasuredContentModeTables) {
151
141
  return;
152
142
  }
153
- contentModeSizeTableId = requestAnimationFrame(() => {
154
- if (!editorViewRef) {
155
- return;
156
- }
157
- applyMeasuredWidthToAllTables(editorViewRef, pluginInjectionApi);
158
- });
143
+ hasMeasuredContentModeTables = true;
144
+ applyMeasuredWidthToAllTables(editorView, pluginInjectionApi);
159
145
  },
160
146
  options: {
161
147
  once: true
@@ -229,7 +215,6 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
229
215
  }
230
216
  },
231
217
  destroy: () => {
232
- contentModeSizeTableId && cancelAnimationFrame(contentModeSizeTableId);
233
218
  focusListenerBinding && focusListenerBinding();
234
219
  }
235
220
  };
@@ -1219,10 +1219,10 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
1219
1219
  width: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `${akEditorTableNumberColumnWidth}px` : `${akEditorTableNumberColumnWidth - 1}px`};
1220
1220
  height: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'calc(100% + 2px)' : '100%'};
1221
1221
  margin-left: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `-${akEditorTableNumberColumnWidth + 1}px` : `-${akEditorTableNumberColumnWidth}px`};
1222
- ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? fg('platform_editor_table_q4_patch_2') ?
1222
+ ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ?
1223
1223
  // Anchor the mask with an explicit `top` so `vertical-align` (data-valign) on the cell
1224
1224
  // doesn't shift it; the calc reproduces the previous top-aligned offset.
1225
- `top: calc(${"var(--ds-space-100, 8px)"} - ${stickyRowOffsetTop + 1}px);` : `margin-top: -${stickyRowOffsetTop + 1}px;` : `margin-top: -${stickyRowOffsetTop}px;`}
1225
+ `top: calc(${"var(--ds-space-100, 8px)"} - ${stickyRowOffsetTop + 1}px);` : `margin-top: -${stickyRowOffsetTop}px;`}
1226
1226
  outline: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : `0.5px solid ${tableBorderColor}`};
1227
1227
  border-left: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `1px solid ${tableBorderColor}` : 'none'};
1228
1228
  ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `border-bottom: 1px solid ${tableBorderColor};` : ``}
@@ -1253,7 +1253,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
1253
1253
 
1254
1254
  .${ClassName.TABLE_CONTAINER}[data-number-column="true"] .${ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW} tr:first-of-type th.${ClassName.HOVERED_CELL_IN_DANGER}:first-of-type::before, .${ClassName.TABLE_CONTAINER}[data-number-column="true"] .${ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW} tr:first-of-type th.${ClassName.HOVERED_CELL_IN_DANGER}:not(.${ClassName.COLUMN_SELECTED}):first-of-type::before {
1255
1255
  outline: none;
1256
- ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_2') ?
1256
+ ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ?
1257
1257
  // Recolour the corner edges to the delete border and composite the translucent danger
1258
1258
  // fill over the mask's gray so it matches the adjacent cells instead of reading as transparent.
1259
1259
  `border-left: 1px solid ${tableBorderDeleteColor};
@@ -14,6 +14,7 @@ import { isSSRStreaming } from '@atlaskit/editor-common/core-utils';
14
14
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
15
15
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
16
16
  import { isTableInContentMode } from '@atlaskit/editor-common/table';
17
+ import { applyContentVisibility, estimateTableIntrinsicHeight } from '@atlaskit/editor-common/utils/content-visibility';
17
18
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
18
19
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
19
20
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
@@ -67,6 +68,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
67
68
  _this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
68
69
  // @portal-render-immediately
69
70
  true]);
71
+ _defineProperty(_this, "isNestedTable", false);
70
72
  _defineProperty(_this, "getNode", function () {
71
73
  return _this.node;
72
74
  });
@@ -108,6 +110,8 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
108
110
  var tableElement = rendered.dom.querySelector('table');
109
111
  this.table = tableElement ? tableElement : rendered.dom;
110
112
  this.renderedDOM = rendered.dom;
113
+ this.isNestedTable = isNested;
114
+ this.updateContentVisibility();
111
115
  var allowFixedColumnWidthOption = ((_this$reactComponentP5 = this.reactComponentProps) === null || _this$reactComponentP5 === void 0 ? void 0 : _this$reactComponentP5.allowFixedColumnWidthOption) || false;
112
116
  if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.isTableScalingEnabled) || (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.isTableScalingEnabled && allowFixedColumnWidthOption && this.node.attrs.displayMode === 'fixed') {
113
117
  var tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos(), this.reactComponentProps.allowTableResizing);
@@ -257,6 +261,35 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
257
261
  }
258
262
  }
259
263
  }
264
+ }, {
265
+ key: "updateContentVisibility",
266
+ value: function updateContentVisibility() {
267
+ var _this$reactComponentP9,
268
+ _limitedMode$sharedSt,
269
+ _this4 = this;
270
+ if (this.isNestedTable || !this.table) {
271
+ return;
272
+ }
273
+ // Read limited mode from the nodeView's own `this.view.state` via the plugin key exposed on
274
+ // the (already-typed) shared state, NOT `currentState().enabled`: during initial EditorView
275
+ // construction the injection API's editor state is undefined, so `.enabled` reads a stale false.
276
+ var limitedMode = (_this$reactComponentP9 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP9 === void 0 ? void 0 : _this$reactComponentP9.limitedMode;
277
+ var enabled = Boolean(limitedMode === null || limitedMode === void 0 || (_limitedMode$sharedSt = limitedMode.sharedState.currentState()) === null || _limitedMode$sharedSt === void 0 || (_limitedMode$sharedSt = _limitedMode$sharedSt.limitedModePluginKey) === null || _limitedMode$sharedSt === void 0 || (_limitedMode$sharedSt = _limitedMode$sharedSt.getState(this.view.state)) === null || _limitedMode$sharedSt === void 0 ? void 0 : _limitedMode$sharedSt.documentSizeBreachesThreshold);
278
+ var applied = applyContentVisibility(this.table, enabled, function () {
279
+ return {
280
+ // The `<table>` is content-sized (`display: table`), so it needs an explicit intrinsic
281
+ // width or it collapses to 0 wide while contained. `getTableContainerWidth` covers
282
+ // wide/full-width tables; explicit inline widths (resizable tables) simply override it.
283
+ width: getTableContainerWidth(_this4.node),
284
+ height: estimateTableIntrinsicHeight(_this4.node)
285
+ };
286
+ });
287
+ // Marker for the shared table CSS: when content-visibility (→ contain: paint) is actually
288
+ // applied, it pulls the `::after` outer-border overlay from `inset: -0.5px` to `inset: 0` so
289
+ // paint clipping doesn't shave the border. Keyed off the real applied style so it stays in
290
+ // sync with the gate inside applyContentVisibility.
291
+ this.table.toggleAttribute('data-content-visibility', applied);
292
+ }
260
293
  }, {
261
294
  key: "update",
262
295
  value: function update(node, decorations, innerDecorations, validUpdate) {
@@ -265,6 +298,9 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
265
298
  // Keep the rounded-corner edge attrs in sync with structural changes (rows/columns
266
299
  // added, removed, merged, or reordered via drag-and-drop) that the cells themselves
267
300
  // can miss.
301
+ if (didUpdate) {
302
+ this.updateContentVisibility();
303
+ }
268
304
  if (didUpdate && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true)) {
269
305
  var _this$roundedTableEdg;
270
306
  (_this$roundedTableEdg = this.roundedTableEdges) === null || _this$roundedTableEdg === void 0 || _this$roundedTableEdg.handleUpdate(node);
@@ -12,7 +12,6 @@ import { closestElement } from '@atlaskit/editor-common/utils';
12
12
  import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
13
13
  import { TableMap } from '@atlaskit/editor-tables';
14
14
  import { findTable } from '@atlaskit/editor-tables/utils';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { tableCellView, tableHeaderView, tableRowView, tableView } from '../nodeviews/table-node-views';
18
17
  import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
@@ -136,7 +135,6 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
136
135
  var _pluginInjectionApi$e;
137
136
  var domAtPos = editorView.domAtPos.bind(editorView);
138
137
  editorViewRef = editorView;
139
- var contentModeSizeTableId = null;
140
138
  var hasMeasuredContentModeTables = false;
141
139
  var focusListenerBinding = null;
142
140
  if (!__livePage && (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) !== 'view' && isContentModeSupported({
@@ -147,23 +145,11 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
147
145
  focusListenerBinding = bind(editorView.dom, {
148
146
  type: 'focus',
149
147
  listener: function listener() {
150
- if (fg('platform_editor_table_nested_renderer_fix')) {
151
- if (hasMeasuredContentModeTables || contentModeSizeTableId) {
152
- return;
153
- }
154
- hasMeasuredContentModeTables = true;
155
- applyMeasuredWidthToAllTables(editorView, pluginInjectionApi);
156
- return;
157
- }
158
- if (contentModeSizeTableId) {
148
+ if (hasMeasuredContentModeTables) {
159
149
  return;
160
150
  }
161
- contentModeSizeTableId = requestAnimationFrame(function () {
162
- if (!editorViewRef) {
163
- return;
164
- }
165
- applyMeasuredWidthToAllTables(editorViewRef, pluginInjectionApi);
166
- });
151
+ hasMeasuredContentModeTables = true;
152
+ applyMeasuredWidthToAllTables(editorView, pluginInjectionApi);
167
153
  },
168
154
  options: {
169
155
  once: true
@@ -232,7 +218,6 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
232
218
  }
233
219
  },
234
220
  destroy: function destroy() {
235
- contentModeSizeTableId && cancelAnimationFrame(contentModeSizeTableId);
236
221
  focusListenerBinding && focusListenerBinding();
237
222
  }
238
223
  };
@@ -79,9 +79,9 @@ var baseTableStylesWithoutSharedStyle = function baseTableStylesWithoutSharedSty
79
79
  // height = paddingTop (=calc(space.400 - 1px)) + paddingBottom (=space.200) + DRAG_HANDLE_HEIGHT
80
80
  // width = DRAG_HANDLE_WIDTH + paddingRight('space.150')
81
81
  ".".concat(ClassName.TABLE_CONTAINER, ".").concat(ClassName.TABLE_STICKY, ":has(tr.sticky)::before {\n\t\t\tcontent: ' ';\n\t\t\tposition: sticky;\n\t\t\tpointer-events: none;\n\t\t\ttop: 0;\n\t\t\tfloat: left;\n\t\t\ttransform: translateX(calc(-1 * (").concat(DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", ")));\n\t\t\tmargin-bottom: calc(-1 * (", "var(--ds-space-400, 32px)", " - 1px + ", "var(--ds-space-200, 16px)", " + ", "var(--ds-space-300, 24px)", "));\n\t\t\theight: calc(", "var(--ds-space-400, 32px)", " - 1px + ", "var(--ds-space-200, 16px)", " + ", "var(--ds-space-300, 24px)", ");\n\t\t\twidth: calc(").concat(DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", ");\n\t\t\tbackground: linear-gradient(\n\t\t\t\tto bottom,\n\t\t\t\t").concat(expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", " 90%,\n\t\t\t\ttransparent\n\t\t\t);\n\t\t\tz-index: ").concat(rowControlsZIndex + 5, ";\n\t\t}\n\t\t").concat(fg('platform_editor_col_insert_patch_1') ? // Shift the mask left by the numbered column width so it sits to the left of it.
82
- ".".concat(ClassName.TABLE_CONTAINER, ".").concat(ClassName.TABLE_STICKY, "[data-number-column='true']:has(tr.sticky)::before {\n\t\t\ttransform: translateX(calc(-1 * (").concat(DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", " + ").concat(akEditorTableNumberColumnWidth, "px)));\n\t\t}") : "") : "", ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.NATIVE_STICKY, tableMarginTop, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? akEditorSmallZIndex : "calc(".concat(akEditorTableCellOnStickyHeaderZIndex, " - 5)"), tableBorderColor, tableBorderColor, ClassName.NATIVE_STICKY_ACTIVE, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(nativeStickyHeaderZIndex, ";") : '', tableBorderColor, tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.TABLE_HEADER_CELL, tableBorderColor, tableBorderColor, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY, tableMarginTop, tableMarginTop, stickyRowZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY_ACTIVE, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, tableColumnControlsHeight, aboveNativeStickyHeaderZIndex, expValEquals('platform_editor_table_sticky_header_patch_12', 'isEnabled', true) ? "\n\t\t\t.".concat(ClassName.TABLE_CONTAINER, ":has(> .").concat(ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ")\n\t\t\t\t> .").concat(ClassName.DRAG_ROW_CONTROLS_WRAPPER, " {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t") : "\n\t\t\t.".concat(ClassName.DRAG_ROW_CONTROLS_WRAPPER, ":has(~ .").concat(ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ") {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t"), ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, belowNativeStickyHeaderZIndex, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.NATIVE_STICKY, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, tableColumnControlsHeight, ClassName.NATIVE_STICKY, akEditorTableNumberColumnWidth, akEditorTableNumberColumnWidth, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, ClassName.WITH_CONTROLS, ClassName.NATIVE_STICKY, tableMarginTop, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_CHROMELESS, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, ClassName.TABLE_CHROMELESS, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_RIGHT_BORDER, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(), rowControlsWrapperDotStyle(), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker("\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor, tableBorderRadiusSize, tableHeaderCellBackgroundColor, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker("\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton("\n border-bottom: 1px solid ".concat(tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.DRAG_ROW_CONTROLS, rowControlsZIndex + 4, ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", ClassName.DRAG_COLUMN_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER, tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", resizeHandlerZIndex, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, tableColumnControlsHeight, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, ClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", ClassName.DRAG_HANDLE_DISABLED, ClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", ClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-icon-subtle, #505258)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-border-focused, #4688EC)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-background-accent-red-subtler-pressed, #FD9891)", "var(--ds-border-inverse, #FFFFFF)", floatingColumnControls(), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, relativeSizeToBaseFontSize(10), relativeSizeToBaseFontSize(14), tableHeaderCellBackgroundColor, tableTextColor, tableBorderColor, tableBorderColor, ClassName.TABLE_STICKY, props.isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, ClassName.TABLE_CONTAINER, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, editorExperiment('platform_editor_block_menu', true) ? "/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.".concat(akEditorSelectedNodeClassName, " {\n\t\t.").concat(ClassName.NUMBERED_COLUMN, " {\n\t\t\t.").concat(ClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\t").concat(numberedColumnButtonSelectedStyles, "\n\t\t\t\t").concat(hideNativeBrowserTextSelectionStyles, "\n\t\t\t}\n\t\t}\n\t}") : '', ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", akEditorUnitZIndex, editorExperiment('platform_editor_block_menu', true) ? ".tableView-content-wrap.danger {\n\t\t:not(.".concat(ClassName.IS_RESIZING, ") .").concat(ClassName.WITH_CONTROLS, " {\n\t\t\t.").concat(ClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\tbackground-color: ").concat(tableToolbarDeleteColor, ";\n\t\t\t\tborder: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", "var(--ds-text-danger, #AE2E24)", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ").concat(akEditorUnitZIndex, ";\n\t\t\t}\n\t\t}\n\t}") : '', ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell borders handled by ::after overlay in rounded mode. */ : "border: 1px solid ".concat(tableBorderSelectedColor, ";"), ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CELL, ClassName.HOVERED_CELL_IN_DANGER, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell border colors are handled by the ::after overlay in rounded mode. */ : "border-left-color: ".concat(tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(tableBorderDeleteColor, ";"), tableBorderDeleteColor, akEditorUnitZIndex * 100, tableCellDeleteColor, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, tableCellDeleteColor, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, tableCellDeleteColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableOverrides() : '', ClassName.DRAG_ROW_CONTROLS_WRAPPER, tableMarginTop, tableToolbarSize + 1, ClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(tableToolbarSize + 1, "px;\n\t\t") : "\n\t\t\t/* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n\t\t\ttop: ".concat(tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(tableToolbarSize, "px;\n\t\t"), ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", nativeStickyHeaderZIndex + 1, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Leave a 1px gap so the sticky header row's top border stays visible. */\n\t\ttranslate: 0 -1px;" : "", ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableNumberColumnWidth + dragRowControlsWidth, akEditorTableNumberColumnWidth + dragRowControlsWidth, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", nativeStickyHeaderZIndex - 1, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(akEditorTableNumberColumnWidth, "px") : "".concat(akEditorTableNumberColumnWidth - 1, "px"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'calc(100% + 2px)' : '100%', expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "-".concat(akEditorTableNumberColumnWidth + 1, "px") : "-".concat(akEditorTableNumberColumnWidth, "px"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? fg('platform_editor_table_q4_patch_2') ? // Anchor the mask with an explicit `top` so `vertical-align` (data-valign) on the cell
82
+ ".".concat(ClassName.TABLE_CONTAINER, ".").concat(ClassName.TABLE_STICKY, "[data-number-column='true']:has(tr.sticky)::before {\n\t\t\ttransform: translateX(calc(-1 * (").concat(DRAG_HANDLE_WIDTH, "px + ", "var(--ds-space-150, 12px)", " + ").concat(akEditorTableNumberColumnWidth, "px)));\n\t\t}") : "") : "", ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.NATIVE_STICKY, tableMarginTop, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? akEditorSmallZIndex : "calc(".concat(akEditorTableCellOnStickyHeaderZIndex, " - 5)"), tableBorderColor, tableBorderColor, ClassName.NATIVE_STICKY_ACTIVE, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(nativeStickyHeaderZIndex, ";") : '', tableBorderColor, tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.TABLE_HEADER_CELL, tableBorderColor, tableBorderColor, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY, tableMarginTop, tableMarginTop, stickyRowZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY_ACTIVE, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, tableColumnControlsHeight, aboveNativeStickyHeaderZIndex, expValEquals('platform_editor_table_sticky_header_patch_12', 'isEnabled', true) ? "\n\t\t\t.".concat(ClassName.TABLE_CONTAINER, ":has(> .").concat(ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ")\n\t\t\t\t> .").concat(ClassName.DRAG_ROW_CONTROLS_WRAPPER, " {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t") : "\n\t\t\t.".concat(ClassName.DRAG_ROW_CONTROLS_WRAPPER, ":has(~ .").concat(ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ") {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t"), ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, belowNativeStickyHeaderZIndex, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.NATIVE_STICKY, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, tableColumnControlsHeight, ClassName.NATIVE_STICKY, akEditorTableNumberColumnWidth, akEditorTableNumberColumnWidth, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, ClassName.WITH_CONTROLS, ClassName.NATIVE_STICKY, tableMarginTop, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_CHROMELESS, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tablePadding, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, ClassName.TABLE_CHROMELESS, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_RIGHT_BORDER, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), columnControlsDecoration(), rowControlsWrapperDotStyle(), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker("\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor, tableBorderRadiusSize, tableHeaderCellBackgroundColor, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker("\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton("\n border-bottom: 1px solid ".concat(tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.DRAG_ROW_CONTROLS, rowControlsZIndex + 4, ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, ClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", ClassName.DRAG_COLUMN_CONTROLS, ClassName.DRAG_COLUMN_CONTROLS_INNER, tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", resizeHandlerZIndex, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, tableColumnControlsHeight, ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, ClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", ClassName.DRAG_HANDLE_DISABLED, ClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", ClassName.DRAG_HANDLE_DISABLED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-icon-subtle, #505258)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-border-focused, #4688EC)", "var(--ds-background-accent-blue-subtle, #669DF1)", "var(--ds-icon-inverse, #FFFFFF)", "var(--ds-background-accent-red-subtler-pressed, #FD9891)", "var(--ds-border-inverse, #FFFFFF)", floatingColumnControls(), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, relativeSizeToBaseFontSize(10), relativeSizeToBaseFontSize(14), tableHeaderCellBackgroundColor, tableTextColor, tableBorderColor, tableBorderColor, ClassName.TABLE_STICKY, props.isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, ClassName.TABLE_CONTAINER, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, editorExperiment('platform_editor_block_menu', true) ? "/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.".concat(akEditorSelectedNodeClassName, " {\n\t\t.").concat(ClassName.NUMBERED_COLUMN, " {\n\t\t\t.").concat(ClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\t").concat(numberedColumnButtonSelectedStyles, "\n\t\t\t\t").concat(hideNativeBrowserTextSelectionStyles, "\n\t\t\t}\n\t\t}\n\t}") : '', ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", akEditorUnitZIndex, editorExperiment('platform_editor_block_menu', true) ? ".tableView-content-wrap.danger {\n\t\t:not(.".concat(ClassName.IS_RESIZING, ") .").concat(ClassName.WITH_CONTROLS, " {\n\t\t\t.").concat(ClassName.NUMBERED_COLUMN_BUTTON, " {\n\t\t\t\tbackground-color: ").concat(tableToolbarDeleteColor, ";\n\t\t\t\tborder: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", "var(--ds-text-danger, #AE2E24)", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ").concat(akEditorUnitZIndex, ";\n\t\t\t}\n\t\t}\n\t}") : '', ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell borders handled by ::after overlay in rounded mode. */ : "border: 1px solid ".concat(tableBorderSelectedColor, ";"), ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CELL, ClassName.HOVERED_CELL_IN_DANGER, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? '' /* Cell border colors are handled by the ::after overlay in rounded mode. */ : "border-left-color: ".concat(tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(tableBorderDeleteColor, ";"), tableBorderDeleteColor, akEditorUnitZIndex * 100, tableCellDeleteColor, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.TABLE_HEADER_CELL, ClassName.HOVERED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, tableCellDeleteColor, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), akEditorUnitZIndex * 100, tableCellDeleteColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableOverrides() : '', ClassName.DRAG_ROW_CONTROLS_WRAPPER, tableMarginTop, tableToolbarSize + 1, ClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(tableToolbarSize + 1, "px;\n\t\t") : "\n\t\t\t/* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n\t\t\ttop: ".concat(tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(tableToolbarSize, "px;\n\t\t"), ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", nativeStickyHeaderZIndex + 1, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Leave a 1px gap so the sticky header row's top border stays visible. */\n\t\ttranslate: 0 -1px;" : "", ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableNumberColumnWidth + dragRowControlsWidth, akEditorTableNumberColumnWidth + dragRowControlsWidth, tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", nativeStickyHeaderZIndex - 1, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(akEditorTableNumberColumnWidth, "px") : "".concat(akEditorTableNumberColumnWidth - 1, "px"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'calc(100% + 2px)' : '100%', expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "-".concat(akEditorTableNumberColumnWidth + 1, "px") : "-".concat(akEditorTableNumberColumnWidth, "px"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? // Anchor the mask with an explicit `top` so `vertical-align` (data-valign) on the cell
83
83
  // doesn't shift it; the calc reproduces the previous top-aligned offset.
84
- "top: calc(".concat("var(--ds-space-100, 8px)", " - ", stickyRowOffsetTop + 1, "px);") : "margin-top: -".concat(stickyRowOffsetTop + 1, "px;") : "margin-top: -".concat(stickyRowOffsetTop, "px;"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : "0.5px solid ".concat(tableBorderColor), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "1px solid ".concat(tableBorderColor) : 'none', expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom: 1px solid ".concat(tableBorderColor, ";") : "", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", tableBorderColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_SELECTED, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, tableBorderSelectedColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(tableBorderSelectedColor, ";") : '', tableBorderSelectedColor, tableHeaderCellSelectedColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_SELECTED, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_SELECTED, tableBorderSelectedColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(tableBorderSelectedColor) : '', tableBorderSelectedColor, tableHeaderCellSelectedColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_SELECTED, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_2') ? // Recolour the corner edges to the delete border and composite the translucent danger
84
+ "top: calc(".concat("var(--ds-space-100, 8px)", " - ", stickyRowOffsetTop + 1, "px);") : "margin-top: -".concat(stickyRowOffsetTop, "px;"), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : "0.5px solid ".concat(tableBorderColor), expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "1px solid ".concat(tableBorderColor) : 'none', expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom: 1px solid ".concat(tableBorderColor, ";") : "", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", tableBorderColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_SELECTED, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, tableBorderSelectedColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(tableBorderSelectedColor, ";") : '', tableBorderSelectedColor, tableHeaderCellSelectedColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_SELECTED, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_SELECTED, tableBorderSelectedColor, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(tableBorderSelectedColor) : '', tableBorderSelectedColor, tableHeaderCellSelectedColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.HOVERED_CELL_IN_DANGER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_SELECTED, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? // Recolour the corner edges to the delete border and composite the translucent danger
85
85
  // fill over the mask's gray so it matches the adjacent cells instead of reading as transparent.
86
86
  "border-left: 1px solid ".concat(tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-top: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-bottom: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t\t\t\tbackground-color: ", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", ";\n\t\t\t\t\t\tbackground-image: linear-gradient(").concat(tableCellDeleteColor, ", ").concat(tableCellDeleteColor, ");") : "border-left: unset;\n\t\t\t\t\tborder-top: unset;\n\t\t\t\t\tbackground: ".concat(tableCellDeleteColor, ";"), ClassName.TABLE_CONTAINER, ClassName.TABLE_SELECTED, ClassName.HOVERED_DELETE_BUTTON, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.SELECTED_CELL, ClassName.COLUMN_SELECTED, tableBorderDeleteColor, tableBorderDeleteColor, tableCellDeleteColor, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.NATIVE_STICKY_ACTIVE, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_INNER, ClassName.NESTED_TABLE_WITH_CONTROLS, tableMarginTop, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableCellOnStickyHeaderZIndex - 4, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') ? ".".concat(ClassName.TABLE_CONTAINER, ".").concat(ClassName.WITH_CONTROLS, ":has(tr.sticky) .").concat(ClassName.NUMBERED_COLUMN, " .").concat(ClassName.NUMBERED_COLUMN_BUTTON, ":first-of-type {\n\t\t\tbox-shadow: 0 -5px 0 1px ").concat(tableBorderColor, ";\n\t\t}") : "", ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
87
87
  };
@@ -16,6 +16,7 @@ export default class TableView extends ReactNodeView<Props> {
16
16
  private resizeObserver?;
17
17
  private roundedTableEdges;
18
18
  private intl?;
19
+ private isNestedTable;
19
20
  eventDispatcher?: EventDispatcher;
20
21
  getPos: getPosHandlerNode;
21
22
  options: TableOptions | undefined;
@@ -35,6 +36,7 @@ export default class TableView extends ReactNodeView<Props> {
35
36
  private _handleTableRef;
36
37
  setDomAttrs(node: PmNode): void;
37
38
  getNode: () => PmNode;
39
+ private updateContentVisibility;
38
40
  update(node: PmNode, decorations: ReadonlyArray<Decoration>, innerDecorations?: DecorationSource, validUpdate?: (currentNode: PmNode, newNode: PmNode) => boolean): boolean;
39
41
  render(props: Props, forwardRef: ForwardRef): React.JSX.Element;
40
42
  private hasHoveredRows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "26.0.9",
3
+ "version": "26.1.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/editor-ui-control-model": "^2.6.0",
46
46
  "@atlaskit/icon": "^37.3.0",
47
47
  "@atlaskit/icon-lab": "^7.5.0",
48
- "@atlaskit/insm": "^1.2.0",
48
+ "@atlaskit/insm": "^1.3.0",
49
49
  "@atlaskit/menu": "^10.0.0",
50
50
  "@atlaskit/platform-feature-experiments": "^0.3.0",
51
51
  "@atlaskit/platform-feature-flags": "^2.1.0",
@@ -68,7 +68,7 @@
68
68
  "uuid": "^3.1.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@atlaskit/editor-common": "^118.10.0",
71
+ "@atlaskit/editor-common": "^118.11.0",
72
72
  "react": "^18.2.0 || ^19.2.0",
73
73
  "react-dom": "^18.2.0 || ^19.2.0",
74
74
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -95,11 +95,6 @@
95
95
  ]
96
96
  }
97
97
  },
98
- "stricter": {
99
- "no-unused-dependencies": {
100
- "checkDevDependencies": true
101
- }
102
- },
103
98
  "platform-feature-flags": {
104
99
  "platform_editor_markdown_compatible_toolbar": {
105
100
  "type": "boolean"
@@ -125,15 +120,9 @@
125
120
  "platform_editor_col_insert_patch_1": {
126
121
  "type": "boolean"
127
122
  },
128
- "platform_editor_table_q4_patch_2": {
129
- "type": "boolean"
130
- },
131
123
  "platform_editor_enable_table_scaling": {
132
124
  "type": "boolean"
133
125
  },
134
- "platform_editor_table_nested_renderer_fix": {
135
- "type": "boolean"
136
- },
137
126
  "platform_editor_enable_table_update_ref_atlas": {
138
127
  "type": "boolean"
139
128
  },