import { BaseComponent } from '../components'; import type { NodeFactory } from './NodeFactory.svelte'; import { Connection, Node } from '../nodes'; import { SvelteSet } from 'svelte/reactivity'; import { Comment } from 'rete-comment-plugin'; import { boxSelection } from '@selenite/commons'; declare const entityTypesMap: { readonly node: typeof Node; readonly connection: typeof Connection; readonly comment: typeof Comment; }; type EntityType = keyof typeof entityTypesMap; export type SelectorEntity = InstanceType<(typeof entityTypesMap)[EntityType]>; type EntityWithType = { type: K; entity: InstanceType<(typeof entityTypesMap)[K]>; }; export declare class NodeSelection extends BaseComponent { #private; entities: SvelteSet; accumulating: boolean; ranging: boolean; modifierActive: boolean; typedEntities: EntityWithType[]; constructor(params: { owner: NodeFactory; }); nodes: Node>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record>[]; connections: Connection>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record>, Node>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record>>[]; picked: SelectorEntity | undefined; pickedNode: Node>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record> | undefined; pickedConnection: Connection>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record>, Node>, { [x: string]: import("../socket").Socket; }, { [x: string]: import("../control").Control; }, Record, Record>> | undefined; entityElement(entity: SelectorEntity): HTMLElement | undefined; isSelected(entity: SelectorEntity): boolean; invertSelection(): void; /** * Selects all entities between two entities. * * Selects only entities with 50% of their bounding box inside * the bouding box formed by the two entities. */ selectRange(a: SelectorEntity, b: SelectorEntity): void; selectMultiple(entities: Iterable): void; select(entity: SelectorEntity, options?: { accumulate?: boolean; pick?: boolean; range?: boolean; }): void; remove(entity: SelectorEntity): void; unselect(entity: SelectorEntity): void; unselectAll(): void; translate(dx: number, dy: number): void; pick(entity: SelectorEntity): void; releasePicked(): void; isPicked(entity: SelectorEntity | EntityWithType): boolean; selectAll(): void; get boxSelectionEnabled(): boolean; boxSelectionAction: ReturnType | undefined; set boxSelectionEnabled(value: boolean); } export type SelectOptions = Parameters[1]; export {};