@atlaskit/editor-plugin-block-controls 3.19.7 → 3.19.9
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 +17 -0
- package/dist/cjs/pm-plugins/decorations-drop-target-active.js +1 -1
- package/dist/cjs/ui/drag-handle.js +1 -2
- package/dist/cjs/ui/quick-insert-button.js +1 -1
- package/dist/cjs/ui/utils/document-checks.js +1 -2
- package/dist/es2019/pm-plugins/decorations-drop-target-active.js +1 -1
- package/dist/es2019/ui/drag-handle.js +1 -2
- package/dist/es2019/ui/quick-insert-button.js +1 -1
- package/dist/es2019/ui/utils/document-checks.js +1 -2
- package/dist/esm/pm-plugins/decorations-drop-target-active.js +1 -1
- package/dist/esm/ui/drag-handle.js +1 -2
- package/dist/esm/ui/quick-insert-button.js +1 -1
- package/dist/esm/ui/utils/document-checks.js +1 -2
- package/package.json +5 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 3.19.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
|
|
8
|
+
[`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
|
|
9
|
+
Clean up platform_editor_interaction_api_refactor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.19.8
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#174773](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174773)
|
|
17
|
+
[`d7f8b85a927ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d7f8b85a927ef) -
|
|
18
|
+
Fix drop target insertion into breakout mark
|
|
19
|
+
|
|
3
20
|
## 3.19.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -202,7 +202,7 @@ var getActiveDropTargetDecorations = exports.getActiveDropTargetDecorations = fu
|
|
|
202
202
|
parentNode: state.doc || undefined,
|
|
203
203
|
formatMessage: formatMessage,
|
|
204
204
|
dropTargetStyle: 'default'
|
|
205
|
-
}, nodeViewPortalProviderAPI,
|
|
205
|
+
}, nodeViewPortalProviderAPI, -1, undefined, false));
|
|
206
206
|
}
|
|
207
207
|
rootNodeWithPos = {
|
|
208
208
|
node: root.node,
|
|
@@ -299,7 +299,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
299
299
|
macroInteractionUpdates = _useDragHandlePluginS.macroInteractionUpdates;
|
|
300
300
|
var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
|
|
301
301
|
var isShiftDown = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isShiftDown');
|
|
302
|
-
var _hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.hasHadInteraction') !== false;
|
|
303
302
|
var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.interactionState');
|
|
304
303
|
var start = getPos();
|
|
305
304
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
@@ -846,7 +845,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
846
845
|
var handleOnDrop = function handleOnDrop(event) {
|
|
847
846
|
(0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
|
|
848
847
|
};
|
|
849
|
-
var hasHadInteraction = !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') ||
|
|
848
|
+
var hasHadInteraction = !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
|
|
850
849
|
var renderButton = function renderButton() {
|
|
851
850
|
return (
|
|
852
851
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
@@ -209,7 +209,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
|
|
|
209
209
|
var codeBlock = view.state.schema.nodes.codeBlock;
|
|
210
210
|
var selection = view.state.selection;
|
|
211
211
|
var codeBlockParentNode = (0, _utils.findParentNodeOfType)(codeBlock)(selection);
|
|
212
|
-
if (codeBlockParentNode
|
|
212
|
+
if (codeBlockParentNode) {
|
|
213
213
|
// Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
|
|
214
214
|
api.core.actions.execute((0, _editorCommands.createNewLine)(codeBlockParentNode.pos));
|
|
215
215
|
} else if (isSelectionInsideNode) {
|
|
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isSelectionInNode = exports.isNonEditableBlock = exports.isNestedNodeSelected = exports.isInTextSelection = void 0;
|
|
7
7
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
8
|
var isNestedNodeSelected = exports.isNestedNodeSelected = function isNestedNodeSelected(view) {
|
|
10
9
|
var selection = view.state.selection;
|
|
11
|
-
return selection instanceof _state.NodeSelection && selection.$from.depth >
|
|
10
|
+
return selection instanceof _state.NodeSelection && selection.$from.depth > 0;
|
|
12
11
|
};
|
|
13
12
|
var isSelectionInNode = exports.isSelectionInNode = function isSelectionInNode(start, view) {
|
|
14
13
|
var node = view.state.doc.nodeAt(start);
|
|
@@ -185,7 +185,7 @@ export const getActiveDropTargetDecorations = (activeDropTargetNode, state, api,
|
|
|
185
185
|
parentNode: state.doc || undefined,
|
|
186
186
|
formatMessage,
|
|
187
187
|
dropTargetStyle: 'default'
|
|
188
|
-
}, nodeViewPortalProviderAPI,
|
|
188
|
+
}, nodeViewPortalProviderAPI, -1, undefined, false));
|
|
189
189
|
}
|
|
190
190
|
rootNodeWithPos = {
|
|
191
191
|
node: root.node,
|
|
@@ -278,7 +278,6 @@ export const DragHandle = ({
|
|
|
278
278
|
} = useDragHandlePluginState(api);
|
|
279
279
|
const selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
280
280
|
const isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
|
|
281
|
-
const _hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
|
|
282
281
|
const interactionState = useSharedPluginStateSelector(api, 'interaction.interactionState');
|
|
283
282
|
const start = getPos();
|
|
284
283
|
const isLayoutColumn = nodeType === 'layoutColumn';
|
|
@@ -834,7 +833,7 @@ export const DragHandle = ({
|
|
|
834
833
|
const handleOnDrop = event => {
|
|
835
834
|
editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
|
|
836
835
|
};
|
|
837
|
-
const hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') ||
|
|
836
|
+
const hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
|
|
838
837
|
const renderButton = () =>
|
|
839
838
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
840
839
|
jsx("button", {
|
|
@@ -204,7 +204,7 @@ export const TypeAheadControl = ({
|
|
|
204
204
|
selection
|
|
205
205
|
} = view.state;
|
|
206
206
|
const codeBlockParentNode = findParentNodeOfType(codeBlock)(selection);
|
|
207
|
-
if (codeBlockParentNode
|
|
207
|
+
if (codeBlockParentNode) {
|
|
208
208
|
// Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
|
|
209
209
|
api.core.actions.execute(createNewLine(codeBlockParentNode.pos));
|
|
210
210
|
} else if (isSelectionInsideNode) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
export const isNestedNodeSelected = view => {
|
|
4
3
|
const selection = view.state.selection;
|
|
5
|
-
return selection instanceof NodeSelection && selection.$from.depth >
|
|
4
|
+
return selection instanceof NodeSelection && selection.$from.depth > 0;
|
|
6
5
|
};
|
|
7
6
|
export const isSelectionInNode = (start, view) => {
|
|
8
7
|
const node = view.state.doc.nodeAt(start);
|
|
@@ -197,7 +197,7 @@ export var getActiveDropTargetDecorations = function getActiveDropTargetDecorati
|
|
|
197
197
|
parentNode: state.doc || undefined,
|
|
198
198
|
formatMessage: formatMessage,
|
|
199
199
|
dropTargetStyle: 'default'
|
|
200
|
-
}, nodeViewPortalProviderAPI,
|
|
200
|
+
}, nodeViewPortalProviderAPI, -1, undefined, false));
|
|
201
201
|
}
|
|
202
202
|
rootNodeWithPos = {
|
|
203
203
|
node: root.node,
|
|
@@ -296,7 +296,6 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
296
296
|
macroInteractionUpdates = _useDragHandlePluginS.macroInteractionUpdates;
|
|
297
297
|
var selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
298
298
|
var isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
|
|
299
|
-
var _hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
|
|
300
299
|
var interactionState = useSharedPluginStateSelector(api, 'interaction.interactionState');
|
|
301
300
|
var start = getPos();
|
|
302
301
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
@@ -843,7 +842,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
843
842
|
var handleOnDrop = function handleOnDrop(event) {
|
|
844
843
|
editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
|
|
845
844
|
};
|
|
846
|
-
var hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') ||
|
|
845
|
+
var hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
|
|
847
846
|
var renderButton = function renderButton() {
|
|
848
847
|
return (
|
|
849
848
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
@@ -204,7 +204,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
|
|
|
204
204
|
var codeBlock = view.state.schema.nodes.codeBlock;
|
|
205
205
|
var selection = view.state.selection;
|
|
206
206
|
var codeBlockParentNode = findParentNodeOfType(codeBlock)(selection);
|
|
207
|
-
if (codeBlockParentNode
|
|
207
|
+
if (codeBlockParentNode) {
|
|
208
208
|
// Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
|
|
209
209
|
api.core.actions.execute(createNewLine(codeBlockParentNode.pos));
|
|
210
210
|
} else if (isSelectionInsideNode) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
export var isNestedNodeSelected = function isNestedNodeSelected(view) {
|
|
4
3
|
var selection = view.state.selection;
|
|
5
|
-
return selection instanceof NodeSelection && selection.$from.depth >
|
|
4
|
+
return selection instanceof NodeSelection && selection.$from.depth > 0;
|
|
6
5
|
};
|
|
7
6
|
export var isSelectionInNode = function isSelectionInNode(start, view) {
|
|
8
7
|
var node = view.state.doc.nodeAt(start);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.9",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
36
|
-
"@atlaskit/editor-common": "^107.
|
|
36
|
+
"@atlaskit/editor-common": "^107.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
41
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
41
|
+
"@atlaskit/editor-plugin-interaction": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-metrics": "^3.5.0",
|
|
43
43
|
"@atlaskit/editor-plugin-quick-insert": "^2.6.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
49
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
51
|
-
"@atlaskit/icon": "^27.
|
|
51
|
+
"@atlaskit/icon": "^27.1.0",
|
|
52
52
|
"@atlaskit/link": "^3.2.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/primitives": "^14.9.0",
|
|
58
58
|
"@atlaskit/theme": "^18.0.0",
|
|
59
59
|
"@atlaskit/tmp-editor-statsig": "^8.0.0",
|
|
60
|
-
"@atlaskit/tokens": "^5.
|
|
60
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.3.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
@@ -177,15 +177,9 @@
|
|
|
177
177
|
"platform_editor_table_drag_handle_shift_fix": {
|
|
178
178
|
"type": "boolean"
|
|
179
179
|
},
|
|
180
|
-
"platform_editor_interaction_api_refactor": {
|
|
181
|
-
"type": "boolean"
|
|
182
|
-
},
|
|
183
180
|
"dst-a11y__replace-anchor-with-link__editor-jenga": {
|
|
184
181
|
"type": "boolean"
|
|
185
182
|
},
|
|
186
|
-
"platform_editor_controls_patch_11": {
|
|
187
|
-
"type": "boolean"
|
|
188
|
-
},
|
|
189
183
|
"platform_editor_controls_patch_13": {
|
|
190
184
|
"type": "boolean"
|
|
191
185
|
},
|