@atlaskit/editor-plugin-block-controls 9.0.17 → 9.0.19

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,20 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 9.0.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [`73c46b71987a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73c46b71987a0) -
8
+ [ux] Fix remix button sticky for tables right side
9
+
10
+ ## 9.0.18
11
+
12
+ ### Patch Changes
13
+
14
+ - [`bd008993d07cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd008993d07cd) -
15
+ Reuse the same selectors for determinig hover locations and location to draw drag handle
16
+ - Updated dependencies
17
+
3
18
  ## 9.0.17
4
19
 
5
20
  ### Patch Changes
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _consts.STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "VisibilityContainer", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -15,6 +21,24 @@ Object.defineProperty(exports, "getAnchorAttrName", {
15
21
  return _domAttrName.getAnchorAttrName;
16
22
  }
17
23
  });
24
+ Object.defineProperty(exports, "getControlBottomCSSValue", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _dragHandlePositions.getControlBottomCSSValue;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "getControlHeightCSSValue", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _dragHandlePositions.getControlHeightCSSValue;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "getNodeHeight", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _dragHandlePositions.getNodeHeight;
40
+ }
41
+ });
18
42
  Object.defineProperty(exports, "getRightPositionForRootElement", {
19
43
  enumerable: true,
20
44
  get: function get() {
@@ -39,6 +63,12 @@ Object.defineProperty(exports, "rootElementGap", {
39
63
  return _consts.rootElementGap;
40
64
  }
41
65
  });
66
+ Object.defineProperty(exports, "shouldBeSticky", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _dragHandlePositions.shouldBeSticky;
70
+ }
71
+ });
42
72
  Object.defineProperty(exports, "topPositionAdjustment", {
43
73
  enumerable: true,
44
74
  get: function get() {
@@ -1173,7 +1173,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
1173
1173
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1174
1174
  , {
1175
1175
  style: (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1176
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1176
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1177
1177
  ,
1178
1178
  xcss: [dragHandleContainerStyles],
1179
1179
  as: "span",
@@ -1186,7 +1186,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
1186
1186
  }),
1187
1187
  ignoreTooltipPointerEvents: true,
1188
1188
  position: 'top'
1189
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1189
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1190
1190
  ,
1191
1191
  onShow: function onShow() {
1192
1192
  var _api$accessibilityUti;
@@ -1203,7 +1203,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
1203
1203
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1204
1204
  , {
1205
1205
  style: (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1206
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1206
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1207
1207
  ,
1208
1208
  xcss: [dragHandleContainerStyles],
1209
1209
  as: "span",
@@ -1220,7 +1220,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
1220
1220
  helpDescriptors: helpDescriptors
1221
1221
  }),
1222
1222
  ignoreTooltipPointerEvents: true
1223
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1223
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1224
1224
  ,
1225
1225
  onShow: function onShow() {
1226
1226
  var _api$accessibilityUti2;
@@ -243,12 +243,12 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
243
243
  }, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, isNestedDropTarget ? '100%' : "".concat(lineLength || DEFAULT_DROP_INDICATOR_WIDTH, "px")), EDITOR_BLOCK_CONTROLS_DROP_TARGET_LEFT_MARGIN, isNestedDropTarget ? (0, _consts.getNestedNodeLeftPaddingMargin)(parentNode === null || parentNode === void 0 ? void 0 : parentNode.type.name) : '0'), EDITOR_BLOCK_CONTROLS_DROP_TARGET_ZINDEX, _constants.layers.navigation());
244
244
  var isShowInlineDropTarget = (0, _inlineDropTarget.shouldAllowInlineDropTarget)(isNestedDropTarget, nextNode, isSameLayout, activeNode, parentNode);
245
245
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(HoverZone
246
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
246
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
247
247
  , {
248
248
  onDragEnter: function onDragEnter() {
249
249
  return setIsDraggedOver(true);
250
250
  }
251
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
251
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
252
252
  ,
253
253
  onDragLeave: function onDragLeave() {
254
254
  return setIsDraggedOver(false);
@@ -275,12 +275,12 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
275
275
  }, (0, _react2.jsx)(_box.DropIndicator, {
276
276
  edge: "bottom"
277
277
  }))), dropTargetStyle !== 'remainingHeight' && (0, _react2.jsx)(HoverZone
278
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
278
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
279
279
  , {
280
280
  onDragEnter: function onDragEnter() {
281
281
  return setIsDraggedOver(true);
282
282
  }
283
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
283
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
284
284
  ,
285
285
  onDragLeave: function onDragLeave() {
286
286
  return setIsDraggedOver(false);
@@ -32,6 +32,12 @@ var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-
32
32
  * Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
33
33
  */
34
34
  var dragHandlerAnchorSelectorNext = "[".concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "]:not([data-prosemirror-node-name=\"tableRow\"], [data-prosemirror-node-name=\"tableCell\"], [data-prosemirror-node-name=\"tableHeader\"], [data-prosemirror-node-name=\"media\"], [data-prosemirror-node-inline=\"true\"])");
35
+
36
+ /**
37
+ * Extended version that also excludes descendants of taskList.
38
+ * preventing the ::after hover zone from blocking checkbox inputs in blockTaskItem nodes.
39
+ */
40
+ var dragHandlerAnchorSelectorWithTaskExclusion = "[".concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "]:not([data-prosemirror-node-name=\"tableRow\"], [data-prosemirror-node-name=\"tableCell\"], [data-prosemirror-node-name=\"tableHeader\"], [data-prosemirror-node-name=\"media\"], [data-prosemirror-node-inline=\"true\"], [data-prosemirror-node-name=\"taskList\"] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])");
35
41
  var gutterPaddingWidth = function gutterPaddingWidth() {
36
42
  return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
37
43
  };
@@ -96,10 +102,10 @@ var extendedHoverZone = function extendedHoverZone() {
96
102
  }));
