import type { XYPosition } from '@xyflow/svelte'; import type { CanvasNode, CanvasEdge } from './types.js'; /** * Checks if an event originated from a text input, textarea, contenteditable element, or rich editor. */ export declare function isEventFromTextInput(event: Event | { target: EventTarget | null; }): boolean; /** * Validates that an object conforms to minimal CanvasNode shape: * a string `id` and a `position` whose `x` / `y` are finite numbers. */ export declare function isValidCanvasNode(obj: unknown): obj is CanvasNode; /** * Checks if a string is a valid HTTP/HTTPS URL. */ export declare function isValidUrl(url: string): boolean; export interface CreateCanvasClipboardOptions { onPasteNodes?: (nodes: TNode[], edges?: TEdge[]) => void | Promise; onPasteUrl?: (url: string, position?: XYPosition) => void; onPasteText?: (text: string, position?: XYPosition) => void; onPasteImage?: (blob: File) => void | Promise; screenToFlowPosition?: (position: XYPosition) => XYPosition; } /** * Headless Svelte 5 rune managing canvas copy, cut, and paste interactions. */ export declare function createCanvasClipboard(options?: CreateCanvasClipboardOptions): { copySelectedNodes: (selectedNodes: TNode[], connectedEdges?: TEdge[], event?: ClipboardEvent) => boolean; cutSelectedNodes: (selectedNodes: TNode[], connectedEdges?: TEdge[], onRemove?: (nodes: TNode[]) => void, event?: ClipboardEvent) => boolean; handlePasteEvent: (event: ClipboardEvent) => Promise; };