@atlaskit/editor-plugin-block-controls 7.4.0 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/ui/global-styles.js +22 -13
- package/dist/es2019/ui/global-styles.js +30 -16
- package/dist/esm/ui/global-styles.js +22 -13
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 7.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9ca86d5ced1c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ca86d5ced1c4) -
|
|
8
|
+
ED-294112 fix extended hover zone for platform_editor_native_anchor_support to match existing
|
|
9
|
+
behaviour; no hover zones for inline elements, headerCells or (when advanced_layouts is off)
|
|
10
|
+
layout columns
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 7.4.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -27,7 +27,10 @@ var _domAttrName = require("./utils/dom-attr-name");
|
|
|
27
27
|
* including those within table rows and media.
|
|
28
28
|
*/
|
|
29
29
|
var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
|
|
32
|
+
*/
|
|
33
|
+
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\"])");
|
|
31
34
|
var gutterPaddingWidth = function gutterPaddingWidth() {
|
|
32
35
|
return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
|
|
33
36
|
};
|
|
@@ -95,7 +98,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
|
|
|
95
98
|
return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelectorNext, "::after"), {
|
|
96
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
97
100
|
display: 'none !important'
|
|
98
|
-
}), '.ProseMirror', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
101
|
+
}), '.ProseMirror', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "&& ".concat(dragHandlerAnchorSelectorNext, "::after"), {
|
|
99
102
|
content: '""',
|
|
100
103
|
position: 'absolute',
|
|
101
104
|
top: 0,
|
|
@@ -122,32 +125,38 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
|
|
|
122
125
|
content: '""',
|
|
123
126
|
position: 'absolute',
|
|
124
127
|
top: 0,
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
126
128
|
left: 0,
|
|
127
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
128
129
|
width: 0,
|
|
129
130
|
height: '100%',
|
|
130
131
|
cursor: 'default',
|
|
131
132
|
zIndex: 1
|
|
132
|
-
}),
|
|
133
|
+
})), 'hr[data-drag-handler-anchor-name]', {
|
|
134
|
+
overflow: 'visible'
|
|
135
|
+
}), "[data-blocks-drag-handle-container=\"true\"] + ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])::after"), {
|
|
136
|
+
display: 'none'
|
|
137
|
+
}));
|
|
138
|
+
};
|
|
139
|
+
var layoutColumnExtendedHoverZone = (0, _react.css)({
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
141
|
+
'.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
|
|
133
142
|
content: '""',
|
|
134
143
|
position: 'absolute',
|
|
135
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
136
145
|
top: "".concat(-_styles.DRAG_HANDLE_WIDTH / 2, "px"),
|
|
137
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
138
146
|
left: 0,
|
|
139
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
140
147
|
width: '100%',
|
|
141
148
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
142
149
|
height: "".concat(_styles.DRAG_HANDLE_WIDTH, "px"),
|
|
143
150
|
cursor: 'default',
|
|
144
151
|
zIndex: 1
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
var layoutColumnWithoutHoverZone = (0, _react.css)({
|
|
155
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
156
|
+
'.ProseMirror': (0, _defineProperty2.default)({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
|
|
148
157
|
display: 'none'
|
|
149
|
-
})
|
|
150
|
-
};
|
|
158
|
+
})
|
|
159
|
+
});
|
|
151
160
|
var extendHoverZoneReduced = (0, _react.css)({
|
|
152
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
153
162
|
'.ProseMirror': (0, _defineProperty2.default)({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), (0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
|
|
@@ -403,6 +412,6 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
|
|
|
403
412
|
return (0, _react.jsx)(_react.Global, {
|
|
404
413
|
styles: [globalStyles(), globalDnDStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
405
414
|
exposure: true
|
|
406
|
-
}) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle]
|
|
415
|
+
}) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_support', 'isEnabled', true) && (0, _expValEquals.expValEquals)('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone]
|
|
407
416
|
});
|
|
408
417
|
};
|
|
@@ -19,7 +19,10 @@ import { NODE_ANCHOR_ATTR_NAME } from './utils/dom-attr-name';
|
|
|
19
19
|
* including those within table rows and media.
|
|
20
20
|
*/
|
|
21
21
|
const dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
|
|
24
|
+
*/
|
|
25
|
+
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"])`;
|
|
23
26
|
const gutterPaddingWidth = () => editorExperiment('platform_editor_controls', 'variant1') ? `${akEditorGutterPaddingDynamic()}px` : '100%';
|
|
24
27
|
const gutterPaddingLeft = () => editorExperiment('platform_editor_controls', 'variant1') ? `-${akEditorGutterPaddingDynamic()}px` : '-100px';
|
|
25
28
|
const extendedHoverZone = () => css({
|
|
@@ -140,14 +143,27 @@ const extendedHoverZoneNext = () => css({
|
|
|
140
143
|
content: '""',
|
|
141
144
|
position: 'absolute',
|
|
142
145
|
top: 0,
|
|
143
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
144
146
|
left: 0,
|
|
145
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
146
147
|
width: 0,
|
|
147
148
|
height: '100%',
|
|
148
149
|
cursor: 'default',
|
|
149
150
|
zIndex: 1
|
|
150
|
-
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
// TODO: ED-23995 - this style override needs to be moved to the Rule styles after FF cleanup packages/editor/editor-common/src/styles/shared/rule.ts
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
155
|
+
'hr[data-drag-handler-anchor-name]': {
|
|
156
|
+
overflow: 'visible'
|
|
157
|
+
},
|
|
158
|
+
//Hide pseudo element at top depth level. Leave for nested depths to prevent mouseover loop.
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
160
|
+
[`[data-blocks-drag-handle-container="true"] + ${dragHandlerAnchorSelectorNext}:not([${NODE_ANCHOR_ATTR_NAME}] [${NODE_ANCHOR_ATTR_NAME}])::after`]: {
|
|
161
|
+
display: 'none'
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
const layoutColumnExtendedHoverZone = css({
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
|
+
'.ProseMirror': {
|
|
151
167
|
// hover zone for layout column should be placed near the top of the column (where drag handle is)
|
|
152
168
|
// 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
|
|
153
169
|
[`&&& ${dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
|
|
@@ -155,25 +171,23 @@ const extendedHoverZoneNext = () => css({
|
|
|
155
171
|
position: 'absolute',
|
|
156
172
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
157
173
|
top: `${-DRAG_HANDLE_WIDTH / 2}px`,
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
159
174
|
left: 0,
|
|
160
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
161
175
|
width: '100%',
|
|
162
176
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
163
177
|
height: `${DRAG_HANDLE_WIDTH}px`,
|
|
164
178
|
cursor: 'default',
|
|
165
179
|
zIndex: 1
|
|
166
180
|
}
|
|
167
|
-
}
|
|
168
|
-
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
const layoutColumnWithoutHoverZone = css({
|
|
169
184
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
170
|
-
'
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
display: 'none'
|
|
185
|
+
'.ProseMirror': {
|
|
186
|
+
// when advanced_layouts is off, layout columns should not have hover zones, because there aren't any drag handles for layout columns
|
|
187
|
+
// 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
|
|
188
|
+
[`&&& ${dragHandlerAnchorSelectorNext}[data-layout-column]::after`]: {
|
|
189
|
+
display: 'none'
|
|
190
|
+
}
|
|
177
191
|
}
|
|
178
192
|
});
|
|
179
193
|
const extendHoverZoneReduced = css({
|
|
@@ -477,6 +491,6 @@ export const GlobalStylesWrapper = ({
|
|
|
477
491
|
return jsx(Global, {
|
|
478
492
|
styles: [globalStyles(), globalDnDStyle, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && (expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
479
493
|
exposure: true
|
|
480
|
-
}) ? expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle]
|
|
494
|
+
}) ? expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone]
|
|
481
495
|
});
|
|
482
496
|
};
|
|
@@ -20,7 +20,10 @@ import { NODE_ANCHOR_ATTR_NAME } from './utils/dom-attr-name';
|
|
|
20
20
|
* including those within table rows and media.
|
|
21
21
|
*/
|
|
22
22
|
var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Disregards anchors that can not have handles next to them, and so shouldn't have an extended hover zone
|
|
25
|
+
*/
|
|
26
|
+
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\"])");
|
|
24
27
|
var gutterPaddingWidth = function gutterPaddingWidth() {
|
|
25
28
|
return editorExperiment('platform_editor_controls', 'variant1') ? "".concat(akEditorGutterPaddingDynamic(), "px") : '100%';
|
|
26
29
|
};
|
|
@@ -88,7 +91,7 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
|
|
|
88
91
|
return css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelectorNext, "::after"), {
|
|
89
92
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
90
93
|
display: 'none !important'
|
|
91
|
-
}), '.ProseMirror', _defineProperty(_defineProperty(_defineProperty(
|
|
94
|
+
}), '.ProseMirror', _defineProperty(_defineProperty(_defineProperty({}, "&& ".concat(dragHandlerAnchorSelectorNext, "::after"), {
|
|
92
95
|
content: '""',
|
|
93
96
|
position: 'absolute',
|
|
94
97
|
top: 0,
|
|
@@ -115,32 +118,38 @@ var extendedHoverZoneNext = function extendedHoverZoneNext() {
|
|
|
115
118
|
content: '""',
|
|
116
119
|
position: 'absolute',
|
|
117
120
|
top: 0,
|
|
118
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
119
121
|
left: 0,
|
|
120
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
121
122
|
width: 0,
|
|
122
123
|
height: '100%',
|
|
123
124
|
cursor: 'default',
|
|
124
125
|
zIndex: 1
|
|
125
|
-
}),
|
|
126
|
+
})), 'hr[data-drag-handler-anchor-name]', {
|
|
127
|
+
overflow: 'visible'
|
|
128
|
+
}), "[data-blocks-drag-handle-container=\"true\"] + ".concat(dragHandlerAnchorSelectorNext, ":not([").concat(NODE_ANCHOR_ATTR_NAME, "] [").concat(NODE_ANCHOR_ATTR_NAME, "])::after"), {
|
|
129
|
+
display: 'none'
|
|
130
|
+
}));
|
|
131
|
+
};
|
|
132
|
+
var layoutColumnExtendedHoverZone = css({
|
|
133
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
134
|
+
'.ProseMirror': _defineProperty({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
|
|
126
135
|
content: '""',
|
|
127
136
|
position: 'absolute',
|
|
128
137
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
129
138
|
top: "".concat(-DRAG_HANDLE_WIDTH / 2, "px"),
|
|
130
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
131
139
|
left: 0,
|
|
132
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
140
|
width: '100%',
|
|
134
141
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
135
142
|
height: "".concat(DRAG_HANDLE_WIDTH, "px"),
|
|
136
143
|
cursor: 'default',
|
|
137
144
|
zIndex: 1
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
var layoutColumnWithoutHoverZone = css({
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
149
|
+
'.ProseMirror': _defineProperty({}, "&&& ".concat(dragHandlerAnchorSelectorNext, "[data-layout-column]::after"), {
|
|
141
150
|
display: 'none'
|
|
142
|
-
})
|
|
143
|
-
};
|
|
151
|
+
})
|
|
152
|
+
});
|
|
144
153
|
var extendHoverZoneReduced = css({
|
|
145
154
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
146
155
|
'.ProseMirror': _defineProperty({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), _defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
|
|
@@ -396,6 +405,6 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
|
396
405
|
return jsx(Global, {
|
|
397
406
|
styles: [globalStyles(), globalDnDStyle, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && (expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
398
407
|
exposure: true
|
|
399
|
-
}) ? expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle]
|
|
408
|
+
}) ? expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_support', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone]
|
|
400
409
|
});
|
|
401
410
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
53
53
|
"@atlaskit/primitives": "^16.0.0",
|
|
54
54
|
"@atlaskit/theme": "^21.0.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^13.17.0",
|
|
56
56
|
"@atlaskit/tokens": "^7.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^20.6.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"uuid": "^3.1.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^110.
|
|
67
|
+
"@atlaskit/editor-common": "^110.16.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-dom": "^18.2.0",
|
|
70
70
|
"react-intl-next": "npm:react-intl@^5.18.1"
|