97
103
  };
98
104
  var extendedHoverZoneNext = function extendedHoverZoneNext() {
99
- return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelectorNext, "::after"), {
105
+ return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".block-ctrl-drag-preview ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
100
106
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
101
107
  display: 'none !important'
102
- }), '.ProseMirror', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "&& ".concat(dragHandlerAnchorSelectorNext, "::after"), {
108
+ }), '.ProseMirror', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "&& ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
103
109
  content: '""',
104
110
  position: 'absolute',
105
111
  top: 0,
@@ -110,7 +116,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
110
116
  height: '100%',
111
117
  cursor: 'default',
112
118
  zIndex: 1
113
- }), "&& ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
119
+ }), "&& ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
114
120
  content: '""',
115
121
  position: 'absolute',
116
122
  top: 0,
@@ -122,7 +128,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
122
128
  cursor: 'default',
123
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
124
130
  zIndex: -1
125
- }), "&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ".concat(dragHandlerAnchorSelectorNext, "::after"), {
131
+ }), "&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
126
132
  content: '""',
127
133
  position: 'absolute',
128
134
  top: 0,
@@ -133,13 +139,13 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
133
139
  zIndex: 1
134
140
  })), 'hr[data-drag-handler-anchor-name]', {
135
141
  overflow: 'visible'
136
- }), "[data-blocks-drag-handle-container=\"true\"] + ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
142
+ }), "[data-blocks-drag-handle-container=\"true\"] + ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
137
143
  display: 'none'
138
144
  }));
139
145
  };
140
146
  var layoutColumnExtendedHoverZone = (0, _react.css)({
141
147
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
142
- '.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
148
+ '.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
143
149
  content: '""',
144
150
  position: 'absolute',
145
151
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -154,7 +160,7 @@ var layoutColumnExtendedHoverZone = (0, _react.css)({
154
160
  });
155
161
  var layoutColumnWithoutHoverZone = (0, _react.css)({
156
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
157
- '.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
163
+ '.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
158
164
  display: 'none'
159
165
  })
160
166
  });
@@ -169,7 +175,7 @@ var extendHoverZoneReduced = (0, _react.css)({
169
175
  });
