@atlaskit/editor-plugin-block-controls 12.4.1 → 13.0.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 +38 -0
- package/block-decoration-utils/anchor-name/package.json +1 -8
- package/block-decoration-utils/consts/package.json +1 -8
- package/block-decoration-utils/dom-attr-name/package.json +1 -8
- package/block-decoration-utils/drag-handle-positions/package.json +1 -8
- package/block-decoration-utils/package.json +1 -8
- package/block-decoration-utils/visibility-container/package.json +1 -8
- package/block-decoration-utils/widget-positions/package.json +1 -8
- package/blockControlsPlugin/package.json +1 -8
- package/blockControlsPluginType/package.json +1 -8
- package/dist/cjs/blockControlsPlugin.js +1 -1
- package/dist/cjs/pm-plugins/interaction-tracking/constants.js +8 -0
- package/dist/cjs/pm-plugins/interaction-tracking/handle-mouse-move.js +102 -14
- package/dist/cjs/pm-plugins/interaction-tracking/pm-plugin.js +44 -10
- package/dist/cjs/ui/visibility-container.js +2 -0
- package/dist/es2019/blockControlsPlugin.js +1 -1
- package/dist/es2019/pm-plugins/interaction-tracking/constants.js +2 -0
- package/dist/es2019/pm-plugins/interaction-tracking/handle-mouse-move.js +86 -13
- package/dist/es2019/pm-plugins/interaction-tracking/pm-plugin.js +44 -11
- package/dist/es2019/ui/visibility-container.js +2 -0
- package/dist/esm/blockControlsPlugin.js +1 -1
- package/dist/esm/pm-plugins/interaction-tracking/constants.js +2 -0
- package/dist/esm/pm-plugins/interaction-tracking/handle-mouse-move.js +102 -14
- package/dist/esm/pm-plugins/interaction-tracking/pm-plugin.js +44 -10
- package/dist/esm/ui/visibility-container.js +2 -0
- package/dist/types/pm-plugins/interaction-tracking/constants.d.ts +2 -0
- package/dist/types/pm-plugins/interaction-tracking/handle-mouse-move.d.ts +3 -1
- package/dist/types/pm-plugins/interaction-tracking/pm-plugin.d.ts +3 -1
- package/package.json +37 -41
- package/dist/types-ts4.5/blockControlsPlugin.d.ts +0 -2
- package/dist/types-ts4.5/blockControlsPluginType.d.ts +0 -250
- package/dist/types-ts4.5/editor-commands/handle-key-down-with-preserved-selection.d.ts +0 -17
- package/dist/types-ts4.5/editor-commands/map-preserved-selection.d.ts +0 -13
- package/dist/types-ts4.5/editor-commands/move-node-with-block-menu.d.ts +0 -4
- package/dist/types-ts4.5/editor-commands/move-node.d.ts +0 -5
- package/dist/types-ts4.5/editor-commands/move-to-layout.d.ts +0 -7
- package/dist/types-ts4.5/editor-commands/show-drag-handle.d.ts +0 -3
- package/dist/types-ts4.5/editor-commands/utils/move-node-utils.d.ts +0 -31
- package/dist/types-ts4.5/entry-points/block-decoration-utils-anchor-name.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-decoration-utils-consts.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-decoration-utils-dom-attr-name.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-decoration-utils-drag-handle-positions.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-decoration-utils-visibility-container.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-decoration-utils-widget-positions.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockControlsPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockControlsPluginType.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/decorations-anchor.d.ts +0 -15
- package/dist/types-ts4.5/pm-plugins/decorations-common.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/decorations-drag-handle.d.ts +0 -30
- package/dist/types-ts4.5/pm-plugins/decorations-drop-target-active.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/decorations-drop-target.d.ts +0 -21
- package/dist/types-ts4.5/pm-plugins/decorations-find-surrounding-nodes.d.ts +0 -22
- package/dist/types-ts4.5/pm-plugins/decorations-quick-insert-button.d.ts +0 -30
- package/dist/types-ts4.5/pm-plugins/first-node-dec-plugin.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/handle-mouse-down.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/handle-mouse-over.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/interaction-tracking/commands.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/interaction-tracking/handle-key-down.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/interaction-tracking/handle-mouse-move.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/interaction-tracking/pm-plugin.d.ts +0 -20
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -63
- package/dist/types-ts4.5/pm-plugins/quick-insert-calculate-position.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/selection-preservation/editor-commands.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/selection-preservation/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/selection-preservation/pm-plugin.d.ts +0 -35
- package/dist/types-ts4.5/pm-plugins/selection-preservation/types.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/selection-preservation/utils.d.ts +0 -30
- package/dist/types-ts4.5/pm-plugins/utils/active-anchor-tracker.d.ts +0 -16
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/utils/anchor-utils.d.ts +0 -27
- package/dist/types-ts4.5/pm-plugins/utils/check-fragment.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/utils/check-media-layout.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils/consts.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils/drag-handle-positions.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/utils/expand-and-update-selection.d.ts +0 -20
- package/dist/types-ts4.5/pm-plugins/utils/getNestedNodePosition.d.ts +0 -16
- package/dist/types-ts4.5/pm-plugins/utils/getSelection.d.ts +0 -32
- package/dist/types-ts4.5/pm-plugins/utils/inline-drop-target.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/utils/marks.d.ts +0 -25
- package/dist/types-ts4.5/pm-plugins/utils/remove-from-source.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/utils/selection.d.ts +0 -71
- package/dist/types-ts4.5/pm-plugins/utils/transactions.d.ts +0 -31
- package/dist/types-ts4.5/pm-plugins/utils/update-column-widths.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/utils/update-selection.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/utils/validation.d.ts +0 -24
- package/dist/types-ts4.5/pm-plugins/utils/widget-positions.d.ts +0 -14
- package/dist/types-ts4.5/pm-plugins/vanilla-quick-insert.d.ts +0 -21
- package/dist/types-ts4.5/ui/block-decoration-utils.d.ts +0 -6
- package/dist/types-ts4.5/ui/consts.d.ts +0 -67
- package/dist/types-ts4.5/ui/drag-handle-nested-icon.d.ts +0 -12
- package/dist/types-ts4.5/ui/drag-handle.d.ts +0 -20
- package/dist/types-ts4.5/ui/drag-preview.d.ts +0 -9
- package/dist/types-ts4.5/ui/drop-target-layout.d.ts +0 -18
- package/dist/types-ts4.5/ui/drop-target.d.ts +0 -22
- package/dist/types-ts4.5/ui/global-styles.d.ts +0 -10
- package/dist/types-ts4.5/ui/inline-drop-target.d.ts +0 -7
- package/dist/types-ts4.5/ui/quick-insert-button.d.ts +0 -24
- package/dist/types-ts4.5/ui/utils/anchor-name.d.ts +0 -12
- package/dist/types-ts4.5/ui/utils/document-checks.d.ts +0 -5
- package/dist/types-ts4.5/ui/utils/dom-attr-name.d.ts +0 -5
- package/dist/types-ts4.5/ui/utils/editor-commands.d.ts +0 -2
- package/dist/types-ts4.5/ui/visibility-container.d.ts +0 -16
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { BlockControlsPlugin, HandleOptions } from '../blockControlsPluginType';
|
|
6
|
-
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
|
|
7
|
-
type DragHandleProps = {
|
|
8
|
-
anchorName: string;
|
|
9
|
-
anchorRectCache?: AnchorRectCache;
|
|
10
|
-
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
|
|
11
|
-
formatMessage: IntlShape['formatMessage'];
|
|
12
|
-
getPos: () => number | undefined;
|
|
13
|
-
handleOptions?: HandleOptions;
|
|
14
|
-
isTopLevelNode?: boolean;
|
|
15
|
-
nodeType: string;
|
|
16
|
-
view: EditorView;
|
|
17
|
-
};
|
|
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, isTopLevelNode, anchorRectCache, }: DragHandleProps) => jsx.JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type DragPreviewContent = {
|
|
2
|
-
dom: HTMLElement;
|
|
3
|
-
nodeSpacing?: {
|
|
4
|
-
bottom: string;
|
|
5
|
-
top: string;
|
|
6
|
-
};
|
|
7
|
-
nodeType: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const dragPreview: (container: HTMLElement, dragPreviewContent: DragPreviewContent | DragPreviewContent[]) => () => HTMLElement;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
6
|
-
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
|
|
7
|
-
export type DropTargetLayoutProps = {
|
|
8
|
-
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
|
|
9
|
-
formatMessage?: IntlShape['formatMessage'];
|
|
10
|
-
getPos: () => number | undefined;
|
|
11
|
-
parent: PMNode;
|
|
12
|
-
};
|
|
13
|
-
export declare const DropTargetLayout: (props: DropTargetLayoutProps & {
|
|
14
|
-
anchorRectCache?: AnchorRectCache;
|
|
15
|
-
}) => jsx.JSX.Element | null;
|
|
16
|
-
export declare const DropTargetLayoutNativeAnchorSupport: (props: DropTargetLayoutProps & {
|
|
17
|
-
anchorRectCache?: AnchorRectCache;
|
|
18
|
-
}) => jsx.JSX.Element | null;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
6
|
-
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
|
|
7
|
-
export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_OFFSET = "--editor-block-controls-drop-indicator-offset";
|
|
8
|
-
export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP = "--editor-block-controls-drop-indicator-gap";
|
|
9
|
-
export type DropTargetStyle = 'default' | 'remainingHeight';
|
|
10
|
-
export type DropTargetProps = {
|
|
11
|
-
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
|
|
12
|
-
dropTargetStyle?: DropTargetStyle;
|
|
13
|
-
formatMessage?: IntlShape['formatMessage'];
|
|
14
|
-
getPos: () => number | undefined;
|
|
15
|
-
nextNode?: PMNode;
|
|
16
|
-
parentNode?: PMNode;
|
|
17
|
-
prevNode?: PMNode;
|
|
18
|
-
};
|
|
19
|
-
export declare const DropTarget: (props: DropTargetProps & {
|
|
20
|
-
anchorRectCache?: AnchorRectCache;
|
|
21
|
-
isSameLayout?: boolean;
|
|
22
|
-
}) => jsx.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
8
|
-
export declare const GlobalStylesWrapper: ({ api, }: {
|
|
9
|
-
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
|
|
10
|
-
}) => jsx.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
|
|
3
|
-
import type { DropTargetProps } from './drop-target';
|
|
4
|
-
export declare const InlineDropTarget: ({ api, nextNode, position, anchorRectCache, getPos, }: DropTargetProps & {
|
|
5
|
-
anchorRectCache?: AnchorRectCache;
|
|
6
|
-
position: "left" | "right";
|
|
7
|
-
}) => jsx.JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import type { IntlShape } from 'react-intl';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
10
|
-
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
|
|
11
|
-
type Props = {
|
|
12
|
-
anchorName: string;
|
|
13
|
-
anchorRectCache?: AnchorRectCache;
|
|
14
|
-
api: ExtractInjectionAPI<BlockControlsPlugin>;
|
|
15
|
-
formatMessage: IntlShape['formatMessage'];
|
|
16
|
-
getPos: () => number | undefined;
|
|
17
|
-
nodeType: string;
|
|
18
|
-
rootAnchorName?: string;
|
|
19
|
-
rootNodeType: string;
|
|
20
|
-
view: EditorView;
|
|
21
|
-
};
|
|
22
|
-
export declare const TypeAheadControl: ({ view, api, formatMessage, getPos, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
|
|
23
|
-
export declare const QuickInsertWithVisibility: ({ view, api, formatMessage, getPos, nodeType, anchorName, rootAnchorName, rootNodeType, anchorRectCache, }: Props) => jsx.JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
type RefreshAnchorNameParams = {
|
|
3
|
-
anchorName?: string;
|
|
4
|
-
getPos: () => number | undefined;
|
|
5
|
-
view: EditorView;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Checks for plugin state for latest anchorName based on the position, returns
|
|
9
|
-
* provided anchorName if available
|
|
10
|
-
*/
|
|
11
|
-
export declare const refreshAnchorName: ({ getPos, view, anchorName, }: RefreshAnchorNameParams) => string;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
export declare const isNestedNodeSelected: (view: EditorView) => boolean;
|
|
3
|
-
export declare const isSelectionInNode: (start: number, view: EditorView) => boolean;
|
|
4
|
-
export declare const isInTextSelection: (view: EditorView) => boolean | undefined;
|
|
5
|
-
export declare const isNonEditableBlock: (start: number, view: EditorView) => boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const NODE_ANCHOR_ATTR_NAME = "data-node-anchor";
|
|
2
|
-
export declare const NODE_NODE_TYPE_ATTR_NAME = "data-prosemirror-node-name";
|
|
3
|
-
export declare const getAnchorAttrName: () => "data-drag-handler-anchor-name" | "data-node-anchor";
|
|
4
|
-
export declare const getTypeNameAttrName: () => "data-drag-handler-node-type" | "data-prosemirror-node-name";
|
|
5
|
-
export declare const getTypeNameFromDom: (element?: Element | null) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
9
|
-
interface VisibilityContainerProps {
|
|
10
|
-
api?: ExtractInjectionAPI<BlockControlsPlugin>;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
controlSide?: 'left' | 'right';
|
|
13
|
-
forceVisibleOnMouseOut?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const VisibilityContainer: ({ api, children, controlSide, forceVisibleOnMouseOut, }: VisibilityContainerProps) => jsx.JSX.Element;
|
|
16
|
-
export {};
|