@atlaskit/editor-plugin-block-controls 7.12.1 → 7.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/pm-plugins/handle-mouse-over.js +1 -1
- package/dist/cjs/ui/global-styles.js +3 -3
- package/dist/es2019/pm-plugins/handle-mouse-over.js +1 -1
- package/dist/es2019/ui/global-styles.js +3 -3
- package/dist/esm/pm-plugins/handle-mouse-over.js +1 -1
- package/dist/esm/ui/global-styles.js +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 7.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b3a509f727a0f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b3a509f727a0f) -
|
|
8
|
+
ED-29696 update CSS anchor selector to enable less anchors
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 7.12.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -32,7 +32,7 @@ var getNodeSelector = function getNodeSelector(ignoreNodes, ignoreNodeDescendant
|
|
|
32
32
|
var ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(function (node) {
|
|
33
33
|
if (node === 'table') {
|
|
34
34
|
// Special case for table to exclude its direct descendants
|
|
35
|
-
return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]"];
|
|
35
|
+
return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableCell\"] > *:not([data-node-anchor]) > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > *:not([data-node-anchor]) > [data-node-anchor]"];
|
|
36
36
|
}
|
|
37
37
|
return "[data-prosemirror-node-name=\"".concat(node, "\"] [data-node-anchor]");
|
|
38
38
|
});
|
|
@@ -407,11 +407,11 @@ var blockCardWithoutLayout = (0, _react.css)({
|
|
|
407
407
|
});
|
|
408
408
|
var nextAnchorSelector = ['&[data-node-anchor]',
|
|
409
409
|
// adjacent sibling with anchor
|
|
410
|
-
'&:not([data-node-anchor]) [data-node-anchor]',
|
|
411
|
-
// nested anchor inside adjacent sibling
|
|
410
|
+
'&:not([data-node-anchor]) [data-node-anchor]:first-of-type',
|
|
411
|
+
// first nested anchor inside adjacent sibling
|
|
412
412
|
'&.ProseMirror-widget + [data-node-anchor]',
|
|
413
413
|
// adjacent sibling with anchor (when next to a widget like gap cursor)
|
|
414
|
-
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]' // nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
414
|
+
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]:first-of-type' // first nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
415
415
|
].join(', ');
|
|
416
416
|
var dragHandlerAnchorStyles = (0, _react.css)({
|
|
417
417
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -22,7 +22,7 @@ const getNodeSelector = (ignoreNodes, ignoreNodeDescendants) => {
|
|
|
22
22
|
const ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(node => {
|
|
23
23
|
if (node === 'table') {
|
|
24
24
|
// Special case for table to exclude its direct descendants
|
|
25
|
-
return [`[data-prosemirror-node-name="tableCell"] > [data-node-anchor]`, `[data-prosemirror-node-name="tableHeader"] > [data-node-anchor]`];
|
|
25
|
+
return [`[data-prosemirror-node-name="tableCell"] > [data-node-anchor]`, `[data-prosemirror-node-name="tableCell"] > *:not([data-node-anchor]) > [data-node-anchor]`, `[data-prosemirror-node-name="tableHeader"] > [data-node-anchor]`, `[data-prosemirror-node-name="tableHeader"] > *:not([data-node-anchor]) > [data-node-anchor]`];
|
|
26
26
|
}
|
|
27
27
|
return `[data-prosemirror-node-name="${node}"] [data-node-anchor]`;
|
|
28
28
|
});
|
|
@@ -485,11 +485,11 @@ const blockCardWithoutLayout = css({
|
|
|
485
485
|
});
|
|
486
486
|
const nextAnchorSelector = ['&[data-node-anchor]',
|
|
487
487
|
// adjacent sibling with anchor
|
|
488
|
-
'&:not([data-node-anchor]) [data-node-anchor]',
|
|
489
|
-
// nested anchor inside adjacent sibling
|
|
488
|
+
'&:not([data-node-anchor]) [data-node-anchor]:first-of-type',
|
|
489
|
+
// first nested anchor inside adjacent sibling
|
|
490
490
|
'&.ProseMirror-widget + [data-node-anchor]',
|
|
491
491
|
// adjacent sibling with anchor (when next to a widget like gap cursor)
|
|
492
|
-
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]' // nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
492
|
+
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]:first-of-type' // first nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
493
493
|
].join(', ');
|
|
494
494
|
const dragHandlerAnchorStyles = css({
|
|
495
495
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -25,7 +25,7 @@ var getNodeSelector = function getNodeSelector(ignoreNodes, ignoreNodeDescendant
|
|
|
25
25
|
var ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(function (node) {
|
|
26
26
|
if (node === 'table') {
|
|
27
27
|
// Special case for table to exclude its direct descendants
|
|
28
|
-
return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]"];
|
|
28
|
+
return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableCell\"] > *:not([data-node-anchor]) > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > *:not([data-node-anchor]) > [data-node-anchor]"];
|
|
29
29
|
}
|
|
30
30
|
return "[data-prosemirror-node-name=\"".concat(node, "\"] [data-node-anchor]");
|
|
31
31
|
});
|
|
@@ -400,11 +400,11 @@ var blockCardWithoutLayout = css({
|
|
|
400
400
|
});
|
|
401
401
|
var nextAnchorSelector = ['&[data-node-anchor]',
|
|
402
402
|
// adjacent sibling with anchor
|
|
403
|
-
'&:not([data-node-anchor]) [data-node-anchor]',
|
|
404
|
-
// nested anchor inside adjacent sibling
|
|
403
|
+
'&:not([data-node-anchor]) [data-node-anchor]:first-of-type',
|
|
404
|
+
// first nested anchor inside adjacent sibling
|
|
405
405
|
'&.ProseMirror-widget + [data-node-anchor]',
|
|
406
406
|
// adjacent sibling with anchor (when next to a widget like gap cursor)
|
|
407
|
-
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]' // nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
407
|
+
'&.ProseMirror-widget + :not([data-node-anchor]) [data-node-anchor]:first-of-type' // first nested anchor inside adjacent sibling (when next to a widget like gap cursor)
|
|
408
408
|
].join(', ');
|
|
409
409
|
var dragHandlerAnchorStyles = css({
|
|
410
410
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.13.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^16.4.0",
|
|
56
56
|
"@atlaskit/theme": "^21.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^14.7.0",
|
|
58
58
|
"@atlaskit/tokens": "^8.4.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.10.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"uuid": "^3.1.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@atlaskit/editor-common": "^110.
|
|
69
|
+
"@atlaskit/editor-common": "^110.39.0",
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
72
|
"react-intl-next": "npm:react-intl@^5.18.1"
|