@atlaskit/editor-plugin-block-controls 12.4.1 → 12.4.2
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 +6 -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/package.json +2 -2
- 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,24 +0,0 @@
|
|
|
1
|
-
import type { MemoizedFn } from 'memoize-one';
|
|
2
|
-
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { NodeType, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export declare const isInsideTable: (nodeType: NodeType) => Boolean;
|
|
5
|
-
export declare const isLayoutColumn: (nodeType: NodeType) => Boolean;
|
|
6
|
-
export declare const isDoc: (nodeType: NodeType) => Boolean;
|
|
7
|
-
export declare const isExpand: (nodeType: NodeType) => Boolean;
|
|
8
|
-
export declare const isNestedExpand: (nodeType: NodeType) => Boolean;
|
|
9
|
-
export declare const isFontSizeMarkActive: (node: PMNode) => boolean;
|
|
10
|
-
export declare const isInSameLayout: ($from: ResolvedPos, $to: ResolvedPos) => boolean;
|
|
11
|
-
/**
|
|
12
|
-
* This function converts an expand into a nested expand,
|
|
13
|
-
* although it may fail based on the expand's content.
|
|
14
|
-
* @param expandNode the node to transform.
|
|
15
|
-
* @returns an nested expand node
|
|
16
|
-
* @throws RangeError: Invalid content for node nestedExpand
|
|
17
|
-
*/
|
|
18
|
-
export declare const transformExpandToNestedExpand: (expandNode: PMNode) => PMNode | null;
|
|
19
|
-
export declare const transformFragmentExpandToNestedExpand: (fragment: Fragment) => Fragment | null;
|
|
20
|
-
export declare const transformSliceExpandToNestedExpand: (slice: Slice) => Slice | null;
|
|
21
|
-
export declare const memoizedTransformExpandToNestedExpand: MemoizedFn<(node: PMNode) => PMNode | null>;
|
|
22
|
-
export declare const canCreateNodeWithContentInsideAnotherNode: (nodeTypesToCreate: NodeType[], nodeWithTargetFragment: Fragment) => boolean;
|
|
23
|
-
export declare function canMoveNodeToIndex(destParent: PMNode, indexIntoParent: number, srcNode: PMNode, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
|
|
24
|
-
export declare function canMoveSliceToIndex(slice: Slice, sliceFromPos: number, sliceToPos: number, destParent: PMNode, indexIntoParent: number, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const getLeftPositionForRootElement: (dom: HTMLElement | null, nodeType: string, widgetDimensions: {
|
|
2
|
-
height: number;
|
|
3
|
-
width: number;
|
|
4
|
-
}, innerContainer?: HTMLElement | null, macroInteractionUpdates?: boolean) => string;
|
|
5
|
-
/**
|
|
6
|
-
* Left position (in px) for a widget on the right edge of the block.
|
|
7
|
-
* Mirrors getLeftPositionForRootElement: when innerContainer is set (table, mediaSingle,
|
|
8
|
-
* extension, blockCard, embedCard) use it for the right edge so the button aligns to the
|
|
9
|
-
* content box and does not overlap; otherwise use the block (dom).
|
|
10
|
-
*/
|
|
11
|
-
export declare const getRightPositionForRootElement: (dom: HTMLElement | null, nodeType: string, widgetDimensions: {
|
|
12
|
-
height: number;
|
|
13
|
-
width: number;
|
|
14
|
-
}, innerContainer?: HTMLElement | null, macroInteractionUpdates?: boolean) => string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { BlockControlsPlugin } from '../blockControlsPluginType';
|
|
5
|
-
import type { AnchorRectCache } from './utils/anchor-utils';
|
|
6
|
-
type VanillaQuickInsertProps = {
|
|
7
|
-
anchorName: string;
|
|
8
|
-
anchorRectCache?: AnchorRectCache;
|
|
9
|
-
api: ExtractInjectionAPI<BlockControlsPlugin>;
|
|
10
|
-
cleanupCallbacks: ((() => void) | undefined)[];
|
|
11
|
-
formatMessage: IntlShape['formatMessage'];
|
|
12
|
-
getPos: () => number | undefined;
|
|
13
|
-
rootAnchorName: string;
|
|
14
|
-
rootNodeType: string;
|
|
15
|
-
view: EditorView;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Create a Node which contains the quick insert button
|
|
19
|
-
*/
|
|
20
|
-
export declare const createVanillaButton: (props: VanillaQuickInsertProps) => Node;
|
|
21
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { VisibilityContainer } from './visibility-container';
|
|
2
|
-
export { refreshAnchorName } from './utils/anchor-name';
|
|
3
|
-
export { getAnchorAttrName } from './utils/dom-attr-name';
|
|
4
|
-
export { rootElementGap, STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER, topPositionAdjustment, } from './consts';
|
|
5
|
-
export { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky, } from '../pm-plugins/utils/drag-handle-positions';
|
|
6
|
-
export { getRightPositionForRootElement } from '../pm-plugins/utils/widget-positions';
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export declare const ACTIVE_DRAG_HANDLE_ATTR = "data-active-drag-handle";
|
|
2
|
-
export declare const ACTIVE_QUICK_INSERT_ATTR = "data-active-quick-insert";
|
|
3
|
-
export declare const DRAG_HANDLE_HEIGHT = 24;
|
|
4
|
-
export declare const DRAG_HANDLE_BORDER_RADIUS = 4;
|
|
5
|
-
export declare const DRAG_HANDLE_ZINDEX: number;
|
|
6
|
-
export declare const DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
7
|
-
export declare const DRAG_HANDLE_NARROW_GAP = 4;
|
|
8
|
-
export declare const DRAG_HANDLE_MAX_GAP = 12;
|
|
9
|
-
export declare const DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
10
|
-
export declare const DRAG_HANDLE_MAX_WIDTH_PLUS_GAP: number;
|
|
11
|
-
export declare const DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT: number;
|
|
12
|
-
export declare const DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
|
13
|
-
export declare const DRAG_HANDLE_H2_TOP_ADJUSTMENT = 2;
|
|
14
|
-
export declare const DRAG_HANDLE_H3_TOP_ADJUSTMENT = 1;
|
|
15
|
-
export declare const DRAG_HANDLE_H4_TOP_ADJUSTMENT = 3;
|
|
16
|
-
export declare const DRAG_HANDLE_H5_TOP_ADJUSTMENT = 3;
|
|
17
|
-
export declare const DRAG_HANDLE_H6_TOP_ADJUSTMENT = 3;
|
|
18
|
-
export declare const DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = 8;
|
|
19
|
-
export declare const DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = 2;
|
|
20
|
-
export declare const DRAG_HANDLE_PARAGRAPH_SMALL_TOP_ADJUSTMENT = 0;
|
|
21
|
-
export declare const DRAG_HANDLE_WRAPPED_MEDIA_EMBED_TOP_ADJUSTMENT = 8;
|
|
22
|
-
/** We only want to shift-select nodes that are at the top level of a document.
|
|
23
|
-
* This is because funky things happen when selecting inside of tableCells, but we
|
|
24
|
-
* also want to avoid heavily nested cases to descope potential corner cases.
|
|
25
|
-
* Various top level nodes have their selection 'from' at depths other than 0,
|
|
26
|
-
* so we allow for some leniency to capture them all. e.g. Table is depth 3.
|
|
27
|
-
*/
|
|
28
|
-
export declare const DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = 3;
|
|
29
|
-
export declare const STICKY_CONTROLS_TOP_MARGIN = 8;
|
|
30
|
-
export declare const STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER = 24;
|
|
31
|
-
export declare const QUICK_INSERT_HEIGHT = 24;
|
|
32
|
-
export declare const QUICK_INSERT_WIDTH = 24;
|
|
33
|
-
export declare const QUICK_INSERT_DIMENSIONS: {
|
|
34
|
-
height: number;
|
|
35
|
-
width: number;
|
|
36
|
-
};
|
|
37
|
-
export declare const QUICK_INSERT_LEFT_OFFSET = 16;
|
|
38
|
-
export declare const dragHandleGap: (nodeType: string, parentNodeType?: string) => number;
|
|
39
|
-
export declare const rootElementGap: (nodeType: string) => number;
|
|
40
|
-
export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "24px" | "8px" | "16px" | "20px" | "28px" | "40px";
|
|
41
|
-
export declare const topPositionAdjustment: (nodeType: string, layout?: string) => number;
|
|
42
|
-
export declare const dropTargetMarginMap: {
|
|
43
|
-
[key: number]: string;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* This document serves as a quick reference map for correlating various space matches
|
|
47
|
-
* to the table provided above.
|
|
48
|
-
* For instance, the number 1 will correspond to \{0: token('space.0', '0')\}.
|
|
49
|
-
*/
|
|
50
|
-
export declare const spaceLookupMap: {
|
|
51
|
-
[k: string]: string;
|
|
52
|
-
};
|
|
53
|
-
export declare const spacingBetweenNodesForPreview: {
|
|
54
|
-
[key: string]: {
|
|
55
|
-
bottom: string;
|
|
56
|
-
top: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export declare const nodeMargins: {
|
|
60
|
-
[key: string]: {
|
|
61
|
-
bottom: number;
|
|
62
|
-
top: number;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export declare const DEFAULT_COLUMN_DISTRIBUTIONS: {
|
|
66
|
-
[key: number]: number;
|
|
67
|
-
};
|
|
@@ -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 {};
|