@atlaskit/editor-plugin-table 42.2.8 → 42.3.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,26 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 42.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e495ce10dcb71`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e495ce10dcb71) -
8
+ [EDITOR-9904] Keep the table cell options button on its header cell when the editor width or the
9
+ table's column widths change, with the header stuck or not, behind
10
+ platform_editor_sticky_cell_options_position
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 42.2.9
17
+
18
+ ### Patch Changes
19
+
20
+ - [`38e1e35d8bf89`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38e1e35d8bf89) -
21
+ Clean up experiment `platform_editor_table_q4_patch_8`
22
+ - Updated dependencies
23
+
3
24
  ## 42.2.8
4
25
 
5
26
  ### Patch Changes
@@ -28,7 +28,9 @@ var calcObserverTargetMargin = exports.calcObserverTargetMargin = function calcO
28
28
  return fixedButtonRect.left - tableWrapperRect.left + scrollLeft;
29
29
  };
30
30
  var FixedButton = exports.FixedButton = function FixedButton(_ref2) {
31
- var children = _ref2.children,
31
+ var _ref2$cellLayoutVersi = _ref2.cellLayoutVersion,
32
+ cellLayoutVersion = _ref2$cellLayoutVersi === void 0 ? 0 : _ref2$cellLayoutVersi,
33
+ children = _ref2.children,
32
34
  isContextualMenuOpen = _ref2.isContextualMenuOpen,
33
35
  mountTo = _ref2.mountTo,
34
36
  offset = _ref2.offset,
@@ -92,10 +94,24 @@ var FixedButton = exports.FixedButton = function FixedButton(_ref2) {
92
94
  }
93
95
  }, [fixedButtonRef, observerTargetRef, tableWrapper, targetCellPosition, targetCellRef, isContextualMenuOpen]);
94
96
  var fixedButtonTop = 0;
97
+
98
+ // The left position below is read from the cell's current rect, which already includes the
99
+ // table's horizontal scroll, so the scroll translation accumulated so far must start again.
100
+ (0, _react.useLayoutEffect)(function () {
101
+ var fixedButtonRefCurrent = fixedButtonRef.current;
102
+ var observerTargetRefCurrent = observerTargetRef.current;
103
+ if (cellLayoutVersion === 0 || !fixedButtonRefCurrent || !observerTargetRefCurrent) {
104
+ return;
105
+ }
106
+ fixedButtonRefCurrent.style.transform = '';
107
+ scrollDataRef.current = tableWrapper.scrollLeft;
108
+ leftPosDataRef.current = 0;
109
+ observerTargetRefCurrent.style.marginLeft = "".concat(calcObserverTargetMargin(tableWrapper, fixedButtonRefCurrent), "px");
110
+ }, [cellLayoutVersion, tableWrapper]);
95
111
  var containerLeft = (0, _react.useMemo)(function () {
96
112
  var container = targetCellRef.closest('[data-editor-container="true"]');
97
113
  return (container === null || container === void 0 ? void 0 : container.getBoundingClientRect().left) || 0;
98
- }, [targetCellRef]);
114
+ }, [targetCellRef, cellLayoutVersion]);
99
115
  var left = (0, _react.useMemo)(function () {
100
116
  var targetCellRect = targetCellRef.getBoundingClientRect();
101
117
  var baseLeft = calcLeftPos({
@@ -105,7 +121,7 @@ var FixedButton = exports.FixedButton = function FixedButton(_ref2) {
105
121
  offset: offset
106
122
  });
107
123
  return baseLeft - containerLeft;
108
- }, [containerLeft, targetCellRef, offset]);
124
+ }, [containerLeft, targetCellRef, offset, cellLayoutVersion]);
109
125
 
110
126
  // Using a portal here to ensure wrapperRef has the tableWrapper as an
111
127
  // ancestor. This is required to make the Intersection Observer work.
@@ -29,6 +29,7 @@ var _types = require("../../types");
29
29
  var _stickyHeaderZIndex = require("../sticky-header-z-index");
30
30
  var _FixedButton = _interopRequireDefault(require("./FixedButton"));
31
31
  var _styles = require("./styles");
32
+ var _useCellLayoutVersion = require("./useCellLayoutVersion");
32
33
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
33
34
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34
35
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
@@ -96,6 +97,9 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
96
97
  };
97
98
  var domAtPos = editorView.domAtPos.bind(editorView);
98
99
  var targetCellRef = (0, _utils.findDomRefAtPos)(targetCellPosition, domAtPos);
100
+ // Re-renders this component when the cell may have moved, so both FixedButton and Popup
101
+ // reposition: Popup recalculates its position whenever it receives new props.
102
+ var cellLayoutVersion = (0, _useCellLayoutVersion.useCellLayoutVersion)(targetCellRef);
99
103
  (0, _react.useEffect)(function () {
100
104
  if (isCellMenuOpenByKeyboard && !isCellMenuOpen) {
101
105
  var state = editorView.state,
@@ -188,6 +192,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
188
192
  }
189
193
  if (stickyHeader && parentSticky && tableWrapper) {
190
194
  return (0, _react2.jsx)(_FixedButton.default, {
195
+ cellLayoutVersion: cellLayoutVersion,
191
196
  offset: BUTTON_OFFSET,
192
197
  stickyHeader: stickyHeader,
193
198
  tableWrapper: tableWrapper,
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useCellLayoutVersion = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _react = require("react");
10
+ var _rafSchd = _interopRequireDefault(require("raf-schd"));
11
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
12
+ /**
13
+ * Counts layout changes that can move the target cell without re-rendering the cell options
14
+ * button: the editor container resizing (window resize, side panel, product sidebar) or the table
15
+ * resizing (column scaling). Changing the count re-renders the button so it repositions on its
16
+ * cell. Stays 0 when the gate is off.
17
+ */
18
+ var useCellLayoutVersion = exports.useCellLayoutVersion = function useCellLayoutVersion(targetCellRef) {
19
+ var _useState = (0, _react.useState)(0),
20
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
21
+ layoutVersion = _useState2[0],
22
+ setLayoutVersion = _useState2[1];
23
+ (0, _react.useEffect)(function () {
24
+ if (!(0, _fg.fg)('platform_editor_sticky_cell_options_position')) {
25
+ return;
26
+ }
27
+ if (!(targetCellRef instanceof HTMLElement)) {
28
+ return;
29
+ }
30
+ var container = targetCellRef.closest('[data-editor-container="true"]');
31
+ var table = targetCellRef.closest('table');
32
+ var bumpLayoutVersion = (0, _rafSchd.default)(function () {
33
+ return setLayoutVersion(function (version) {
34
+ return version + 1;
35
+ });
36
+ });
37
+ var hasReceivedInitialEntries = false;
38
+ var observer = new ResizeObserver(function () {
39
+ // ResizeObserver reports every observed element once on observe(); that is not a move.
40
+ if (!hasReceivedInitialEntries) {
41
+ hasReceivedInitialEntries = true;
42
+ return;
43
+ }
44
+ bumpLayoutVersion();
45
+ });
46
+ if (container) {
47
+ observer.observe(container);
48
+ }
49
+ if (table) {
50
+ observer.observe(table);
51
+ }
52
+ return function () {
53
+ observer.disconnect();
54
+ bumpLayoutVersion.cancel();
55
+ };
56
+ }, [targetCellRef]);
57
+ return layoutVersion;
58
+ };
@@ -91,11 +91,11 @@ var baseTableStylesWithoutSharedStyle = function baseTableStylesWithoutSharedSty
91
91
  return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", "\n\n\t", "\n\n\t", ";\n\n\t.", " {\n\t\ttd.", ", th.", " {\n\t\t\tposition: relative;\n\t\t\toverflow: visible;\n\t\t}\n\n\t\ttd.", " {\n\t\t\tbackground-color: ", ";\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\tcontent: '';\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-bottom: 1px solid ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: 0px;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t", "\n\n\t", "\n\n\t/* Delete button */\n\t", "\n\t/* Ends Delete button */\n\n\t/* sticky styles */\n\t.", " > .", " .", " .", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t\twidth: ", "px;\n\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tbox-shadow: 0px -", "px\n\t\t\t", ";\n\t\tborder-right: 0 none;\n\t\t", "/* top set by NumberColumn component */\n\t}\n\n\t.", " .", ".sticky {\n\t\tposition: fixed !important;\n\t\t/* needs to be above row controls */\n\t\tz-index: ", " !important;\n\t\tbackground: ", ";\n\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t}\n\n\t.", ".sticky .", " {\n\t\tborder-bottom: 0px none;\n\t\tborder-right: 0px none;\n\n\t\theight: ", "px;\n\t\twidth: ", "px;\n\t}\n\n\t", "\n\n\t", "\n\n .", "\n .", "\n .", ".sticky {\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tdisplay: flex;\n\t\tborder-left: ", "px solid\n\t\t\t", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.", " col:first-of-type {\n\t\t/* moving rows out of a table layout does weird things in Chrome */\n\t\tborder-right: 1px solid\n\t\t\t", ";\n\t}\n\n\ttr.sticky {\n\t\tpadding-top: ", "px;\n\t\tposition: fixed;\n\t\tdisplay: grid;\n\n\t\t/* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n\t\tz-index: ", ";\n\n\t\toverflow-y: visible;\n\t\toverflow-x: hidden;\n\n\t\tgrid-auto-flow: column;\n\n\t\t/* background for where controls apply */\n\t\tbackground: ", ";\n\t\tbox-sizing: content-box;\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\n\t\tmargin-left: -1px;\n\n\t\t&.no-pointer-events {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.tableView-content-wrap:has(.tableView-content-wrap):has(\n\t\t\t.", "\n\t\t) {\n\t\tpadding-left: unset;\n\t}\n\n\t.tableView-content-wrap:has(.", ") {\n\t\tpadding-left: 15px;\n\t}\n\n\ttr.sticky th {\n\t\tborder-bottom: ", "px solid ", ";\n\t\tmargin-right: -1px;\n\t}\n\n\t.", " tr.sticky > th:last-child {\n\t\tborder-right-width: 1px;\n\t}\n\n\t/* add left edge for first cell */\n\t.", " tr.sticky > th:first-of-type {\n\t\tmargin-left: 0px;\n\t}\n\n\t/* add a little bit so the scroll lines up with the table */\n\t.", " tr.sticky::after {\n\t\tcontent: ' ';\n\t\twidth: ", "px;\n\t}\n\n\t/* use :before element to hide table row insert dots when legacy table sticky header is activated */\n\t.", ".", ":has(tr.sticky)::before {\n\t\tcontent: ' ';\n\t\tposition: sticky;\n\t\tpointer-events: none;\n\t\ttop: 0;\n\t\tfloat: left;\n\t\ttransform: translateX(calc(-1 * (", "px + ", ")));\n\t\tmargin-bottom: calc(\n\t\t\t-1 * (", " - 1px + ", " + ", ")\n\t\t);\n\t\theight: calc(", " - 1px + ", " + ", ");\n\t\twidth: calc(", "px + ", ");\n\t\tbackground: linear-gradient(\n\t\t\tto bottom,\n\t\t\t", "\n\t\t\t\t90%,\n\t\t\ttransparent\n\t\t);\n\t\tz-index: ", ";\n\t}\n\t/* Shift the mask left by the numbered column width so it sits to the left of it. */\n\t.", ".", "[data-number-column='true']:has(tr.sticky)::before {\n\t\ttransform: translateX(\n\t\t\tcalc(\n\t\t\t\t-1 * (", "px + ", " + ", "px)\n\t\t\t)\n\t\t);\n\t}\n\n\t/* To fix jumpiness caused in Chrome Browsers for sticky headers */\n\t.", " .sticky + tr {\n\t\tmin-height: 0px;\n\t}\n\n\t/* move resize line a little in sticky bar */\n\t.", ".", " {\n\t\ttr.sticky td.", ", tr.sticky th.", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\n\t\t/* when selected put it back to normal -- :not selector would be nicer */\n\t\ttr.sticky\n\t\t\ttd.", ".", ",\n\t\t\ttr.sticky\n\t\t\tth.", ".", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\ttr.sticky .", ", tr.sticky .", " {\n\t\tz-index: 1;\n\t}\n\n\ttr.", " {\n\t\tposition: sticky;\n\t\ttop: ", "px;\n\t\tz-index: ", ";\n\t\tbox-shadow:\n\t\t\tinset -1px 1px ", ",\n\t\t\tinset 1px -1px ", ";\n\n\t\t&.", " {\n\t\t\t", "\n\t\t\tbox-shadow:\n\t\t\t\tinset -1px 1px ", ",\n\t\t\t\tinset 1px -1px ", ",\n\t\t\t\t0 6px 4px -4px ", ";\n\t\t}\n\n\t\tth.", "::after {\n\t\t\theight: 100%;\n\t\t\tcontent: '';\n\t\t\tborder-left: 1px solid ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\t\t\tposition: absolute;\n\t\t\tright: 0px;\n\t\t\ttop: 0px;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tdisplay: inline-block;\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t/** Adds mask above sticky header to prevent table content from bleeding through on scroll */\n\t.", ":has(tr.", ")::before {\n\t\tcontent: ' ';\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tbox-sizing: border-box;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin-bottom: -", "px;\n\t\tposition: sticky;\n\t\tborder-top: ", "px solid transparent;\n\t\tz-index: ", ";\n\t}\n\n\t.", ":has(tr.", ")::before {\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t}\n\n\t", "\n\n\t/** Corrects position of drag row controls when sticky header top mask is present */\n\t.", ":has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t\tz-index: ", ";\n\t}\n\n\t.", ":has(> .", ")\n\t\t> .", " {\n\t\tmargin-top: 0;\n\t}\n\n\t.", "[data-table-header-is-stuck='true']:has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\tz-index: ", ";\n\t}\n\n\t/** Corrects position of numbered column when sticky header top mask is present */\n\t.", ":has(.", " tr.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t}\n\n\t/** Expands the mask to encompass the numbered column */\n\t.pm-table-wrapper:has([data-number-column='true'] tr.", ")::before {\n\t\tmargin-left: -", "px;\n\t\twidth: calc(100% + ", "px);\n\t}\n\n\t/** Hides the header row drag handle when the position:sticky table header is 'stuck'\n\t *\n\t * 1. We check that the header is 'stuck'.\n\t * - The table container has attribute data-table-header-is-stuck='true' when sticky positioned header is 'stuck'\n\t *\n\t * 2. We check that the header row drag handle is in the first row or the first row is selected\n\t * - The header row drag handle has the data-row-index='0' attribute (i.e. hovered), OR\n\t * - The header row drag handle has the data-selected-row-index='0' attribute\n\t * \t\tAND does not have the data-handle-appearance='default' attribute (i.e. selected)\n\t*/\n\t.", ".", "[data-table-header-is-stuck='true']\n\t.", ":is([data-row-index='0'], [data-selected-row-index='0']:not([data-handle-appearance='default'])) {\n\t\tvisibility: hidden;\n\t}\n\n\t.", " tr.", " {\n\t\ttop: ", "px;\n\t}\n\n\t.", " tr.sticky {\n\t\tpadding-top: ", "px;\n\t}\n\n\t.", ".", "\n\t\t> .", "\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t}\n\n\t.", ".sticky {\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t}\n\n\t", "\n\t", "\n\n\t.less-padding {\n\t\tpadding: 0 ", "px;\n\n\t\t.", ", .", " {\n\t\t\tpadding: 0 ", "px;\n\n\t\t\t/* https://product-fabric.atlassian.net/browse/ED-16386\n\t\t\tFixes issue where the extra padding that is added here throws off the position\n\t\t\tof the rows control dot */\n\t\t\t&::after {\n\t\t\t\tright: 6px !important;\n\t\t\t}\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -4px;\n\t\t}\n\n\t\t.", " {\n\t\t\tpadding: 0 ", "px;\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -8px;\n\t\t}\n\n\t\t&.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t}\n\t\t.", " {\n\t\t\tleft: 8px;\n\t\t}\n\t\t.", " {\n\t\t\tright: 8px;\n\t\t}\n\t}\n\n\t> .", " {\n\t\t/**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n\t}\n\n\t/* Breakout only works on top level unless wrapped in fragment mark */\n\t", "\n\n\t", ";\n\t", ";\n\n\t/* Corner controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tdisplay: none;\n\n\t\t.", " {\n\t\t\tposition: relative;\n\n\t\t\t", ";\n\t\t}\n\t}\n\n\t.", ".sticky {\n\t\t.", " {\n\t\t\t/* sticky row insert dot overlaps other row insert and messes things up */\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tborder: 1px solid ", ";\n\t\tborder-radius: 0;\n\t\tborder-top-left-radius: ", "px;\n\t\tbackground: ", ";\n\t\tbox-sizing: border-box;\n\t\tpadding: 0;\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\t.active .", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column='true'] {\n\t\t.", ", .", " {\n\t\t\twidth: ", "px;\n\t\t}\n\t\t.", " .", " {\n\t\t\tborder-right-width: 0;\n\t\t}\n\t}\n\n\t:not(.", ") .", ":hover {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t\tcursor: pointer;\n\t}\n\n\t:not(.", ")\n\t\t.", ".", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t/* Row controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: relative;\n\n\t\t", ";\n\n\t\t.", " {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.", ":last-child > button {\n\t\t\tborder-bottom-left-radius: ", "px;\n\t\t}\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin-top: -1px;\n\t\t}\n\t\t.", ":hover,\n\t\t\t.", ".active,\n\t\t\t.", ":hover {\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t", "\n\t}\n\n\t.", " {\n\t\tdisplay: grid;\n\t\talign-items: center;\n\t\tposition: absolute;\n\t\tz-index: ", ";\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\talign-self: end;\n\t\t\theight: 100%;\n\t\t\twidth: 18px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tbottom: -3px;\n\t\t\tleft: 2px;\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " {\n\t\t\theight: ", "px;\n\t\t\tposition: absolute;\n\t\t\ttop: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\theight: ", "px;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tposition: absolute;\n\t\t\tright: -2px;\n\t\t}\n\t}\n\n\t.", " {\n\t\tbackground: none;\n\t\tborder: none;\n\t\toutline: none;\n\t\tposition: absolute;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\tcursor: grab;\n\t\tpointer-events: auto;\n\n\t\tline-height: 0;\n\t\tpadding: 0;\n\t\tborder-radius: 6px;\n\t\twidth: max-content;\n\t\tborder: 2px solid ", ";\n\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tbackground: transparent;\n\t\toutline: none;\n\n\t\t&.placeholder {\n\t\t\tbackground-color: transparent;\n\t\t\tborder: 2px solid transparent;\n\t\t}\n\n\t\t&.", " {\n\t\t\tcursor: pointer;\n\t\t\t& svg {\n\t\t\t\t& > rect.", " {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > g > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:not(.", ") {\n\t\t\t& svg {\n\t\t\t\trect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\tg {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:active {\n\t\t\t\tcursor: grabbing;\n\t\t\t}\n\n\t\t\t&.selected {\n\t\t\t\t:focus {\n\t\t\t\t\toutline: 2px solid ", ";\n\t\t\t\t\toutline-offset: 1px;\n\t\t\t\t}\n\n\t\t\t\t&:active {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.danger {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t:not(.", ") .", " {\n\t\t", "\n\t\t", "\n\t}\n\n\t/* Numbered column */\n\t.", " {\n\t\tposition: relative;\n\t\tfloat: right;\n\t\tmargin-left: ", "px;\n\t\ttop: ", "px;\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.", " {\n\t\tborder: 1px solid ", ";\n\t\tbox-sizing: border-box;\n\t\tmargin-top: -1px;\n\t\tpadding-bottom: 2px;\n\t\tpadding: ", " 2px;\n\t\ttext-align: center;\n\t\tfont-size: ", ";\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tborder-color: ", ";\n\n\t\t:first-child:not(style),\n\t\tstyle:first-child + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t:last-child {\n\t\t\tborder-bottom: 1px solid ", ";\n\t\t}\n\t}\n\n\t/* add a background above the first numbered column cell when sticky header is engaged\n\twhich hides the table when scrolling */\n\t.", "\n\t\t> .", " {\n\t\t.", ":first-of-type::after {\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\theight: 33px;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\n\t\t\t/* the extra pixel is accounting for borders */\n\t\t\ttop: -34px;\n\t\t\tleft: -1px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", ", .", " {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.", " {\n\t\t\tpadding-left: 0px;\n\n\t\t\t.", " {\n\t\t\t\tborder-left: 0 none;\n\t\t\t}\n\n\t\t\t.", ".active {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* nested tables should be ignored when we apply border-left: 0 to the parent table */\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.", " {\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t:not(.", ") .", " {\n\t\t.", ":not(.", ") {\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.", ":not(.", "):hover {\n\t\t\t", "\n\t\t}\n\t\t.", ".", " {\n\t\t\tbackground-color: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\tborder-left: 0;\n\t\t\tcolor: ", ";\n\t\t\tposition: relative;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t.tableView-content-wrap.danger {\n\t\t:not(.", ") .", " {\n\t\t\t.", " {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Table */\n\t.", " > table {\n\t\ttable-layout: fixed;\n\t\twhite-space: normal;\n\t\tborder-top: none;\n\t\t/* 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212 */\n\t\tmargin-right: -1px;\n\t\t/* Allows better positioning for the shadow sentinels - ED-16668 */\n\t\tposition: relative;\n\n\t\t> tbody > tr {\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\n\t\t.", " + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t/*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n\t\tth.", " > .fabric-editor-block-mark {\n\t\t\t> h1:first-of-type,\n\t\t\t> h2:first-of-type,\n\t\t\t> h3:first-of-type,\n\t\t\t> h4:first-of-type,\n\t\t\t> h5:first-of-type,\n\t\t\t> h6:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tposition: relative;\n\t\t}\n\t\t/* Give selected cells a blue overlay */\n\t\t.", "::after, .", "::after {\n\t\t\tz-index: ", ";\n\t\t\tposition: absolute;\n\t\t\tcontent: '';\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\ttop: 0;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t\t.", "::after {\n\t\t\tbackground: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\t\t/* Override border colors for danger state */\n\t\tth.", ".", ",\n\t\t\ttd.", ".", " {\n\t\t\t", "\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t\ttd.", ",\n\t\t\ttd.", ",\n\t\t\tth.", ".", ",\n\t\t\tth.", ".", " {\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t&.", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t&.", ".", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t/* override for DnD controls */\n\t.", " {\n\t\tposition: absolute;\n\t\tmargin-top: ", "px;\n\t\tleft: -", "px;\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\t/* this is to fix the misalignment of the numbered column in live page view mode */\n\t\t", "\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: ", "px;\n\t}\n\n\t.", " > .", " {\n\t\t/* +2px is to overlap the table border on the sides */\n\t\twidth: calc(anchor-size(width) + 2px);\n\t\theight: ", "px;\n\t\tbackground: ", ";\n\t\ttop: unset;\n\t\tposition: fixed;\n\t\tposition-area: top center;\n\t\tposition-visibility: anchors-visible;\n\t\tz-index: ", ";\n\t\t", "\n\t}\n\n\t/** Mask for content to the left of the column controls */\n\n\t.", "[data-number-column=\"true\"] .", " > .", "::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\tmargin-left: -", "px;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tbackground: ", ";\n\t\tz-index: ", ";\n\t}\n\n\t/** Mask for numbered column content to the left of the header row */\n\t.", "[data-number-column=\"true\"] .", " tr:first-of-type th:first-of-type::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t\tleft: 0;\n\t\twidth: ", ";\n\t\theight: ", ";\n\t\tmargin-left: ", ";\n\t\t", "\n\t\toutline: ", ";\n\t\tborder-left: ", ";\n\t\t", "\n\t\tbackground: ", ";\n\t\tborder-top: 1px solid ", ";\n\t}\n\n\t.ak-editor-selected-node .", "[data-number-column=\"true\"]:not(.", ") .", " tr:first-of-type th:first-of-type {\n\t\t/* Recolour the number-column corner mask to match the selected cells. Keep this identical\n\t\t to the .selectedCell ::before rule below \u2014 never set margin-top (the base negative\n\t\t margin aligns the mask) or radius (rounded generically by data-reaches-* rules). */\n\t\t&::before {\n\t\t\toutline: none;\n\t\t\tborder-left-color: ", ";\n\t\t\t", "\n\t\t\tborder-top-color: ", ";\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", "[data-number-column=\"true\"].", " .", " tr:first-of-type th.", ":not(.", "):first-of-type::before, .", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":not(.", ", .", "):first-of-type::before {\n\t\toutline: none;\n\t\tborder-left-color: ", ";\n\t\t", ";\n\t\tborder-top-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":first-of-type::before, .", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":not(.", "):first-of-type::before {\n\t\toutline: none;\n\t\t", "\n\t}\n\t.", "[data-number-column=\"true\"].", ".", " .", " tr:first-of-type th:first-of-type::before, .", "[data-number-column=\"true\"].", " .", " tr:first-of-type th.", ":not(.", "):first-of-type::before {\n\t\toutline: none;\n\t\tborder-left-color: ", ";\n\t\tborder-top-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column=\"true\"] .", " .", " th:first-of-type::before {\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\t}\n\n\t.", "\n\t\t.", ":not(.", " *) {\n\t\t/* !important to override the inline style in the inner controls component */\n\t\tmargin-top: ", "px !important;\n\t}\n\n\t.", " .", " {\n\t\tposition: fixed;\n\t\t/* Keep column controls above the sticky header. */\n\t\tz-index: ", ";\n\t}\n\n\t.", ".", ":has(tr.sticky)\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tbox-shadow: 0 -5px 0 1px ", ";\n\t}\n\n\t/* nested tables */\n\t.", " {\n\t\t.", " .", " {\n\t\t\tposition: absolute;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding-bottom: 0px;\n\t\t/* fixes gap cursor height */\n\t\toverflow: auto;\n\t\toverflow-y: hidden;\n\t\tposition: relative;\n\t}\n\n\t.", ".", " {\n\t\toverflow: visible;\n\t}\n\n\t", "\n"])), (0, _uiStyles.columnControlsLineMarker)(), (0, _uiStyles.hoveredDeleteButton)(), (0, _uiStyles.hoveredCell)(), _uiStyles.hoveredWarningCell, (0, _uiStyles.insertLine)(), (0, _uiStyles.resizeHandle)(),
92
92
  // Only block getSelectionStyles when our replacement (gated by q4) owns the
93
93
  // decoration, so node selection is never left unstyled.
94
- (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeSelectionStylesForRoundedTable : rangeSelectionStyles, rangeSelectionStylesForFakeBorders, viewModeSortStyles(), (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_sticky_headers_zindex') ? ".".concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t--ak-editor-table-resize-handle-z-index: ").concat((0, _stickyHeaderZIndex.getTableZIndexes)().mediaResizeHandle, ";\n\t\t}") : '', (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "\n\t\t.ak-editor-panel:not([data-panel-type=\"custom\"]) .".concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-blue-subtlest, #E9F2FE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"note\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-purple-subtlest, #F8EEFE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"tip\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"warning\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-yellow-subtlest, #FEF7C8)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"error\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-red-subtlest, #FFECEB)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"success\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t") : '', tableAnchorStyles, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.TABLE_CELL, _consts4.tableCellBackgroundColor, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, (0, _uiStyles.insertColumnButtonWrapper)(), _types2.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, (0, _uiStyles.insertRowButtonWrapper)(), (0, _uiStyles.dragInsertButtonWrapper)(), (0, _uiStyles.dragCornerControlButton)(), (0, _uiStyles.DeleteButton)(), _types2.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.stickyRowOffsetTop, _constants.akEditorTableNumberColumnWidth, _constants.akEditorStickyHeaderZIndex, _consts4.stickyRowOffsetTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t\twidth: ".concat(_constants.akEditorTableNumberColumnWidth + 1, "px;\n\t\t\tborder-left: 1px solid ").concat(_consts4.tableBorderColor, ";\n\n\t\t\t/* Keep the new fixed left border in sync with the selected/danger states,\n\t\t\t which would otherwise leave it the default colour (.active recolours the\n\t\t\t rest of the border) or drop it entirely (delete-hover sets border-left: 0). */\n\t\t\t&.active {\n\t\t\t\tborder-left-color: ").concat(_consts4.tableBorderSelectedColor, ";\n\t\t\t}\n\t\t\t&.").concat(_types2.TableCssClassName.HOVERED_CELL_IN_DANGER, " {\n\t\t\t\tborder-left: 1px solid ").concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t}\n\t\t\t") : '', _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.CORNER_CONTROLS, _constants.akEditorSmallZIndex, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.tableToolbarSize, _consts4.tableToolbarSize, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableToolbarSize, _consts4.tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _constants.akEditorStickyHeaderZIndex, _consts4.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.tableToolbarSize, _types2.TableCssClassName.TABLE_STICKY, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.stickyRowOffsetTop, (0, _stickyHeaderZIndex.getTableZIndexes)().header, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _consts4.stickyHeaderBorderBottomWidth, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_STICKY, insertColumnButtonOffset + 1, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.rowControlsZIndex + 5, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", _constants.akEditorTableNumberColumnWidth, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts4.resizeHandlerAreaWidth - _consts4.resizeLineWidth) / 2 + 1, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts4.resizeHandlerAreaWidth - _consts4.resizeLineWidth) / 2, _types2.TableCssClassName.HOVERED_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _constants.akEditorSmallZIndex : "calc(".concat((0, _stickyHeaderZIndex.getTableZIndexes)().header, ")"), _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat((0, _stickyHeaderZIndex.getTableZIndexes)().header, ";") : '', _consts4.tableBorderColor, _consts4.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.TABLE_HEADER_CELL, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, _table.tableMarginTop, (0, _stickyHeaderZIndex.getTableZIndexes)().mask, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_q4_patch_8') ? "\n\t/* Borders floor to device pixels at fractional zoom; overlap the sticky row by 1px to avoid a seam. */\n\t.".concat(_types2.TableCssClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(_types2.TableCssClassName.NATIVE_STICKY, ")::before {\n\t\tborder-top: none;\n\t\theight: ").concat(_table.tableMarginTop + 1, "px;\n\t\tmargin-bottom: -").concat(_table.tableMarginTop + 1, "px;\n\t\tbackground: transparent;\n\t}\n\n\t.").concat(_types2.TableCssClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(_types2.TableCssClassName.NATIVE_STICKY_ACTIVE, ")::before {\n\t\tborder-top: none;\n\t\tbackground: ").concat((0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ";\n\t}\n\t") : '', _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.DRAG_ROW_CONTROLS, _consts4.tableColumnControlsHeight, (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.DRAG_ROW_CONTROLS, (0, _stickyHeaderZIndex.getTableZIndexes)().belowHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.NATIVE_STICKY, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _consts4.tableColumnControlsHeight, _types2.TableCssClassName.NATIVE_STICKY, _constants.akEditorTableNumberColumnWidth, _constants.akEditorTableNumberColumnWidth, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, _types2.TableCssClassName.WITH_CONTROLS, _consts4.tableControlsSpacing, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableControlsSpacing, _types2.TableCssClassName.CORNER_CONTROLS, _consts4.tableControlsSpacing - _consts4.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, _consts4.tablePadding, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts4.tablePadding, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CHROMELESS, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _consts4.tablePadding, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CHROMELESS, _types2.TableCssClassName.TABLE_CONTAINER, _constants.akEditorTableNumberColumnWidth + _consts4.tablePadding - 1, _styles.TableSharedCssClassName.TABLE_LEFT_BORDER, _styles.TableSharedCssClassName.TABLE_RIGHT_BORDER, _types2.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(), (0, _uiStyles.rowControlsWrapperDotStyle)(), _types2.TableCssClassName.CORNER_CONTROLS, _consts4.tableToolbarSize + 1, cornerControlHeight, _types2.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)("\n left: -11px;\n top: 9px;\n "), _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableToolbarSize + 1, _consts4.tableToolbarSize + 1, _consts4.tableBorderColor, _consts4.tableBorderRadiusSize, _consts4.tableHeaderCellBackgroundColor, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableBorderSelectedColor, _consts4.tableToolbarSelectedColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _constants.akEditorTableToolbarSize + _constants.akEditorTableNumberColumnWidth + 1, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.CONTROLS_BUTTON, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableBorderSelectedColor, _consts4.tableToolbarSelectedColor, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts4.tableBorderDeleteColor, _consts4.tableToolbarDeleteColor, _types2.TableCssClassName.ROW_CONTROLS, _consts4.tableToolbarSize, (0, _uiStyles.InsertMarker)("\n bottom: -1px;\n left: -11px;\n "), _types2.TableCssClassName.ROW_CONTROLS_INNER, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts4.tableBorderRadiusSize, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.CONTROLS_BUTTON, _constants.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)("\n border-bottom: 1px solid ".concat(_consts4.tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts4.tableToolbarSize, "px;\n\n .").concat(_types2.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types2.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types2.TableCssClassName.DRAG_ROW_CONTROLS, _consts4.rowControlsZIndex + 4, _types2.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, _types2.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types2.TableCssClassName.DRAG_COLUMN_CONTROLS, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _consts4.tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", (0, _stickyHeaderZIndex.getTableZIndexes)().resizeHandle, _types2.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, _consts4.tableColumnControlsHeight, _types2.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types2.TableCssClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, _types2.TableCssClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", _types2.TableCssClassName.DRAG_HANDLE_DISABLED, _types2.TableCssClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", _types2.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)(), _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types2.TableCssClassName.NUMBERED_COLUMN, _constants.akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : _constants.akEditorTableToolbarSize, _constants.akEditorTableNumberColumnWidth + 1, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, (0, _constants.relativeSizeToBaseFontSize)(10), (0, _constants.relativeSizeToBaseFontSize)(14), _consts4.tableHeaderCellBackgroundColor, _consts4.tableTextColor, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, _constants.akEditorSelectedNodeClassName, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _utils.hideNativeBrowserTextSelectionStyles, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts4.tableToolbarDeleteColor, _consts4.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _constants.akEditorUnitZIndex, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableToolbarDeleteColor, _consts4.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _constants.akEditorUnitZIndex, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _constants.akEditorSmallZIndex, _types2.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(_consts4.tableBorderSelectedColor, ";"), _types2.TableCssClassName.SELECTED_CELL, _consts4.tableCellSelectedColor, _constants.akEditorSmallZIndex, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.TABLE_CELL, _types2.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(_consts4.tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(_consts4.tableBorderDeleteColor, ";"), _consts4.tableBorderDeleteColor, (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, _types2.TableCssClassName.HOVERED_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.HOVERED_CELL, _consts4.tableBorderSelectedColor, _constants.akEditorSmallZIndex, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, _types2.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _roundedTableStyles.roundedTableOverrides)() : '', _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _table.tableMarginTop, _consts4.tableToolbarSize + 1, _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(_table.tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(_consts4.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(_table.tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(_consts4.tableToolbarSize, "px;\n\t\t"), _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _table.tableMarginTop, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_q4_patch_8') ? _table.tableMarginTop - 1 : _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_q4_patch_8') ? "\n\t\t/* Transparent bottom 1px so the sticky header row's top border stays visible. */\n\t\tpadding-bottom: 1px;\n\t\tbackground-clip: content-box;\n\t\t/* Chrome can fall back to start alignment after zoom, covering the header. */\n\t\talign-self: unsafe end;" : "\n\t\t/* Leave a 1px gap so the sticky header row's top border stays visible. */\n\t\ttranslate: 0 -1px;" : "", _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _constants.akEditorTableNumberColumnWidth + _consts4.dragRowControlsWidth, _constants.akEditorTableNumberColumnWidth + _consts4.dragRowControlsWidth, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_q4_patch_8') ? _table.tableMarginTop - 1 : _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _stickyHeaderZIndex.getTableZIndexes)().belowHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(_constants.akEditorTableNumberColumnWidth, "px") : "".concat(_constants.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(_constants.akEditorTableNumberColumnWidth + 1, "px") : "-".concat(_constants.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
94
+ (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeSelectionStylesForRoundedTable : rangeSelectionStyles, rangeSelectionStylesForFakeBorders, viewModeSortStyles(), (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_sticky_headers_zindex') ? ".".concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t--ak-editor-table-resize-handle-z-index: ").concat((0, _stickyHeaderZIndex.getTableZIndexes)().mediaResizeHandle, ";\n\t\t}") : '', (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "\n\t\t.ak-editor-panel:not([data-panel-type=\"custom\"]) .".concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-blue-subtlest, #E9F2FE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"note\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-purple-subtlest, #F8EEFE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"tip\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"warning\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-yellow-subtlest, #FEF7C8)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"error\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-red-subtlest, #FFECEB)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"success\"] .").concat(_types2.TableCssClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(_consts2.akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t") : '', tableAnchorStyles, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.TABLE_CELL, _consts4.tableCellBackgroundColor, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, (0, _uiStyles.insertColumnButtonWrapper)(), _types2.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, (0, _uiStyles.insertRowButtonWrapper)(), (0, _uiStyles.dragInsertButtonWrapper)(), (0, _uiStyles.dragCornerControlButton)(), (0, _uiStyles.DeleteButton)(), _types2.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.stickyRowOffsetTop, _constants.akEditorTableNumberColumnWidth, _constants.akEditorStickyHeaderZIndex, _consts4.stickyRowOffsetTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t\twidth: ".concat(_constants.akEditorTableNumberColumnWidth + 1, "px;\n\t\t\tborder-left: 1px solid ").concat(_consts4.tableBorderColor, ";\n\n\t\t\t/* Keep the new fixed left border in sync with the selected/danger states,\n\t\t\t which would otherwise leave it the default colour (.active recolours the\n\t\t\t rest of the border) or drop it entirely (delete-hover sets border-left: 0). */\n\t\t\t&.active {\n\t\t\t\tborder-left-color: ").concat(_consts4.tableBorderSelectedColor, ";\n\t\t\t}\n\t\t\t&.").concat(_types2.TableCssClassName.HOVERED_CELL_IN_DANGER, " {\n\t\t\t\tborder-left: 1px solid ").concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t}\n\t\t\t") : '', _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.CORNER_CONTROLS, _constants.akEditorSmallZIndex, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.tableToolbarSize, _consts4.tableToolbarSize, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableToolbarSize, _consts4.tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _constants.akEditorStickyHeaderZIndex, _consts4.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.tableToolbarSize, _types2.TableCssClassName.TABLE_STICKY, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.stickyRowOffsetTop, (0, _stickyHeaderZIndex.getTableZIndexes)().header, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _consts4.stickyHeaderBorderBottomWidth, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_STICKY, insertColumnButtonOffset + 1, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", _consts4.rowControlsZIndex + 5, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _dragHandle.DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", _constants.akEditorTableNumberColumnWidth, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts4.resizeHandlerAreaWidth - _consts4.resizeLineWidth) / 2 + 1, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.WITH_RESIZE_LINE, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts4.resizeHandlerAreaWidth - _consts4.resizeLineWidth) / 2, _types2.TableCssClassName.HOVERED_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _constants.akEditorSmallZIndex : "calc(".concat((0, _stickyHeaderZIndex.getTableZIndexes)().header, ")"), _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat((0, _stickyHeaderZIndex.getTableZIndexes)().header, ";") : '', _consts4.tableBorderColor, _consts4.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.TABLE_HEADER_CELL, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, _table.tableMarginTop, (0, _stickyHeaderZIndex.getTableZIndexes)().mask, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t/* Borders floor to device pixels at fractional zoom; overlap the sticky row by 1px to avoid a seam. */\n\t.".concat(_types2.TableCssClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(_types2.TableCssClassName.NATIVE_STICKY, ")::before {\n\t\tborder-top: none;\n\t\theight: ").concat(_table.tableMarginTop + 1, "px;\n\t\tmargin-bottom: -").concat(_table.tableMarginTop + 1, "px;\n\t\tbackground: transparent;\n\t}\n\n\t.").concat(_types2.TableCssClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(_types2.TableCssClassName.NATIVE_STICKY_ACTIVE, ")::before {\n\t\tborder-top: none;\n\t\tbackground: ").concat((0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ";\n\t}\n\t") : '', _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.DRAG_ROW_CONTROLS, _consts4.tableColumnControlsHeight, (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.DRAG_ROW_CONTROLS, (0, _stickyHeaderZIndex.getTableZIndexes)().belowHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.NATIVE_STICKY, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _consts4.tableColumnControlsHeight, _types2.TableCssClassName.NATIVE_STICKY, _constants.akEditorTableNumberColumnWidth, _constants.akEditorTableNumberColumnWidth, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.DRAG_ROW_FLOATING_DRAG_HANDLE, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NATIVE_STICKY, _table.tableMarginTop, _types2.TableCssClassName.WITH_CONTROLS, _consts4.tableControlsSpacing, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableControlsSpacing, _types2.TableCssClassName.CORNER_CONTROLS, _consts4.tableControlsSpacing - _consts4.tableToolbarSize, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", sentinelStyles, stickyScrollbarStyles, _consts4.tablePadding, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts4.tablePadding, _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CHROMELESS, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _consts4.tablePadding, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _types2.TableCssClassName.TABLE_CHROMELESS, _types2.TableCssClassName.TABLE_CONTAINER, _constants.akEditorTableNumberColumnWidth + _consts4.tablePadding - 1, _styles.TableSharedCssClassName.TABLE_LEFT_BORDER, _styles.TableSharedCssClassName.TABLE_RIGHT_BORDER, _types2.TableCssClassName.NODEVIEW_WRAPPER, breakoutWidthStyling(), (0, _uiStyles.columnControlsDecoration)(), (0, _uiStyles.rowControlsWrapperDotStyle)(), _types2.TableCssClassName.CORNER_CONTROLS, _consts4.tableToolbarSize + 1, cornerControlHeight, _types2.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)("\n left: -11px;\n top: 9px;\n "), _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableToolbarSize + 1, _consts4.tableToolbarSize + 1, _consts4.tableBorderColor, _consts4.tableBorderRadiusSize, _consts4.tableHeaderCellBackgroundColor, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableBorderSelectedColor, _consts4.tableToolbarSelectedColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _constants.akEditorTableToolbarSize + _constants.akEditorTableNumberColumnWidth + 1, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.CONTROLS_BUTTON, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts4.tableBorderSelectedColor, _consts4.tableToolbarSelectedColor, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.CONTROLS_CORNER_BUTTON, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts4.tableBorderDeleteColor, _consts4.tableToolbarDeleteColor, _types2.TableCssClassName.ROW_CONTROLS, _consts4.tableToolbarSize, (0, _uiStyles.InsertMarker)("\n bottom: -1px;\n left: -11px;\n "), _types2.TableCssClassName.ROW_CONTROLS_INNER, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts4.tableBorderRadiusSize, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types2.TableCssClassName.CONTROLS_BUTTON, _constants.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)("\n border-bottom: 1px solid ".concat(_consts4.tableBorderColor, ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts4.tableToolbarSize, "px;\n\n .").concat(_types2.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types2.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), _types2.TableCssClassName.DRAG_ROW_CONTROLS, _consts4.rowControlsZIndex + 4, _types2.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER, _types2.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types2.TableCssClassName.DRAG_COLUMN_CONTROLS, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _consts4.tableColumnControlsHeight, "var(--ds-space-negative-150, -12px)", (0, _stickyHeaderZIndex.getTableZIndexes)().resizeHandle, _types2.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER, _consts4.tableColumnControlsHeight, _types2.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT, "var(--ds-background-accent-gray-subtler, #DDDEE1)", _types2.TableCssClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE, _types2.TableCssClassName.DRAG_HANDLE_BUTTON_CONTAINER, "var(--ds-surface, #FFFFFF)", _types2.TableCssClassName.DRAG_HANDLE_DISABLED, _types2.TableCssClassName.DRAG_HANDLE_MINIMISED, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", "var(--ds-icon-disabled, #080F214A)", _types2.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)(), _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types2.TableCssClassName.NUMBERED_COLUMN, _constants.akEditorTableToolbarSize, props.isDragAndDropEnabled ? 0 : _constants.akEditorTableToolbarSize, _constants.akEditorTableNumberColumnWidth + 1, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, (0, _constants.relativeSizeToBaseFontSize)(10), (0, _constants.relativeSizeToBaseFontSize)(14), _consts4.tableHeaderCellBackgroundColor, _consts4.tableTextColor, _consts4.tableBorderColor, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, "var(--ds-surface, #FFFFFF)", _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.CORNER_CONTROLS, _types2.TableCssClassName.ROW_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, _constants.akEditorSelectedNodeClassName, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, _utils.hideNativeBrowserTextSelectionStyles, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, numberedColumnButtonSelectedStyles, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts4.tableToolbarDeleteColor, _consts4.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _constants.akEditorUnitZIndex, _types2.TableCssClassName.IS_RESIZING, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableToolbarDeleteColor, _consts4.tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", _constants.akEditorUnitZIndex, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _constants.akEditorSmallZIndex, _types2.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(_consts4.tableBorderSelectedColor, ";"), _types2.TableCssClassName.SELECTED_CELL, _consts4.tableCellSelectedColor, _constants.akEditorSmallZIndex, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.TABLE_CELL, _types2.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(_consts4.tableBorderDeleteColor, ";\n\t\t\tborder-top-color: ").concat(_consts4.tableBorderDeleteColor, ";"), _consts4.tableBorderDeleteColor, (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, _types2.TableCssClassName.HOVERED_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.TABLE_HEADER_CELL, _types2.TableCssClassName.HOVERED_CELL, _consts4.tableBorderSelectedColor, _constants.akEditorSmallZIndex, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, _types2.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), (0, _stickyHeaderZIndex.getTableZIndexes)().dangerOverlay, _consts4.tableCellDeleteColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? (0, _roundedTableStyles.roundedTableOverrides)() : '', _types2.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _table.tableMarginTop, _consts4.tableToolbarSize + 1, _types2.TableCssClassName.ROW_CONTROLS_WRAPPER, props.isDragAndDropEnabled ? "\n\t\t\tmargin-top: ".concat(_table.tableMarginTop, "px;\n\t\t\ttop: 0;\n\t\t\tleft: -").concat(_consts4.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(_table.tableMarginTop - cornerControlHeight + 1, "px;\n\t\t\tmargin-top: 0;\n\t\t\tleft: -").concat(_consts4.tableToolbarSize, "px;\n\t\t"), _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _table.tableMarginTop, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _table.tableMarginTop - 1 : _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Transparent bottom 1px so the sticky header row's top border stays visible. */\n\t\tpadding-bottom: 1px;\n\t\tbackground-clip: content-box;\n\t\t/* Chrome can fall back to start alignment after zoom, covering the header. */\n\t\talign-self: unsafe end;" : "", _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _constants.akEditorTableNumberColumnWidth + _consts4.dragRowControlsWidth, _constants.akEditorTableNumberColumnWidth + _consts4.dragRowControlsWidth, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _table.tableMarginTop - 1 : _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts2.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _stickyHeaderZIndex.getTableZIndexes)().belowHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "".concat(_constants.akEditorTableNumberColumnWidth, "px") : "".concat(_constants.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(_constants.akEditorTableNumberColumnWidth + 1, "px") : "-".concat(_constants.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
95
95
  // doesn't shift it; the calc reproduces the previous top-aligned offset.
96
96
  "top: calc(".concat("var(--ds-space-100, 8px)", " - ", _consts4.stickyRowOffsetTop + 1, "px);") : "margin-top: -".concat(_consts4.stickyRowOffsetTop, "px;"), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? 'none' : "0.5px solid ".concat(_consts4.tableBorderColor), (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "1px solid ".concat(_consts4.tableBorderColor) : 'none', (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom: 1px solid ".concat(_consts4.tableBorderColor, ";") : "", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_SELECTED, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _consts4.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts4.tableBorderSelectedColor, ";") : '', _consts4.tableBorderSelectedColor, _consts4.tableHeaderCellSelectedColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_SELECTED, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.COLUMN_SELECTED, _consts4.tableBorderSelectedColor, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? "border-bottom-color: ".concat(_consts4.tableBorderSelectedColor) : '', _consts4.tableBorderSelectedColor, _consts4.tableHeaderCellSelectedColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.HOVERED_CELL_IN_DANGER, _types2.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
97
97
  // fill over the mask's gray so it matches the adjacent cells instead of reading as transparent.
98
- "border-left: 1px solid ".concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-top: 1px solid ").concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-bottom: 1px solid ").concat(_consts4.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(_consts4.tableCellDeleteColor, ", ").concat(_consts4.tableCellDeleteColor, ");") : "border-left: unset;\n\t\t\t\t\tborder-top: unset;\n\t\t\t\t\tbackground: ".concat(_consts4.tableCellDeleteColor, ";"), _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_SELECTED, _types2.TableCssClassName.HOVERED_DELETE_BUTTON, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.HOVERED_DELETE_BUTTON, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.COLUMN_SELECTED, _consts4.tableBorderDeleteColor, _consts4.tableBorderDeleteColor, _consts4.tableCellDeleteColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_q4_patch_8') ? _table.tableMarginTop - 1 : _table.tableMarginTop, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _constants.akEditorUnitZIndex, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _fg.fg)('platform-dst-tokens-finesse') ? selectedCellBorderStyles() : '');
98
+ "border-left: 1px solid ".concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-top: 1px solid ").concat(_consts4.tableBorderDeleteColor, ";\n\t\t\t\t\t\tborder-bottom: 1px solid ").concat(_consts4.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(_consts4.tableCellDeleteColor, ", ").concat(_consts4.tableCellDeleteColor, ");") : "border-left: unset;\n\t\t\t\t\tborder-top: unset;\n\t\t\t\t\tbackground: ".concat(_consts4.tableCellDeleteColor, ";"), _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_SELECTED, _types2.TableCssClassName.HOVERED_DELETE_BUTTON, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.HOVERED_DELETE_BUTTON, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.SELECTED_CELL, _types2.TableCssClassName.COLUMN_SELECTED, _consts4.tableBorderDeleteColor, _consts4.tableBorderDeleteColor, _consts4.tableCellDeleteColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.NATIVE_STICKY_ACTIVE, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER, _types2.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? _table.tableMarginTop - 1 : _table.tableMarginTop, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, (0, _stickyHeaderZIndex.getTableZIndexes)().aboveHeader, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.WITH_CONTROLS, _types2.TableCssClassName.NUMBERED_COLUMN, _types2.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts4.tableBorderColor, _types2.TableCssClassName.TABLE_CONTAINER, _types2.TableCssClassName.TABLE_STICKY, _types2.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER, _constants.akEditorUnitZIndex, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_NODE_WRAPPER, _types2.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, (0, _fg.fg)('platform-dst-tokens-finesse') ? selectedCellBorderStyles() : '');
99
99
  };
100
100
 
101
101
  // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useRef } from 'react';
1
+ import React, { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import rafSchedule from 'raf-schd';
4
4
  import { TableCssClassName as ClassName } from '../../types';
@@ -20,6 +20,7 @@ export const calcObserverTargetMargin = (tableWrapper, fixedButtonRefCurrent) =>
20
20
  return fixedButtonRect.left - tableWrapperRect.left + scrollLeft;
21
21
  };
22
22
  export const FixedButton = ({
23
+ cellLayoutVersion = 0,
23
24
  children,
24
25
  isContextualMenuOpen,
25
26
  mountTo,
@@ -85,10 +86,24 @@ export const FixedButton = ({
85
86
  }
86
87
  }, [fixedButtonRef, observerTargetRef, tableWrapper, targetCellPosition, targetCellRef, isContextualMenuOpen]);
87
88
  const fixedButtonTop = 0;
89
+
90
+ // The left position below is read from the cell's current rect, which already includes the
91
+ // table's horizontal scroll, so the scroll translation accumulated so far must start again.
92
+ useLayoutEffect(() => {
93
+ const fixedButtonRefCurrent = fixedButtonRef.current;
94
+ const observerTargetRefCurrent = observerTargetRef.current;
95
+ if (cellLayoutVersion === 0 || !fixedButtonRefCurrent || !observerTargetRefCurrent) {
96
+ return;
97
+ }
98
+ fixedButtonRefCurrent.style.transform = '';
99
+ scrollDataRef.current = tableWrapper.scrollLeft;
100
+ leftPosDataRef.current = 0;
101
+ observerTargetRefCurrent.style.marginLeft = `${calcObserverTargetMargin(tableWrapper, fixedButtonRefCurrent)}px`;
102
+ }, [cellLayoutVersion, tableWrapper]);
88
103
  const containerLeft = useMemo(() => {
89
104
  const container = targetCellRef.closest('[data-editor-container="true"]');
90
105
  return (container === null || container === void 0 ? void 0 : container.getBoundingClientRect().left) || 0;
91
- }, [targetCellRef]);
106
+ }, [targetCellRef, cellLayoutVersion]);
92
107
  const left = useMemo(() => {
93
108
  const targetCellRect = targetCellRef.getBoundingClientRect();
94
109
  const baseLeft = calcLeftPos({
@@ -98,7 +113,7 @@ export const FixedButton = ({
98
113
  offset
99
114
  });
100
115
  return baseLeft - containerLeft;
101
- }, [containerLeft, targetCellRef, offset]);
116
+ }, [containerLeft, targetCellRef, offset, cellLayoutVersion]);
102
117
 
103
118
  // Using a portal here to ensure wrapperRef has the tableWrapper as an
104
119
  // ancestor. This is required to make the Intersection Observer work.
@@ -27,6 +27,7 @@ import { getTableZIndexes } from '../sticky-header-z-index';
27
27
  // eslint-disable-next-line import/no-named-as-default
28
28
  import FixedButton from './FixedButton';
29
29
  import { tableFloatingCellButtonSelectedStyles, tableFloatingCellButtonStyles } from './styles';
30
+ import { useCellLayoutVersion } from './useCellLayoutVersion';
30
31
  const BUTTON_OFFSET = 3;
31
32
  const CONTEXTUAL_MENU_BUTTON_Z_INDEX = 2;
32
33
  const anchorStyles = css({
@@ -95,6 +96,9 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
95
96
  };
96
97
  const domAtPos = editorView.domAtPos.bind(editorView);
97
98
  const targetCellRef = findDomRefAtPos(targetCellPosition, domAtPos);
99
+ // Re-renders this component when the cell may have moved, so both FixedButton and Popup
100
+ // reposition: Popup recalculates its position whenever it receives new props.
101
+ const cellLayoutVersion = useCellLayoutVersion(targetCellRef);
98
102
  useEffect(() => {
99
103
  if (isCellMenuOpenByKeyboard && !isCellMenuOpen) {
100
104
  const {
@@ -194,6 +198,7 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
194
198
  }
195
199
  if (stickyHeader && parentSticky && tableWrapper) {
196
200
  return jsx(FixedButton, {
201
+ cellLayoutVersion: cellLayoutVersion,
197
202
  offset: BUTTON_OFFSET,
198
203
  stickyHeader: stickyHeader,
199
204
  tableWrapper: tableWrapper,
@@ -0,0 +1,44 @@
1
+ import { useEffect, useState } from 'react';
2
+ import rafSchedule from 'raf-schd';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
4
+
5
+ /**
6
+ * Counts layout changes that can move the target cell without re-rendering the cell options
7
+ * button: the editor container resizing (window resize, side panel, product sidebar) or the table
8
+ * resizing (column scaling). Changing the count re-renders the button so it repositions on its
9
+ * cell. Stays 0 when the gate is off.
10
+ */
11
+ export const useCellLayoutVersion = targetCellRef => {
12
+ const [layoutVersion, setLayoutVersion] = useState(0);
13
+ useEffect(() => {
14
+ if (!fg('platform_editor_sticky_cell_options_position')) {
15
+ return;
16
+ }
17
+ if (!(targetCellRef instanceof HTMLElement)) {
18
+ return;
19
+ }
20
+ const container = targetCellRef.closest('[data-editor-container="true"]');
21
+ const table = targetCellRef.closest('table');
22
+ const bumpLayoutVersion = rafSchedule(() => setLayoutVersion(version => version + 1));
23
+ let hasReceivedInitialEntries = false;
24
+ const observer = new ResizeObserver(() => {
25
+ // ResizeObserver reports every observed element once on observe(); that is not a move.
26
+ if (!hasReceivedInitialEntries) {
27
+ hasReceivedInitialEntries = true;
28
+ return;
29
+ }
30
+ bumpLayoutVersion();
31
+ });
32
+ if (container) {
33
+ observer.observe(container);
34
+ }
35
+ if (table) {
36
+ observer.observe(table);
37
+ }
38
+ return () => {
39
+ observer.disconnect();
40
+ bumpLayoutVersion.cancel();
41
+ };
42
+ }, [targetCellRef]);
43
+ return layoutVersion;
44
+ };
@@ -549,7 +549,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
549
549
  ${expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? `var(${akEditorTableContainerBg}, ${"var(--ds-surface, #FFFFFF)"})` : "var(--ds-surface, #FFFFFF)"};
550
550
  }
551
551
 
552
- ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? `
552
+ ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `
553
553
  /* Borders floor to device pixels at fractional zoom; overlap the sticky row by 1px to avoid a seam. */
554
554
  .${ClassName.TABLE_NODE_WRAPPER}:has(tr.${ClassName.NATIVE_STICKY})::before {
555
555
  border-top: none;
@@ -1223,21 +1223,19 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
1223
1223
  .${ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW} > .${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
1224
1224
  /* +2px is to overlap the table border on the sides */
1225
1225
  width: calc(anchor-size(width) + 2px);
1226
- height: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop}px;
1226
+ height: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop}px;
1227
1227
  background: ${expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? `var(${akEditorTableContainerBg}, ${"var(--ds-surface, #FFFFFF)"})` : "var(--ds-surface, #FFFFFF)"};
1228
1228
  top: unset;
1229
1229
  position: fixed;
1230
1230
  position-area: top center;
1231
1231
  position-visibility: anchors-visible;
1232
1232
  z-index: ${getTableZIndexes().aboveHeader};
1233
- ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? isExperimentEnabled('platform_editor_table_q4_patch_8') ? `
1233
+ ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? `
1234
1234
  /* Transparent bottom 1px so the sticky header row's top border stays visible. */
1235
1235
  padding-bottom: 1px;
1236
1236
  background-clip: content-box;
1237
1237
  /* Chrome can fall back to start alignment after zoom, covering the header. */
1238
- align-self: unsafe end;` : `
1239
- /* Leave a 1px gap so the sticky header row's top border stays visible. */
1240
- translate: 0 -1px;` : ``}
1238
+ align-self: unsafe end;` : ``}
1241
1239
  }
1242
1240
 
1243
1241
  /** Mask for content to the left of the column controls */
@@ -1248,7 +1246,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
1248
1246
  display: inline-block;
1249
1247
  margin-left: -${akEditorTableNumberColumnWidth + dragRowControlsWidth}px;
1250
1248
  width: ${akEditorTableNumberColumnWidth + dragRowControlsWidth}px;
1251
- height: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop}px;
1249
+ height: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop}px;
1252
1250
  background: ${expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? `var(${akEditorTableContainerBg}, ${"var(--ds-surface, #FFFFFF)"})` : "var(--ds-surface, #FFFFFF)"};
1253
1251
  z-index: ${getTableZIndexes().belowHeader};
1254
1252
  }
@@ -1322,7 +1320,7 @@ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeS
1322
1320
  .${ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW}
1323
1321
  .${ClassName.DRAG_COLUMN_CONTROLS_INNER}:not(.${ClassName.NESTED_TABLE_WITH_CONTROLS} *) {
1324
1322
  /* !important to override the inline style in the inner controls component */
1325
- margin-top: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop}px !important;
1323
+ margin-top: ${expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop}px !important;
1326
1324
  }
1327
1325
 
1328
1326
  .${ClassName.TABLE_STICKY} .${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useRef } from 'react';
1
+ import React, { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import rafSchedule from 'raf-schd';
4
4
  import { TableCssClassName as ClassName } from '../../types';
@@ -19,7 +19,9 @@ export var calcObserverTargetMargin = function calcObserverTargetMargin(tableWra
19
19
  return fixedButtonRect.left - tableWrapperRect.left + scrollLeft;
20
20
  };
21
21
  export var FixedButton = function FixedButton(_ref2) {
22
- var children = _ref2.children,
22
+ var _ref2$cellLayoutVersi = _ref2.cellLayoutVersion,
23
+ cellLayoutVersion = _ref2$cellLayoutVersi === void 0 ? 0 : _ref2$cellLayoutVersi,
24
+ children = _ref2.children,
23
25
  isContextualMenuOpen = _ref2.isContextualMenuOpen,
24
26
  mountTo = _ref2.mountTo,
25
27
  offset = _ref2.offset,
@@ -83,10 +85,24 @@ export var FixedButton = function FixedButton(_ref2) {
83
85
  }
84
86
  }, [fixedButtonRef, observerTargetRef, tableWrapper, targetCellPosition, targetCellRef, isContextualMenuOpen]);
85
87
  var fixedButtonTop = 0;
88
+
89
+ // The left position below is read from the cell's current rect, which already includes the
90
+ // table's horizontal scroll, so the scroll translation accumulated so far must start again.
91
+ useLayoutEffect(function () {
92
+ var fixedButtonRefCurrent = fixedButtonRef.current;
93
+ var observerTargetRefCurrent = observerTargetRef.current;
94
+ if (cellLayoutVersion === 0 || !fixedButtonRefCurrent || !observerTargetRefCurrent) {
95
+ return;
96
+ }
97
+ fixedButtonRefCurrent.style.transform = '';
98
+ scrollDataRef.current = tableWrapper.scrollLeft;
99
+ leftPosDataRef.current = 0;
100
+ observerTargetRefCurrent.style.marginLeft = "".concat(calcObserverTargetMargin(tableWrapper, fixedButtonRefCurrent), "px");
101
+ }, [cellLayoutVersion, tableWrapper]);
86
102
  var containerLeft = useMemo(function () {
87
103
  var container = targetCellRef.closest('[data-editor-container="true"]');
88
104
  return (container === null || container === void 0 ? void 0 : container.getBoundingClientRect().left) || 0;
89
- }, [targetCellRef]);
105
+ }, [targetCellRef, cellLayoutVersion]);
90
106
  var left = useMemo(function () {
91
107
  var targetCellRect = targetCellRef.getBoundingClientRect();
92
108
  var baseLeft = calcLeftPos({
@@ -96,7 +112,7 @@ export var FixedButton = function FixedButton(_ref2) {
96
112
  offset: offset
97
113
  });
98
114
  return baseLeft - containerLeft;
99
- }, [containerLeft, targetCellRef, offset]);
115
+ }, [containerLeft, targetCellRef, offset, cellLayoutVersion]);
100
116
 
101
117
  // Using a portal here to ensure wrapperRef has the tableWrapper as an
102
118
  // ancestor. This is required to make the Intersection Observer work.
@@ -30,6 +30,7 @@ import { getTableZIndexes } from '../sticky-header-z-index';
30
30
  // eslint-disable-next-line import/no-named-as-default
31
31
  import FixedButton from './FixedButton';
32
32
  import { tableFloatingCellButtonSelectedStyles, tableFloatingCellButtonStyles } from './styles';
33
+ import { useCellLayoutVersion } from './useCellLayoutVersion';
33
34
  var BUTTON_OFFSET = 3;
34
35
  var CONTEXTUAL_MENU_BUTTON_Z_INDEX = 2;
35
36
  var anchorStyles = css({
@@ -89,6 +90,9 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
89
90
  };
90
91
  var domAtPos = editorView.domAtPos.bind(editorView);
91
92
  var targetCellRef = findDomRefAtPos(targetCellPosition, domAtPos);
93
+ // Re-renders this component when the cell may have moved, so both FixedButton and Popup
94
+ // reposition: Popup recalculates its position whenever it receives new props.
95
+ var cellLayoutVersion = useCellLayoutVersion(targetCellRef);
92
96
  useEffect(function () {
93
97
  if (isCellMenuOpenByKeyboard && !isCellMenuOpen) {
94
98
  var state = editorView.state,
@@ -181,6 +185,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
181
185
  }
182
186
  if (stickyHeader && parentSticky && tableWrapper) {
183
187
  return jsx(FixedButton, {
188
+ cellLayoutVersion: cellLayoutVersion,
184
189
  offset: BUTTON_OFFSET,
185
190
  stickyHeader: stickyHeader,
186
191
  tableWrapper: tableWrapper,
@@ -0,0 +1,52 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { useEffect, useState } from 'react';
3
+ import rafSchedule from 'raf-schd';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
+
6
+ /**
7
+ * Counts layout changes that can move the target cell without re-rendering the cell options
8
+ * button: the editor container resizing (window resize, side panel, product sidebar) or the table
9
+ * resizing (column scaling). Changing the count re-renders the button so it repositions on its
10
+ * cell. Stays 0 when the gate is off.
11
+ */
12
+ export var useCellLayoutVersion = function useCellLayoutVersion(targetCellRef) {
13
+ var _useState = useState(0),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ layoutVersion = _useState2[0],
16
+ setLayoutVersion = _useState2[1];
17
+ useEffect(function () {
18
+ if (!fg('platform_editor_sticky_cell_options_position')) {
19
+ return;
20
+ }
21
+ if (!(targetCellRef instanceof HTMLElement)) {
22
+ return;
23
+ }
24
+ var container = targetCellRef.closest('[data-editor-container="true"]');
25
+ var table = targetCellRef.closest('table');
26
+ var bumpLayoutVersion = rafSchedule(function () {
27
+ return setLayoutVersion(function (version) {
28
+ return version + 1;
29
+ });
30
+ });
31
+ var hasReceivedInitialEntries = false;
32
+ var observer = new ResizeObserver(function () {
33
+ // ResizeObserver reports every observed element once on observe(); that is not a move.
34
+ if (!hasReceivedInitialEntries) {
35
+ hasReceivedInitialEntries = true;
36
+ return;
37
+ }
38
+ bumpLayoutVersion();
39
+ });
40
+ if (container) {
41
+ observer.observe(container);
42
+ }
43
+ if (table) {
44
+ observer.observe(table);
45
+ }
46
+ return function () {
47
+ observer.disconnect();
48
+ bumpLayoutVersion.cancel();
49
+ };
50
+ }, [targetCellRef]);
51
+ return layoutVersion;
52
+ };
@@ -86,11 +86,11 @@ var baseTableStylesWithoutSharedStyle = function baseTableStylesWithoutSharedSty
86
86
  return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", "\n\n\t", "\n\n\t", ";\n\n\t.", " {\n\t\ttd.", ", th.", " {\n\t\t\tposition: relative;\n\t\t\toverflow: visible;\n\t\t}\n\n\t\ttd.", " {\n\t\t\tbackground-color: ", ";\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\tcontent: '';\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-bottom: 1px solid ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: 0px;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t", "\n\n\t", "\n\n\t/* Delete button */\n\t", "\n\t/* Ends Delete button */\n\n\t/* sticky styles */\n\t.", " > .", " .", " .", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t\twidth: ", "px;\n\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tbox-shadow: 0px -", "px\n\t\t\t", ";\n\t\tborder-right: 0 none;\n\t\t", "/* top set by NumberColumn component */\n\t}\n\n\t.", " .", ".sticky {\n\t\tposition: fixed !important;\n\t\t/* needs to be above row controls */\n\t\tz-index: ", " !important;\n\t\tbackground: ", ";\n\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t}\n\n\t.", ".sticky .", " {\n\t\tborder-bottom: 0px none;\n\t\tborder-right: 0px none;\n\n\t\theight: ", "px;\n\t\twidth: ", "px;\n\t}\n\n\t", "\n\n\t", "\n\n .", "\n .", "\n .", ".sticky {\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tdisplay: flex;\n\t\tborder-left: ", "px solid\n\t\t\t", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.", " col:first-of-type {\n\t\t/* moving rows out of a table layout does weird things in Chrome */\n\t\tborder-right: 1px solid\n\t\t\t", ";\n\t}\n\n\ttr.sticky {\n\t\tpadding-top: ", "px;\n\t\tposition: fixed;\n\t\tdisplay: grid;\n\n\t\t/* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n\t\tz-index: ", ";\n\n\t\toverflow-y: visible;\n\t\toverflow-x: hidden;\n\n\t\tgrid-auto-flow: column;\n\n\t\t/* background for where controls apply */\n\t\tbackground: ", ";\n\t\tbox-sizing: content-box;\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\n\t\tmargin-left: -1px;\n\n\t\t&.no-pointer-events {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.tableView-content-wrap:has(.tableView-content-wrap):has(\n\t\t\t.", "\n\t\t) {\n\t\tpadding-left: unset;\n\t}\n\n\t.tableView-content-wrap:has(.", ") {\n\t\tpadding-left: 15px;\n\t}\n\n\ttr.sticky th {\n\t\tborder-bottom: ", "px solid ", ";\n\t\tmargin-right: -1px;\n\t}\n\n\t.", " tr.sticky > th:last-child {\n\t\tborder-right-width: 1px;\n\t}\n\n\t/* add left edge for first cell */\n\t.", " tr.sticky > th:first-of-type {\n\t\tmargin-left: 0px;\n\t}\n\n\t/* add a little bit so the scroll lines up with the table */\n\t.", " tr.sticky::after {\n\t\tcontent: ' ';\n\t\twidth: ", "px;\n\t}\n\n\t/* use :before element to hide table row insert dots when legacy table sticky header is activated */\n\t.", ".", ":has(tr.sticky)::before {\n\t\tcontent: ' ';\n\t\tposition: sticky;\n\t\tpointer-events: none;\n\t\ttop: 0;\n\t\tfloat: left;\n\t\ttransform: translateX(calc(-1 * (", "px + ", ")));\n\t\tmargin-bottom: calc(\n\t\t\t-1 * (", " - 1px + ", " + ", ")\n\t\t);\n\t\theight: calc(", " - 1px + ", " + ", ");\n\t\twidth: calc(", "px + ", ");\n\t\tbackground: linear-gradient(\n\t\t\tto bottom,\n\t\t\t", "\n\t\t\t\t90%,\n\t\t\ttransparent\n\t\t);\n\t\tz-index: ", ";\n\t}\n\t/* Shift the mask left by the numbered column width so it sits to the left of it. */\n\t.", ".", "[data-number-column='true']:has(tr.sticky)::before {\n\t\ttransform: translateX(\n\t\t\tcalc(\n\t\t\t\t-1 * (", "px + ", " + ", "px)\n\t\t\t)\n\t\t);\n\t}\n\n\t/* To fix jumpiness caused in Chrome Browsers for sticky headers */\n\t.", " .sticky + tr {\n\t\tmin-height: 0px;\n\t}\n\n\t/* move resize line a little in sticky bar */\n\t.", ".", " {\n\t\ttr.sticky td.", ", tr.sticky th.", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\n\t\t/* when selected put it back to normal -- :not selector would be nicer */\n\t\ttr.sticky\n\t\t\ttd.", ".", ",\n\t\t\ttr.sticky\n\t\t\tth.", ".", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\ttr.sticky .", ", tr.sticky .", " {\n\t\tz-index: 1;\n\t}\n\n\ttr.", " {\n\t\tposition: sticky;\n\t\ttop: ", "px;\n\t\tz-index: ", ";\n\t\tbox-shadow:\n\t\t\tinset -1px 1px ", ",\n\t\t\tinset 1px -1px ", ";\n\n\t\t&.", " {\n\t\t\t", "\n\t\t\tbox-shadow:\n\t\t\t\tinset -1px 1px ", ",\n\t\t\t\tinset 1px -1px ", ",\n\t\t\t\t0 6px 4px -4px ", ";\n\t\t}\n\n\t\tth.", "::after {\n\t\t\theight: 100%;\n\t\t\tcontent: '';\n\t\t\tborder-left: 1px solid ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\t\t\tposition: absolute;\n\t\t\tright: 0px;\n\t\t\ttop: 0px;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tdisplay: inline-block;\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t/** Adds mask above sticky header to prevent table content from bleeding through on scroll */\n\t.", ":has(tr.", ")::before {\n\t\tcontent: ' ';\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tbox-sizing: border-box;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin-bottom: -", "px;\n\t\tposition: sticky;\n\t\tborder-top: ", "px solid transparent;\n\t\tz-index: ", ";\n\t}\n\n\t.", ":has(tr.", ")::before {\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t}\n\n\t", "\n\n\t/** Corrects position of drag row controls when sticky header top mask is present */\n\t.", ":has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t\tz-index: ", ";\n\t}\n\n\t.", ":has(> .", ")\n\t\t> .", " {\n\t\tmargin-top: 0;\n\t}\n\n\t.", "[data-table-header-is-stuck='true']:has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\tz-index: ", ";\n\t}\n\n\t/** Corrects position of numbered column when sticky header top mask is present */\n\t.", ":has(.", " tr.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t}\n\n\t/** Expands the mask to encompass the numbered column */\n\t.pm-table-wrapper:has([data-number-column='true'] tr.", ")::before {\n\t\tmargin-left: -", "px;\n\t\twidth: calc(100% + ", "px);\n\t}\n\n\t/** Hides the header row drag handle when the position:sticky table header is 'stuck'\n\t *\n\t * 1. We check that the header is 'stuck'.\n\t * - The table container has attribute data-table-header-is-stuck='true' when sticky positioned header is 'stuck'\n\t *\n\t * 2. We check that the header row drag handle is in the first row or the first row is selected\n\t * - The header row drag handle has the data-row-index='0' attribute (i.e. hovered), OR\n\t * - The header row drag handle has the data-selected-row-index='0' attribute\n\t * \t\tAND does not have the data-handle-appearance='default' attribute (i.e. selected)\n\t*/\n\t.", ".", "[data-table-header-is-stuck='true']\n\t.", ":is([data-row-index='0'], [data-selected-row-index='0']:not([data-handle-appearance='default'])) {\n\t\tvisibility: hidden;\n\t}\n\n\t.", " tr.", " {\n\t\ttop: ", "px;\n\t}\n\n\t.", " tr.sticky {\n\t\tpadding-top: ", "px;\n\t}\n\n\t.", ".", "\n\t\t> .", "\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t}\n\n\t.", ".sticky {\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t}\n\n\t", "\n\t", "\n\n\t.less-padding {\n\t\tpadding: 0 ", "px;\n\n\t\t.", ", .", " {\n\t\t\tpadding: 0 ", "px;\n\n\t\t\t/* https://product-fabric.atlassian.net/browse/ED-16386\n\t\t\tFixes issue where the extra padding that is added here throws off the position\n\t\t\tof the rows control dot */\n\t\t\t&::after {\n\t\t\t\tright: 6px !important;\n\t\t\t}\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -4px;\n\t\t}\n\n\t\t.", " {\n\t\t\tpadding: 0 ", "px;\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -8px;\n\t\t}\n\n\t\t&.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t}\n\t\t.", " {\n\t\t\tleft: 8px;\n\t\t}\n\t\t.", " {\n\t\t\tright: 8px;\n\t\t}\n\t}\n\n\t> .", " {\n\t\t/**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n\t}\n\n\t/* Breakout only works on top level unless wrapped in fragment mark */\n\t", "\n\n\t", ";\n\t", ";\n\n\t/* Corner controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tdisplay: none;\n\n\t\t.", " {\n\t\t\tposition: relative;\n\n\t\t\t", ";\n\t\t}\n\t}\n\n\t.", ".sticky {\n\t\t.", " {\n\t\t\t/* sticky row insert dot overlaps other row insert and messes things up */\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tborder: 1px solid ", ";\n\t\tborder-radius: 0;\n\t\tborder-top-left-radius: ", "px;\n\t\tbackground: ", ";\n\t\tbox-sizing: border-box;\n\t\tpadding: 0;\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\t.active .", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column='true'] {\n\t\t.", ", .", " {\n\t\t\twidth: ", "px;\n\t\t}\n\t\t.", " .", " {\n\t\t\tborder-right-width: 0;\n\t\t}\n\t}\n\n\t:not(.", ") .", ":hover {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t\tcursor: pointer;\n\t}\n\n\t:not(.", ")\n\t\t.", ".", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t/* Row controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: relative;\n\n\t\t", ";\n\n\t\t.", " {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.", ":last-child > button {\n\t\t\tborder-bottom-left-radius: ", "px;\n\t\t}\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin-top: -1px;\n\t\t}\n\t\t.", ":hover,\n\t\t\t.", ".active,\n\t\t\t.", ":hover {\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t", "\n\t}\n\n\t.", " {\n\t\tdisplay: grid;\n\t\talign-items: center;\n\t\tposition: absolute;\n\t\tz-index: ", ";\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\talign-self: end;\n\t\t\theight: 100%;\n\t\t\twidth: 18px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tbottom: -3px;\n\t\t\tleft: 2px;\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " {\n\t\t\theight: ", "px;\n\t\t\tposition: absolute;\n\t\t\ttop: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\theight: ", "px;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tposition: absolute;\n\t\t\tright: -2px;\n\t\t}\n\t}\n\n\t.", " {\n\t\tbackground: none;\n\t\tborder: none;\n\t\toutline: none;\n\t\tposition: absolute;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\tcursor: grab;\n\t\tpointer-events: auto;\n\n\t\tline-height: 0;\n\t\tpadding: 0;\n\t\tborder-radius: 6px;\n\t\twidth: max-content;\n\t\tborder: 2px solid ", ";\n\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tbackground: transparent;\n\t\toutline: none;\n\n\t\t&.placeholder {\n\t\t\tbackground-color: transparent;\n\t\t\tborder: 2px solid transparent;\n\t\t}\n\n\t\t&.", " {\n\t\t\tcursor: pointer;\n\t\t\t& svg {\n\t\t\t\t& > rect.", " {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > g > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:not(.", ") {\n\t\t\t& svg {\n\t\t\t\trect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\tg {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:active {\n\t\t\t\tcursor: grabbing;\n\t\t\t}\n\n\t\t\t&.selected {\n\t\t\t\t:focus {\n\t\t\t\t\toutline: 2px solid ", ";\n\t\t\t\t\toutline-offset: 1px;\n\t\t\t\t}\n\n\t\t\t\t&:active {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.danger {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t:not(.", ") .", " {\n\t\t", "\n\t\t", "\n\t}\n\n\t/* Numbered column */\n\t.", " {\n\t\tposition: relative;\n\t\tfloat: right;\n\t\tmargin-left: ", "px;\n\t\ttop: ", "px;\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.", " {\n\t\tborder: 1px solid ", ";\n\t\tbox-sizing: border-box;\n\t\tmargin-top: -1px;\n\t\tpadding-bottom: 2px;\n\t\tpadding: ", " 2px;\n\t\ttext-align: center;\n\t\tfont-size: ", ";\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tborder-color: ", ";\n\n\t\t:first-child:not(style),\n\t\tstyle:first-child + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t:last-child {\n\t\t\tborder-bottom: 1px solid ", ";\n\t\t}\n\t}\n\n\t/* add a background above the first numbered column cell when sticky header is engaged\n\twhich hides the table when scrolling */\n\t.", "\n\t\t> .", " {\n\t\t.", ":first-of-type::after {\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\theight: 33px;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\n\t\t\t/* the extra pixel is accounting for borders */\n\t\t\ttop: -34px;\n\t\t\tleft: -1px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", ", .", " {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.", " {\n\t\t\tpadding-left: 0px;\n\n\t\t\t.", " {\n\t\t\t\tborder-left: 0 none;\n\t\t\t}\n\n\t\t\t.", ".active {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* nested tables should be ignored when we apply border-left: 0 to the parent table */\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Apply numbered column styling when table is selected via text selection (e.g., block menu) */\n\t.", " {\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t:not(.", ") .", " {\n\t\t.", ":not(.", ") {\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.", ":not(.", "):hover {\n\t\t\t", "\n\t\t}\n\t\t.", ".", " {\n\t\t\tbackground-color: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\tborder-left: 0;\n\t\t\tcolor: ", ";\n\t\t\tposition: relative;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t.tableView-content-wrap.danger {\n\t\t:not(.", ") .", " {\n\t\t\t.", " {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-left: 0;\n\t\t\t\tcolor: ", ";\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Table */\n\t.", " > table {\n\t\ttable-layout: fixed;\n\t\twhite-space: normal;\n\t\tborder-top: none;\n\t\t/* 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212 */\n\t\tmargin-right: -1px;\n\t\t/* Allows better positioning for the shadow sentinels - ED-16668 */\n\t\tposition: relative;\n\n\t\t> tbody > tr {\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\n\t\t.", " + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t/*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n\t\tth.", " > .fabric-editor-block-mark {\n\t\t\t> h1:first-of-type,\n\t\t\t> h2:first-of-type,\n\t\t\t> h3:first-of-type,\n\t\t\t> h4:first-of-type,\n\t\t\t> h5:first-of-type,\n\t\t\t> h6:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tposition: relative;\n\t\t}\n\t\t/* Give selected cells a blue overlay */\n\t\t.", "::after, .", "::after {\n\t\t\tz-index: ", ";\n\t\t\tposition: absolute;\n\t\t\tcontent: '';\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\ttop: 0;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t\t.", "::after {\n\t\t\tbackground: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\t\t/* Override border colors for danger state */\n\t\tth.", ".", ",\n\t\t\ttd.", ".", " {\n\t\t\t", "\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t\ttd.", ",\n\t\t\ttd.", ",\n\t\t\tth.", ".", ",\n\t\t\tth.", ".", " {\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t&.", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t&.", ".", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t/* override for DnD controls */\n\t.", " {\n\t\tposition: absolute;\n\t\tmargin-top: ", "px;\n\t\tleft: -", "px;\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\t/* this is to fix the misalignment of the numbered column in live page view mode */\n\t\t", "\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: ", "px;\n\t}\n\n\t.", " > .", " {\n\t\t/* +2px is to overlap the table border on the sides */\n\t\twidth: calc(anchor-size(width) + 2px);\n\t\theight: ", "px;\n\t\tbackground: ", ";\n\t\ttop: unset;\n\t\tposition: fixed;\n\t\tposition-area: top center;\n\t\tposition-visibility: anchors-visible;\n\t\tz-index: ", ";\n\t\t", "\n\t}\n\n\t/** Mask for content to the left of the column controls */\n\n\t.", "[data-number-column=\"true\"] .", " > .", "::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\tmargin-left: -", "px;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tbackground: ", ";\n\t\tz-index: ", ";\n\t}\n\n\t/** Mask for numbered column content to the left of the header row */\n\t.", "[data-number-column=\"true\"] .", " tr:first-of-type th:first-of-type::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t\tleft: 0;\n\t\twidth: ", ";\n\t\theight: ", ";\n\t\tmargin-left: ", ";\n\t\t", "\n\t\toutline: ", ";\n\t\tborder-left: ", ";\n\t\t", "\n\t\tbackground: ", ";\n\t\tborder-top: 1px solid ", ";\n\t}\n\n\t.ak-editor-selected-node .", "[data-number-column=\"true\"]:not(.", ") .", " tr:first-of-type th:first-of-type {\n\t\t/* Recolour the number-column corner mask to match the selected cells. Keep this identical\n\t\t to the .selectedCell ::before rule below \u2014 never set margin-top (the base negative\n\t\t margin aligns the mask) or radius (rounded generically by data-reaches-* rules). */\n\t\t&::before {\n\t\t\toutline: none;\n\t\t\tborder-left-color: ", ";\n\t\t\t", "\n\t\t\tborder-top-color: ", ";\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", "[data-number-column=\"true\"].", " .", " tr:first-of-type th.", ":not(.", "):first-of-type::before, .", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":not(.", ", .", "):first-of-type::before {\n\t\toutline: none;\n\t\tborder-left-color: ", ";\n\t\t", ";\n\t\tborder-top-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":first-of-type::before, .", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":not(.", "):first-of-type::before {\n\t\toutline: none;\n\t\t", "\n\t}\n\t.", "[data-number-column=\"true\"].", ".", " .", " tr:first-of-type th:first-of-type::before, .", "[data-number-column=\"true\"].", " .", " tr:first-of-type th.", ":not(.", "):first-of-type::before {\n\t\toutline: none;\n\t\tborder-left-color: ", ";\n\t\tborder-top-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column=\"true\"] .", " .", " th:first-of-type::before {\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\t}\n\n\t.", "\n\t\t.", ":not(.", " *) {\n\t\t/* !important to override the inline style in the inner controls component */\n\t\tmargin-top: ", "px !important;\n\t}\n\n\t.", " .", " {\n\t\tposition: fixed;\n\t\t/* Keep column controls above the sticky header. */\n\t\tz-index: ", ";\n\t}\n\n\t.", ".", ":has(tr.sticky)\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tbox-shadow: 0 -5px 0 1px ", ";\n\t}\n\n\t/* nested tables */\n\t.", " {\n\t\t.", " .", " {\n\t\t\tposition: absolute;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding-bottom: 0px;\n\t\t/* fixes gap cursor height */\n\t\toverflow: auto;\n\t\toverflow-y: hidden;\n\t\tposition: relative;\n\t}\n\n\t.", ".", " {\n\t\toverflow: visible;\n\t}\n\n\t", "\n"])), columnControlsLineMarker(), hoveredDeleteButton(), hoveredCell(), hoveredWarningCell, insertLine(), resizeHandle(),
87
87
  // Only block getSelectionStyles when our replacement (gated by q4) owns the
88
88
  // decoration, so node selection is never left unstyled.
89
- expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeSelectionStylesForRoundedTable : rangeSelectionStyles, rangeSelectionStylesForFakeBorders, viewModeSortStyles(), isExperimentEnabled('platform_editor_sticky_headers_zindex') ? ".".concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t--ak-editor-table-resize-handle-z-index: ").concat(getTableZIndexes().mediaResizeHandle, ";\n\t\t}") : '', expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "\n\t\t.ak-editor-panel:not([data-panel-type=\"custom\"]) .".concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-blue-subtlest, #E9F2FE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"note\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-purple-subtlest, #F8EEFE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"tip\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"warning\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-yellow-subtlest, #FEF7C8)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"error\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-red-subtlest, #FFECEB)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"success\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t") : '', tableAnchorStyles, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor, tableBorderColor, tableBorderColor, ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(), dragInsertButtonWrapper(), dragCornerControlButton(), DeleteButton(), ClassName.TABLE_STICKY, props.isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t\twidth: ".concat(akEditorTableNumberColumnWidth + 1, "px;\n\t\t\tborder-left: 1px solid ").concat(tableBorderColor, ";\n\n\t\t\t/* Keep the new fixed left border in sync with the selected/danger states,\n\t\t\t which would otherwise leave it the default colour (.active recolours the\n\t\t\t rest of the border) or drop it entirely (delete-hover sets border-left: 0). */\n\t\t\t&.active {\n\t\t\t\tborder-left-color: ").concat(tableBorderSelectedColor, ";\n\t\t\t}\n\t\t\t&.").concat(ClassName.HOVERED_CELL_IN_DANGER, " {\n\t\t\t\tborder-left: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t}\n\t\t\t") : '', ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", tableToolbarSize, ClassName.TABLE_STICKY, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", stickyRowOffsetTop, getTableZIndexes().header, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.NESTED_TABLE_WITH_CONTROLS, ClassName.NESTED_TABLE_WITH_CONTROLS, stickyHeaderBorderBottomWidth, tableBorderColor, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", rowControlsZIndex + 5, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", akEditorTableNumberColumnWidth, 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(getTableZIndexes().header, ")"), tableBorderColor, tableBorderColor, ClassName.NATIVE_STICKY_ACTIVE, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(getTableZIndexes().header, ";") : '', tableBorderColor, tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.TABLE_HEADER_CELL, tableBorderColor, tableBorderColor, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY, tableMarginTop, tableMarginTop, getTableZIndexes().mask, 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)", expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? "\n\t/* Borders floor to device pixels at fractional zoom; overlap the sticky row by 1px to avoid a seam. */\n\t.".concat(ClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(ClassName.NATIVE_STICKY, ")::before {\n\t\tborder-top: none;\n\t\theight: ").concat(tableMarginTop + 1, "px;\n\t\tmargin-bottom: -").concat(tableMarginTop + 1, "px;\n\t\tbackground: transparent;\n\t}\n\n\t.").concat(ClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(ClassName.NATIVE_STICKY_ACTIVE, ")::before {\n\t\tborder-top: none;\n\t\tbackground: ").concat(expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ";\n\t}\n\t") : '', ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, tableColumnControlsHeight, getTableZIndexes().aboveHeader, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, getTableZIndexes().belowHeader, 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)", getTableZIndexes().resizeHandle, 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, akEditorSelectedNodeClassName, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, hideNativeBrowserTextSelectionStyles, 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, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", akEditorUnitZIndex, 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, getTableZIndexes().dangerOverlay, 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(), getTableZIndexes().dangerOverlay, tableCellDeleteColor, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), getTableZIndexes().dangerOverlay, 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, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", getTableZIndexes().aboveHeader, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? isExperimentEnabled('platform_editor_table_q4_patch_8') ? "\n\t\t/* Transparent bottom 1px so the sticky header row's top border stays visible. */\n\t\tpadding-bottom: 1px;\n\t\tbackground-clip: content-box;\n\t\t/* Chrome can fall back to start alignment after zoom, covering the header. */\n\t\talign-self: unsafe end;" : "\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, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", getTableZIndexes().belowHeader, 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
89
+ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? rangeSelectionStylesForRoundedTable : rangeSelectionStyles, rangeSelectionStylesForFakeBorders, viewModeSortStyles(), isExperimentEnabled('platform_editor_sticky_headers_zindex') ? ".".concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t--ak-editor-table-resize-handle-z-index: ").concat(getTableZIndexes().mediaResizeHandle, ";\n\t\t}") : '', expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "\n\t\t.ak-editor-panel:not([data-panel-type=\"custom\"]) .".concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-blue-subtlest, #E9F2FE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"note\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-purple-subtlest, #F8EEFE)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"tip\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"warning\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-yellow-subtlest, #FEF7C8)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"error\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-red-subtlest, #FFECEB)", ";\n\t\t}\n\t\t.ak-editor-panel[data-panel-type=\"success\"] .").concat(ClassName.TABLE_CONTAINER, " {\n\t\t\t").concat(akEditorTableContainerBg, ": ", "var(--ds-background-accent-green-subtlest, #DCFFF1)", ";\n\t\t}\n\t") : '', tableAnchorStyles, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor, tableBorderColor, tableBorderColor, ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper(), ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper(), dragInsertButtonWrapper(), dragCornerControlButton(), DeleteButton(), ClassName.TABLE_STICKY, props.isDragAndDropEnabled ? ClassName.DRAG_ROW_CONTROLS_WRAPPER : ClassName.ROW_CONTROLS_WRAPPER, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t\twidth: ".concat(akEditorTableNumberColumnWidth + 1, "px;\n\t\t\tborder-left: 1px solid ").concat(tableBorderColor, ";\n\n\t\t\t/* Keep the new fixed left border in sync with the selected/danger states,\n\t\t\t which would otherwise leave it the default colour (.active recolours the\n\t\t\t rest of the border) or drop it entirely (delete-hover sets border-left: 0). */\n\t\t\t&.active {\n\t\t\t\tborder-left-color: ").concat(tableBorderSelectedColor, ";\n\t\t\t}\n\t\t\t&.").concat(ClassName.HOVERED_CELL_IN_DANGER, " {\n\t\t\t\tborder-left: 1px solid ").concat(tableBorderDeleteColor, ";\n\t\t\t}\n\t\t\t") : '', ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", tableToolbarSize, ClassName.TABLE_STICKY, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", stickyRowOffsetTop, getTableZIndexes().header, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.NESTED_TABLE_WITH_CONTROLS, ClassName.NESTED_TABLE_WITH_CONTROLS, stickyHeaderBorderBottomWidth, tableBorderColor, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", "var(--ds-space-400, 32px)", "var(--ds-space-200, 16px)", "var(--ds-space-300, 24px)", DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", rowControlsZIndex + 5, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, DRAG_HANDLE_WIDTH, "var(--ds-space-150, 12px)", akEditorTableNumberColumnWidth, 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(getTableZIndexes().header, ")"), tableBorderColor, tableBorderColor, ClassName.NATIVE_STICKY_ACTIVE, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "z-index: ".concat(getTableZIndexes().header, ";") : '', tableBorderColor, tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ClassName.TABLE_HEADER_CELL, tableBorderColor, tableBorderColor, ClassName.TABLE_NODE_WRAPPER, ClassName.NATIVE_STICKY, tableMarginTop, tableMarginTop, getTableZIndexes().mask, 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)", expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t/* Borders floor to device pixels at fractional zoom; overlap the sticky row by 1px to avoid a seam. */\n\t.".concat(ClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(ClassName.NATIVE_STICKY, ")::before {\n\t\tborder-top: none;\n\t\theight: ").concat(tableMarginTop + 1, "px;\n\t\tmargin-bottom: -").concat(tableMarginTop + 1, "px;\n\t\tbackground: transparent;\n\t}\n\n\t.").concat(ClassName.TABLE_NODE_WRAPPER, ":has(tr.").concat(ClassName.NATIVE_STICKY_ACTIVE, ")::before {\n\t\tborder-top: none;\n\t\tbackground: ").concat(expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", ";\n\t}\n\t") : '', ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, tableColumnControlsHeight, getTableZIndexes().aboveHeader, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_ROW_CONTROLS_WRAPPER, ClassName.DRAG_ROW_CONTROLS, getTableZIndexes().belowHeader, 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)", getTableZIndexes().resizeHandle, 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, akEditorSelectedNodeClassName, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, numberedColumnButtonSelectedStyles, hideNativeBrowserTextSelectionStyles, 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, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, tableToolbarDeleteColor, tableBorderDeleteColor, "var(--ds-text-danger, #AE2E24)", akEditorUnitZIndex, 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, getTableZIndexes().dangerOverlay, 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(), getTableZIndexes().dangerOverlay, tableCellDeleteColor, ClassName.HOVERED_NO_HIGHLIGHT, ClassName.HOVERED_CELL_IN_DANGER, tableBorderStyles(), getTableZIndexes().dangerOverlay, 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, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", getTableZIndexes().aboveHeader, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? "\n\t\t/* Transparent bottom 1px so the sticky header row's top border stays visible. */\n\t\tpadding-bottom: 1px;\n\t\tbackground-clip: content-box;\n\t\t/* Chrome can fall back to start alignment after zoom, covering the header. */\n\t\talign-self: unsafe end;" : "", ClassName.TABLE_CONTAINER, ClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, akEditorTableNumberColumnWidth + dragRowControlsWidth, akEditorTableNumberColumnWidth + dragRowControlsWidth, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", getTableZIndexes().belowHeader, 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
90
90
  // doesn't shift it; the calc reproduces the previous top-aligned offset.
91
91
  "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
92
92
  // fill over the mask's gray so it matches the adjacent cells instead of reading as transparent.
93
- "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, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && isExperimentEnabled('platform_editor_table_q4_patch_8') ? tableMarginTop - 1 : tableMarginTop, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, getTableZIndexes().aboveHeader, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, 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, fg('platform-dst-tokens-finesse') ? selectedCellBorderStyles() : '');
93
+ "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, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? tableMarginTop - 1 : tableMarginTop, ClassName.TABLE_STICKY, ClassName.DRAG_COLUMN_CONTROLS_WRAPPER, getTableZIndexes().aboveHeader, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor, 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, fg('platform-dst-tokens-finesse') ? selectedCellBorderStyles() : '');
94
94
  };
95
95
 
96
96
  // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
3
3
  interface Props {
4
+ /** Changes when the cell may have moved without a re-render; see `useCellLayoutVersion`. */
5
+ cellLayoutVersion?: number;
4
6
  children: React.ReactNode;
5
7
  isContextualMenuOpen: boolean | undefined;
6
8
  mountTo: HTMLElement;
@@ -18,5 +20,5 @@ interface CalcLeftPosData {
18
20
  }
19
21
  export declare const calcLeftPos: ({ buttonWidth, cellRectLeft, cellRefWidth, offset, }: CalcLeftPosData) => number;
20
22
  export declare const calcObserverTargetMargin: (tableWrapper: HTMLElement, fixedButtonRefCurrent: HTMLElement) => number;
21
- export declare const FixedButton: ({ children, isContextualMenuOpen, mountTo, offset, stickyHeader, tableWrapper, targetCellPosition, targetCellRef, }: Props) => React.ReactPortal;
23
+ export declare const FixedButton: ({ cellLayoutVersion, children, isContextualMenuOpen, mountTo, offset, stickyHeader, tableWrapper, targetCellPosition, targetCellRef, }: Props) => React.ReactPortal;
22
24
  export default FixedButton;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Counts layout changes that can move the target cell without re-rendering the cell options
3
+ * button: the editor container resizing (window resize, side panel, product sidebar) or the table
4
+ * resizing (column scaling). Changing the count re-renders the button so it repositions on its
5
+ * cell. Stays 0 when the gate is off.
6
+ */
7
+ export declare const useCellLayoutVersion: (targetCellRef: Node | undefined) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "42.2.8",
3
+ "version": "42.3.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -68,12 +68,15 @@
68
68
  "uuid": "^11.1.1"
69
69
  },
70
70
  "peerDependencies": {
71
- "@atlaskit/editor-common": "^134.5.0",
71
+ "@atlaskit/editor-common": "^134.6.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"
75
75
  },
76
76
  "platform-feature-flags": {
77
+ "platform_editor_sticky_cell_options_position": {
78
+ "type": "boolean"
79
+ },
77
80
  "platform_editor_ai_suggestion_table_scroll_fix": {
78
81
  "type": "boolean"
79
82
  },
@@ -107,7 +110,7 @@
107
110
  }
108
111
  },
109
112
  "devDependencies": {
110
- "@atlaskit/editor-common": "^134.5.0",
113
+ "@atlaskit/editor-common": "^134.6.0",
111
114
  "react": "^19.2.0",
112
115
  "react-dom": "^19.2.0",
113
116
  "react-intl": "^7.0.0"