@atlaskit/editor-plugin-block-controls 9.0.16 → 9.0.17
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 +6 -0
- package/dist/cjs/ui/drag-handle.js +12 -4
- package/dist/cjs/ui/drop-target.js +12 -4
- package/dist/cjs/ui/global-styles.js +3 -1
- package/dist/cjs/ui/quick-insert-button.js +6 -2
- package/dist/cjs/ui/visibility-container.js +2 -0
- package/dist/es2019/ui/drag-handle.js +12 -4
- package/dist/es2019/ui/drop-target.js +12 -4
- package/dist/es2019/ui/global-styles.js +3 -1
- package/dist/es2019/ui/quick-insert-button.js +6 -2
- package/dist/es2019/ui/visibility-container.js +2 -0
- package/dist/esm/ui/drag-handle.js +12 -4
- package/dist/esm/ui/drop-target.js +12 -4
- package/dist/esm/ui/global-styles.js +3 -1
- package/dist/esm/ui/quick-insert-button.js +6 -2
- package/dist/esm/ui/visibility-container.js +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1172,7 +1172,9 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
|
|
|
1172
1172
|
return (0, _react2.jsx)(_primitives.Box
|
|
1173
1173
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1174
1174
|
, {
|
|
1175
|
-
style: (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1177
|
+
,
|
|
1176
1178
|
xcss: [dragHandleContainerStyles],
|
|
1177
1179
|
as: "span",
|
|
1178
1180
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1183,7 +1185,9 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
|
|
|
1183
1185
|
helpDescriptors: helpDescriptors
|
|
1184
1186
|
}),
|
|
1185
1187
|
ignoreTooltipPointerEvents: true,
|
|
1186
|
-
position: 'top'
|
|
1188
|
+
position: 'top'
|
|
1189
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1190
|
+
,
|
|
1187
1191
|
onShow: function onShow() {
|
|
1188
1192
|
var _api$accessibilityUti;
|
|
1189
1193
|
api === null || api === void 0 || (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 || _api$accessibilityUti.actions.ariaNotify(message, {
|
|
@@ -1198,7 +1202,9 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
|
|
|
1198
1202
|
return (0, _react2.jsx)(_primitives.Box
|
|
1199
1203
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1200
1204
|
, {
|
|
1201
|
-
style: (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1207
|
+
,
|
|
1202
1208
|
xcss: [dragHandleContainerStyles],
|
|
1203
1209
|
as: "span",
|
|
1204
1210
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1213,7 +1219,9 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref3) {
|
|
|
1213
1219
|
content: (0, _react2.jsx)(_keymaps.TooltipContentWithMultipleShortcuts, {
|
|
1214
1220
|
helpDescriptors: helpDescriptors
|
|
1215
1221
|
}),
|
|
1216
|
-
ignoreTooltipPointerEvents: true
|
|
1222
|
+
ignoreTooltipPointerEvents: true
|
|
1223
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1224
|
+
,
|
|
1217
1225
|
onShow: function onShow() {
|
|
1218
1226
|
var _api$accessibilityUti2;
|
|
1219
1227
|
api === null || api === void 0 || (_api$accessibilityUti2 = api.accessibilityUtils) === null || _api$accessibilityUti2 === void 0 || _api$accessibilityUti2.actions.ariaNotify(message, {
|
|
@@ -242,10 +242,14 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
|
|
|
242
242
|
width: isNestedDropTarget ? 'unset' : '100%'
|
|
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
|
-
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(HoverZone
|
|
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)
|
|
247
|
+
, {
|
|
246
248
|
onDragEnter: function onDragEnter() {
|
|
247
249
|
return setIsDraggedOver(true);
|
|
248
|
-
}
|
|
250
|
+
}
|
|
251
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
252
|
+
,
|
|
249
253
|
onDragLeave: function onDragLeave() {
|
|
250
254
|
return setIsDraggedOver(false);
|
|
251
255
|
},
|
|
@@ -270,10 +274,14 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
|
|
|
270
274
|
"data-testid": "block-ctrl-drop-indicator"
|
|
271
275
|
}, (0, _react2.jsx)(_box.DropIndicator, {
|
|
272
276
|
edge: "bottom"
|
|
273
|
-
}))), dropTargetStyle !== 'remainingHeight' && (0, _react2.jsx)(HoverZone
|
|
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)
|
|
279
|
+
, {
|
|
274
280
|
onDragEnter: function onDragEnter() {
|
|
275
281
|
return setIsDraggedOver(true);
|
|
276
|
-
}
|
|
282
|
+
}
|
|
283
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
284
|
+
,
|
|
277
285
|
onDragLeave: function onDragLeave() {
|
|
278
286
|
return setIsDraggedOver(false);
|
|
279
287
|
},
|
|
@@ -469,7 +469,9 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
|
|
|
469
469
|
var isDragging = (0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true) ? isDraggingFromState : false;
|
|
470
470
|
var shouldRenderAnchors = (0, _styles.isCSSAnchorSupported)() && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
|
|
471
471
|
var toolbarFlagsEnabled = (0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
472
|
-
return (0, _react.jsx)(_react.Global
|
|
472
|
+
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)
|
|
474
|
+
, {
|
|
473
475
|
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, {
|
|
474
476
|
exposure: true
|
|
475
477
|
}) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
@@ -341,7 +341,9 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
|
|
|
341
341
|
}, (0, _react2.jsx)(_primitives.Pressable, {
|
|
342
342
|
testId: "editor-quick-insert-button",
|
|
343
343
|
type: "button",
|
|
344
|
-
"aria-label": formatMessage(_messages.blockControlsMessages.insert)
|
|
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)
|
|
346
|
+
,
|
|
345
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],
|
|
346
348
|
onClick: handleQuickInsert,
|
|
347
349
|
onMouseDown: handleMouseDown
|
|
@@ -354,7 +356,9 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
|
|
|
354
356
|
return (0, _react2.jsx)(_primitives.Box
|
|
355
357
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
356
358
|
, {
|
|
357
|
-
style: positionStyles
|
|
359
|
+
style: positionStyles
|
|
360
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
361
|
+
,
|
|
358
362
|
xcss: [containerStaticStyles]
|
|
359
363
|
}, (0, _react2.jsx)("span", {
|
|
360
364
|
css: [tooltipContainerStyles, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_6') ? tooltipContainerImprovedStylesStickyHeader : tooltipContainerStylesStickyHeader, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMarksFix : tooltipContainerStylesStickyHeaderWithMarksFix]
|
|
@@ -124,6 +124,8 @@ var VisibilityContainer = exports.VisibilityContainer = function VisibilityConta
|
|
|
124
124
|
css: [baseStylesCSS, shouldHide ? hiddenStylesCSS : visibleStylesCSS]
|
|
125
125
|
}, children);
|
|
126
126
|
}
|
|
127
|
+
|
|
128
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
127
129
|
return (0, _react2.jsx)(_primitives.Box, {
|
|
128
130
|
xcss: [baseStyles, shouldHide ? hiddenStyles : visibleStyles]
|
|
129
131
|
}, children);
|
|
@@ -1151,7 +1151,9 @@ export const DragHandle = ({
|
|
|
1151
1151
|
const stickyWithTooltip = () => jsx(Box
|
|
1152
1152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1153
1153
|
, {
|
|
1154
|
-
style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1156
|
+
,
|
|
1155
1157
|
xcss: [dragHandleContainerStyles],
|
|
1156
1158
|
as: "span",
|
|
1157
1159
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1162,7 +1164,9 @@ export const DragHandle = ({
|
|
|
1162
1164
|
helpDescriptors: helpDescriptors
|
|
1163
1165
|
}),
|
|
1164
1166
|
ignoreTooltipPointerEvents: true,
|
|
1165
|
-
position: 'top'
|
|
1167
|
+
position: 'top'
|
|
1168
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1169
|
+
,
|
|
1166
1170
|
onShow: () => {
|
|
1167
1171
|
var _api$accessibilityUti;
|
|
1168
1172
|
api === null || api === void 0 ? void 0 : (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 ? void 0 : _api$accessibilityUti.actions.ariaNotify(message, {
|
|
@@ -1175,7 +1179,9 @@ export const DragHandle = ({
|
|
|
1175
1179
|
const stickyWithoutTooltip = () => jsx(Box
|
|
1176
1180
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1177
1181
|
, {
|
|
1178
|
-
style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1184
|
+
,
|
|
1179
1185
|
xcss: [dragHandleContainerStyles],
|
|
1180
1186
|
as: "span",
|
|
1181
1187
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1188,7 +1194,9 @@ export const DragHandle = ({
|
|
|
1188
1194
|
content: jsx(TooltipContentWithMultipleShortcuts, {
|
|
1189
1195
|
helpDescriptors: helpDescriptors
|
|
1190
1196
|
}),
|
|
1191
|
-
ignoreTooltipPointerEvents: true
|
|
1197
|
+
ignoreTooltipPointerEvents: true
|
|
1198
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1199
|
+
,
|
|
1192
1200
|
onShow: () => {
|
|
1193
1201
|
var _api$accessibilityUti2;
|
|
1194
1202
|
api === null || api === void 0 ? void 0 : (_api$accessibilityUti2 = api.accessibilityUtils) === null || _api$accessibilityUti2 === void 0 ? void 0 : _api$accessibilityUti2.actions.ariaNotify(message, {
|
|
@@ -235,8 +235,12 @@ export const DropTarget = props => {
|
|
|
235
235
|
[EDITOR_BLOCK_CONTROLS_DROP_TARGET_ZINDEX]: layers.navigation()
|
|
236
236
|
};
|
|
237
237
|
const isShowInlineDropTarget = shouldAllowInlineDropTarget(isNestedDropTarget, nextNode, isSameLayout, activeNode, parentNode);
|
|
238
|
-
return jsx(Fragment, null, jsx(HoverZone
|
|
239
|
-
|
|
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)
|
|
240
|
+
, {
|
|
241
|
+
onDragEnter: () => setIsDraggedOver(true)
|
|
242
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
243
|
+
,
|
|
240
244
|
onDragLeave: () => setIsDraggedOver(false),
|
|
241
245
|
onDrop: onDrop,
|
|
242
246
|
node: prevNode,
|
|
@@ -259,8 +263,12 @@ export const DropTarget = props => {
|
|
|
259
263
|
"data-testid": "block-ctrl-drop-indicator"
|
|
260
264
|
}, jsx(DropIndicator, {
|
|
261
265
|
edge: "bottom"
|
|
262
|
-
}))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
|
|
263
|
-
|
|
266
|
+
}))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
|
|
267
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
268
|
+
, {
|
|
269
|
+
onDragEnter: () => setIsDraggedOver(true)
|
|
270
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
271
|
+
,
|
|
264
272
|
onDragLeave: () => setIsDraggedOver(false),
|
|
265
273
|
onDrop: onDrop,
|
|
266
274
|
node: nextNode,
|
|
@@ -555,7 +555,9 @@ export const GlobalStylesWrapper = ({
|
|
|
555
555
|
const isDragging = expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) ? isDraggingFromState : false;
|
|
556
556
|
const shouldRenderAnchors = isCSSAnchorSupported() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
|
|
557
557
|
const toolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
558
|
-
return jsx(Global
|
|
558
|
+
return jsx(Global
|
|
559
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
560
|
+
, {
|
|
559
561
|
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, {
|
|
560
562
|
exposure: true
|
|
561
563
|
}) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
@@ -337,7 +337,9 @@ export const TypeAheadControl = ({
|
|
|
337
337
|
}, jsx(Pressable, {
|
|
338
338
|
testId: "editor-quick-insert-button",
|
|
339
339
|
type: "button",
|
|
340
|
-
"aria-label": formatMessage(messages.insert)
|
|
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)
|
|
342
|
+
,
|
|
341
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],
|
|
342
344
|
onClick: handleQuickInsert,
|
|
343
345
|
onMouseDown: handleMouseDown
|
|
@@ -349,7 +351,9 @@ export const TypeAheadControl = ({
|
|
|
349
351
|
return jsx(Box
|
|
350
352
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
351
353
|
, {
|
|
352
|
-
style: positionStyles
|
|
354
|
+
style: positionStyles
|
|
355
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
356
|
+
,
|
|
353
357
|
xcss: [containerStaticStyles]
|
|
354
358
|
}, jsx("span", {
|
|
355
359
|
css: [tooltipContainerStyles, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerImprovedStylesStickyHeader : tooltipContainerStylesStickyHeader, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMarksFix : tooltipContainerStylesStickyHeaderWithMarksFix]
|
|
@@ -112,6 +112,8 @@ export const VisibilityContainer = ({
|
|
|
112
112
|
css: [baseStylesCSS, shouldHide ? hiddenStylesCSS : visibleStylesCSS]
|
|
113
113
|
}, children);
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
115
117
|
return jsx(Box, {
|
|
116
118
|
xcss: [baseStyles, shouldHide ? hiddenStyles : visibleStyles]
|
|
117
119
|
}, children);
|
|
@@ -1169,7 +1169,9 @@ export var DragHandle = function DragHandle(_ref3) {
|
|
|
1169
1169
|
return jsx(Box
|
|
1170
1170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1171
1171
|
, {
|
|
1172
|
-
style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1174
|
+
,
|
|
1173
1175
|
xcss: [dragHandleContainerStyles],
|
|
1174
1176
|
as: "span",
|
|
1175
1177
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1180,7 +1182,9 @@ export var DragHandle = function DragHandle(_ref3) {
|
|
|
1180
1182
|
helpDescriptors: helpDescriptors
|
|
1181
1183
|
}),
|
|
1182
1184
|
ignoreTooltipPointerEvents: true,
|
|
1183
|
-
position: 'top'
|
|
1185
|
+
position: 'top'
|
|
1186
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1187
|
+
,
|
|
1184
1188
|
onShow: function onShow() {
|
|
1185
1189
|
var _api$accessibilityUti;
|
|
1186
1190
|
api === null || api === void 0 || (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 || _api$accessibilityUti.actions.ariaNotify(message, {
|
|
@@ -1195,7 +1199,9 @@ export var DragHandle = function DragHandle(_ref3) {
|
|
|
1195
1199
|
return jsx(Box
|
|
1196
1200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
1197
1201
|
, {
|
|
1198
|
-
style: editorExperiment('platform_editor_block_control_optimise_render', true) ? positionStyles : positionStylesOld
|
|
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)
|
|
1204
|
+
,
|
|
1199
1205
|
xcss: [dragHandleContainerStyles],
|
|
1200
1206
|
as: "span",
|
|
1201
1207
|
testId: "block-ctrl-drag-handle-container"
|
|
@@ -1210,7 +1216,9 @@ export var DragHandle = function DragHandle(_ref3) {
|
|
|
1210
1216
|
content: jsx(TooltipContentWithMultipleShortcuts, {
|
|
1211
1217
|
helpDescriptors: helpDescriptors
|
|
1212
1218
|
}),
|
|
1213
|
-
ignoreTooltipPointerEvents: true
|
|
1219
|
+
ignoreTooltipPointerEvents: true
|
|
1220
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1221
|
+
,
|
|
1214
1222
|
onShow: function onShow() {
|
|
1215
1223
|
var _api$accessibilityUti2;
|
|
1216
1224
|
api === null || api === void 0 || (_api$accessibilityUti2 = api.accessibilityUtils) === null || _api$accessibilityUti2 === void 0 || _api$accessibilityUti2.actions.ariaNotify(message, {
|
|
@@ -234,10 +234,14 @@ export var DropTarget = function DropTarget(props) {
|
|
|
234
234
|
width: isNestedDropTarget ? 'unset' : '100%'
|
|
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
|
-
return jsx(Fragment, null, jsx(HoverZone
|
|
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)
|
|
239
|
+
, {
|
|
238
240
|
onDragEnter: function onDragEnter() {
|
|
239
241
|
return setIsDraggedOver(true);
|
|
240
|
-
}
|
|
242
|
+
}
|
|
243
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
244
|
+
,
|
|
241
245
|
onDragLeave: function onDragLeave() {
|
|
242
246
|
return setIsDraggedOver(false);
|
|
243
247
|
},
|
|
@@ -262,10 +266,14 @@ export var DropTarget = function DropTarget(props) {
|
|
|
262
266
|
"data-testid": "block-ctrl-drop-indicator"
|
|
263
267
|
}, jsx(DropIndicator, {
|
|
264
268
|
edge: "bottom"
|
|
265
|
-
}))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
|
|
269
|
+
}))), dropTargetStyle !== 'remainingHeight' && jsx(HoverZone
|
|
270
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
271
|
+
, {
|
|
266
272
|
onDragEnter: function onDragEnter() {
|
|
267
273
|
return setIsDraggedOver(true);
|
|
268
|
-
}
|
|
274
|
+
}
|
|
275
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
276
|
+
,
|
|
269
277
|
onDragLeave: function onDragLeave() {
|
|
270
278
|
return setIsDraggedOver(false);
|
|
271
279
|
},
|
|
@@ -462,7 +462,9 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
|
462
462
|
var isDragging = expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) ? isDraggingFromState : false;
|
|
463
463
|
var shouldRenderAnchors = isCSSAnchorSupported() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true);
|
|
464
464
|
var toolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
465
|
-
return jsx(Global
|
|
465
|
+
return jsx(Global
|
|
466
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
467
|
+
, {
|
|
466
468
|
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, {
|
|
467
469
|
exposure: true
|
|
468
470
|
}) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
@@ -336,7 +336,9 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
|
|
|
336
336
|
}, jsx(Pressable, {
|
|
337
337
|
testId: "editor-quick-insert-button",
|
|
338
338
|
type: "button",
|
|
339
|
-
"aria-label": formatMessage(messages.insert)
|
|
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)
|
|
341
|
+
,
|
|
340
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],
|
|
341
343
|
onClick: handleQuickInsert,
|
|
342
344
|
onMouseDown: handleMouseDown
|
|
@@ -349,7 +351,9 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
|
|
|
349
351
|
return jsx(Box
|
|
350
352
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
351
353
|
, {
|
|
352
|
-
style: positionStyles
|
|
354
|
+
style: positionStyles
|
|
355
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
356
|
+
,
|
|
353
357
|
xcss: [containerStaticStyles]
|
|
354
358
|
}, jsx("span", {
|
|
355
359
|
css: [tooltipContainerStyles, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerImprovedStylesStickyHeader : tooltipContainerStylesStickyHeader, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMarksFix : tooltipContainerStylesStickyHeaderWithMarksFix]
|
|
@@ -113,6 +113,8 @@ export var VisibilityContainer = function VisibilityContainer(_ref) {
|
|
|
113
113
|
css: [baseStylesCSS, shouldHide ? hiddenStylesCSS : visibleStylesCSS]
|
|
114
114
|
}, children);
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
116
118
|
return jsx(Box, {
|
|
117
119
|
xcss: [baseStyles, shouldHide ? hiddenStyles : visibleStyles]
|
|
118
120
|
}, children);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.17",
|
|
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": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^44.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^11.1.0",
|
|
61
61
|
"@atlaskit/tooltip": "^21.0.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|