@xyflow/vue 2.0.0-next.0 → 2.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, Component, ComputedRef, DefineComponent, HTMLAttributes, InjectionKey, MaybeRefOrGetter, SVGAttributes, ToRefs, VNode } from "vue";
2
- import { Align, AriaLabelConfig, AriaLabelConfig as AriaLabelConfig$1, ColorMode, ColorMode as ColorMode$1, ColorModeClass, Connection, Connection as Connection$1, ConnectionLineType, ConnectionLineType as ConnectionLineType$1, ConnectionMode, ConnectionMode as ConnectionMode$1, ControlLinePosition, ControlLinePosition as ControlLinePosition$1, ControlPosition, ControlPosition as ControlPosition$1, CoordinateExtent, CoordinateExtent as CoordinateExtent$1, Dimensions, Dimensions as Dimensions$1, DistributivePick, EdgeBase, EdgeRemoveChange, EdgeRemoveChange as EdgeRemoveChange$1, EdgeSelectionChange, EdgeSelectionChange as EdgeSelectionChange$1, FinalConnectionState, FinalConnectionState as FinalConnectionState$1, FitViewOptionsBase, FitViewOptionsBase as FitViewOptions, GetViewport, GetViewport as GetViewport$1, HandleType, HandleType as HandleType$1, InternalNodeBase, NodeBase, NodeConnection, NodeConnection as NodeConnection$1, NodeDimensionChange, NodeDimensionChange as NodeDimensionChange$1, NodePositionChange, NodePositionChange as NodePositionChange$1, NodeRemoveChange, NodeRemoveChange as NodeRemoveChange$1, NodeSelectionChange, NodeSelectionChange as NodeSelectionChange$1, Padding, Padding as Padding$1, PaddingUnit, PaddingWithUnit, PanOnScrollMode, PanOnScrollMode as PanOnScrollMode$1, PanZoomInstance, PanelPosition, Position, Position as Position$1, Project, Project as Project$1, Rect, Rect as Rect$1, ResizeControlVariant, ResizeControlVariant as ResizeControlVariant$1, ResizeControlVariant as ResizeControlVariant$2, ResizeDragEvent, ResizeDragEvent as ResizeDragEvent$1, ResizeParams, ResizeParams as ResizeParams$1, ResizeParamsWithDirection, ResizeParamsWithDirection as ResizeParamsWithDirection$1, SelectionMode, SelectionMode as SelectionMode$1, SelectionRect, SelectionRect as SelectionRect$1, SetCenter, SetCenter as SetCenter$1, SetCenterOptions, SetViewport, SetViewport as SetViewport$1, ShouldResize, ShouldResize as ShouldResize$1, SnapGrid, SnapGrid as SnapGrid$1, Transform, Viewport, Viewport as Viewport$1, ViewportHelperFunctionOptions, ViewportHelperFunctionOptions as ViewportHelperFunctionOptions$1, XYPosition, XYPosition as XYPosition$1, ZIndexMode, ZIndexMode as ZIndexMode$1, ZoomInOut, ZoomInOut as ZoomInOut$1, ZoomTo, ZoomTo as ZoomTo$1, clamp, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdgeBase, isInternalNodeBase, isMacOs, isNodeBase, pointToRendererPoint, rendererPointToPoint } from "@xyflow/system";
2
+ import { Align, AriaLabelConfig, AriaLabelConfig as AriaLabelConfig$1, ColorMode, ColorMode as ColorMode$1, Connection, Connection as Connection$1, ConnectionLineType, ConnectionLineType as ConnectionLineType$1, ConnectionMode, ConnectionMode as ConnectionMode$1, ControlLinePosition, ControlLinePosition as ControlLinePosition$1, ControlPosition, ControlPosition as ControlPosition$1, CoordinateExtent, CoordinateExtent as CoordinateExtent$1, Dimensions, Dimensions as Dimensions$1, DistributivePick, EdgeBase, EdgeRemoveChange, EdgeRemoveChange as EdgeRemoveChange$1, EdgeSelectionChange, EdgeSelectionChange as EdgeSelectionChange$1, FinalConnectionState, FinalConnectionState as FinalConnectionState$1, FitViewOptionsBase, FitViewOptionsBase as FitViewOptions, GetViewport, GetViewport as GetViewport$1, HandleType, HandleType as HandleType$1, InternalNodeBase, NodeBase, NodeConnection, NodeConnection as NodeConnection$1, NodeDimensionChange, NodeDimensionChange as NodeDimensionChange$1, NodePositionChange, NodePositionChange as NodePositionChange$1, NodeRemoveChange, NodeRemoveChange as NodeRemoveChange$1, NodeSelectionChange, NodeSelectionChange as NodeSelectionChange$1, Padding, Padding as Padding$1, PaddingUnit, PaddingWithUnit, PanOnScrollMode, PanOnScrollMode as PanOnScrollMode$1, PanZoomInstance, PanelPosition, Position, Position as Position$1, Project, Project as Project$1, Rect, Rect as Rect$1, ResizeControlVariant, ResizeControlVariant as ResizeControlVariant$1, ResizeControlVariant as ResizeControlVariant$2, ResizeDragEvent, ResizeDragEvent as ResizeDragEvent$1, ResizeParams, ResizeParams as ResizeParams$1, ResizeParamsWithDirection, ResizeParamsWithDirection as ResizeParamsWithDirection$1, SelectionMode, SelectionMode as SelectionMode$1, SelectionRect, SelectionRect as SelectionRect$1, SetCenter, SetCenter as SetCenter$1, SetCenterOptions, SetViewport, SetViewport as SetViewport$1, ShouldResize, ShouldResize as ShouldResize$1, SnapGrid, SnapGrid as SnapGrid$1, Transform, Viewport, Viewport as Viewport$1, ViewportHelperFunctionOptions, ViewportHelperFunctionOptions as ViewportHelperFunctionOptions$1, XYPosition, XYPosition as XYPosition$1, ZIndexMode, ZIndexMode as ZIndexMode$1, ZoomInOut, ZoomInOut as ZoomInOut$1, ZoomTo, ZoomTo as ZoomTo$1, clamp, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdgeBase, isInternalNodeBase, isMacOs, isNodeBase, pointToRendererPoint, rendererPointToPoint } from "@xyflow/system";
3
3
  import { KeyFilter } from "@vueuse/core";
4
4
 
5
5
  //#region src/components/Background/types.d.ts
