text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>ional duration. If set, a transition will be applied * @param options.includeHiddenNodes - optional includeHiddenNodes */ fitView: FitView<NodeType>; }; /** * The `ReactFlowInstance` provides a collection of methods to query and manipulate * the internal state of your flow. You can get an instan...
fim
xyflow/xyflow
typescript
<|fim_suffix|> noPanClassName: string; rfId: string; disableKeyboardA11y: boolean; nodeTypes?: NodeTypes; nodeExtent?: CoordinateExtent; onError?: OnError; nodeClickDistance?: number; }; /** * The `BuiltInNode` type represents the built-in node types that are available in React Flow. * You can use this t...
fim
xyflow/xyflow
typescript
<|fim_suffix|>d; onClickConnectStart?: OnConnectStart; onClickConnectEnd?: OnConnectEnd; connectOnClick: boolean; defaultEdgeOptions?: DefaultEdgeOptions; fitViewQueued: boolean; fitViewOptions: FitViewOptions | undefined; fitViewResolver: ReturnType<typeof withResolvers<boolean>> | null; onNodesDel...
fim
xyflow/xyflow
typescript
<|fim_prefix|>/* eslint-disable @typescript-eslint/no-explicit-any */ import { EdgeLookup, NodeLookup, EdgeChange, NodeChange, NodeSelectionChange, EdgeSelectionChange, NodeRemoveChange, EdgeRemoveChange, } from '@xyflow/system'; import type { Node, Edge, InternalNode } from '../types'; /* * This func...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { addEdge as addEdgeSystem, reconnectEdge as reconnectEdgeSystem, createDevWarn, type AddEdgeOptions, type Connection, type EdgeBase, type ReconnectEdgeOptions, } from '@xyflow/system'; const defaultOnError = createDevWarn('React Flow', 'https://reactflow.dev/'); export function add...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { type Ref, type RefAttributes, forwardRef, JSX, PropsWithoutRef } from 'react'; import { isNodeBase, isEdgeBase } from '@xyflow/system'; import type { Edge, Node } from '../types'; /** * Test whether an object is usable as an [`Node`](/api-reference/types/node). * In TypeScript this is a type ...
fim
xyflow/xyflow
typescript
<|fim_suffix|>anges'; export * from './edges'; export * from './general'; <|fim_prefix|>ex<|fim_middle|>port * from './ch<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|> } ); <|fim_prefix|>import prettier from 'eslint-config-prettier'; import { fileURLToPath } from 'node:url'; import { includeIgnoreFile } from '@eslint/compat'; import js fro<|fim_middle|>m '@eslint/js'; import svelte from 'eslint-plugin-svelte'; import { defineConfig } from 'eslint/config'; import glob...
fim
xyflow/xyflow
javascript
<|fim_suffix|> params.noDragClass, handleSelector: params.handleSelector, nodeId: params.nodeId, isSelectable: params.isSelectable, nodeClickDistance: params.nodeClickDistance }); } updateDrag(domNode, params); return { update(params: UseDragParams<NodeType, EdgeType>) { up...
fim
xyflow/xyflow
typescript
<|fim_suffix|>s.svelte'; <|fim_prefix|>export { portal } from './portal.svelte'; export {<|fim_middle|> hideOnSSR } from './util<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { useStore } from '$lib/store'; ty<|fim_suffix|>(node); } } export function portal(node: Element, target: Portal | undefined) { const { domNode } = $derived(useStore()); let destroyEffect: (() => void) | undefined; // svelte-ignore state_referenced_locally if (domNode) { // if the ...
fim
xyflow/xyflow
typescript
<|fim_suffix|>t value() { return hide; } }; } <|fim_prefix|>export function hideOnSSR(): { value: boolean } { let hide = $state(typeof window === 'undefined'); if (hide) { const destroyEffect = $effect.root(() => { $effect(() => { hide = fa<|fim_middle|>lse; destroyEffect?.(); ...
fim
xyflow/xyflow
typescript
<|fim_suffix|> onPanZoomStart, onPanZoomEnd, onDraggingChange }); const viewport = panZoomInstance.getViewport(); if ( initialViewport.x !== viewport.x || initialViewport.y !== viewport.y || initialViewport.zoom !== viewport.zoom ) { onTransformChange([viewport.x, viewport.y, viewpo...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as A11yDescriptions } from './A11yDescriptions.svelte'; export cons<|fim_suffix|>_KEY = 'svelte-flow__edge-desc'; export const ARIA_LIVE_MESSAGE = 'svelte-flow__aria-live'; <|fim_middle|>t ARIA_NODE_DESC_KEY = 'svelte-flow__node-desc'; export const ARIA_EDGE_DESC<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default a<|fim_suffix|>n.svelte'; <|fim_middle|>s Attribution } from './Attributio<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>impo<|fim_suffix|>proOptions?: ProOptions; position?: PanelPosition; }; <|fim_middle|>rt type { PanelPosition, ProOptions } from '@xyflow/system'; export type AttributionProps = { <|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>nLine.svelte'; <|fim_prefix|>export { default as ConnectionLine } from <|fim_middle|>'./Connectio<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|> <|fim_prefix|>export { default as EdgeLabel } from './EdgeLab<|fim_middle|>el.svelte'; export * from './types';<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>; width?: number; height?: number; selectEdgeOnClick?: boolean; transparent?: boolean; children?: Snippet; } & HTMLAttributes<HTMLDivElement>; <|fim_prefix|>import type { Snippet } from 'svelte'; import type { HTMLAttributes } from 'svelte/elements'; export type Edge<|fim_middle|>LabelProps = {...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as EdgeReconnectAnchor } from './<|fim_suffix|>tAnchor.svelte'; export * from './types'; <|fim_middle|>EdgeReconnec<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>lement>; <|fim_prefix|>import type { HandleType, XYPosition } from '@xyflow/system'; import type { Snippet } from 'svelte'; import type { ClassValue, HTMLAttributes } from 'svelt<|fim_middle|>e/elements'; export type EdgeReconnectAnchorProps = { type: HandleType; reconnecting?: boolean; style?: str...
fim
xyflow/xyflow
typescript
<|fim_suffix|>s EdgeWrapper } from './EdgeWrapper.svelte'; <|fim_prefix|>export { d<|fim_middle|>efault a<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as Handle<|fim_suffix|>om './Handle.svelte'; export * from './types'; <|fim_middle|> } fr<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>n?: Snippet; } & HTMLAttributes<HTMLDivElement>; <|fim_prefix|>import type { HandleConnection, HandleProps as HandlePropsSystem } from '@xyflow/system'; import type { Snippet } from 'svelte'; import type { ClassValue, HTMLAttributes } from 'svelte/elements'; export type HandleProps = HandlePropsSystem & ...
fim
xyflow/xyflow
typescript
<|fim_suffix|> './types'; <|fim_prefix|>export { default as KeyHandler } from './KeyHandler.svelte'; export<|fim_middle|> type { KeyHandlerProps } from<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { SvelteFlowStore } from '$lib/store/types'; import type { Node, Edge, KeyDefinition } from '$lib/types'; export type KeyHandlerProps<NodeType extends Node = Node, EdgeType extends Edge = Edge<|fim_suffix|>on | KeyDefinition[] | null; deleteKey?: KeyDefinition | KeyDefinition[] | null; pa...
fim
xyflow/xyflow
typescript
<|fim_suffix|> './NodeSelection.svelte'; <|fim_prefix|>export {<|fim_middle|> default as NodeSelection } from<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|><NodeType, EdgeType>; } & NodeSelectionEvents<NodeType> & Pick<NodeEvents<NodeType>, 'onnodedrag' | 'onnodedragstart' | 'onnodedragstop'>; <|fim_prefix|>import type { SvelteFlowStore } from '$lib/store/types'; import type { Node, Edge, NodeEvents, NodeSelectionEvents } from '$lib/types'; export type No...
fim
xyflow/xyflow
typescript
export { default as NodeWrapper } from './NodeWrapper.svelte'; <|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>e<NodeType, EdgeType>; nodeClickDistance?: number; resizeObserver?: ResizeObserver | null; }; <|fim_prefix|>import type { SvelteFlowStore } from '$lib<|fim_middle|>/store/types'; import type { Node, Edge, InternalNode } from '$lib/types'; export type ConnectableContext = { value: boolean; }; expor...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as Selection <|fim_suffix|> from './Selection.svelte'; <|fim_middle|>}<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>elteFlowProvider.svelte'; <|fim_prefix|>export { default as SvelteFlowProvider<|fim_middle|> } from './Sv<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { Snippet } from 'svelte'; export type SvelteFlowProvid<|fim_suffix|>?: Snippet; }; <|fim_middle|>erProps = { children<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as ViewportPortal } from './ViewportPortal.svelte'; export *<|fim_suffix|>es'; <|fim_middle|> from './typ<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>hildren?: Snippet; } & HTMLAttributes<HTMLDivElement>; <|fim_prefix|>impo<|fim_middle|>rt type { Snippet } from 'svelte'; import type { HTMLAttributes } from 'svelte/elements'; export type ViewportPortalProps = { target: 'front' | 'back'; c<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>// We distinguish between internal and exported edges // The internal edges are used directly like custom edges and always get an id, source and target props // If you import an edge from the library, the id is optional and source and target are not used at all // @todo: how can we prevent this duplicati...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as MarkerDefinition } from './MarkerDefinition.sve<|fim_suffix|>default as Marker } from './Marker.svelte'; <|fim_middle|>lte'; export { <|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as Ed<|fim_suffix|>enderer } from './EdgeRenderer.svelte'; <|fim_middle|>geR<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { defau<|fim_suffix|>erer.svelte'; <|fim_middle|>lt as NodeRenderer } from './NodeRend<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>rt * from './types'; <|fim_prefix|>export { default as Pane } from './Pane.svelte'; exp<|fim_middle|>o<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>nt: PointerEvent) => void; children: Snippet; } & PaneEvents; <|fim_prefix|>import type { Snippet } from 'svelte'; import type { Node, Edge, PaneEvents } from '$lib/types'; import type { SvelteFlowStore } from '$lib/store/types'; export type PaneProps<NodeType extends Node = Node, EdgeType extends Edge...
fim
xyflow/xyflow
typescript
<|fim_suffix|>ort * from './types'; <|fim_prefix|>export { default as Panel } from './Pane<|fim_middle|>l.svelte'; exp<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { PanelPosition } from '@xyflow/system'; import type { ClassValue, HTMLAttributes } from 'svelte/elements'; export <|fim_suffix|>-left' | 'bottom-center' | 'bottom-right' */ position?: PanelPosition; style?: string; class?: ClassValue; }; <|fim_middle|>type PanelProps = HTMLAttribute...
fim
xyflow/xyflow
typescript
<|fim_prefix|>e<|fim_suffix|>ort { default as SvelteFlow } from './SvelteFlow.svelte'; export * from './types'; <|fim_middle|>xp<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { ClassValue } from 'svelte/elements'; import type { ConnectionLineType, NodeOrigin, Viewport, SelectionMode, SnapGrid, OnMoveStart, OnMove, OnMoveEnd, CoordinateExtent, PanOnScrollMode, OnError, ConnectionMode, PanelPosition, ProOptions, ColorMode, OnConnect, ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { de<|fim_suffix|>wport.svelte'; <|fim_middle|>fault as Viewport } from './Vie<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>om } from './Zoom.svelte'; <|fim_prefix|>export { default <|fim_middle|>as Zo<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { SvelteFlowStore } from '$lib/store/types'; import type { Edge, Node } from '$lib/types'; import type { OnMoveStart, OnMove, OnMoveEnd, PanOnScrollMode } from '@xyflow/system'; import type { Snippet } from 'svelte'<|fim_suffix|>ll: boolean; panOnDrag: boolean | number[]; paneClickDistance...
fim
xyflow/xyflow
typescript
<|fim_suffix|>derived(useStore()); return { current: colorMode }; } <|fim_prefix|>import type { ColorModeClass } from '@xyflow/system'<|fim_middle|>; import { useStore } from './useStore'; /** * Hook for receiving the current color mode class 'dark' or 'light'. * */ export function useColorMode(): { curren...
fim
xyflow/xyflow
typescript
<|fim_suffix|> = $derived(useStore()); return { get current() { return connection; } }; } <|fim_prefix|>import { useStore } from '$lib/store'; import type { ConnectionState } from '@xyflow/system'; /** * Hook for receiving the current connection. * * @public * @returns Current connection as a s...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { useStore } from '$lib/store'; /** * Hook for seeing if nodes are initialized * @returns A boolean that indicates if nodes are initialized * @public */ export function useNodesInitialized() { const { nodesInitialized } = $derived(useStore()); return { get current() { <|fim_suffix|...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { useStore }<|fim_suffix|> const node = $derived.by(() => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions nodes; return nodeLookup.get(id); }); return { get current() { return node; } }; } <|fim_middle|> from '$lib/store'; import type { Inter...
fim
xyflow/xyflow
typescript
/* eslint-disable svelte/prefer-svelte-reactivity */ import { areConnectionMapsEqual, handleConnectionChange, type NodeConnection, type UseNodeConnectionsParams } from '@xyflow/system'; import { useStore } from '$lib/store'; import { getNodeIdContext } from '$lib/store/context'; type ConnectionMap = Map<strin...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { shallowNodeData, type DistributivePick } from '@xyflow/system'; import type { Node } from '$lib/types'; import { useStore } from '$lib/store'; /** * Hook for receiving data of one or multiple nodes * * @public * @param nodeId - The id (or ids) of the node to get the data from * @returns An...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { useStore } from '$lib/store'; import type { Edge, Node } from '$lib/types'; import type { Viewport } from '@xyflow/system'; /** * Hook for getting the current nodes from the store. <|fim_suffix|> } <|fim_middle|> * * @public * @returns A reactive signal of the current nodes */ export functio...
fim
xyflow/xyflow
typescript
<|fim_suffix|>et(symbol, onselectionchange); return () => { store.selectionChangeHandlers.delete(symbol); }; }); } <|fim_prefix|>import type { OnSelectionChange } from '$lib/types'; import { useStore } from '$lib/hooks/useStore'; export f<|fim_middle|>unction useOnSelectionChange(onselectionchange: On...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { getContext } from 'svelte'; import { errorMessages } from '@xyflow/system'; import type { StoreContext, SvelteFlowStore } from '../store/types'; import { key } from '../store'; import type { Node, Edge } from '$lib/<|fim_suffix|>rror001']('svelte'); export function useStore< NodeType extends...
fim
xyflow/xyflow
typescript
<|fim_suffix|> ); }, deleteElements: async ({ nodes: nodesToRemove = [], edges: edgesToRemove = [] }) => { const { nodes: matchingNodes, edges: matchingEdges } = await getElementsToRemove< NodeType, EdgeType >({ nodesToRemove, edgesToRemove, nodes: store....
fim
xyflow/xyflow
typescript
<|fim_prefix|>/* eslint-disable svelte/prefer-svelte-reactivity */ import { useStore } from '$lib/store'; import { getNodeIdContext } from '$lib/store/context'; /** * When you programmatically add or remove handles to a node or update a node's * handle position, you need to let Svelte Flow know about it using this h...
fim
xyflow/xyflow
typescript
<|fim_prefix|>// main component export { SvelteFlow } from '$lib/container/SvelteFlow'; export * from '$lib/container/SvelteFlow/types'; // components export * from '$lib/container/Panel'; export * from '$lib/components/SvelteFlowProvider'; export * from '$lib/components/ViewportPortal'; export { BezierEdge, StepE...
fim
xyflow/xyflow
typescript
<|fim_suffix|>ground.svelte'; <|fim_prefix|>export { BackgroundVariant, ty<|fim_middle|>pe BackgroundProps } from './types'; export { default as Background } from './Back<|endoftext|>
fim
xyflow/xyflow
typescript
import type { ClassValue } from 'svelte/elements'; export enum BackgroundVariant { Lines = 'lines', Dots = 'dots', Cross = 'cross' } export type BackgroundProps = { /** When multiple backgrounds are present on the page, each one should have a unique id. */ id?: string; /** Color of the background */ bgC...
fim
xyflow/xyflow
typescript
<|fim_suffix|>s'; <|fim_prefix|>export { default as Controls } from './Controls.svelte'; export { default as ControlButton } from './ControlButton.s<|fim_middle|>velte'; export * from './type<|endoftext|>
fim
xyflow/xyflow
typescript
import type { Snippet } from 'svelte'; import type { ClassValue, HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements'; import type { PanelPosition } from '@xyflow/system'; import type { FitViewOptions } from '$lib/types'; export type ControlsProps = { /** Position of the controls on the pane * @example ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export {<|fim_suffix|>bar.svelte'; export * from './types'; <|fim_middle|> default as EdgeToolbar } from './EdgeTool<|endoftext|>
fim
xyflow/xyflow
typescript
import type { EdgeToolbarBaseProps } from '@xyflow/system'; import type { Snippet } from 'svelte'; import type { HTMLAttributes } from 'svelte/elements'; export type EdgeToolbarProps = Omit<EdgeToolbarBaseProps, 'edgeId'> & { selectEdgeOnClick?: boolean; children?: Snippet; } & HTMLAttributes<HTMLDivElement>; <|en...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as MiniMap } from './M<|fim_suffix|>de } from './MinimapNode.svelte'; export * from './types'; <|fim_middle|>inimap.svelte'; export { default as MiniMapNo<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { XYMinimap, type PanZoomInstance, type XYMinimapUpdate } from '@xyflow/system'; import typ<|fim_suffix|>omNode: Element, params: UseInteractiveParams) { const minimap = XYMinimap({ domNode, panZoom: params.panZoom, getTransform: () => { const { viewport } = params.store; ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { PanelPosition } from '@xyflow/system'; import type { ClassValue, HTMLAttributes } from 'svelte/elements'; import type { Component } from 'svelte'; import type { Node } from '$lib/types'; export type GetMiniMapNodeAttribute = (node: Node) => string; /** * The props that are passed to the M...
fim
xyflow/xyflow
typescript
<|fim_suffix|>l } from './ResizeControl.svelte'; <|fim_prefix|>export<|fim_middle|> { default as NodeResizer } from './NodeResizer.svelte'; export { default as NodeResizeContro<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|>llback to determine if node should resize */ shouldResize?: ShouldResize; /** Callback called when resizing starts */ onResizeStart?: OnResizeStart; /** Callback called when resizing */ onResize?: OnResize; /** Callback called when resizing ends */ onResizeEnd?: OnResizeEnd; /** The direct...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export { default as NodeToolbar } from './NodeToolbar.svelt<|fim_suffix|> <|fim_middle|>e'; export * from './types';<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { Position, Align } from '@xyflow/system'; import t<|fim_suffix|>f the toolbar relative to the node * @example Position.TopLeft, Position.TopRight, * Position.BottomLeft, Position.BottomRight */ position?: Position; /** Align the toolbar relative to the node * @example Align.St...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { ConnectableContext } from '$lib/components/NodeWrapper/types'; import { setContext, getContext, hasContext } from 'svelte'; /** * Creates a type-safe context getter and setter pair. * Extended from Svelte's official createContext pattern. * - When called with an error message string, it ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { panBy as panBySystem, updateNodeInternals as updateNodeInternalsSystem, initialConnection, errorMessages, type UpdateNodePositions, type InternalNodeUpdate, type ViewportHelperFunctionOptions, type Connection, type XYPosition, type CoordinateExtent, type UpdateConnection, ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>/* eslint-disable svelte/prefer-svelte-reactivity */ import { infiniteExtent, SelectionMode, ConnectionMode, createDevWarn, adoptUserNodes, getViewportForBounds, updateConnectionLookup, initialConnection, mergeAriaLabelConfig, type SelectionRect, type SnapGrid, type MarkerProps, ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import type { InternalNodeUpdate, XYPosition, ViewportHelperFunctionOptions, Connection, UpdateNodePositions, CoordinateExtent, UpdateConnection, Viewport, SetCenter }<|fim_suffix|>rops<NodeType extends Node = Node, EdgeType extends Edge = Edge> = Omit< SvelteFlowProps<NodeType, EdgeTy...
fim
xyflow/xyflow
typescript
<|fim_suffix|>ceNode); visibleNodes!.set(targetNode.id, targetNode); } else { continue; } } // we reuse the previous edge object if // the current and previous edge are the same // and the source and target node are the same // and references to internalNodes are the sam...
fim
xyflow/xyflow
typescript
import type { Component } from 'svelte'; import type { ClassValue, HTMLAttributes, SVGAttributes } from 'svelte/elements'; import type { EdgeBase, BezierPathOptions, DefaultEdgeOptionsBase, EdgePosition, SmoothStepPathOptions, StepPathOptions } from '@xyflow/system'; import type { Node } from '$lib/types';...
fim
xyflow/xyflow
typescript
<|fim_suffix|> handler is called when a user clicks an edge. */ onedgeclick?: ({ edge, event }: { edge: EdgeType; event: MouseEvent }) => void; /** This event handler is called when a user right-clicks an edge. */ onedgecontextmenu?: ({ edge, event }: { edge: EdgeType; event: MouseEvent }) => void; /** This eve...
fim
xyflow/xyflow
typescript
<|fim_suffix|> Edge > = OnBeforeDeleteBase<NodeType, EdgeType>; /** * This type can be used to type the `isValidConnection` function. * If the function returns `true`, the connection is valid and can be created. */ export type IsValidConnection<EdgeType extends Edge = Edge> = ( edge: EdgeType | Connection ) => ...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export *<|fim_suffix|>ral'; export * from './events'; <|fim_middle|> from './nodes'; export * from './edges'; export * from './gene<|endoftext|>
fim
xyflow/xyflow
typescript
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 ad...
fim
xyflow/xyflow
typescript
<|fim_suffix|>Type extends EdgeBase>( edgeParams: EdgeType | Connection, edges: EdgeType[], options: AddEdgeOptions = {} ): EdgeType[] { return addEdgeSystem(edgeParams, edges, { ...options, onError: options.onError ?? defaultOnError, }); } <|fim_prefix|>import { addEdge as addEdgeSystem, c<|fim_m...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import { isNodeBase, isEdgeBase, type XYPosition } from '@xyflow/system'; import type { Edge, Node } from '$lib/types'; /** * Test whether an object is usable as a Node * @public * @remarks In TypeScript this is a type g<|fim_suffix|>he type of whatever you pass in to Edge if it returns true * @para...
fim
xyflow/xyflow
typescript
<|fim_prefix|>/** @typedef {typeof __propDef.props} PageProps */ /** @typedef {typeof __propDef.events} PageEvents */ /** @typedef {typeof __propDef.slots} PageSlots */ // export default class Page extends SvelteComponentTyped<{ // [x: string]: never; // }, { // [ev<|fim_suffix|> [evt: string]: CustomEvent...
fim
xyflow/xyflow
typescript
<|fim_prefix|>import adapter from '@sveltejs/adapter-auto'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */ const c<|fim_suffix|>es: true }, kit: { adapter: adapter() } }; export default config; <|fim_middle|>onfig = { preprocess: vitePreprocess...
fim
xyflow/xyflow
javascript
<|fim_prefix|>module.exports = <|fim_suffix|>nds: ['@xyflow/eslint-config'], }; <|fim_middle|>{ root: true, exte<|endoftext|>
fim
xyflow/xyflow
javascript
<|fim_prefix|>import { CoordinateExtent, HandleType } from './types'; export const errorMessages = { error001: (lib: string = 'react') => `Seems like y<|fim_suffix|>.NEGATIVE_INFINITY], [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY], ]; export const elementSelectionKeys = ['Enter', ' ', 'Escape']; expo...
fim
xyflow/xyflow
typescript
<|fim_suffix|>inimap'; export * from './xypanzoom'; export * from './xyresizer'; <|fim_prefix|>export * from './constants'; export * from './types'; export * from './utils'; export * from './xydrag'; export * from './xyhandle'; ex<|fim_middle|>port * from './xym<|endoftext|>
fim
xyflow/xyflow
typescript
<|fim_suffix|> the node and not just the measured dimensions */ setAttributes?: boolean | 'width' | 'height'; }; export type NodePositionChange = { id: string; type: 'position'; position?: XYPosition; positionAbsolute?: XYPosition; dragging?: boolean; }; export type NodeSelectionChange = { id: string; ...
fim
xyflow/xyflow
typescript
<|fim_suffix|>dgeLookup<EdgeType extends EdgeBase = EdgeBase> = Map<string, EdgeType>; export type EdgeToolbarBaseProps = { /** * The `x` position of the edge toolbar. */ x: number; /** * The `y` position of the edge toolbar. */ y: number; /** If `true`, edge toolbar is visible even if edge is no...
fim
xyflow/xyflow
typescript
<|fim_suffix|> * * @public */ export type ConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = | ConnectionInProgress<NodeType> | NoConnection; export type FinalConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = Omit< ConnectionState<NodeType>, 'inProgress' >; export...
fim
xyflow/xyflow
typescript
<|fim_suffix|>n.Right, Position.Bottom, Position.Left */ position: Position; /** * Should you be able to connect to/from this handle. * @default true */ isConnectable?: boolean; /** * Dictates whether a connection can start from this handle. * @default true */ isConnectableStart?: boolean...
fim
xyflow/xyflow
typescript
<|fim_prefix|>export * from './changes'; export * from './gener<|fim_suffix|> './nodes'; export * from './edges'; export * from './handles'; export * from './utils'; export * from './panzoom'; <|fim_middle|>al'; export * from<|endoftext|>
fim
xyflow/xyflow
typescript
import type { XYPosition, Position, CoordinateExtent, Handle } from '.'; import { Optional } from '../utils/types'; /** * Framework independent node data structure. * * @inline * @typeParam NodeData - type of the node data * @typeParam NodeType - type of the node */ export type NodeBase< NodeData extends Recor...
fim
xyflow/xyflow
typescript
<|fim_suffix|> ) => Promise<ZoomTransform | undefined>; setScaleExtent: (scaleExtent: [number, number]) => void; setTranslateExtent: (translateExtent: CoordinateExtent) => void; scaleTo: (scale: number, options?: PanZoomTransformOptions) => Promise<boolean>; scaleBy: (factor: number, options?: PanZoomTransformO...
fim
xyflow/xyflow
typescript
/** * While [`PanelPosition`](/api-reference/types/panel-position) can be used to place a * component in the corners of a container, the `Position` enum is less precise and used * primarily in relation to edges and handles. * * @public */ export enum Position { Left = 'left', Top = 'top', Right = 'right', ...
fim
xyflow/xyflow
typescript
<|fim_suffix|> void ) { if (!cb) { return; } const diff: HandleConnection[] = []; a.forEach((connection, key) => { if (!b?.has(key)) { diff.push(connection); } }); if (diff.length) { cb(diff); } } export function getConnectionStatus(isValid: boolean | null) { return isValid ===...
fim
xyflow/xyflow
typescript
<|fim_suffix|>ttribute('data-handlepos') as unknown as Position, x: (handleBounds.left - nodeBounds.left) / zoom, y: (handleBounds.top - nodeBounds.top) / zoom, ...getDimensions(handle as HTMLDivElement), }; }); }; <|fim_prefix|>import type { Transform, XYPosition, SnapGrid, Dimensions, Position...
fim
xyflow/xyflow
typescript