@atlaskit/editor-plugin-block-menu 6.0.48 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 6.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`042eb4751bd4d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/042eb4751bd4d) -
|
|
8
|
+
[ux] Cleanup fg: platform_editor_table_transform_selection_fix
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 6.0.48
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -98,21 +98,13 @@ var transformNode = exports.transformNode = function transformNode(api) {
|
|
|
98
98
|
} else {
|
|
99
99
|
tr.replaceWith(sliceStart, $to.pos, content);
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
// [FEATURE FLAG: platform_editor_table_transform_selection_fix]
|
|
103
|
-
// Fixes table cell selection not being preserved after transform to expand/layout.
|
|
104
|
-
// When a table with CellSelection is transformed, we need to re-select the wrapper node.
|
|
105
|
-
// To clean up: remove the if-else block and keep only the flag-on behavior.
|
|
106
|
-
if (preservedSelection instanceof _editorTables.CellSelection && (0, _platformFeatureFlags.fg)('platform_editor_table_transform_selection_fix')) {
|
|
101
|
+
if (preservedSelection instanceof _editorTables.CellSelection) {
|
|
107
102
|
var insertedNode = tr.doc.nodeAt($from.pos);
|
|
108
103
|
var isSelectable = insertedNode && _state.NodeSelection.isSelectable(insertedNode);
|
|
109
104
|
if (isSelectable) {
|
|
110
105
|
var _api$blockControls3;
|
|
111
106
|
var nodeSelection = _state.NodeSelection.create(tr.doc, $from.pos);
|
|
112
107
|
tr.setSelection(nodeSelection);
|
|
113
|
-
|
|
114
|
-
// Update preserved selection to match the new NodeSelection
|
|
115
|
-
// This prevents appendTransaction from restoring the old table selection positions
|
|
116
108
|
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || _api$blockControls3.commands.startPreservingSelection()({
|
|
117
109
|
tr: tr
|
|
118
110
|
});
|
|
@@ -92,21 +92,13 @@ export const transformNode = api => (targetType, metadata) => ({
|
|
|
92
92
|
} else {
|
|
93
93
|
tr.replaceWith(sliceStart, $to.pos, content);
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
// [FEATURE FLAG: platform_editor_table_transform_selection_fix]
|
|
97
|
-
// Fixes table cell selection not being preserved after transform to expand/layout.
|
|
98
|
-
// When a table with CellSelection is transformed, we need to re-select the wrapper node.
|
|
99
|
-
// To clean up: remove the if-else block and keep only the flag-on behavior.
|
|
100
|
-
if (preservedSelection instanceof CellSelection && fg('platform_editor_table_transform_selection_fix')) {
|
|
95
|
+
if (preservedSelection instanceof CellSelection) {
|
|
101
96
|
const insertedNode = tr.doc.nodeAt($from.pos);
|
|
102
97
|
const isSelectable = insertedNode && NodeSelection.isSelectable(insertedNode);
|
|
103
98
|
if (isSelectable) {
|
|
104
99
|
var _api$blockControls3;
|
|
105
100
|
const nodeSelection = NodeSelection.create(tr.doc, $from.pos);
|
|
106
101
|
tr.setSelection(nodeSelection);
|
|
107
|
-
|
|
108
|
-
// Update preserved selection to match the new NodeSelection
|
|
109
|
-
// This prevents appendTransaction from restoring the old table selection positions
|
|
110
102
|
api === null || api === void 0 ? void 0 : (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 ? void 0 : _api$blockControls3.commands.startPreservingSelection()({
|
|
111
103
|
tr
|
|
112
104
|
});
|
|
@@ -92,21 +92,13 @@ export var transformNode = function transformNode(api) {
|
|
|
92
92
|
} else {
|
|
93
93
|
tr.replaceWith(sliceStart, $to.pos, content);
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
// [FEATURE FLAG: platform_editor_table_transform_selection_fix]
|
|
97
|
-
// Fixes table cell selection not being preserved after transform to expand/layout.
|
|
98
|
-
// When a table with CellSelection is transformed, we need to re-select the wrapper node.
|
|
99
|
-
// To clean up: remove the if-else block and keep only the flag-on behavior.
|
|
100
|
-
if (preservedSelection instanceof CellSelection && fg('platform_editor_table_transform_selection_fix')) {
|
|
95
|
+
if (preservedSelection instanceof CellSelection) {
|
|
101
96
|
var insertedNode = tr.doc.nodeAt($from.pos);
|
|
102
97
|
var isSelectable = insertedNode && NodeSelection.isSelectable(insertedNode);
|
|
103
98
|
if (isSelectable) {
|
|
104
99
|
var _api$blockControls3;
|
|
105
100
|
var nodeSelection = NodeSelection.create(tr.doc, $from.pos);
|
|
106
101
|
tr.setSelection(nodeSelection);
|
|
107
|
-
|
|
108
|
-
// Update preserved selection to match the new NodeSelection
|
|
109
|
-
// This prevents appendTransaction from restoring the old table selection positions
|
|
110
102
|
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || _api$blockControls3.commands.startPreservingSelection()({
|
|
111
103
|
tr: tr
|
|
112
104
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/css": "^0.19.0",
|
|
33
33
|
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
35
|
-
"@atlaskit/editor-plugin-block-controls": "^8.
|
|
35
|
+
"@atlaskit/editor-plugin-block-controls": "^8.5.0",
|
|
36
36
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-user-intent": "^5.0.0",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
47
47
|
"@atlaskit/primitives": "^18.0.0",
|
|
48
48
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^29.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^29.4.0",
|
|
50
50
|
"@atlaskit/tokens": "^11.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"bind-event-listener": "^3.0.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^111.
|
|
55
|
+
"@atlaskit/editor-common": "^111.19.0",
|
|
56
56
|
"react": "^18.2.0",
|
|
57
57
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
58
58
|
},
|
|
@@ -102,9 +102,6 @@
|
|
|
102
102
|
"platform_editor_block_menu_v2_patch_2": {
|
|
103
103
|
"type": "boolean"
|
|
104
104
|
},
|
|
105
|
-
"platform_editor_table_transform_selection_fix": {
|
|
106
|
-
"type": "boolean"
|
|
107
|
-
},
|
|
108
105
|
"platform_editor_preserve_breakout_on_transform": {
|
|
109
106
|
"type": "boolean"
|
|
110
107
|
}
|