@atlaskit/editor-plugin-block-controls 4.2.3 → 4.2.4

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/types/blockControlsPluginType.d.ts +34 -34
  3. package/dist/types/editor-commands/move-to-layout.d.ts +1 -1
  4. package/dist/types/editor-commands/utils/move-node-utils.d.ts +3 -3
  5. package/dist/types/pm-plugins/decorations-drag-handle.d.ts +5 -5
  6. package/dist/types/pm-plugins/decorations-find-surrounding-nodes.d.ts +4 -4
  7. package/dist/types/pm-plugins/decorations-quick-insert-button.d.ts +4 -4
  8. package/dist/types/pm-plugins/quick-insert-calculate-position.d.ts +5 -5
  9. package/dist/types/pm-plugins/utils/anchor-utils.d.ts +2 -2
  10. package/dist/types/pm-plugins/utils/getNestedNodePosition.d.ts +2 -2
  11. package/dist/types/pm-plugins/utils/getSelection.d.ts +1 -1
  12. package/dist/types/pm-plugins/utils/transactions.d.ts +2 -2
  13. package/dist/types/pm-plugins/utils/widget-positions.d.ts +1 -1
  14. package/dist/types/pm-plugins/vanilla-quick-insert.d.ts +6 -6
  15. package/dist/types/ui/block-menu.d.ts +2 -2
  16. package/dist/types/ui/consts.d.ts +2 -2
  17. package/dist/types/ui/drag-handle.d.ts +4 -4
  18. package/dist/types/ui/drag-preview.d.ts +2 -2
  19. package/dist/types/ui/drop-target-layout.d.ts +1 -1
  20. package/dist/types/ui/drop-target.d.ts +3 -3
  21. package/dist/types/ui/quick-insert-button.d.ts +3 -3
  22. package/dist/types/ui/utils/anchor-name.d.ts +1 -1
  23. package/dist/types-ts4.5/blockControlsPluginType.d.ts +34 -34
  24. package/dist/types-ts4.5/editor-commands/move-to-layout.d.ts +1 -1
  25. package/dist/types-ts4.5/editor-commands/utils/move-node-utils.d.ts +3 -3
  26. package/dist/types-ts4.5/pm-plugins/decorations-drag-handle.d.ts +5 -5
  27. package/dist/types-ts4.5/pm-plugins/decorations-find-surrounding-nodes.d.ts +4 -4
  28. package/dist/types-ts4.5/pm-plugins/decorations-quick-insert-button.d.ts +4 -4
  29. package/dist/types-ts4.5/pm-plugins/quick-insert-calculate-position.d.ts +5 -5
  30. package/dist/types-ts4.5/pm-plugins/utils/anchor-utils.d.ts +2 -2
  31. package/dist/types-ts4.5/pm-plugins/utils/getNestedNodePosition.d.ts +2 -2
  32. package/dist/types-ts4.5/pm-plugins/utils/getSelection.d.ts +1 -1
  33. package/dist/types-ts4.5/pm-plugins/utils/transactions.d.ts +2 -2
  34. package/dist/types-ts4.5/pm-plugins/utils/widget-positions.d.ts +1 -1
  35. package/dist/types-ts4.5/pm-plugins/vanilla-quick-insert.d.ts +6 -6
  36. package/dist/types-ts4.5/ui/block-menu.d.ts +2 -2
  37. package/dist/types-ts4.5/ui/consts.d.ts +2 -2
  38. package/dist/types-ts4.5/ui/drag-handle.d.ts +4 -4
  39. package/dist/types-ts4.5/ui/drag-preview.d.ts +2 -2
  40. package/dist/types-ts4.5/ui/drop-target-layout.d.ts +1 -1
  41. package/dist/types-ts4.5/ui/drop-target.d.ts +3 -3
  42. package/dist/types-ts4.5/ui/quick-insert-button.d.ts +3 -3
  43. package/dist/types-ts4.5/ui/utils/anchor-name.d.ts +1 -1
  44. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 4.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+ - Updated dependencies
10
+
3
11
  ## 4.2.3
4
12
 
5
13
  ### Patch Changes
@@ -15,17 +15,17 @@ import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
15
15
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
16
16
  import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
17
17
  export type ActiveNode = {
18
- pos: number;
19
18
  anchorName: string;
20
- nodeType: string;
21
19
  handleOptions?: HandleOptions;
22
- rootPos?: number;
20
+ nodeType: string;
21
+ pos: number;
23
22
  rootAnchorName?: string;
24
23
  rootNodeType?: string;
24
+ rootPos?: number;
25
25
  };
26
26
  export type ActiveDropTargetNode = {
27
- pos: number;
28
27
  nodeTypeName: string | null;
28
+ pos: number;
29
29
  };