@@ -75,8 +75,8 @@ declare const _default: typeof __VLS_export$14;
75
75
  declare const __VLS_export$14: __VLS_WithSlots$10<import("vue").DefineComponent<BackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BackgroundProps> & Readonly<{}>, {
76
76
  x: number;
77
77
  y: number;
78
- offset: number | [number, number];
79
78
  size: number;
79
+ offset: number | [number, number];
80
80
  variant: BackgroundVariant;
81
81
  gap: number | number[];
82
82
  lineWidth: number;
@@ -671,7 +671,6 @@ interface State<NodeType extends Node = Node, EdgeType extends Edge = Edge> exte
671
671
  translateExtent: CoordinateExtent$1;
672
672
  nodeExtent: CoordinateExtent$1;
673
673
  nodeOrigin: NodeOrigin;
674
- colorMode: ColorMode$1;
675
674
  /** viewport dimensions - do not change! */
676
675
  readonly dimensions: Dimensions$1;
677
676
  /** canonical viewport transform `[x, y, zoom]` (the `@xyflow/system` representation) - do not change! Read `viewport` for the `{ x, y, zoom }` shape. */
@@ -1212,8 +1211,8 @@ interface FlowProps<NodeType extends Node = Node, EdgeType extends Edge = Edge>
1212
1211
  nodeExtent?: CoordinateExtent$1;
1213
1212
  /** origin of all nodes relative to their position — `[0, 0]` top-left, `[0.5, 0.5]` center, `[1, 1]` bottom-right */
1214
1213
  nodeOrigin?: NodeOrigin;
1215
- /** light/dark/system applies the resolved `light`/`dark` class to the flow container; `system` follows `prefers-color-scheme` @default 'light' */
1216
- colorMode?: ColorMode$1;
1214
+ /** Forces a color scheme on the flow container via class name. Page-level theming is typically done by setting `data-theme` on `<html>`. */
1215
+ forceColorMode?: ColorMode$1;
1217
1216
  /** color of edge markers; pass `null` to drive the arrowhead color from the `--xy-edge-stroke` CSS variable @default '#b1b1b7' */
1218
1217
  defaultMarkerColor?: string | null;
1219
1218
  zoomOnScroll?: boolean;
@@ -1359,14 +1358,14 @@ interface FlowEmits<NodeType extends Node = Node, EdgeType extends Edge = Edge>
1359
1358
  nodeDrag: [nodeDragEvent: NodeDragEvent<NodeType>];
1360
1359
  nodeDragStop: [nodeDragEvent: NodeDragEvent<NodeType>];
1361
1360
  }
1362
- type NodeByType<NodeType extends Node, T extends string> = NodeType extends any ? (T extends NonNullable<NodeType['type']> ? NodeType : never) : never;
1363
- type EdgeByType<EdgeType extends Edge, T extends string> = EdgeType extends any ? (T extends NonNullable<EdgeType['type']> ? EdgeType : never) : never;
1361
+ type NodeByType<NodeType extends Node, T extends string> = NodeType extends any ? T extends NonNullable<NodeType['type']> ? NodeType : never : never;
1362
+ type EdgeByType<EdgeType extends Edge, T extends string> = EdgeType extends any ? T extends NonNullable<EdgeType['type']> ? EdgeType : never : never;
1364
1363
  type NodeSlots<NodeType extends Node = Node> = Partial<{ [T in NonNullable<NodeType['type']> as `node-${T}`]: (nodeProps: NodeProps<NodeByType<NodeType, T>>) => any } & Record<`node-${string}`, (nodeProps: NodeProps<NodeType>) => any>>;
1365
1364
  type EdgeSlots<EdgeType extends Edge = Edge> = Partial<{ [T in NonNullable<EdgeType['type']> as `edge-${T}`]: (edgeProps: EdgeProps<EdgeByType<EdgeType, T>>) => any } & Record<`edge-${string}`, (edgeProps: EdgeProps<EdgeType>) => any>>;
1366
1365
  type FlowSlots<NodeType extends Node = Node, EdgeType extends Edge = Edge> = NodeSlots<NodeType> & EdgeSlots<EdgeType> & {
1367
1366
  'connection-line'?: (connectionLineProps: ConnectionLineProps<NodeType>) => any;
1368
1367
  'zoom-pane'?: () => any;
1369
- 'default'?: () => any;
1368
+ default?: () => any;
1370
1369
  };
1371
1370
  //#endregion
1372
1371
  //#region src/types/node.d.ts
@@ -2204,5 +2203,5 @@ declare const NodeId: InjectionKey<string>;
2204
2203
  declare const defaultNodeTypes: DefaultNodeTypes;
2205
2204
  declare const defaultEdgeTypes: DefaultEdgeTypes;
2206
2205
  //#endregion
