import type { Component } from 'svelte'; import type { ClassValue, HTMLAttributes, DOMAttributes } from 'svelte/elements'; import type { InternalNodeBase, NodeBase, NodeProps as NodePropsBase } from '@xyflow/system'; /** * The node data structure that gets used for internal nodes. * There are some data structures added under node.internal * that are needed for tracking some properties * @public */ export type InternalNode = InternalNodeBase; /** * The node data structure that gets used for the nodes prop. * @public */ export type Node = Record, NodeType extends string | undefined = string | undefined> = NodeBase & { class?: ClassValue; style?: string; focusable?: boolean; /** * The ARIA role attribute for the node element, used for accessibility. * @default "group" */ ariaRole?: HTMLAttributes['role']; /** * General escape hatch for adding custom attributes to the node's DOM element. */ domAttributes?: Omit, 'id' | 'style' | 'class' | 'draggable' | 'role' | 'aria-label' | 'dangerouslySetInnerHTML' | keyof DOMAttributes>; }; export type NodeProps = NodePropsBase & { type: any; }; export type NodeTypes = Record>; export type BuiltInNode = Node<{ label: string; }, 'input' | 'output' | 'default' | undefined> | Node, 'group'>;