30
30
  export type MultiSelectDnD = {
31
31
  anchor: number;
@@ -36,52 +36,52 @@ export type MultiSelectDnD = {
36
36
  userHead: number;
37
37
  };
38
38
  export interface PluginState {
39
- decorations: DecorationSet;
40
- isDragging: boolean;
41
- isMenuOpen?: boolean;
42
- menuTriggerBy?: string;
39
+ activeDropTargetNode?: ActiveDropTargetNode;
40
+ activeNode?: ActiveNode;
43
41
  blockMenuOptions?: {
44
- canMoveUp?: boolean;
45
42
  canMoveDown?: boolean;
43
+ canMoveUp?: boolean;
46
44
  };
45
+ decorations: DecorationSet;
47
46
  editorHeight: number;
48
47
  editorWidthLeft: number;
49
48
  editorWidthRight: number;
50
- activeNode?: ActiveNode;
51
- activeDropTargetNode?: ActiveDropTargetNode;
52
- isResizerResizing: boolean;
53
49
  /**
54
50
  * @private
55
51
  * @deprecated Doc size limits no longer supported
56
52
  */
57
53
  isDocSizeLimitEnabled: boolean | null;
54
+ isDragging: boolean;
55
+ isMenuOpen?: boolean;
58
56
  /**
59
57
  * is dragging the node without using drag handle, i,e, native prosemirror DnD
60
58
  */
61
59
  isPMDragging: boolean;
62
- multiSelectDnD?: MultiSelectDnD;
60
+ isResizerResizing: boolean;
61
+ isSelectedViaDragHandle?: boolean;
63
62
  isShiftDown?: boolean;
64
63
  lastDragCancelled: boolean;
65
- isSelectedViaDragHandle?: boolean;
64
+ menuTriggerBy?: string;
65
+ multiSelectDnD?: MultiSelectDnD;
66
66
  }
67
67
  export type ReleaseHiddenDecoration = () => boolean | undefined;
68
68
  export type BlockControlsSharedState = {
69
- isMenuOpen: boolean;
70
- menuTriggerBy?: string;
69
+ activeDropTargetNode?: ActiveDropTargetNode;
70
+ activeNode?: ActiveNode;
71
71
  blockMenuOptions?: {
72
- canMoveUp?: boolean;
73
72
  canMoveDown?: boolean;
73
+ canMoveUp?: boolean;
74
74
  };
75
- activeNode?: ActiveNode;
76
- activeDropTargetNode?: ActiveDropTargetNode;
77
75
  isDragging: boolean;
78
- isPMDragging: boolean;
79
- multiSelectDnD?: MultiSelectDnD;
80
- isShiftDown?: boolean;
81
- lastDragCancelled: boolean;
82
76
  isEditing?: boolean;
77
+ isMenuOpen: boolean;
83
78
  isMouseOut?: boolean;
79
+ isPMDragging: boolean;
84
80
  isSelectedViaDragHandle?: boolean;
81
+ isShiftDown?: boolean;
82
+ lastDragCancelled: boolean;
83
+ menuTriggerBy?: string;
84
+ multiSelectDnD?: MultiSelectDnD;
85
85
  } | undefined;
86
86
  export type HandleOptions = {
87
87
  isFocused: boolean;
@@ -102,9 +102,9 @@ export type BlockControlsPluginDependencies = [
102
102
  OptionalPlugin<UserIntentPlugin>
103
103
  ];
104
104
  export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
105
- dependencies: BlockControlsPluginDependencies;
106
- sharedState: BlockControlsSharedState;
107
105
  commands: {
106
+ moveNode: MoveNode;
107
+ moveNodeWithBlockMenu: (direction: DIRECTION.UP | DIRECTION.DOWN) => EditorCommand;
108
108
  /**
109
109
  * Move a node before (unless `moveToEnd` is set) another node to expand a layout or create a new layout
110
110
  * @param from position of the node to be moved
@@ -113,28 +113,28 @@ export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
113
113
  * @param options selectMovedNode: select the moved node after moving it
114
114
  */
115
115
  moveToLayout: (start: number, to: number, options?: {
116
+ moveNodeAtCursorPos?: boolean;
116
117
  moveToEnd?: boolean;
117
118
  selectMovedNode?: boolean;
118
- moveNodeAtCursorPos?: boolean;
119
119
  }) => EditorCommand;
120
- moveNode: MoveNode;
120
+ setMultiSelectPositions: (anchor?: number, head?: number) => EditorCommand;
121
+ setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => EditorCommand;
122
+ setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => EditorCommand;
121
123
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType?: string) => EditorCommand;
122
124
  toggleBlockMenu: (options?: {
123
- closeMenu?: boolean;
124
125
  anchorName?: string;
126
+ closeMenu?: boolean;
125
127
  }) => EditorCommand;
126
- setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => EditorCommand;
127
- setMultiSelectPositions: (anchor?: number, head?: number) => EditorCommand;
128
- setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => EditorCommand;
129
- moveNodeWithBlockMenu: (direction: DIRECTION.UP | DIRECTION.DOWN) => EditorCommand;
130
128
  };
129
+ dependencies: BlockControlsPluginDependencies;
130
+ sharedState: BlockControlsSharedState;
131
131
  }>;
132
132
  export type BlockControlsMeta = {
133
133
  activeNode: ActiveNode;
134
- type: string;
135
134
  dom: HTMLElement;
135
+ editorBlurred: boolean;
136
136
  editorHeight: number;
137
137
  nodeMoved: boolean;
138
- editorBlurred: boolean;
138
+ type: string;
139
139
  };
140
140
  export type MoveNodeMethod = INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT | INPUT_METHOD.BLOCK_MENU;
@@ -1,7 +1,7 @@
1
1
  import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
3
3
  export declare const moveToLayout: (api?: ExtractInjectionAPI<BlockControlsPlugin>) => (from: number, to: number, options?: {
4
+ moveNodeAtCursorPos?: boolean;
4
5
  moveToEnd?: boolean;
5
6
  selectMovedNode?: boolean;
6
- moveNodeAtCursorPos?: boolean;
7
7
  }) => EditorCommand;