2207
- export { Actions, AddEdges, AddNodes, type Align, type AriaLabelConfig, _default as Background, BackgroundProps, BackgroundVariant, _default$1 as BaseEdge, BaseEdgeProps, BezierEdge, BezierEdgeProps, BezierEdgeType, BezierPathOptions, BuiltInNode, CSSVars, ClassValue, type ColorMode, type ColorModeClass, ComputedGetters, ConnectEndEvent, ConnectingHandle, type Connection, ConnectionInProgress, ConnectionLineOptions, ConnectionLineProps, ConnectionLineType, ConnectionLookup, ConnectionMode, ConnectionState, ConnectionStatus, Connector, _default$2 as ControlButton, ControlEmits, type ControlLinePosition, type ControlPosition, ControlProps, _default$3 as Controls, type CoordinateExtent, CustomThemeVars, DefaultEdge, DefaultEdgeOptions, DefaultEdgeTypes, DefaultNodeTypes, DeleteElements, type Dimensions, Edge, EdgeAddChange, EdgeChange, EdgeComponent, EdgeEventsHandler, EdgeEventsOn, EdgeLabelOptions, _default$4 as EdgeLabelRenderer, EdgeLookup, EdgeMarker, EdgeMarkerType, EdgeMouseEvent, EdgePositions, EdgeProps, EdgeReconnectEndEvent, EdgeReconnectEvent, EdgeReconnectStartEvent, EdgeReconnectable, type EdgeRemoveChange, type EdgeSelectionChange, EdgeSlots, _default$5 as EdgeText, EdgeTextProps, EdgeTypesObject, ElementChange, ErrorCode, type FinalConnectionState, FitBounds, FitBoundsOptions, FitView, type FitViewOptions, FlowEmits, FlowEvents, FlowExportObject, FlowHooks, FlowHooksEmit, FlowHooksOn, FlowOptions, FlowProps, FlowSlots, GetEdge, GetInternalNode, GetIntersectingNodes, GetNode, type GetViewport, Getters, _default$6 as Handle, HandleConnectable, HandleConnectableFunc, HandleElement, HandleProps, type HandleType, InternalNode, IsNodeIntersecting, IsValidParams, MarkerProps, MarkerType, _default$7 as MiniMap, MiniMapEmits, _default$8 as MiniMapNode, MiniMapNodeEmits, MiniMapNodeFunc, MiniMapNodeProps, MiniMapProps, MiniMapSlots, MouseTouchEvent, NoConnection, Node, NodeAddChange, NodeChange, NodeComponent, type NodeConnection, type NodeDimensionChange, NodeDragEvent, NodeDragItem, NodeEventsHandler, NodeEventsOn, NodeHandleBounds, NodeId as NodeIdInjection, NodeLookup, NodeMouseEvent, NodeOrigin, type NodePositionChange, NodeProps, type NodeRemoveChange, _default$9 as NodeResizeControl, _default$10 as NodeResizer, NodeResizerEmits, NodeResizerProps, type NodeSelectionChange, NodeSlots, _default$11 as NodeToolbar, NodeToolbarProps, NodeTypesObject, OnBeforeDelete, OnConnectStartParams, OnResize, OnResizeEnd, OnResizeStart, type Padding, type PaddingUnit, type PaddingWithUnit, PanOnScrollMode, _default$12 as Panel, PanelProps, Position, type Project, ReconnectEdge, type Rect, RemoveEdges, RemoveNodes, ResizeControlLineProps, ResizeControlProps, ResizeControlVariant, type ResizeDragEvent, type ResizeParams, type ResizeParamsWithDirection, Result, SelectionChangeEvent, SelectionMode, type SelectionRect, type SetCenter, type SetCenterOptions, SetEdges, SetNodes, SetState, SetStateOptions, type SetViewport, ShapeRendering, type ShouldResize, SimpleBezierEdge, SimpleBezierEdgeProps, Slots, SmoothStepEdge, SmoothStepEdgeProps, SmoothStepEdgeType, SmoothStepPathOptions, type SnapGrid, State, StepEdge, StepEdgeProps, StraightEdge, StraightEdgeProps, Styles, ThemeVars, UpdateEdge, UpdateEdgeData, UpdateNode, UpdateNodeData, UpdateNodeDimensions, UpdateNodeDimensionsParams, UpdateNodeInternals, UpdateNodePosition, ValidConnectionFunc, type Viewport, ViewportFunctions, type ViewportHelperFunctionOptions, _default$13 as VueFlow, VueFlowError, VueFlow as VueFlowInjection, VueFlowInstance, _default$14 as VueFlowProvider, VueFlowState, VueFlowStoreHandle, type XYPosition, type ZIndexMode, type ZoomInOut, type ZoomTo, applyChanges, applyEdgeChanges, applyNodeChanges, clamp, connectionExists, defaultEdgeTypes, defaultNodeTypes, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdge, isEdgeBase, isErrorOfType, isInternalNode, isInternalNodeBase, isMacOs, isNode, isNodeBase, pointToRendererPoint, rendererPointToPoint, storeToRefs, useConnection, useEdge, useEdgesData, useHandle, useInternalNode, useKeyPress, useNode, useNodeConnections, useNodeId, useNodesData, useNodesInitialized, useStore, useVueFlow };
2206
+ export { Actions, AddEdges, AddNodes, type Align, type AriaLabelConfig, _default as Background, BackgroundProps, BackgroundVariant, _default$1 as BaseEdge, BaseEdgeProps, BezierEdge, BezierEdgeProps, BezierEdgeType, BezierPathOptions, BuiltInNode, CSSVars, ClassValue, type ColorMode, ComputedGetters, ConnectEndEvent, ConnectingHandle, type Connection, ConnectionInProgress, ConnectionLineOptions, ConnectionLineProps, ConnectionLineType, ConnectionLookup, ConnectionMode, ConnectionState, ConnectionStatus, Connector, _default$2 as ControlButton, ControlEmits, type ControlLinePosition, type ControlPosition, ControlProps, _default$3 as Controls, type CoordinateExtent, CustomThemeVars, DefaultEdge, DefaultEdgeOptions, DefaultEdgeTypes, DefaultNodeTypes, DeleteElements, type Dimensions, Edge, EdgeAddChange, EdgeChange, EdgeComponent, EdgeEventsHandler, EdgeEventsOn, EdgeLabelOptions, _default$4 as EdgeLabelRenderer, EdgeLookup, EdgeMarker, EdgeMarkerType, EdgeMouseEvent, EdgePositions, EdgeProps, EdgeReconnectEndEvent, EdgeReconnectEvent, EdgeReconnectStartEvent, EdgeReconnectable, type EdgeRemoveChange, type EdgeSelectionChange, EdgeSlots, _default$5 as EdgeText, EdgeTextProps, EdgeTypesObject, ElementChange, ErrorCode, type FinalConnectionState, FitBounds, FitBoundsOptions, FitView, type FitViewOptions, FlowEmits, FlowEvents, FlowExportObject, FlowHooks, FlowHooksEmit, FlowHooksOn, FlowOptions, FlowProps, FlowSlots, GetEdge, GetInternalNode, GetIntersectingNodes, GetNode, type GetViewport, Getters, _default$6 as Handle, HandleConnectable, HandleConnectableFunc, HandleElement, HandleProps, type HandleType, InternalNode, IsNodeIntersecting, IsValidParams, MarkerProps, MarkerType, _default$7 as MiniMap, MiniMapEmits, _default$8 as MiniMapNode, MiniMapNodeEmits, MiniMapNodeFunc, MiniMapNodeProps, MiniMapProps, MiniMapSlots, MouseTouchEvent, NoConnection, Node, NodeAddChange, NodeChange, NodeComponent, type NodeConnection, type NodeDimensionChange, NodeDragEvent, NodeDragItem, NodeEventsHandler, NodeEventsOn, NodeHandleBounds, NodeId as NodeIdInjection, NodeLookup, NodeMouseEvent, NodeOrigin, type NodePositionChange, NodeProps, type NodeRemoveChange, _default$9 as NodeResizeControl, _default$10 as NodeResizer, NodeResizerEmits, NodeResizerProps, type NodeSelectionChange, NodeSlots, _default$11 as NodeToolbar, NodeToolbarProps, NodeTypesObject, OnBeforeDelete, OnConnectStartParams, OnResize, OnResizeEnd, OnResizeStart, type Padding, type PaddingUnit, type PaddingWithUnit, PanOnScrollMode, _default$12 as Panel, PanelProps, Position, type Project, ReconnectEdge, type Rect, RemoveEdges, RemoveNodes, ResizeControlLineProps, ResizeControlProps, ResizeControlVariant, type ResizeDragEvent, type ResizeParams, type ResizeParamsWithDirection, Result, SelectionChangeEvent, SelectionMode, type SelectionRect, type SetCenter, type SetCenterOptions, SetEdges, SetNodes, SetState, SetStateOptions, type SetViewport, ShapeRendering, type ShouldResize, SimpleBezierEdge, SimpleBezierEdgeProps, Slots, SmoothStepEdge, SmoothStepEdgeProps, SmoothStepEdgeType, SmoothStepPathOptions, type SnapGrid, State, StepEdge, StepEdgeProps, StraightEdge, StraightEdgeProps, Styles, ThemeVars, UpdateEdge, UpdateEdgeData, UpdateNode, UpdateNodeData, UpdateNodeDimensions, UpdateNodeDimensionsParams, UpdateNodeInternals, UpdateNodePosition, ValidConnectionFunc, type Viewport, ViewportFunctions, type ViewportHelperFunctionOptions, _default$13 as VueFlow, VueFlowError, VueFlow as VueFlowInjection, VueFlowInstance, _default$14 as VueFlowProvider, VueFlowState, VueFlowStoreHandle, type XYPosition, type ZIndexMode, type ZoomInOut, type ZoomTo, applyChanges, applyEdgeChanges, applyNodeChanges, clamp, connectionExists, defaultEdgeTypes, defaultNodeTypes, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdge, isEdgeBase, isErrorOfType, isInternalNode, isInternalNodeBase, isMacOs, isNode, isNodeBase, pointToRendererPoint, rendererPointToPoint, storeToRefs, useConnection, useEdge, useEdgesData, useHandle, useInternalNode, useKeyPress, useNode, useNodeConnections, useNodeId, useNodesData, useNodesInitialized, useStore, useVueFlow };
2208
2207
  //# sourceMappingURL=index.d.mts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Align, AriaLabelConfig, AriaLabelConfig as AriaLabelConfig$1, ColorMode, ColorMode as ColorMode$1, ColorModeClass, Connection, Connection as Connection$1, ConnectionLineType, ConnectionLineType as ConnectionLineType$1, ConnectionMode, ConnectionMode as ConnectionMode$1, ControlLinePosition, ControlLinePosition as ControlLinePosition$1, ControlPosition, ControlPosition as ControlPosition$1, CoordinateExtent, CoordinateExtent as CoordinateExtent$1, Dimensions, Dimensions as Dimensions$1, DistributivePick, EdgeBase, EdgeRemoveChange, EdgeRemoveChange as EdgeRemoveChange$1, EdgeSelectionChange, EdgeSelectionChange as EdgeSelectionChange$1, FinalConnectionState, FinalConnectionState as FinalConnectionState$1, FitViewOptionsBase, FitViewOptionsBase as FitViewOptions, GetViewport, GetViewport as GetViewport$1, HandleType, HandleType as HandleType$1, InternalNodeBase, NodeBase, NodeConnection, NodeConnection as NodeConnection$1, NodeDimensionChange, NodeDimensionChange as NodeDimensionChange$1, NodePositionChange, NodePositionChange as NodePositionChange$1, NodeRemoveChange, NodeRemoveChange as NodeRemoveChange$1, NodeSelectionChange, NodeSelectionChange as NodeSelectionChange$1, Padding, Padding as Padding$1, PaddingUnit, PaddingWithUnit, PanOnScrollMode, PanOnScrollMode as PanOnScrollMode$1, PanZoomInstance, PanelPosition, Position, Position as Position$1, Project, Project as Project$1, Rect, Rect as Rect$1, ResizeControlVariant, ResizeControlVariant as ResizeControlVariant$1, ResizeControlVariant as ResizeControlVariant$2, ResizeDragEvent, ResizeDragEvent as ResizeDragEvent$1, ResizeParams, ResizeParams as ResizeParams$1, ResizeParamsWithDirection, ResizeParamsWithDirection as ResizeParamsWithDirection$1, SelectionMode, SelectionMode as SelectionMode$1, SelectionRect, SelectionRect as SelectionRect$1, SetCenter, SetCenter as SetCenter$1, SetCenterOptions, SetViewport, SetViewport as SetViewport$1, ShouldResize, ShouldResize as ShouldResize$1, SnapGrid, SnapGrid as SnapGrid$1, Transform, Viewport, Viewport as Viewport$1, ViewportHelperFunctionOptions, ViewportHelperFunctionOptions as ViewportHelperFunctionOptions$1, XYPosition, XYPosition as XYPosition$1, ZIndexMode, ZIndexMode as ZIndexMode$1, ZoomInOut, ZoomInOut as ZoomInOut$1, ZoomTo, ZoomTo as ZoomTo$1, clamp, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdgeBase, isInternalNodeBase, isMacOs, isNodeBase, pointToRendererPoint, rendererPointToPoint } from "@xyflow/system";
