@dschz/solid-flow 1.0.0-next.7 → 1.0.0-next.8
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/index.d.ts +30 -5
- package/dist/index/index.js +321 -220
- package/dist/index/index.jsx +265 -169
- package/dist/styles/index.css +16 -4
- package/package.json +1 -1
package/dist/index/index.d.ts
CHANGED
|
@@ -1341,10 +1341,10 @@ type EdgesInput<TUserEdgeTypes extends EdgeTypes> = SolidFlowEdge<TUserEdgeTypes
|
|
|
1341
1341
|
* ```
|
|
1342
1342
|
*
|
|
1343
1343
|
* @remarks
|
|
1344
|
-
* - Provides autocomplete for the `type` field with all available
|
|
1345
|
-
* - Validates `data` structure based on the selected
|
|
1346
|
-
* - Supports all
|
|
1347
|
-
* - Works seamlessly with both built-in and custom
|
|
1344
|
+
* - Provides autocomplete for the `type` field with all available edge types
|
|
1345
|
+
* - Validates `data` structure based on the selected edge type
|
|
1346
|
+
* - Supports all Edge properties (style, animated, selectable, etc.)
|
|
1347
|
+
* - Works seamlessly with both built-in and custom edge types
|
|
1348
1348
|
* - Type errors prevent invalid type names or incorrect data structures
|
|
1349
1349
|
*/
|
|
1350
1350
|
/**
|
|
@@ -1535,6 +1535,25 @@ declare function useViewportInitialized(): Accessor<boolean>;
|
|
|
1535
1535
|
*/
|
|
1536
1536
|
declare function useInternalNode(id: Accessor<string>): Accessor<InternalNode | undefined>;
|
|
1537
1537
|
//#endregion
|
|
1538
|
+
//#region src/hooks/useKeyPress.d.ts
|
|
1539
|
+
/**
|
|
1540
|
+
* Reactive "is this key (combo) held right now?" — the Solid Flow
|
|
1541
|
+
* counterpart of React Flow's `useKeyPress`, usable anywhere (no flow
|
|
1542
|
+
* context required).
|
|
1543
|
+
*
|
|
1544
|
+
* The definition is an Accessor per house convention — `useKeyPress(() =>
|
|
1545
|
+
* "a")`, `useKeyPress(() => ["a", "d"])`, or `useKeyPress(() => ({ key:
|
|
1546
|
+
* "s", modifier: ["meta"] }))`; swapping the definition resets the state.
|
|
1547
|
+
*
|
|
1548
|
+
* Hardened beyond upstream:
|
|
1549
|
+
* - Combos re-activate when the base key is re-pressed while the modifier
|
|
1550
|
+
* stays held (upstream's oldest open key bug, xyflow#2248).
|
|
1551
|
+
* - Stuck modifiers self-heal from the flags later keyboard/pointer/wheel
|
|
1552
|
+
* events carry (OS overlays swallow keyups without blurring — the macOS
|
|
1553
|
+
* screenshot HUD; xyflow#5679), and window blur resets.
|
|
1554
|
+
*/
|
|
1555
|
+
declare function useKeyPress(keys: Accessor<KeyDefinition | KeyDefinition[] | null>): Accessor<boolean>;
|
|
1556
|
+
//#endregion
|
|
1538
1557
|
//#region src/hooks/useNodeConnections.d.ts
|
|
1539
1558
|
type UseNodeConnectionsParams = {
|
|
1540
1559
|
id?: string;
|
|
@@ -1782,6 +1801,12 @@ type MiniMapProps<NodeType extends Node> = Omit<JSX.HTMLAttributes<HTMLDivElemen
|
|
|
1782
1801
|
readonly inversePan?: boolean;
|
|
1783
1802
|
/** Step size for zooming in/out */
|
|
1784
1803
|
readonly zoomStep?: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* Scales the padding around the graph inside the minimap (multiplied by
|
|
1806
|
+
* the minimap's view scale). Upstream parity.
|
|
1807
|
+
* @default 5
|
|
1808
|
+
*/
|
|
1809
|
+
readonly offsetScale?: number;
|
|
1785
1810
|
};
|
|
1786
1811
|
/** Miniature overview map of the whole flow, with optional pan/zoom interaction. */
|
|
1787
1812
|
declare const MiniMap: <NodeType extends Node>(props: ParentProps<Partial<MiniMapProps<NodeType>>>) => JSX.Element;
|
|
@@ -1974,4 +1999,4 @@ declare const getEdgeCenter: typeof getEdgeCenter$1;
|
|
|
1974
1999
|
/** Returns the label center and offsets for a bezier edge. */
|
|
1975
2000
|
declare const getBezierEdgeCenter: typeof getBezierEdgeCenter$1;
|
|
1976
2001
|
//#endregion
|
|
1977
|
-
export { Align, AriaLabelConfig, Background, type BackgroundProps, type BackgroundVariant, BaseEdge, BezierEdge, BezierEdgeInternal, type BezierEdgeProps, BezierPathOptions, Box, type BuiltInEdge, type BuiltInNode, type BuiltInNodeTypes, ColorMode, ColorModeClass, type Connection, ConnectionData, ConnectionLine, ConnectionLineComponentProps, ConnectionLineType, ConnectionMode, type ConnectionsRecord, ControlButton, type ControlLinePosition, type ControlPosition, Controls, type CoordinateExtent, type DefaultEdgeOptions, DefaultNode, DeleteEvents, Dimensions, type Edge, EdgeConnection, EdgeEvents, EdgeLabel, EdgeLabelRenderer, type EdgeMarker, EdgeMarkerType, type EdgeProps, EdgeReconnectAnchor, EdgeReconnectEvents, EdgeRenderer, EdgeToolbar, EdgeToolbarProps, type EdgeTypes, EdgeWrapper, type FitBounds, FitBoundsOptions, FitViewOptions, type FlowCommands, type FlowSelection, type FlowState, GetBezierPathParams, type GetMiniMapNodeAttribute, GetSmoothStepPathParams, GetStraightPathParams, GroupNode, Handle, type HandleConnection, InputNode, type InternalNode, IsValidConnection, KeyDefinition, KeyDefinitionObject, KeyModifier, Marker, MarkerDefinition, MarkerType, MiniMap, MiniMapNode, type MiniMapNodeProps, type MiniMapProps, type Node, type NodeConnection, NodeEvents, NodeGraph, type NodeOrigin, type NodeProps, NodeRenderer, NodeResizer, NodeSelection, NodeSelectionEvents, NodeToolbar, NodeToolbarProps, type NodeTypes, NodeWrapper, OnBeforeDelete, OnBeforeEdgeConnect, OnBeforeReconnect, OnConnect, OnConnectEnd, OnConnectStart, OnConnectStartParams, OnDelete, OnEdgeConnect, OnEdgeCreate, OnError, type OnMove, OnMoveEnd, OnMoveStart, OnReconnect, OnReconnectEnd, OnReconnectStart, OnResize, OnResizeEnd, OnResizeStart, OnSelectionChange, OnSelectionDrag, OutputNode, PanOnScrollMode, Pane, PaneEvents, Panel, type PanelPosition, Position, ProOptions, Rect, ResizeControl, ResizeControlVariant, ResizeDragEvent, ResizeParams, ResizeParamsWithDirection, Selection, SelectionMode, SelectionRect, type SetCenter, SetCenterOptions, type SetViewport, ShortcutModifier, ShortcutModifierDefinition, type ShouldResize, SmoothStepEdge, SmoothStepEdgeInternal, type SmoothStepEdgeProps, SmoothStepPathOptions, SnapGrid, SolidFlow, type SolidFlowEdge, type SolidFlowInitialProps, type SolidFlowNode, type SolidFlowProps, SolidFlowProvider, StepEdge, StepEdgeInternal, type StepEdgeProps, StraightEdge, StraightEdgeInternal, type StraightEdgeProps, Transform, UseSolidFlowReturn, Viewport, ViewportHelperFunctionOptions, ViewportPortal, type XYPosition, XYZPosition, Zoom, addEdge, connectionKey, createEdgeStore, createNodeStore, getBezierEdgeCenter, getBezierPath, getConnectedEdges, getEdgeCenter, getIncomers, getNodesBounds, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, useColorMode, useConnection, useEdgeId, useEdges, useInternalNode, useNodeConnections, useNodeId, useNodes, useNodesData, useNodesInitialized, useSolidFlow, useUpdateNodeInternals, useViewport, useViewportInitialized };
|
|
2002
|
+
export { Align, AriaLabelConfig, Background, type BackgroundProps, type BackgroundVariant, BaseEdge, BezierEdge, BezierEdgeInternal, type BezierEdgeProps, BezierPathOptions, Box, type BuiltInEdge, type BuiltInNode, type BuiltInNodeTypes, ColorMode, ColorModeClass, type Connection, ConnectionData, ConnectionLine, ConnectionLineComponentProps, ConnectionLineType, ConnectionMode, type ConnectionsRecord, ControlButton, type ControlLinePosition, type ControlPosition, Controls, type CoordinateExtent, type DefaultEdgeOptions, DefaultNode, DeleteEvents, Dimensions, type Edge, EdgeConnection, EdgeEvents, EdgeLabel, EdgeLabelRenderer, type EdgeMarker, EdgeMarkerType, type EdgeProps, EdgeReconnectAnchor, EdgeReconnectEvents, EdgeRenderer, EdgeToolbar, EdgeToolbarProps, type EdgeTypes, EdgeWrapper, type FitBounds, FitBoundsOptions, FitViewOptions, type FlowCommands, type FlowSelection, type FlowState, GetBezierPathParams, type GetMiniMapNodeAttribute, GetSmoothStepPathParams, GetStraightPathParams, GroupNode, Handle, type HandleConnection, InputNode, type InternalNode, IsValidConnection, KeyDefinition, KeyDefinitionObject, KeyModifier, Marker, MarkerDefinition, MarkerType, MiniMap, MiniMapNode, type MiniMapNodeProps, type MiniMapProps, type Node, type NodeConnection, NodeEvents, NodeGraph, type NodeOrigin, type NodeProps, NodeRenderer, NodeResizer, NodeSelection, NodeSelectionEvents, NodeToolbar, NodeToolbarProps, type NodeTypes, NodeWrapper, OnBeforeDelete, OnBeforeEdgeConnect, OnBeforeReconnect, OnConnect, OnConnectEnd, OnConnectStart, OnConnectStartParams, OnDelete, OnEdgeConnect, OnEdgeCreate, OnError, type OnMove, OnMoveEnd, OnMoveStart, OnReconnect, OnReconnectEnd, OnReconnectStart, OnResize, OnResizeEnd, OnResizeStart, OnSelectionChange, OnSelectionDrag, OutputNode, PanOnScrollMode, Pane, PaneEvents, Panel, type PanelPosition, Position, ProOptions, Rect, ResizeControl, ResizeControlVariant, ResizeDragEvent, ResizeParams, ResizeParamsWithDirection, Selection, SelectionMode, SelectionRect, type SetCenter, SetCenterOptions, type SetViewport, ShortcutModifier, ShortcutModifierDefinition, type ShouldResize, SmoothStepEdge, SmoothStepEdgeInternal, type SmoothStepEdgeProps, SmoothStepPathOptions, SnapGrid, SolidFlow, type SolidFlowEdge, type SolidFlowInitialProps, type SolidFlowNode, type SolidFlowProps, SolidFlowProvider, StepEdge, StepEdgeInternal, type StepEdgeProps, StraightEdge, StraightEdgeInternal, type StraightEdgeProps, Transform, UseSolidFlowReturn, Viewport, ViewportHelperFunctionOptions, ViewportPortal, type XYPosition, XYZPosition, Zoom, addEdge, connectionKey, createEdgeStore, createNodeStore, getBezierEdgeCenter, getBezierPath, getConnectedEdges, getEdgeCenter, getIncomers, getNodesBounds, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds, useColorMode, useConnection, useEdgeId, useEdges, useInternalNode, useKeyPress, useNodeConnections, useNodeId, useNodes, useNodesData, useNodesInitialized, useSolidFlow, useUpdateNodeInternals, useViewport, useViewportInitialized };
|