@@ -2,9 +2,9 @@ import type { ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import { type Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  export declare const getCurrentNodePosFromDragHandleSelection: ({ selection, schema, resolve, }: {
5
- selection: Selection;
6
- schema: Schema;
7
5
  resolve: (pos: number) => ResolvedPos;
6
+ schema: Schema;
7
+ selection: Selection;
8
8
  }) => number;
9
9
  export declare const getPosWhenMoveNodeUp: ($currentNodePos: ResolvedPos, currentNodePos: number) => number;
10
10
  export declare const getPosWhenMoveNodeDown: ({ $currentNodePos, nodeAfterPos, tr, }: {
@@ -18,6 +18,6 @@ export declare const getShouldMoveNode: ({ currentNodePos, moveToPos, tr, }: {
18
18
  tr: Transaction;
19
19
  }) => boolean;
20
20
  export declare const canMoveNodeUpOrDown: (tr: Transaction) => {
21
- moveUp: boolean;
22
21
  moveDown: boolean;
22
+ moveUp: boolean;
23
23
  };
@@ -8,15 +8,15 @@ import { type AnchorRectCache } from './utils/anchor-utils';
8
8
  export declare const emptyParagraphNodeDecorations: () => Decoration;
9
9
  export declare const findHandleDec: (decorations: DecorationSet, from?: number, to?: number) => Decoration[];
10
10
  type DragHandleDecorationParams = {
11
+ anchorName: string;
12
+ anchorRectCache?: AnchorRectCache;
11
13
  api: ExtractInjectionAPI<BlockControlsPlugin>;
14
+ editorState: EditorState;
12
15
  formatMessage: IntlShape['formatMessage'];
13
- pos: number;
14
- anchorName: string;
16
+ handleOptions?: HandleOptions;
15
17
  nodeType: string;
16
18
  nodeViewPortalProviderAPI: PortalProviderAPI;
17
- handleOptions?: HandleOptions;
18
- anchorRectCache?: AnchorRectCache;
19
- editorState: EditorState;
19
+ pos: number;
20
20
  };
21
21
  export declare const dragHandleDecoration: ({ api, formatMessage, pos, anchorName, nodeType, nodeViewPortalProviderAPI, handleOptions, anchorRectCache, editorState, }: DragHandleDecorationParams) => Decoration;
22
22
  export {};
@@ -1,13 +1,13 @@
1
1
  import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  type SurroundingNodes = {
4
- pos: number;
5
- node: PMNode;
4
+ after: PMNode | null;
5
+ before: PMNode | null;
6
6
  depth: number;
7
7
  index: number;
8
+ node: PMNode;
8
9
  parent: PMNode;
9
- before: PMNode | null;
10
- after: PMNode | null;
10
+ pos: number;
11
11
  };
12
12
  /**
13
13
  * This function returns the surrounding nodes of a given resolved position in the editor.
@@ -7,16 +7,16 @@ import type { BlockControlsPlugin } from '../blockControlsPluginType';
7
7
  import { type AnchorRectCache } from './utils/anchor-utils';
8
8
  export declare const findQuickInsertInsertButtonDecoration: (decorations: DecorationSet, from?: number, to?: number) => Decoration[];
9
9
  type QuickInsertButtonDecorationParams = {
10
+ anchorName: string;
11
+ anchorRectCache?: AnchorRectCache;
10
12
  api: ExtractInjectionAPI<BlockControlsPlugin>;
13
+ editorState: EditorState;
11
14
  formatMessage: IntlShape['formatMessage'];
12
- rootPos: number;
13
- anchorName: string;
14
15
  nodeType: string;
15
16
  nodeViewPortalProviderAPI: PortalProviderAPI;
16
17
  rootAnchorName?: string;
17
18
  rootNodeType?: string;
18
- anchorRectCache?: AnchorRectCache;
19
- editorState: EditorState;
19
+ rootPos: number;
20
20
  };
21
21
  export declare const quickInsertButtonDecoration: ({ api, formatMessage, rootPos, anchorName, nodeType, nodeViewPortalProviderAPI, rootAnchorName, rootNodeType, anchorRectCache, editorState, }: QuickInsertButtonDecorationParams) => Decoration;
22
22
  export {};
@@ -2,11 +2,11 @@ import { type CSSProperties } from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import { type AnchorRectCache } from './utils/anchor-utils';
4
4
  export declare const calculatePosition: ({ rootAnchorName, anchorName, view, getPos, rootNodeType, macroInteractionUpdates, anchorRectCache, }: {
5
- rootAnchorName: string | undefined;
6
- getPos: () => number | undefined;
7
- view: EditorView;
8
- rootNodeType: string;
9
5
  anchorName: string;
10
- macroInteractionUpdates: boolean | undefined;
11
6
  anchorRectCache: AnchorRectCache | undefined;
7
+ getPos: () => number | undefined;
8
+ macroInteractionUpdates: boolean | undefined;
9
+ rootAnchorName: string | undefined;
10
+ rootNodeType: string;
11
+ view: EditorView;
12
12
  }) => CSSProperties;
@@ -1,12 +1,12 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
3
3
  type RectInfo = {
4
+ bottom: number;
4
5
  height: number;
5
- top: number;
6
6
  left: number;
7
7
  right: number;
8
+ top: number;
8
9
  width: number;
9
- bottom: number;
10
10
  };
11
11
  export declare class AnchorRectCache {
12
12
  private anchorRectMap;
@@ -1,7 +1,7 @@
1
1
  import type { ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { type Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const getNestedNodePosition: ({ selection, schema, resolve, }: {
4
- selection: Selection;
5
- schema: Schema;
6
4
  resolve: (pos: number) => ResolvedPos;
5
+ schema: Schema;
6
+ selection: Selection;
7
7
  }) => number;
@@ -1,8 +1,8 @@
1
1
  import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import { type EditorState, NodeSelection, TextSelection, type Transaction, type Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const getInlineNodePos: (tr: Transaction, start: number, nodeSize: number) => {
4
- inlineNodePos: number;
5
4
  inlineNodeEndPos: number;
5
+ inlineNodePos: number;
6
6
  };
7
7
  export declare const getSelection: (tr: Transaction, start: number) => false | NodeSelection | TextSelection;
8
8
  export declare const selectNode: (tr: Transaction, start: number, nodeType: string) => Transaction;
@@ -2,10 +2,10 @@ import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemir
2
2
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  interface TransactionMetadata {
4
4
  from: number;
5
- to: number;
6
- numReplaceSteps: number;
7
5
  isAllText: boolean;
8
6
  isReplacedWithSameSize: boolean;
7
+ numReplaceSteps: number;
8
+ to: number;
9
9
  }
10
10
  /**
11
11
  * Checks if step adds inline char
@@ -1,4 +1,4 @@
1
1
  export declare const getLeftPositionForRootElement: (dom: HTMLElement | null, nodeType: string, widgetDimensions: {
2
- width: number;
3
2
  height: number;
3
+ width: number;
4
4
  }, innerContainer?: HTMLElement | null, macroInteractionUpdates?: boolean) => string;
@@ -4,15 +4,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
5
5
  import { type AnchorRectCache } from './utils/anchor-utils';
6
6
  type VanillaQuickInsertProps = {
7
- formatMessage: IntlShape['formatMessage'];
7
+ anchorName: string;
8
+ anchorRectCache?: AnchorRectCache;
8
9
  api: ExtractInjectionAPI<BlockControlsPlugin>;
9
- view: EditorView;
10
- getPos: () => number | undefined;
11
10
  cleanupCallbacks: ((() => void) | undefined)[];
12
- rootNodeType: string;
13
- anchorRectCache?: AnchorRectCache;
14
- anchorName: string;
11
+ formatMessage: IntlShape['formatMessage'];
12
+ getPos: () => number | undefined;
15
13
  rootAnchorName: string;
14
+ rootNodeType: string;
15
+ view: EditorView;
16
16
  };
17
17
  /**
18
18
  * Create a Node which contains the quick insert button
@@ -4,11 +4,11 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
6
  type BlockMenuProps = {
7
+ api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
8
+ boundariesElement?: HTMLElement;
7
9
  editorView: EditorView | undefined;
8
10
  mountPoint?: HTMLElement;
9
- boundariesElement?: HTMLElement;
10
11
  scrollableElement?: HTMLElement;
11
- api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
12
12
  };
13
13
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<BlockMenuProps & WrappedComponentProps>> & {
14
14
  WrappedComponent: React.ComponentType<BlockMenuProps & WrappedComponentProps>;
@@ -46,14 +46,14 @@ export declare const spaceLookupMap: {
46
46
  };
47
47
  export declare const spacingBetweenNodesForPreview: {
48
48
  [key: string]: {
49
- top: string;
50
49
  bottom: string;
50
+ top: string;
51
51
  };
52
52
  };
53
53
  export declare const nodeMargins: {
54
54
  [key: string]: {
55
- top: number;
56
55
  bottom: number;
56
+ top: number;
57
57
  };
58
58
  };
59
59
  export declare const DEFAULT_COLUMN_DISTRIBUTIONS: {
@@ -5,15 +5,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { BlockControlsPlugin, HandleOptions } from '../blockControlsPluginType';
6
6
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
7
7
  type DragHandleProps = {
8
- view: EditorView;
8
+ anchorName: string;
9
+ anchorRectCache?: AnchorRectCache;
9
10
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
10
11
  formatMessage: IntlShape['formatMessage'];
11
12
  getPos: () => number | undefined;
12
- anchorName: string;
13
- nodeType: string;
14
13
  handleOptions?: HandleOptions;
15
14
  isTopLevelNode?: boolean;
16
- anchorRectCache?: AnchorRectCache;
15
+ nodeType: string;
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
19
  export declare const DragHandleWithVisibility: ({ view, api, formatMessage, getPos, anchorName, nodeType, handleOptions, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
@@ -1,9 +1,9 @@
1
1
  export type DragPreviewContent = {
2
2
  dom: HTMLElement;
3
- nodeType: string;
4
3
  nodeSpacing?: {
5
- top: string;
6
4
  bottom: string;
5
+ top: string;
7
6
  };
7
+ nodeType: string;
8
8
  };
9
9
  export declare const dragPreview: (container: HTMLElement, dragPreviewContent: DragPreviewContent | DragPreviewContent[]) => () => HTMLElement;
@@ -6,9 +6,9 @@ import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
6
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
7
7
  export type DropTargetLayoutProps = {
8
8
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
9
+ formatMessage?: IntlShape['formatMessage'];
9
10
  getPos: () => number | undefined;
10
11
  parent: PMNode;
11
- formatMessage?: IntlShape['formatMessage'];
12
12
  };
13
13
  export declare const DropTargetLayout: (props: DropTargetLayoutProps & {
14
14
  anchorRectCache?: AnchorRectCache;
@@ -9,12 +9,12 @@ export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP = "--editor-block-
9
9
  export type DropTargetStyle = 'default' | 'remainingHeight';
10
10
  export type DropTargetProps = {
11
11
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
12
+ dropTargetStyle?: DropTargetStyle;
13
+ formatMessage?: IntlShape['formatMessage'];
12
14
  getPos: () => number | undefined;
13
- prevNode?: PMNode;
14
15
  nextNode?: PMNode;
15
16
  parentNode?: PMNode;
16
- dropTargetStyle?: DropTargetStyle;
17
- formatMessage?: IntlShape['formatMessage'];
17
+ prevNode?: PMNode;
18
18
  };
19
19
  export declare const DropTarget: (props: DropTargetProps & {
20
20
  anchorRectCache?: AnchorRectCache;
@@ -9,15 +9,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
10
10
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
11
11
  type Props = {
12
- view: EditorView;
12
+ anchorName: string;
13
+ anchorRectCache?: AnchorRectCache;
13
14
  api: ExtractInjectionAPI<BlockControlsPlugin>;
14
15
  formatMessage: IntlShape['formatMessage'];
15
16
  getPos: () => number | undefined;
16
17
  nodeType: string;
17
- anchorName: string;
18
18
  rootAnchorName?: string;
19
19
  rootNodeType: string;
20
- anchorRectCache?: AnchorRectCache;
20
+ view: EditorView;
21
21
  };
22
22
  export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
23
23
  export declare const QuickInsertWithVisibility: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  type RefreshAnchorNameParams = {
3
+ anchorName?: string;
3
4
  getPos: () => number | undefined;
4
5
  view: EditorView;
5
- anchorName?: string;
6
6
  };
7
7
  /**
8
8
  * Checks for plugin state for latest anchorName based on the position, returns
@@ -15,17 +15,17 @@ import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
15
15
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
16
16
  import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
17
17
  export type ActiveNode = {
18
- pos: number;
19
18
  anchorName: string;
20
- nodeType: string;
21
19
  handleOptions?: HandleOptions;
22
- rootPos?: number;
20
+ nodeType: string;
21
+ pos: number;
23
22
  rootAnchorName?: string;
24
23
  rootNodeType?: string;
24
+ rootPos?: number;
25
25
  };
26
26
  export type ActiveDropTargetNode = {
27
- pos: number;
28
27
  nodeTypeName: string | null;
28
+ pos: number;
29
29
  };
30
30
  export type MultiSelectDnD = {
31
31
  anchor: number;
@@ -36,52 +36,52 @@ export type MultiSelectDnD = {
36
36
  userHead: number;
37
37
  };
38
38
  export interface PluginState {
39
- decorations: DecorationSet;
40
- isDragging: boolean;
41
- isMenuOpen?: boolean;
42
- menuTriggerBy?: string;
39
+ activeDropTargetNode?: ActiveDropTargetNode;
40
+ activeNode?: ActiveNode;
43
41
  blockMenuOptions?: {
44
- canMoveUp?: boolean;
45
42
  canMoveDown?: boolean;
43
+ canMoveUp?: boolean;
46
44
  };
45
+ decorations: DecorationSet;
47
46
  editorHeight: number;
48
47
  editorWidthLeft: number;
49
48
  editorWidthRight: number;
50
- activeNode?: ActiveNode;
51
- activeDropTargetNode?: ActiveDropTargetNode;
52
- isResizerResizing: boolean;
53
49
  /**
54
50
  * @private
55
51
  * @deprecated Doc size limits no longer supported
56
52
  */
57
53
  isDocSizeLimitEnabled: boolean | null;
54
+ isDragging: boolean;
55
+ isMenuOpen?: boolean;
58
56
  /**
59
57
  * is dragging the node without using drag handle, i,e, native prosemirror DnD
60
58
  */
61
59
  isPMDragging: boolean;
62
- multiSelectDnD?: MultiSelectDnD;
60
+ isResizerResizing: boolean;
61
+ isSelectedViaDragHandle?: boolean;
63
62
  isShiftDown?: boolean;
64
63
  lastDragCancelled: boolean;
65
- isSelectedViaDragHandle?: boolean;
64
+ menuTriggerBy?: string;
65
+ multiSelectDnD?: MultiSelectDnD;
66
66
  }
67
67
  export type ReleaseHiddenDecoration = () => boolean | undefined;
68
68
  export type BlockControlsSharedState = {
69
- isMenuOpen: boolean;
70
- menuTriggerBy?: string;
69
+ activeDropTargetNode?: ActiveDropTargetNode;
70
+ activeNode?: ActiveNode;
71
71
  blockMenuOptions?: {
72
- canMoveUp?: boolean;
73
72
  canMoveDown?: boolean;
73
+ canMoveUp?: boolean;
74
74
  };
75
- activeNode?: ActiveNode;
76
- activeDropTargetNode?: ActiveDropTargetNode;
77
75
  isDragging: boolean;
78
- isPMDragging: boolean;
79
- multiSelectDnD?: MultiSelectDnD;
80
- isShiftDown?: boolean;
81
- lastDragCancelled: boolean;
82
76
  isEditing?: boolean;
77
+ isMenuOpen: boolean;
83
78
  isMouseOut?: boolean;
79
+ isPMDragging: boolean;
84
80
  isSelectedViaDragHandle?: boolean;
81
+ isShiftDown?: boolean;
82
+ lastDragCancelled: boolean;
83
+ menuTriggerBy?: string;
84
+ multiSelectDnD?: MultiSelectDnD;
85
85
  } | undefined;
86
86
  export type HandleOptions = {
87
87
  isFocused: boolean;
@@ -102,9 +102,9 @@ export type BlockControlsPluginDependencies = [
102
102
  OptionalPlugin<UserIntentPlugin>
103
103
  ];
104
104
  export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
105
- dependencies: BlockControlsPluginDependencies;
106
- sharedState: BlockControlsSharedState;
107
105
  commands: {
106
+ moveNode: MoveNode;
107
+ moveNodeWithBlockMenu: (direction: DIRECTION.UP | DIRECTION.DOWN) => EditorCommand;
108
108
  /**
109
109
  * Move a node before (unless `moveToEnd` is set) another node to expand a layout or create a new layout
110
110
  * @param from position of the node to be moved
@@ -113,28 +113,28 @@ export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
113
113
  * @param options selectMovedNode: select the moved node after moving it
114
114
  */
115
115
  moveToLayout: (start: number, to: number, options?: {
116
+ moveNodeAtCursorPos?: boolean;
116
117
  moveToEnd?: boolean;
117
118
  selectMovedNode?: boolean;
118
- moveNodeAtCursorPos?: boolean;
119
119
  }) => EditorCommand;
120
- moveNode: MoveNode;
120
+ setMultiSelectPositions: (anchor?: number, head?: number) => EditorCommand;
121
+ setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => EditorCommand;
122
+ setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => EditorCommand;
121
123
  showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType?: string) => EditorCommand;
122
124
  toggleBlockMenu: (options?: {
123
- closeMenu?: boolean;
124
125
  anchorName?: string;
126
+ closeMenu?: boolean;
125
127
  }) => EditorCommand;
126
- setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => EditorCommand;
127
- setMultiSelectPositions: (anchor?: number, head?: number) => EditorCommand;
128
- setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => EditorCommand;
129
- moveNodeWithBlockMenu: (direction: DIRECTION.UP | DIRECTION.DOWN) => EditorCommand;
130
128
  };
129
+ dependencies: BlockControlsPluginDependencies;
130
+ sharedState: BlockControlsSharedState;
131
131
  }>;
132
132
  export type BlockControlsMeta = {
133
133
  activeNode: ActiveNode;
134
- type: string;
135
134
  dom: HTMLElement;
135
+ editorBlurred: boolean;
136
136
  editorHeight: number;
137
137
  nodeMoved: boolean;
138
- editorBlurred: boolean;
138
+ type: string;
139
139
  };
140
140
  export type MoveNodeMethod = INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT | INPUT_METHOD.BLOCK_MENU;
@@ -1,7 +1,7 @@
1
1
  import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
3
3
  export declare const moveToLayout: (api?: ExtractInjectionAPI<BlockControlsPlugin>) => (from: number, to: number, options?: {
4
+ moveNodeAtCursorPos?: boolean;
4
5
  moveToEnd?: boolean;
5
6
  selectMovedNode?: boolean;
6
- moveNodeAtCursorPos?: boolean;
7
7
  }) => EditorCommand;
@@ -2,9 +2,9 @@ import type { ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import { type Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  export declare const getCurrentNodePosFromDragHandleSelection: ({ selection, schema, resolve, }: {
5
- selection: Selection;
6
- schema: Schema;
7
5
  resolve: (pos: number) => ResolvedPos;
6
+ schema: Schema;
7
+ selection: Selection;
8
8
  }) => number;
9
9
  export declare const getPosWhenMoveNodeUp: ($currentNodePos: ResolvedPos, currentNodePos: number) => number;
10
10
  export declare const getPosWhenMoveNodeDown: ({ $currentNodePos, nodeAfterPos, tr, }: {
@@ -18,6 +18,6 @@ export declare const getShouldMoveNode: ({ currentNodePos, moveToPos, tr, }: {
18
18
  tr: Transaction;
19
19
  }) => boolean;
20
20
  export declare const canMoveNodeUpOrDown: (tr: Transaction) => {
21
- moveUp: boolean;
22
21
  moveDown: boolean;
22
+ moveUp: boolean;
23
23
  };
@@ -8,15 +8,15 @@ import { type AnchorRectCache } from './utils/anchor-utils';
8
8
  export declare const emptyParagraphNodeDecorations: () => Decoration;
9
9
  export declare const findHandleDec: (decorations: DecorationSet, from?: number, to?: number) => Decoration[];
10
10
  type DragHandleDecorationParams = {
11
+ anchorName: string;
12
+ anchorRectCache?: AnchorRectCache;
11
13
  api: ExtractInjectionAPI<BlockControlsPlugin>;
14
+ editorState: EditorState;
12
15
  formatMessage: IntlShape['formatMessage'];
13
- pos: number;
14
- anchorName: string;
16
+ handleOptions?: HandleOptions;
15
17
  nodeType: string;
16
18
  nodeViewPortalProviderAPI: PortalProviderAPI;
17
- handleOptions?: HandleOptions;
18
- anchorRectCache?: AnchorRectCache;
19
- editorState: EditorState;
19
+ pos: number;
20
20
  };
21
21
  export declare const dragHandleDecoration: ({ api, formatMessage, pos, anchorName, nodeType, nodeViewPortalProviderAPI, handleOptions, anchorRectCache, editorState, }: DragHandleDecorationParams) => Decoration;
22
22
  export {};
@@ -1,13 +1,13 @@
1
1
  import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  type SurroundingNodes = {
4
- pos: number;
5
- node: PMNode;
4
+ after: PMNode | null;
5
+ before: PMNode | null;
6
6
  depth: number;
7
7
  index: number;
8
+ node: PMNode;
8
9
  parent: PMNode;
9
- before: PMNode | null;
10
- after: PMNode | null;
10
+ pos: number;
11
11
  };
12
12
  /**
13
13
  * This function returns the surrounding nodes of a given resolved position in the editor.
@@ -7,16 +7,16 @@ import type { BlockControlsPlugin } from '../blockControlsPluginType';
7
7
  import { type AnchorRectCache } from './utils/anchor-utils';
8
8
  export declare const findQuickInsertInsertButtonDecoration: (decorations: DecorationSet, from?: number, to?: number) => Decoration[];
9
9
  type QuickInsertButtonDecorationParams = {
10
+ anchorName: string;
11
+ anchorRectCache?: AnchorRectCache;
10
12
  api: ExtractInjectionAPI<BlockControlsPlugin>;
13
+ editorState: EditorState;
11
14
  formatMessage: IntlShape['formatMessage'];
12
- rootPos: number;
13
- anchorName: string;
14
15
  nodeType: string;
15
16
  nodeViewPortalProviderAPI: PortalProviderAPI;
16
17
  rootAnchorName?: string;
17
18
  rootNodeType?: string;
18
- anchorRectCache?: AnchorRectCache;
19
- editorState: EditorState;
19
+ rootPos: number;
20
20
  };
21
21
  export declare const quickInsertButtonDecoration: ({ api, formatMessage, rootPos, anchorName, nodeType, nodeViewPortalProviderAPI, rootAnchorName, rootNodeType, anchorRectCache, editorState, }: QuickInsertButtonDecorationParams) => Decoration;
22
22
  export {};
@@ -2,11 +2,11 @@ import { type CSSProperties } from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import { type AnchorRectCache } from './utils/anchor-utils';
4
4
  export declare const calculatePosition: ({ rootAnchorName, anchorName, view, getPos, rootNodeType, macroInteractionUpdates, anchorRectCache, }: {
5
- rootAnchorName: string | undefined;
6
- getPos: () => number | undefined;
7
- view: EditorView;
8
- rootNodeType: string;
9
5
  anchorName: string;
10
- macroInteractionUpdates: boolean | undefined;
11
6
  anchorRectCache: AnchorRectCache | undefined;
7
+ getPos: () => number | undefined;
8
+ macroInteractionUpdates: boolean | undefined;
9
+ rootAnchorName: string | undefined;
10
+ rootNodeType: string;
11
+ view: EditorView;
12
12
  }) => CSSProperties;
@@ -1,12 +1,12 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
3
3
  type RectInfo = {
4
+ bottom: number;
4
5
  height: number;
5
- top: number;
6
6
  left: number;
7
7
  right: number;
8
+ top: number;
8
9
  width: number;
9
- bottom: number;
10
10
  };
11
11
  export declare class AnchorRectCache {
12
12
  private anchorRectMap;
@@ -1,7 +1,7 @@
1
1
  import type { ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { type Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const getNestedNodePosition: ({ selection, schema, resolve, }: {
4
- selection: Selection;
5
- schema: Schema;
6
4
  resolve: (pos: number) => ResolvedPos;
5
+ schema: Schema;
6
+ selection: Selection;
7
7
  }) => number;
@@ -1,8 +1,8 @@
1
1
  import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import { type EditorState, NodeSelection, TextSelection, type Transaction, type Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const getInlineNodePos: (tr: Transaction, start: number, nodeSize: number) => {
4
- inlineNodePos: number;
5
4
  inlineNodeEndPos: number;
5
+ inlineNodePos: number;
6
6
  };
7
7
  export declare const getSelection: (tr: Transaction, start: number) => false | NodeSelection | TextSelection;
8
8
  export declare const selectNode: (tr: Transaction, start: number, nodeType: string) => Transaction;
@@ -2,10 +2,10 @@ import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemir
2
2
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  interface TransactionMetadata {
4
4
  from: number;
5
- to: number;
6
- numReplaceSteps: number;
7
5
  isAllText: boolean;
8
6
  isReplacedWithSameSize: boolean;
7
+ numReplaceSteps: number;
8
+ to: number;
9
9
  }
10
10
  /**
11
11
  * Checks if step adds inline char
@@ -1,4 +1,4 @@
1
1
  export declare const getLeftPositionForRootElement: (dom: HTMLElement | null, nodeType: string, widgetDimensions: {
2
- width: number;
3
2
  height: number;
3
+ width: number;
4
4
  }, innerContainer?: HTMLElement | null, macroInteractionUpdates?: boolean) => string;
@@ -4,15 +4,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
5
5
  import { type AnchorRectCache } from './utils/anchor-utils';
6
6
  type VanillaQuickInsertProps = {
7
- formatMessage: IntlShape['formatMessage'];
7
+ anchorName: string;
8
+ anchorRectCache?: AnchorRectCache;
8
9
  api: ExtractInjectionAPI<BlockControlsPlugin>;
9
- view: EditorView;
10
- getPos: () => number | undefined;
11
10
  cleanupCallbacks: ((() => void) | undefined)[];
12
- rootNodeType: string;
13
- anchorRectCache?: AnchorRectCache;
14
- anchorName: string;
11
+ formatMessage: IntlShape['formatMessage'];
12
+ getPos: () => number | undefined;
15
13
  rootAnchorName: string;
14
+ rootNodeType: string;
15
+ view: EditorView;
16
16
  };
17
17
  /**
18
18
  * Create a Node which contains the quick insert button
@@ -4,11 +4,11 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
6
  type BlockMenuProps = {
7
+ api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
8
+ boundariesElement?: HTMLElement;
7
9
  editorView: EditorView | undefined;
8
10
  mountPoint?: HTMLElement;
9
- boundariesElement?: HTMLElement;
10
11
  scrollableElement?: HTMLElement;
11
- api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
12
12
  };
13
13
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<BlockMenuProps & WrappedComponentProps>> & {
14
14
  WrappedComponent: React.ComponentType<BlockMenuProps & WrappedComponentProps>;
@@ -46,14 +46,14 @@ export declare const spaceLookupMap: {
46
46
  };
47
47
  export declare const spacingBetweenNodesForPreview: {
48
48
  [key: string]: {
49
- top: string;
50
49
  bottom: string;
50
+ top: string;
51
51
  };
52
52
  };
53
53
  export declare const nodeMargins: {
54
54
  [key: string]: {
55
- top: number;
56
55
  bottom: number;
56
+ top: number;
57
57
  };
58
58
  };
59
59
  export declare const DEFAULT_COLUMN_DISTRIBUTIONS: {
@@ -5,15 +5,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { BlockControlsPlugin, HandleOptions } from '../blockControlsPluginType';
6
6
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
7
7
  type DragHandleProps = {
8
- view: EditorView;
8
+ anchorName: string;
9
+ anchorRectCache?: AnchorRectCache;
9
10
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
10
11
  formatMessage: IntlShape['formatMessage'];
11
12
  getPos: () => number | undefined;
12
- anchorName: string;
13
- nodeType: string;
14
13
  handleOptions?: HandleOptions;
15
14
  isTopLevelNode?: boolean;
16
- anchorRectCache?: AnchorRectCache;
15
+ nodeType: string;
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
19
  export declare const DragHandleWithVisibility: ({ view, api, formatMessage, getPos, anchorName, nodeType, handleOptions, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
@@ -1,9 +1,9 @@
1
1
  export type DragPreviewContent = {
2
2
  dom: HTMLElement;
3
- nodeType: string;
4
3
  nodeSpacing?: {
5
- top: string;
6
4
  bottom: string;
5
+ top: string;
7
6
  };
7
+ nodeType: string;
8
8
  };
9
9
  export declare const dragPreview: (container: HTMLElement, dragPreviewContent: DragPreviewContent | DragPreviewContent[]) => () => HTMLElement;
@@ -6,9 +6,9 @@ import type { BlockControlsPlugin } from '../blockControlsPluginType';
6
6
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
7
7
  export type DropTargetLayoutProps = {
8
8
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
9
+ formatMessage?: IntlShape['formatMessage'];
9
10
  getPos: () => number | undefined;
10
11
  parent: PMNode;
11
- formatMessage?: IntlShape['formatMessage'];
12
12
  };
13
13
  export declare const DropTargetLayout: (props: DropTargetLayoutProps & {
14
14
  anchorRectCache?: AnchorRectCache;
@@ -9,12 +9,12 @@ export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP = "--editor-block-
9
9
  export type DropTargetStyle = 'default' | 'remainingHeight';
10
10
  export type DropTargetProps = {
11
11
  api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
12
+ dropTargetStyle?: DropTargetStyle;
13
+ formatMessage?: IntlShape['formatMessage'];
12
14
  getPos: () => number | undefined;
13
- prevNode?: PMNode;
14
15
  nextNode?: PMNode;
15
16
  parentNode?: PMNode;
16
- dropTargetStyle?: DropTargetStyle;
17
- formatMessage?: IntlShape['formatMessage'];
17
+ prevNode?: PMNode;
18
18
  };
19
19
  export declare const DropTarget: (props: DropTargetProps & {
20
20
  anchorRectCache?: AnchorRectCache;
@@ -9,15 +9,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { BlockControlsPlugin } from '../blockControlsPluginType';
10
10
  import { type AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
11
11
  type Props = {
12
- view: EditorView;
12
+ anchorName: string;
13
+ anchorRectCache?: AnchorRectCache;
13
14
  api: ExtractInjectionAPI<BlockControlsPlugin>;
14
15
  formatMessage: IntlShape['formatMessage'];
15
16
  getPos: () => number | undefined;
16
17
  nodeType: string;
17
- anchorName: string;
18
18
  rootAnchorName?: string;
19
19
  rootNodeType: string;
20
- anchorRectCache?: AnchorRectCache;
20
+ view: EditorView;
21
21
  };
22
22
  export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
23
23
  export declare const QuickInsertWithVisibility: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  type RefreshAnchorNameParams = {
3
+ anchorName?: string;
3
4
  getPos: () => number | undefined;
4
5
  view: EditorView;
5
- anchorName?: string;
6
6
  };
7
7
  /**
8
8
  * Checks for plugin state for latest anchorName based on the position, returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/editor-plugin-limited-mode": "^0.0.3",
41
41
  "@atlaskit/editor-plugin-metrics": "^4.0.0",
42
42
  "@atlaskit/editor-plugin-quick-insert": "^3.0.0",
43
- "@atlaskit/editor-plugin-selection": "^3.1.0",
43
+ "@atlaskit/editor-plugin-selection": "^3.2.0",
44
44
  "@atlaskit/editor-plugin-type-ahead": "^3.1.0",
45
45
  "@atlaskit/editor-plugin-user-intent": "^1.1.0",
46
46
  "@atlaskit/editor-plugin-width": "^4.0.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
56
56
  "@atlaskit/primitives": "^14.11.0",
57
57
  "@atlaskit/theme": "^19.0.0",
58
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
58
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
59
59
  "@atlaskit/tokens": "^6.0.0",
60
60
  "@atlaskit/tooltip": "^20.4.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^107.26.0",
70
+ "@atlaskit/editor-common": "^107.28.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl-next": "npm:react-intl@^5.18.1"