1
+ import { Align, AriaLabelConfig, AriaLabelConfig as AriaLabelConfig$1, ColorMode, ColorMode as ColorMode$1, Connection, Connection as Connection$1, ConnectionLineType, ConnectionLineType as ConnectionLineType$1, ConnectionMode, ConnectionMode as ConnectionMode$1, ControlLinePosition, ControlLinePosition as ControlLinePosition$1, ControlPosition, ControlPosition as ControlPosition$1, CoordinateExtent, CoordinateExtent as CoordinateExtent$1, Dimensions, Dimensions as Dimensions$1, DistributivePick, EdgeBase, EdgeRemoveChange, EdgeRemoveChange as EdgeRemoveChange$1, EdgeSelectionChange, EdgeSelectionChange as EdgeSelectionChange$1, FinalConnectionState, FinalConnectionState as FinalConnectionState$1, FitViewOptionsBase, FitViewOptionsBase as FitViewOptions, GetViewport, GetViewport as GetViewport$1, HandleType, HandleType as HandleType$1, InternalNodeBase, NodeBase, NodeConnection, NodeConnection as NodeConnection$1, NodeDimensionChange, NodeDimensionChange as NodeDimensionChange$1, NodePositionChange, NodePositionChange as NodePositionChange$1, NodeRemoveChange, NodeRemoveChange as NodeRemoveChange$1, NodeSelectionChange, NodeSelectionChange as NodeSelectionChange$1, Padding, Padding as Padding$1, PaddingUnit, PaddingWithUnit, PanOnScrollMode, PanOnScrollMode as PanOnScrollMode$1, PanZoomInstance, PanelPosition, Position, Position as Position$1, Project, Project as Project$1, Rect, Rect as Rect$1, ResizeControlVariant, ResizeControlVariant as ResizeControlVariant$1, ResizeControlVariant as ResizeControlVariant$2, ResizeDragEvent, ResizeDragEvent as ResizeDragEvent$1, ResizeParams, ResizeParams as ResizeParams$1, ResizeParamsWithDirection, ResizeParamsWithDirection as ResizeParamsWithDirection$1, SelectionMode, SelectionMode as SelectionMode$1, SelectionRect, SelectionRect as SelectionRect$1, SetCenter, SetCenter as SetCenter$1, SetCenterOptions, SetViewport, SetViewport as SetViewport$1, ShouldResize, ShouldResize as ShouldResize$1, SnapGrid, SnapGrid as SnapGrid$1, Transform, Viewport, Viewport as Viewport$1, ViewportHelperFunctionOptions, ViewportHelperFunctionOptions as ViewportHelperFunctionOptions$1, XYPosition, XYPosition as XYPosition$1, ZIndexMode, ZIndexMode as ZIndexMode$1, ZoomInOut, ZoomInOut as ZoomInOut$1, ZoomTo, ZoomTo as ZoomTo$1, clamp, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdgeBase, isInternalNodeBase, isMacOs, isNodeBase, pointToRendererPoint, rendererPointToPoint } from "@xyflow/system";
2
2
  import { CSSProperties, Component, ComputedRef, DefineComponent, HTMLAttributes, InjectionKey, MaybeRefOrGetter, SVGAttributes, ToRefs, VNode } from "vue";