170
176
  var extendHoverZoneReducedNext = (0, _react.css)({
171
177
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
172
- '.ProseMirror': (0, _defineProperty2.default)({}, "> ".concat(dragHandlerAnchorSelectorNext, "::after"), (0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
178
+ '.ProseMirror': (0, _defineProperty2.default)({}, "> ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), (0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
173
179
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
174
180
  left: "-".concat(_editorSharedStyles.akEditorGutterPaddingReduced, "px"),
175
181
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
@@ -185,7 +191,7 @@ var extendedDragZone = (0, _react.css)({
185
191
  });
186
192
  var extendedDragZoneNext = (0, _react.css)({
187
193
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
188
- '.ProseMirror': (0, _defineProperty2.default)({}, "&& ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
194
+ '.ProseMirror': (0, _defineProperty2.default)({}, "&& ".concat((0, _expValEquals.expValEquals)('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
189
195
  width: 'var(--ak-editor-max-container-width)',
190
196
  left: "calc((100% - var(--ak-editor-max-container-width))/2)"
191
197
  })
@@ -470,7 +476,7 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
470
476
  var shouldRenderAnchors = (0, _styles.isCSSAnchorSupported)() && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
471
477
  var toolbarFlagsEnabled = (0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
472
478
  return (0, _react.jsx)(_react.Global
473
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
479
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
474
480
  , {
475
481
  styles: [globalStyles(), globalDnDStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
476
482
  exposure: true
@@ -342,7 +342,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
342
342
  testId: "editor-quick-insert-button",
343
343
  type: "button",
344
344
  "aria-label": formatMessage(_messages.blockControlsMessages.insert)
345
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
345
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
346
346
  ,
347
347
  xcss: [stickyButtonStyles, ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
348
348
  onClick: handleQuickInsert,
@@ -357,7 +357,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
357
357
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
358
358
  , {
359
359
  style: positionStyles
360
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
360
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
361
361
  ,
362
362
  xcss: [containerStaticStyles]
363
363
  }, (0, _react2.jsx)("span", {
@@ -4,6 +4,6 @@
4
4
  export { VisibilityContainer } from './visibility-container';
5
5
  export { refreshAnchorName } from './utils/anchor-name';
6
6
  export { getAnchorAttrName } from './utils/dom-attr-name';
7
- export { rootElementGap, topPositionAdjustment } from './consts';
8
- export { getTopPosition } from '../pm-plugins/utils/drag-handle-positions';
7
+ export { rootElementGap, STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER, topPositionAdjustment } from './consts';
8
+ export { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
9
9
  export { getRightPositionForRootElement } from '../pm-plugins/utils/widget-positions';
@@ -1152,7 +1152,7 @@ export const DragHandle = ({
1152
1152
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1153
1153
  , {
1154
1154
  style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1155
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1155
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1156
1156
  ,
1157
1157
  xcss: [dragHandleContainerStyles],
1158
1158
  as: "span",
@@ -1165,7 +1165,7 @@ export const DragHandle = ({
1165
1165
  }),
1166
1166
  ignoreTooltipPointerEvents: true,
1167
1167
  position: 'top'
1168
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1168
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1169
1169
  ,
1170
1170
  onShow: () => {
1171
1171
  var _api$accessibilityUti;
@@ -1180,7 +1180,7 @@ export const DragHandle = ({
1180
1180
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1181
1181
  , {
1182
1182
  style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1183
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1183
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1184
1184
  ,
1185
1185
  xcss: [dragHandleContainerStyles],
1186
1186
  as: "span",
@@ -1195,7 +1195,7 @@ export const DragHandle = ({
1195
1195
  helpDescriptors: helpDescriptors
1196
1196
  }),
1197
1197
  ignoreTooltipPointerEvents: true
1198
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1198
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1199
1199
  ,
1200
1200
  onShow: () => {
1201
1201
  var _api$accessibilityUti2;
@@ -236,10 +236,10 @@ export const DropTarget = props => {
236
236
  };
237
237
  const isShowInlineDropTarget = shouldAllowInlineDropTarget(isNestedDropTarget, nextNode, isSameLayout, activeNode, parentNode);
238
238
  return jsx(Fragment, null, jsx(HoverZone
239
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
239
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
240
240
  , {
241
241
  onDragEnter: () => setIsDraggedOver(true)
242
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
242
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
243
243
  ,
244
244
  onDragLeave: () => setIsDraggedOver(false),
245
245
  onDrop: onDrop,
@@ -264,10 +264,10 @@ export const DropTarget = props => {
264
264
  }, jsx(DropIndicator, {
265
265
  edge: "bottom"
266
266
  }))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
267
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
267
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
268
268
  , {
269
269
  onDragEnter: () => setIsDraggedOver(true)
270
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
270
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
271
271
  ,
272
272
  onDragLeave: () => setIsDraggedOver(false),
273
273
  onDrop: onDrop,
@@ -24,6 +24,12 @@ const dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-dra
24
24
  * Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
25
25
  */
26
26
  const dragHandlerAnchorSelectorNext = `[${NODE_ANCHOR_ATTR_NAME}]:not([data-prosemirror-node-name="tableRow"], [data-prosemirror-node-name="tableCell"], [data-prosemirror-node-name="tableHeader"], [data-prosemirror-node-name="media"], [data-prosemirror-node-inline="true"])`;
27
+
28
+ /**
29
+ * Extended version that also excludes descendants of taskList.
30
+ * preventing the ::after hover zone from blocking checkbox inputs in blockTaskItem nodes.
31
+ */
32
+ const dragHandlerAnchorSelectorWithTaskExclusion = `[${NODE_ANCHOR_ATTR_NAME}]:not([data-prosemirror-node-name="tableRow"], [data-prosemirror-node-name="tableCell"], [data-prosemirror-node-name="tableHeader"], [data-prosemirror-node-name="media"], [data-prosemirror-node-inline="true"], [data-prosemirror-node-name="taskList"] [${NODE_ANCHOR_ATTR_NAME}])`;
27
33
  const gutterPaddingWidth = () => editorExperiment('platform_editor_controls', 'variant1') ? `${akEditorGutterPaddingDynamic()}px` : '100%';
28
34
  const gutterPaddingLeft = () => editorExperiment('platform_editor_controls', 'variant1') ? `-${akEditorGutterPaddingDynamic()}px` : '-100px';
29
35
  const extendedHoverZone = () => css({
@@ -103,15 +109,15 @@ const extendedHoverZone = () => css({
103
109
  }
104
110
  });
105
111
  const extendedHoverZoneNext = () => css({
106
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
107
- [`.block-ctrl-drag-preview ${dragHandlerAnchorSelectorNext}::after`]: {
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
113
+ [`.block-ctrl-drag-preview ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}::after`]: {
108
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
109
115
  display: 'none !important'
110
116
  },
111
117
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
112
118
  '.ProseMirror': {
113
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
114
- [`&& ${dragHandlerAnchorSelectorNext}::after`]: {
119
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
120
+ [`&& ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}::after`]: {
115
121
  content: '""',
116
122
  position: 'absolute',
117
123
  top: 0,
@@ -126,7 +132,7 @@ const extendedHoverZoneNext = () => css({
126
132
  // Top level depth hover zone should extend to gutter padding area
127
133
  // we select the top level by using NOT nested anchor selector
128
134
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
129
- [`&& ${dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
135
+ [`&& ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
130
136
  content: '""',
131
137
  position: 'absolute',
132
138
  top: 0,
@@ -139,8 +145,8 @@ const extendedHoverZoneNext = () => css({
139
145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
140
146
  zIndex: -1
141
147
  },
142
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
143
- [`&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ${dragHandlerAnchorSelectorNext}::after`]: {
148
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
149
+ [`&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}::after`]: {
144
150
  content: '""',
145
151
  position: 'absolute',
146
152
  top: 0,
@@ -158,7 +164,7 @@ const extendedHoverZoneNext = () => css({
158
164
  },
159
165
  //Hide pseudo element at top depth level. Leave for nested depths to prevent mouseover loop.
160
166
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
161
- [`[data-blocks-drag-handle-container="true"] + ${dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
167
+ [`[data-blocks-drag-handle-container="true"] + ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
162
168
  display: 'none'
163
169
  }
164
170
  });
@@ -166,8 +172,8 @@ const layoutColumnExtendedHoverZone = css({
166
172
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
167
173
  '.ProseMirror': {
168
174
  // hover zone for layout column should be placed near the top of the column (where drag handle is)
169
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
170
- [`&&& ${dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
175
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
176
+ [`&&& ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
171
177
  content: '""',
172
178
  position: 'absolute',
173
179
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -185,8 +191,8 @@ const layoutColumnWithoutHoverZone = css({
185
191
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
186
192
  '.ProseMirror': {
187
193
  // when advanced_layouts is off, layout columns should not have hover zones, because there aren't any drag handles for layout columns
188
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
189
- [`&&& ${dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
194
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
195
+ [`&&& ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
190
196
  display: 'none'
191
197
  }
192
198
  }
@@ -209,8 +215,8 @@ const extendHoverZoneReduced = css({
209
215
  const extendHoverZoneReducedNext = css({
210
216
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
211
217
  '.ProseMirror': {
212
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
213
- [`> ${dragHandlerAnchorSelectorNext}::after`]: {
218
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
219
+ [`> ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}::after`]: {
214
220
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
215
221
  [`@container editor-area (max-width: ${akEditorFullPageNarrowBreakout}px)`]: {
216
222
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
@@ -235,7 +241,7 @@ const extendedDragZoneNext = css({
235
241
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
236
242
  '.ProseMirror': {
237
243
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
238
- [`&& ${dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
244
+ [`&& ${expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
239
245
  width: 'var(--ak-editor-max-container-width)',
240
246
  left: `calc((100% - var(--ak-editor-max-container-width))/2)`
241
247
  }
@@ -556,7 +562,7 @@ export const GlobalStylesWrapper = ({
556
562
  const shouldRenderAnchors = isCSSAnchorSupported() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
557
563
  const toolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
558
564
  return jsx(Global
559
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
565
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
560
566
  , {
561
567
  styles: [globalStyles(), globalDnDStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), editorExperiment('platform_editor_preview_panel_responsiveness', true, {
562
568
  exposure: true
@@ -338,7 +338,7 @@ export const TypeAheadControl = ({
338
338
  testId: "editor-quick-insert-button",
339
339
  type: "button",
340
340
  "aria-label": formatMessage(messages.insert)
341
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
341
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
342
342
  ,
343
343
  xcss: [stickyButtonStyles, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
344
344
  onClick: handleQuickInsert,
@@ -352,7 +352,7 @@ export const TypeAheadControl = ({
352
352
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
353
353
  , {
354
354
  style: positionStyles
355
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
355
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
356
356
  ,
357
357
  xcss: [containerStaticStyles]
358
358
  }, jsx("span", {
@@ -4,6 +4,6 @@
4
4
  export { VisibilityContainer } from './visibility-container';
5
5
  export { refreshAnchorName } from './utils/anchor-name';
6
6
  export { getAnchorAttrName } from './utils/dom-attr-name';
7
- export { rootElementGap, topPositionAdjustment } from './consts';
8
- export { getTopPosition } from '../pm-plugins/utils/drag-handle-positions';
7
+ export { rootElementGap, STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER, topPositionAdjustment } from './consts';
8
+ export { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
9
9
  export { getRightPositionForRootElement } from '../pm-plugins/utils/widget-positions';
@@ -1170,7 +1170,7 @@ export var DragHandle = function DragHandle(_ref3) {
1170
1170
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1171
1171
  , {
1172
1172
  style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1173
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1173
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1174
1174
  ,
1175
1175
  xcss: [dragHandleContainerStyles],
1176
1176
  as: "span",
@@ -1183,7 +1183,7 @@ export var DragHandle = function DragHandle(_ref3) {
1183
1183
  }),
1184
1184
  ignoreTooltipPointerEvents: true,
1185
1185
  position: 'top'
1186
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1186
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1187
1187
  ,
1188
1188
  onShow: function onShow() {
1189
1189
  var _api$accessibilityUti;
@@ -1200,7 +1200,7 @@ export var DragHandle = function DragHandle(_ref3) {
1200
1200
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
1201
1201
  , {
1202
1202
  style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
1203
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1203
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1204
1204
  ,
1205
1205
  xcss: [dragHandleContainerStyles],
1206
1206
  as: "span",
@@ -1217,7 +1217,7 @@ export var DragHandle = function DragHandle(_ref3) {
1217
1217
  helpDescriptors: helpDescriptors
1218
1218
  }),
1219
1219
  ignoreTooltipPointerEvents: true
1220
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1220
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1221
1221
  ,
1222
1222
  onShow: function onShow() {
1223
1223
  var _api$accessibilityUti2;
@@ -235,12 +235,12 @@ export var DropTarget = function DropTarget(props) {
235
235
  }, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, isNestedDropTarget ? '100%' : "".concat(lineLength || DEFAULT_DROP_INDICATOR_WIDTH, "px")), EDITOR_BLOCK_CONTROLS_DROP_TARGET_LEFT_MARGIN, isNestedDropTarget ? getNestedNodeLeftPaddingMargin(parentNode === null || parentNode === void 0 ? void 0 : parentNode.type.name) : '0'), EDITOR_BLOCK_CONTROLS_DROP_TARGET_ZINDEX, layers.navigation());
236
236
  var isShowInlineDropTarget = shouldAllowInlineDropTarget(isNestedDropTarget, nextNode, isSameLayout, activeNode, parentNode);
237
237
  return jsx(Fragment, null, jsx(HoverZone
238
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
238
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
239
239
  , {
240
240
  onDragEnter: function onDragEnter() {
241
241
  return setIsDraggedOver(true);
242
242
  }
243
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
243
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
244
244
  ,
245
245
  onDragLeave: function onDragLeave() {
246
246
  return setIsDraggedOver(false);
@@ -267,12 +267,12 @@ export var DropTarget = function DropTarget(props) {
267
267
  }, jsx(DropIndicator, {
268
268
  edge: "bottom"
269
269
  }))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
270
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
270
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
271
271
  , {
272
272
  onDragEnter: function onDragEnter() {
273
273
  return setIsDraggedOver(true);
274
274
  }
275
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
275
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
276
276
  ,
277
277
  onDragLeave: function onDragLeave() {
278
278
  return setIsDraggedOver(false);
@@ -25,6 +25,12 @@ var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-
25
25
  * Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
26
26
  */
27
27
  var dragHandlerAnchorSelectorNext = "[".concat(NODE_ANCHOR_ATTR_NAME, "]:not([data-prosemirror-node-name=\"tableRow\"], [data-prosemirror-node-name=\"tableCell\"], [data-prosemirror-node-name=\"tableHeader\"], [data-prosemirror-node-name=\"media\"], [data-prosemirror-node-inline=\"true\"])");
28
+
29
+ /**
30
+ * Extended version that also excludes descendants of taskList.
31
+ * preventing the ::after hover zone from blocking checkbox inputs in blockTaskItem nodes.
32
+ */
33
+ var dragHandlerAnchorSelectorWithTaskExclusion = "[".concat(NODE_ANCHOR_ATTR_NAME, "]:not([data-prosemirror-node-name=\"tableRow\"], [data-prosemirror-node-name=\"tableCell\"], [data-prosemirror-node-name=\"tableHeader\"], [data-prosemirror-node-name=\"media\"], [data-prosemirror-node-inline=\"true\"], [data-prosemirror-node-name=\"taskList\"] [").concat(NODE_ANCHOR_ATTR_NAME, "])");
28
34
  var gutterPaddingWidth = function gutterPaddingWidth() {
29
35
  return editorExperiment('platform_editor_controls', 'variant1') ? "".concat(akEditorGutterPaddingDynamic(), "px") : '100%';
30
36
  };
@@ -89,10 +95,10 @@ var extendedHoverZone = function extendedHoverZone() {
89
95
  }));
90
96
  };
91
97
  var extendedHoverZoneNext = function extendedHoverZoneNext() {
92
- return css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelectorNext, "::after"), {
98
+ return css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".block-ctrl-drag-preview ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
93
99
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
94
100
  display: 'none !important'
95
- }), '.ProseMirror', _defineProperty(_defineProperty(_defineProperty({}, "&& ".concat(dragHandlerAnchorSelectorNext, "::after"), {
101
+ }), '.ProseMirror', _defineProperty(_defineProperty(_defineProperty({}, "&& ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
96
102
  content: '""',
97
103
  position: 'absolute',
98
104
  top: 0,
@@ -103,7 +109,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
103
109
  height: '100%',
104
110
  cursor: 'default',
105
111
  zIndex: 1
106
- }), "&& ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
112
+ }), "&& ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
107
113
  content: '""',
108
114
  position: 'absolute',
109
115
  top: 0,
@@ -115,7 +121,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
115
121
  cursor: 'default',
116
122
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
117
123
  zIndex: -1
118
- }), "&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ".concat(dragHandlerAnchorSelectorNext, "::after"), {
124
+ }), "&& :is(.pm-table-cell-content-wrap, .pm-table-header-content-wrap) > ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), {
119
125
  content: '""',
120
126
  position: 'absolute',
121
127
  top: 0,
@@ -126,13 +132,13 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
126
132
  zIndex: 1
127
133
  })), 'hr[data-drag-handler-anchor-name]', {
128
134
  overflow: 'visible'
129
- }), "[data-blocks-drag-handle-container=\"true\"] + ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
135
+ }), "[data-blocks-drag-handle-container=\"true\"] + ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
130
136
  display: 'none'
131
137
  }));
132
138
  };
133
139
  var layoutColumnExtendedHoverZone = css({
134
140
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
135
- '.ProseMirror': _defineProperty({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
141
+ '.ProseMirror': _defineProperty({}, "&&& ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
136
142
  content: '""',
137
143
  position: 'absolute',
138
144
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -147,7 +153,7 @@ var layoutColumnExtendedHoverZone = css({
147
153
  });
148
154
  var layoutColumnWithoutHoverZone = css({
149
155
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
150
- '.ProseMirror': _defineProperty({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
156
+ '.ProseMirror': _defineProperty({}, "&&& ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
151
157
  display: 'none'
152
158
  })
153
159
  });
@@ -162,7 +168,7 @@ var extendHoverZoneReduced = css({
162
168
  });
163
169
  var extendHoverZoneReducedNext = css({
164
170
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
165
- '.ProseMirror': _defineProperty({}, "> ".concat(dragHandlerAnchorSelectorNext, "::after"), _defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
171
+ '.ProseMirror': _defineProperty({}, "> ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, "::after"), _defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
166
172
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
167
173
  left: "-".concat(akEditorGutterPaddingReduced, "px"),
168
174
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
@@ -178,7 +184,7 @@ var extendedDragZone = css({
178
184
  });
179
185
  var extendedDragZoneNext = css({
180
186
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
181
- '.ProseMirror': _defineProperty({}, "&& ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
187
+ '.ProseMirror': _defineProperty({}, "&& ".concat(expValEquals('platform_editor_unify_native_dnd_selectors', 'isEnabled', true) ? dragHandlerAnchorSelectorWithTaskExclusion : dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
182
188
  width: 'var(--ak-editor-max-container-width)',
183
189
  left: "calc((100% - var(--ak-editor-max-container-width))/2)"
184
190
  })
@@ -463,7 +469,7 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
463
469
  var shouldRenderAnchors = isCSSAnchorSupported() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
464
470
  var toolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
465
471
  return jsx(Global
466
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
472
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
467
473
  , {
468
474
  styles: [globalStyles(), globalDnDStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), editorExperiment('platform_editor_preview_panel_responsiveness', true, {
469
475
  exposure: true
@@ -337,7 +337,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
337
337
  testId: "editor-quick-insert-button",
338
338
  type: "button",
339
339
  "aria-label": formatMessage(messages.insert)
340
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
340
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
341
341
  ,
342
342
  xcss: [stickyButtonStyles, (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && stickyButtonDenseModeStyles],
343
343
  onClick: handleQuickInsert,
@@ -352,7 +352,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
352
352
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
353
353
  , {
354
354
  style: positionStyles
355
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
355
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
356
356
  ,
357
357
  xcss: [containerStaticStyles]
358
358
  }, jsx("span", {
@@ -1,6 +1,6 @@
1
1
  export { VisibilityContainer } from './visibility-container';
2
2
  export { refreshAnchorName } from './utils/anchor-name';
3
3
  export { getAnchorAttrName } from './utils/dom-attr-name';
4
- export { rootElementGap, topPositionAdjustment } from './consts';
5
- export { getTopPosition } from '../pm-plugins/utils/drag-handle-positions';
4
+ export { rootElementGap, STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER, topPositionAdjustment, } from './consts';
5
+ export { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky, } from '../pm-plugins/utils/drag-handle-positions';
6
6
  export { getRightPositionForRootElement } from '../pm-plugins/utils/widget-positions';
@@ -1,6 +1,6 @@
1
1
  export { VisibilityContainer } from './visibility-container';
2
2
  export { refreshAnchorName } from './utils/anchor-name';
3
3
  export { getAnchorAttrName } from './utils/dom-attr-name';
4
- export { rootElementGap, topPositionAdjustment } from './consts';
5
- export { getTopPosition } from '../pm-plugins/utils/drag-handle-positions';
4
+ export { rootElementGap, STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER, topPositionAdjustment, } from './consts';
5
+ export { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky, } from '../pm-plugins/utils/drag-handle-positions';
6
6
  export { getRightPositionForRootElement } from '../pm-plugins/utils/widget-positions';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "9.0.17",
3
+ "version": "9.0.19",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^18.0.0",
58
58
  "@atlaskit/theme": "^22.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^44.0.0",
59
+ "@atlaskit/tmp-editor-statsig": "^44.2.0",
60
60
  "@atlaskit/tokens": "^11.1.0",
61
61
  "@atlaskit/tooltip": "^21.0.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^112.7.0",
70
+ "@atlaskit/editor-common": "^112.8.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl-next": "npm:react-intl@^5.18.1"