UNPKG

@atlaskit/editor-plugin-block-controls

Version:

Block controls plugin for @atlaskit/editor-core

27 lines (26 loc) • 1.43 kB
import React from 'react'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin'; import { SurfaceRenderer } from '@atlaskit/editor-ui-control-model/surface-renderer'; import type { SurfaceContext } from '@atlaskit/editor-ui-control-model/types'; import type { BlockControlsPlugin } from '../blockControlsPluginType'; import type { BlockControlsSurfaceTarget } from '../ui/block-controls-surface-targets'; import type { SurfaceSide, SurfaceWrapperPlacement } from '../ui/utils/get-surface-placement'; export type BlockControlsSurfaceWrapperProps = { children: React.ReactNode; placement: SurfaceWrapperPlacement; source: BlockControlsSurfaceTarget['source']; surfaceContext: SurfaceContext; }; type Props = { api: ExtractInjectionAPI<BlockControlsPlugin>; components: React.ComponentProps<typeof SurfaceRenderer>['components']; forceVisibleOnMouseOut: boolean; placement: SurfaceWrapperPlacement; side: SurfaceSide; source: BlockControlsSurfaceTarget['source']; surfaceContext: SurfaceContext; SurfaceWrapper: React.ComponentType<BlockControlsSurfaceWrapperProps>; }; /** Renders one block-controls surface for either side on the CLS fix path. */ export declare const BlockControlsSurfaceWithClsFix: ({ api, components, forceVisibleOnMouseOut, placement, side, source, surfaceContext, SurfaceWrapper, }: Props) => React.JSX.Element; export {};