3
3
  import { KeyFilter } from "@vueuse/core";
4
4
 
@@ -75,8 +75,8 @@ declare const _default: typeof __VLS_export$14;
75
75
  declare const __VLS_export$14: __VLS_WithSlots$10<import("vue").DefineComponent<BackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BackgroundProps> & Readonly<{}>, {
76
76
  x: number;
77
77
  y: number;
78
- offset: number | [number, number];
79
78
  size: number;
79
+ offset: number | [number, number];
80
80
  variant: BackgroundVariant;
81
81
  gap: number | number[];
82
82
  lineWidth: number;
@@ -671,7 +671,6 @@ interface State<NodeType extends Node = Node, EdgeType extends Edge = Edge> exte
671
671
  translateExtent: CoordinateExtent$1;
672
672
  nodeExtent: CoordinateExtent$1;
673
673
  nodeOrigin: NodeOrigin;
674
- colorMode: ColorMode$1;
675
674
  /** viewport dimensions - do not change! */
676
675
  readonly dimensions: Dimensions$1;
677
676
  /** canonical viewport transform `[x, y, zoom]` (the `@xyflow/system` representation) - do not change! Read `viewport` for the `{ x, y, zoom }` shape. */
@@ -1212,8 +1211,8 @@ interface FlowProps<NodeType extends Node = Node, EdgeType extends Edge = Edge>
1212
1211
  nodeExtent?: CoordinateExtent$1;
1213
1212
  /** origin of all nodes relative to their position — `[0, 0]` top-left, `[0.5, 0.5]` center, `[1, 1]` bottom-right */
1214
1213
  nodeOrigin?: NodeOrigin;
1215
- /** light/dark/system applies the resolved `light`/`dark` class to the flow container; `system` follows `prefers-color-scheme` @default 'light' */
1216
- colorMode?: ColorMode$1;
1214
+ /** Forces a color scheme on the flow container via class name. Page-level theming is typically done by setting `data-theme` on `<html>`. */
1215
+ forceColorMode?: ColorMode$1;
1217
1216
  /** color of edge markers; pass `null` to drive the arrowhead color from the `--xy-edge-stroke` CSS variable @default '#b1b1b7' */
1218
1217
  defaultMarkerColor?: string | null;
1219
1218
  zoomOnScroll?: boolean;
@@ -1359,14 +1358,14 @@ interface FlowEmits<NodeType extends Node = Node, EdgeType extends Edge = Edge>
1359
1358
  nodeDrag: [nodeDragEvent: NodeDragEvent<NodeType>];
1360
1359
  nodeDragStop: [nodeDragEvent: NodeDragEvent<NodeType>];
1361
1360
  }
1362
- type NodeByType<NodeType extends Node, T extends string> = NodeType extends any ? (T extends NonNullable<NodeType['type']> ? NodeType : never) : never;
1363
- type EdgeByType<EdgeType extends Edge, T extends string> = EdgeType extends any ? (T extends NonNullable<EdgeType['type']> ? EdgeType : never) : never;
1361
+ type NodeByType<NodeType extends Node, T extends string> = NodeType extends any ? T extends NonNullable<NodeType['type']> ? NodeType : never : never;
1362
+ type EdgeByType<EdgeType extends Edge, T extends string> = EdgeType extends any ? T extends NonNullable<EdgeType['type']> ? EdgeType : never : never;
1364
1363
  type NodeSlots<NodeType extends Node = Node> = Partial<{ [T in NonNullable<NodeType['type']> as `node-${T}`]: (nodeProps: NodeProps<NodeByType<NodeType, T>>) => any } & Record<`node-${string}`, (nodeProps: NodeProps<NodeType>) => any>>;
1365
1364
  type EdgeSlots<EdgeType extends Edge = Edge> = Partial<{ [T in NonNullable<EdgeType['type']> as `edge-${T}`]: (edgeProps: EdgeProps<EdgeByType<EdgeType, T>>) => any } & Record<`edge-${string}`, (edgeProps: EdgeProps<EdgeType>) => any>>;
1366
1365
  type FlowSlots<NodeType extends Node = Node, EdgeType extends Edge = Edge> = NodeSlots<NodeType> & EdgeSlots<EdgeType> & {
1367
1366
  'connection-line'?: (connectionLineProps: ConnectionLineProps<NodeType>) => any;
1368
1367
  'zoom-pane'?: () => any;
1369
- 'default'?: () => any;
1368
+ default?: () => any;
1370
1369
  };
1371
1370
  //#endregion
1372
1371
  //#region src/types/node.d.ts
@@ -2204,5 +2203,5 @@ declare const NodeId: InjectionKey<string>;
2204
2203
  declare const defaultNodeTypes: DefaultNodeTypes;
2205
2204
  declare const defaultEdgeTypes: DefaultEdgeTypes;
2206
2205
  //#endregion
