@atlaskit/editor-plugin-block-controls 8.0.14 → 8.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 +21 -0
- package/dist/cjs/blockControlsPlugin.js +1 -1
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/cjs/pm-plugins/handle-mouse-down.js +10 -13
- package/dist/cjs/pm-plugins/utils/selection.js +61 -2
- package/dist/cjs/ui/drag-handle-nested-icon.js +64 -0
- package/dist/cjs/ui/drag-handle.js +43 -18
- package/dist/es2019/blockControlsPlugin.js +1 -1
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/es2019/pm-plugins/handle-mouse-down.js +10 -13
- package/dist/es2019/pm-plugins/utils/selection.js +56 -1
- package/dist/es2019/ui/drag-handle-nested-icon.js +57 -0
- package/dist/es2019/ui/drag-handle.js +44 -19
- package/dist/esm/blockControlsPlugin.js +1 -1
- package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/esm/pm-plugins/handle-mouse-down.js +10 -13
- package/dist/esm/pm-plugins/utils/selection.js +60 -1
- package/dist/esm/ui/drag-handle-nested-icon.js +57 -0
- package/dist/esm/ui/drag-handle.js +44 -19
- package/dist/types/pm-plugins/utils/selection.d.ts +15 -0
- package/dist/types/ui/drag-handle-nested-icon.d.ts +12 -0
- package/dist/types/ui/drag-handle.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/selection.d.ts +15 -0
- package/dist/types-ts4.5/ui/drag-handle-nested-icon.d.ts +12 -0
- package/dist/types-ts4.5/ui/drag-handle.d.ts +1 -1
- package/package.json +4 -7
|
@@ -39,6 +39,21 @@ export declare const alignAnchorHeadInDirectionOfPos: (selection: Selection, pos
|
|
|
39
39
|
* @returns The mapped selection or undefined if mapping is not possible
|
|
40
40
|
*/
|
|
41
41
|
export declare const mapPreservedSelection: (selection: Selection, tr: ReadonlyTransaction | Transaction) => Selection | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Adjust selection bounds to exclude nodes where the selection only touches
|
|
44
|
+
* the edge position without selecting any content.
|
|
45
|
+
*
|
|
46
|
+
* Exception: Don't adjust if the selection is inside an empty textblock,
|
|
47
|
+
* as we want to include empty paragraphs in block operations.
|
|
48
|
+
*
|
|
49
|
+
* @param $from The resolved position of the start of the selection
|
|
50
|
+
* @param $to The resolved position of the end of the selection
|
|
51
|
+
* @returns Adjusted $from and $to positions
|
|
52
|
+
*/
|
|
53
|
+
export declare const adjustSelectionBoundsForEdgePositions: ($from: ResolvedPos, $to: ResolvedPos) => {
|
|
54
|
+
$from: ResolvedPos;
|
|
55
|
+
$to: ResolvedPos;
|
|
56
|
+
};
|
|
42
57
|
/**
|
|
43
58
|
* Creates a preserved selection which is expanded to block boundaries.
|
|
44
59
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsxRuntime classic */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
/**
|
|
8
|
+
* Custom 3-dot vertical drag handle icon for nested nodes.
|
|
9
|
+
* Similar to DragHandleVerticalIcon but with only 3 dots instead of 6.
|
|
10
|
+
* Hardcoded to medium size with spacious spacing.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DragHandleNestedIcon: () => jsx.JSX.Element;
|
|
@@ -16,5 +16,5 @@ type DragHandleProps = {
|
|
|
16
16
|
view: EditorView;
|
|
17
17
|
};
|
|
18
18
|
export declare const DragHandle: ({ view, api, formatMessage, getPos, anchorName, nodeType, handleOptions, isTopLevelNode, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
|
|
19
|
-
export declare const DragHandleWithVisibility: ({ view, api, formatMessage, getPos, anchorName, nodeType, handleOptions, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
|
|
19
|
+
export declare const DragHandleWithVisibility: ({ view, api, formatMessage, getPos, anchorName, nodeType, handleOptions, isTopLevelNode, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
|
|
20
20
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-toolbar": "^4.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-type-ahead": "^7.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-user-intent": "^5.0.0",
|
|
45
|
-
"@atlaskit/editor-plugin-width": "^8.
|
|
45
|
+
"@atlaskit/editor-plugin-width": "^8.1.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^17.1.0",
|
|
56
56
|
"@atlaskit/theme": "^21.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^17.0.0",
|
|
58
58
|
"@atlaskit/tokens": "^10.1.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.14.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": "^111.
|
|
69
|
+
"@atlaskit/editor-common": "^111.9.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"
|
|
@@ -137,9 +137,6 @@
|
|
|
137
137
|
"platform_editor_content_mode_button_mvp": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
-
"platform_editor_toolbar_aifc_user_intent_fix": {
|
|
141
|
-
"type": "boolean"
|
|
142
|
-
},
|
|
143
140
|
"platform_editor_table_sticky_header_patch_6": {
|
|
144
141
|
"type": "boolean"
|
|
145
142
|
},
|