import { BaseSchemes, Scope } from 'rete'; import { RenderSignal } from 'rete-area-plugin'; import { Item, Items, Position } from './types'; export * as Presets from './presets'; /** * Context menu plugin props * @priority 8 */ export type Props = { /** * delay before hiding context menu * @deprecated Use the `delay` option of the rendering plugin preset. */ delay?: number; /** menu items, can be produced by preset */ items: Items; }; export type RenderMeta = { filled?: boolean; }; /** * Signal types produced by ContextMenuPlugin instance * @priority 10 */ export type ContextMenuExtra = RenderSignal<'contextmenu', { items: Item[]; onHide(): void; searchBar?: boolean; }>; type Requires = { type: 'contextmenu'; data: { event: MouseEvent; context: 'root' | Schemes['Node'] | Schemes['Connection']; }; } | { type: 'unmount'; data: { element: HTMLElement; }; } | { type: 'pointerdown'; data: { position: Position; event: PointerEvent; }; }; /** * Plugin for context menu. * Responsible for initialing rendering of context menu with predefined items. * @priority 9 * @emits render * @emits unmount * @listens unmount * @listens contextmenu * @listens pointerdown */ export declare class ContextMenuPlugin extends Scope | ContextMenuExtra]> { private props; /** * @param props Properties */ constructor(props: Props); setParent(scope: Scope>): void; } //# sourceMappingURL=index.d.ts.map