2207
- export { Actions, AddEdges, AddNodes, type Align, type AriaLabelConfig, _default as Background, BackgroundProps, BackgroundVariant, _default$1 as BaseEdge, BaseEdgeProps, BezierEdge, BezierEdgeProps, BezierEdgeType, BezierPathOptions, BuiltInNode, CSSVars, ClassValue, type ColorMode, type ColorModeClass, ComputedGetters, ConnectEndEvent, ConnectingHandle, type Connection, ConnectionInProgress, ConnectionLineOptions, ConnectionLineProps, ConnectionLineType, ConnectionLookup, ConnectionMode, ConnectionState, ConnectionStatus, Connector, _default$2 as ControlButton, ControlEmits, type ControlLinePosition, type ControlPosition, ControlProps, _default$3 as Controls, type CoordinateExtent, CustomThemeVars, DefaultEdge, DefaultEdgeOptions, DefaultEdgeTypes, DefaultNodeTypes, DeleteElements, type Dimensions, Edge, EdgeAddChange, EdgeChange, EdgeComponent, EdgeEventsHandler, EdgeEventsOn, EdgeLabelOptions, _default$4 as EdgeLabelRenderer, EdgeLookup, EdgeMarker, EdgeMarkerType, EdgeMouseEvent, EdgePositions, EdgeProps, EdgeReconnectEndEvent, EdgeReconnectEvent, EdgeReconnectStartEvent, EdgeReconnectable, type EdgeRemoveChange, type EdgeSelectionChange, EdgeSlots, _default$5 as EdgeText, EdgeTextProps, EdgeTypesObject, ElementChange, ErrorCode, type FinalConnectionState, FitBounds, FitBoundsOptions, FitView, type FitViewOptions, FlowEmits, FlowEvents, FlowExportObject, FlowHooks, FlowHooksEmit, FlowHooksOn, FlowOptions, FlowProps, FlowSlots, GetEdge, GetInternalNode, GetIntersectingNodes, GetNode, type GetViewport, Getters, _default$6 as Handle, HandleConnectable, HandleConnectableFunc, HandleElement, HandleProps, type HandleType, InternalNode, IsNodeIntersecting, IsValidParams, MarkerProps, MarkerType, _default$7 as MiniMap, MiniMapEmits, _default$8 as MiniMapNode, MiniMapNodeEmits, MiniMapNodeFunc, MiniMapNodeProps, MiniMapProps, MiniMapSlots, MouseTouchEvent, NoConnection, Node, NodeAddChange, NodeChange, NodeComponent, type NodeConnection, type NodeDimensionChange, NodeDragEvent, NodeDragItem, NodeEventsHandler, NodeEventsOn, NodeHandleBounds, NodeId as NodeIdInjection, NodeLookup, NodeMouseEvent, NodeOrigin, type NodePositionChange, NodeProps, type NodeRemoveChange, _default$9 as NodeResizeControl, _default$10 as NodeResizer, NodeResizerEmits, NodeResizerProps, type NodeSelectionChange, NodeSlots, _default$11 as NodeToolbar, NodeToolbarProps, NodeTypesObject, OnBeforeDelete, OnConnectStartParams, OnResize, OnResizeEnd, OnResizeStart, type Padding, type PaddingUnit, type PaddingWithUnit, PanOnScrollMode, _default$12 as Panel, PanelProps, Position, type Project, ReconnectEdge, type Rect, RemoveEdges, RemoveNodes, ResizeControlLineProps, ResizeControlProps, ResizeControlVariant, type ResizeDragEvent, type ResizeParams, type ResizeParamsWithDirection, Result, SelectionChangeEvent, SelectionMode, type SelectionRect, type SetCenter, type SetCenterOptions, SetEdges, SetNodes, SetState, SetStateOptions, type SetViewport, ShapeRendering, type ShouldResize, SimpleBezierEdge, SimpleBezierEdgeProps, Slots, SmoothStepEdge, SmoothStepEdgeProps, SmoothStepEdgeType, SmoothStepPathOptions, type SnapGrid, State, StepEdge, StepEdgeProps, StraightEdge, StraightEdgeProps, Styles, ThemeVars, UpdateEdge, UpdateEdgeData, UpdateNode, UpdateNodeData, UpdateNodeDimensions, UpdateNodeDimensionsParams, UpdateNodeInternals, UpdateNodePosition, ValidConnectionFunc, type Viewport, ViewportFunctions, type ViewportHelperFunctionOptions, _default$13 as VueFlow, VueFlowError, VueFlow as VueFlowInjection, VueFlowInstance, _default$14 as VueFlowProvider, VueFlowState, VueFlowStoreHandle, type XYPosition, type ZIndexMode, type ZoomInOut, type ZoomTo, applyChanges, applyEdgeChanges, applyNodeChanges, clamp, connectionExists, defaultEdgeTypes, defaultNodeTypes, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdge, isEdgeBase, isErrorOfType, isInternalNode, isInternalNodeBase, isMacOs, isNode, isNodeBase, pointToRendererPoint, rendererPointToPoint, storeToRefs, useConnection, useEdge, useEdgesData, useHandle, useInternalNode, useKeyPress, useNode, useNodeConnections, useNodeId, useNodesData, useNodesInitialized, useStore, useVueFlow };
2206
+ export { Actions, AddEdges, AddNodes, type Align, type AriaLabelConfig, _default as Background, BackgroundProps, BackgroundVariant, _default$1 as BaseEdge, BaseEdgeProps, BezierEdge, BezierEdgeProps, BezierEdgeType, BezierPathOptions, BuiltInNode, CSSVars, ClassValue, type ColorMode, ComputedGetters, ConnectEndEvent, ConnectingHandle, type Connection, ConnectionInProgress, ConnectionLineOptions, ConnectionLineProps, ConnectionLineType, ConnectionLookup, ConnectionMode, ConnectionState, ConnectionStatus, Connector, _default$2 as ControlButton, ControlEmits, type ControlLinePosition, type ControlPosition, ControlProps, _default$3 as Controls, type CoordinateExtent, CustomThemeVars, DefaultEdge, DefaultEdgeOptions, DefaultEdgeTypes, DefaultNodeTypes, DeleteElements, type Dimensions, Edge, EdgeAddChange, EdgeChange, EdgeComponent, EdgeEventsHandler, EdgeEventsOn, EdgeLabelOptions, _default$4 as EdgeLabelRenderer, EdgeLookup, EdgeMarker, EdgeMarkerType, EdgeMouseEvent, EdgePositions, EdgeProps, EdgeReconnectEndEvent, EdgeReconnectEvent, EdgeReconnectStartEvent, EdgeReconnectable, type EdgeRemoveChange, type EdgeSelectionChange, EdgeSlots, _default$5 as EdgeText, EdgeTextProps, EdgeTypesObject, ElementChange, ErrorCode, type FinalConnectionState, FitBounds, FitBoundsOptions, FitView, type FitViewOptions, FlowEmits, FlowEvents, FlowExportObject, FlowHooks, FlowHooksEmit, FlowHooksOn, FlowOptions, FlowProps, FlowSlots, GetEdge, GetInternalNode, GetIntersectingNodes, GetNode, type GetViewport, Getters, _default$6 as Handle, HandleConnectable, HandleConnectableFunc, HandleElement, HandleProps, type HandleType, InternalNode, IsNodeIntersecting, IsValidParams, MarkerProps, MarkerType, _default$7 as MiniMap, MiniMapEmits, _default$8 as MiniMapNode, MiniMapNodeEmits, MiniMapNodeFunc, MiniMapNodeProps, MiniMapProps, MiniMapSlots, MouseTouchEvent, NoConnection, Node, NodeAddChange, NodeChange, NodeComponent, type NodeConnection, type NodeDimensionChange, NodeDragEvent, NodeDragItem, NodeEventsHandler, NodeEventsOn, NodeHandleBounds, NodeId as NodeIdInjection, NodeLookup, NodeMouseEvent, NodeOrigin, type NodePositionChange, NodeProps, type NodeRemoveChange, _default$9 as NodeResizeControl, _default$10 as NodeResizer, NodeResizerEmits, NodeResizerProps, type NodeSelectionChange, NodeSlots, _default$11 as NodeToolbar, NodeToolbarProps, NodeTypesObject, OnBeforeDelete, OnConnectStartParams, OnResize, OnResizeEnd, OnResizeStart, type Padding, type PaddingUnit, type PaddingWithUnit, PanOnScrollMode, _default$12 as Panel, PanelProps, Position, type Project, ReconnectEdge, type Rect, RemoveEdges, RemoveNodes, ResizeControlLineProps, ResizeControlProps, ResizeControlVariant, type ResizeDragEvent, type ResizeParams, type ResizeParamsWithDirection, Result, SelectionChangeEvent, SelectionMode, type SelectionRect, type SetCenter, type SetCenterOptions, SetEdges, SetNodes, SetState, SetStateOptions, type SetViewport, ShapeRendering, type ShouldResize, SimpleBezierEdge, SimpleBezierEdgeProps, Slots, SmoothStepEdge, SmoothStepEdgeProps, SmoothStepEdgeType, SmoothStepPathOptions, type SnapGrid, State, StepEdge, StepEdgeProps, StraightEdge, StraightEdgeProps, Styles, ThemeVars, UpdateEdge, UpdateEdgeData, UpdateNode, UpdateNodeData, UpdateNodeDimensions, UpdateNodeDimensionsParams, UpdateNodeInternals, UpdateNodePosition, ValidConnectionFunc, type Viewport, ViewportFunctions, type ViewportHelperFunctionOptions, _default$13 as VueFlow, VueFlowError, VueFlow as VueFlowInjection, VueFlowInstance, _default$14 as VueFlowProvider, VueFlowState, VueFlowStoreHandle, type XYPosition, type ZIndexMode, type ZoomInOut, type ZoomTo, applyChanges, applyEdgeChanges, applyNodeChanges, clamp, connectionExists, defaultEdgeTypes, defaultNodeTypes, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getIncomers, getMarkerId, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStraightPath, getViewportForBounds, isEdge, isEdgeBase, isErrorOfType, isInternalNode, isInternalNodeBase, isMacOs, isNode, isNodeBase, pointToRendererPoint, rendererPointToPoint, storeToRefs, useConnection, useEdge, useEdgesData, useHandle, useInternalNode, useKeyPress, useNode, useNodeConnections, useNodeId, useNodesData, useNodesInitialized, useStore, useVueFlow };
2208
2207
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2566,18 +2566,6 @@ const _sfc_main$17 = /* @__PURE__ */ (0, vue.defineComponent)({
2566
2566
  "data-nodeid": nodeId,
2567
2567
  "data-handlepos": __props.position
2568
2568
  }));
2569
- const isConnectableStart = (0, vue.toRef)(() => typeof __props.connectableStart !== "undefined" ? __props.connectableStart : true);
2570
- const isConnectableEnd = (0, vue.toRef)(() => typeof __props.connectableEnd !== "undefined" ? __props.connectableEnd : true);
2571
- const connectionInProcess = (0, vue.toRef)(() => store.connectionStartHandle !== null);
2572
- const clickConnectionInProcess = (0, vue.toRef)(() => store.connectionClickStartHandle !== null);
2573
- const isPossibleEndHandle = (0, vue.toRef)(() => {
2574
- const fromHandle = store.connectionStartHandle;
2575
- return store.connectionMode === _xyflow_system.ConnectionMode.Strict ? fromHandle?.type !== type.value : nodeId !== fromHandle?.nodeId || __props.id !== fromHandle?.id;
2576
- });
2577
- const isClickConnecting = (0, vue.toRef)(() => store.connectionClickStartHandle?.nodeId === nodeId && store.connectionClickStartHandle?.id === __props.id && store.connectionClickStartHandle?.type === type.value);
2578
- const connectingFrom = (0, vue.toRef)(() => store.connectionStartHandle?.nodeId === nodeId && store.connectionStartHandle?.id === __props.id && store.connectionStartHandle?.type === type.value);
2579
- const connectingTo = (0, vue.toRef)(() => store.connectionEndHandle?.nodeId === nodeId && store.connectionEndHandle?.id === __props.id && store.connectionEndHandle?.type === type.value);
2580
- const valid = (0, vue.toRef)(() => connectingTo.value && store.connectionStatus === "valid");
2581
2569
  const { handlePointerDown, handleClick } = useHandle({
2582
2570
  nodeId,
2583
2571
  handleId: __props.id,
@@ -2598,6 +2586,28 @@ const _sfc_main$17 = /* @__PURE__ */ (0, vue.defineComponent)({
2598
2586
  if (typeof __props.isConnectable === "function") return nodeRef.value ? __props.isConnectable(nodeRef.value, connectedEdges.value) : false;
2599
2587
  return isDef(__props.isConnectable) ? __props.isConnectable : store.nodesConnectable;
2600
2588
  });
2589
+ const connectionClasses = (0, vue.computed)((prev) => {
2590
+ const fromHandle = store.connectionStartHandle;
2591
+ const clickFromHandle = store.connectionClickStartHandle;
2592
+ const toHandle = store.connectionEndHandle;
2593
+ const handleType = type.value;
2594
+ const connectionInProcess = fromHandle !== null;
2595
+ const clickConnectionInProcess = clickFromHandle !== null;
2596
+ const isPossibleEndHandle = store.connectionMode === _xyflow_system.ConnectionMode.Strict ? fromHandle?.type !== handleType : nodeId !== fromHandle?.nodeId || __props.id !== fromHandle?.id;
2597
+ const connectingto = toHandle?.nodeId === nodeId && toHandle?.id === __props.id && toHandle?.type === handleType;
2598
+ const next = {
2599
+ connectable: isHandleConnectable.value,
2600
+ connecting: clickFromHandle?.nodeId === nodeId && clickFromHandle?.id === __props.id && clickFromHandle?.type === handleType,
2601
+ connectablestart: __props.connectableStart,
2602
+ connectableend: __props.connectableEnd,
2603
+ connectingfrom: fromHandle?.nodeId === nodeId && fromHandle?.id === __props.id && fromHandle?.type === handleType,
2604
+ connectingto,
2605
+ valid: connectingto && store.connectionStatus === "valid",
2606
+ connectionindicator: isHandleConnectable.value && (!connectionInProcess || isPossibleEndHandle) && (connectionInProcess || clickConnectionInProcess ? __props.connectableEnd : __props.connectableStart)
2607
+ };
2608
+ if (prev && prev.connectable === next.connectable && prev.connecting === next.connecting && prev.connectablestart === next.connectablestart && prev.connectableend === next.connectableend && prev.connectingfrom === next.connectingfrom && prev.connectingto === next.connectingto && prev.valid === next.valid && prev.connectionindicator === next.connectionindicator) return prev;
2609
+ return next;
2610
+ });
2601
2611
  (0, vue.onMounted)(() => {
2602
2612
  const node = nodeRef.value;
2603
2613
  if (!node || !(0, _xyflow_system.nodeHasDimensions)(node)) return;
@@ -2627,10 +2637,10 @@ const _sfc_main$17 = /* @__PURE__ */ (0, vue.defineComponent)({
2627
2637
  });
2628
2638
  function onPointerDown(event) {
2629
2639
  const isMouseTriggered = (0, _xyflow_system.isMouseEvent)(event);
2630
- if (isHandleConnectable.value && isConnectableStart.value && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) handlePointerDown(event);
2640
+ if (isHandleConnectable.value && __props.connectableStart && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) handlePointerDown(event);
2631
2641
  }
2632
2642
  function onClick(event) {
2633
- if (!nodeId || !store.connectionClickStartHandle && !isConnectableStart.value) return;
2643
+ if (!nodeId || !store.connectionClickStartHandle && !__props.connectableStart) return;
2634
2644
  if (isHandleConnectable.value) handleClick(event);
2635
2645
  }
2636
2646
  __expose({
@@ -2651,18 +2661,10 @@ const _sfc_main$17 = /* @__PURE__ */ (0, vue.defineComponent)({
2651
2661
  connectedEdges,
2652
2662
  handle,
2653
2663
  handleDataIds,
2654
- isConnectableStart,
2655
- isConnectableEnd,
2656
- connectionInProcess,
2657
- clickConnectionInProcess,
2658
- isPossibleEndHandle,
2659
- isClickConnecting,
2660
- connectingFrom,
2661
- connectingTo,
2662
- valid,
2663
2664
  handlePointerDown,
2664
2665
  handleClick,
2665
2666
  isHandleConnectable,
2667
+ connectionClasses,
2666
2668
  onPointerDown,
2667
2669
  onClick
2668
2670
  };
@@ -2683,16 +2685,7 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
2683
2685
  $setup.store.noDragClassName,
2684
2686
  $setup.store.noPanClassName,
2685
2687
  $setup.type,
2686
- {
2687
- connectable: $setup.isHandleConnectable,
2688
- connecting: $setup.isClickConnecting,
2689
- connectablestart: $setup.isConnectableStart,
2690
- connectableend: $setup.isConnectableEnd,
2691
- connectingfrom: $setup.connectingFrom,
2692
- connectingto: $setup.connectingTo,
2693
- valid: $setup.valid,
2694
- connectionindicator: $setup.isHandleConnectable && (!$setup.connectionInProcess || $setup.isPossibleEndHandle) && ($setup.connectionInProcess || $setup.clickConnectionInProcess ? $setup.isConnectableEnd : $setup.isConnectableStart)
2695
- }
2688
+ $setup.connectionClasses
2696
2689
  ]],
2697
2690
  onMousedown: $setup.onPointerDown,
2698
2691
  onTouchstartPassive: $setup.onPointerDown,
@@ -4041,23 +4034,6 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
4041
4034
  }
4042
4035
  var A11yDescriptions_default = /* @__PURE__ */ export_helper_default(_sfc_main$11, [["render", _sfc_render$11], ["__file", "/Users/moritz/xyflow/xyflow/packages/vue/src/components/A11y/A11yDescriptions.vue"]]);
4043
4036
  //#endregion
4044
- //#region src/composables/useColorModeClass.ts
4045
- /**
4046
- * Resolves the `colorMode` prop to the `light`/`dark` class applied to the flow container, tracking
4047
- * `prefers-color-scheme` reactively when `colorMode` is `system` (matching xyflow/react+svelte).
4048
- *
4049
- * Takes the state explicitly because it runs inside `<VueFlow>`'s own setup; defaults to `useStore()`.
4050
- *
4051
- * @internal
4052
- */
4053
- function useColorModeClass(state = useStore()) {
4054
- const prefersDark = (0, _vueuse_core.useMediaQuery)("(prefers-color-scheme: dark)");
4055
- return (0, vue.computed)(() => {
4056
- if (state.colorMode === "system") return prefersDark.value ? "dark" : "light";
4057
- return state.colorMode;
4058
- });
4059
- }
4060
- //#endregion
4061
4037
  //#region src/store/hooks.ts
4062
4038
  function createHooks() {
4063
4039
  return {
@@ -4175,7 +4151,6 @@ function useState() {
4175
4151
  translateExtent: [[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]],
4176
4152
  nodeExtent: [[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]],
4177
4153
  nodeOrigin: [0, 0],
4178
- colorMode: "light",
4179
4154
  selectionMode: _xyflow_system.SelectionMode.Full,
4180
4155
  paneDragging: false,
4181
4156
  preventScrolling: true,
@@ -7116,7 +7091,7 @@ const _sfc_main$1 = /* @__PURE__ */ (0, vue.defineComponent)({
7116
7091
  type: Array,
7117
7092
  required: false
7118
7093
  },
7119
- colorMode: {
7094
+ forceColorMode: {
7120
7095
  type: String,
7121
7096
  required: false,
7122
7097
  default: void 0
@@ -7368,7 +7343,6 @@ const _sfc_main$1 = /* @__PURE__ */ (0, vue.defineComponent)({
7368
7343
  useOnInitHandler(instance);
7369
7344
  useSelectionChange(instance);
7370
7345
  useStylesLoadedWarning(instance);
7371
- const colorModeClass = useColorModeClass(state);
7372
7346
  useViewportSync(modelViewport, state);
7373
7347
  const stateRefs = storeToRefs(state);
7374
7348
  (0, vue.provide)(Slots$1, slots);
@@ -7387,7 +7361,6 @@ const _sfc_main$1 = /* @__PURE__ */ (0, vue.defineComponent)({
7387
7361
  instance,
7388
7362
  state,
7389
7363
  disposeWatchers,
7390
- colorModeClass,
7391
7364
  stateRefs,
7392
7365
  A11yDescriptions: A11yDescriptions_default,
7393
7366
  ZoomPane: ZoomPane_default
@@ -7402,7 +7375,7 @@ const _sfc_main$1 = /* @__PURE__ */ (0, vue.defineComponent)({
7402
7375
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7403
7376
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
7404
7377
  ref: $setup.stateRefs.vueFlowRef,
7405
- class: (0, vue.normalizeClass)(["vue-flow", $setup.colorModeClass])
7378
+ class: (0, vue.normalizeClass)(["vue-flow", $setup.props.forceColorMode])
7406
7379
  }, [
7407
7380
  (0, vue.createCommentVNode)(" the `zoom-pane` slot (affected by zooming & panning) renders inside the transformed Viewport via\n the provided `Slots` (see ZoomPaneSlot), not drilled through ZoomPane → Pane → Viewport "),
7408
7381
  (0, vue.createVNode)($setup["ZoomPane"]),