@aloudata/ink-flow 1.0.25 → 1.0.27
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/components/ConnectionLine/index.d.ts +4 -4
- package/dist/components/ConnectionLine/index.d.ts.map +1 -1
- package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +7 -9
- package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -1
- package/dist/components/EdgeWrapper/index.d.ts +1 -1
- package/dist/components/EdgeWrapper/index.d.ts.map +1 -1
- package/dist/components/Handle/index.d.ts.map +1 -1
- package/dist/components/NodeWrapper/index.d.ts.map +1 -1
- package/dist/components/StoreUpdater/index.d.ts +1 -1
- package/dist/components/StoreUpdater/index.d.ts.map +1 -1
- package/dist/container/EdgeRenderer/index.d.ts +2 -2
- package/dist/container/EdgeRenderer/index.d.ts.map +1 -1
- package/dist/container/FlowRenderer/index.d.ts +1 -1
- package/dist/container/FlowRenderer/index.d.ts.map +1 -1
- package/dist/container/GraphView/index.d.ts +2 -2
- package/dist/container/GraphView/index.d.ts.map +1 -1
- package/dist/container/InkFlow/index.d.ts.map +1 -1
- package/dist/container/Pane/index.d.ts +3 -2
- package/dist/container/Pane/index.d.ts.map +1 -1
- package/dist/container/Viewport/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useConnection.d.ts +29 -0
- package/dist/hooks/useConnection.d.ts.map +1 -0
- package/dist/hooks/useGlobalKeyHandler.d.ts.map +1 -1
- package/dist/hooks/useInkFlow.d.ts.map +1 -1
- package/dist/hooks/useNodeInView.d.ts +10 -0
- package/dist/hooks/useNodeInView.d.ts.map +1 -0
- package/dist/hooks/useNodesInView.d.ts +12 -0
- package/dist/hooks/useNodesInView.d.ts.map +1 -0
- package/dist/hooks/useViewportHelper.d.ts.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/plugins/NodeResizer/NodeResizeControl.d.ts +11 -0
- package/dist/plugins/NodeResizer/NodeResizeControl.d.ts.map +1 -0
- package/dist/plugins/NodeResizer/NodeResizer.d.ts +27 -0
- package/dist/plugins/NodeResizer/NodeResizer.d.ts.map +1 -0
- package/dist/plugins/NodeResizer/index.d.ts +4 -0
- package/dist/plugins/NodeResizer/index.d.ts.map +1 -0
- package/dist/plugins/NodeResizer/types.d.ts +65 -0
- package/dist/plugins/NodeResizer/types.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/initialState.d.ts.map +1 -1
- package/dist/style.css +7 -5
- package/dist/types/edges.d.ts +17 -14
- package/dist/types/edges.d.ts.map +1 -1
- package/dist/types/general.d.ts +1 -1
- package/dist/types/general.d.ts.map +1 -1
- package/dist/types/nodes.d.ts +1 -1
- package/dist/types/nodes.d.ts.map +1 -1
- package/dist/types/props.d.ts +71 -3
- package/dist/types/props.d.ts.map +1 -1
- package/dist/types/store.d.ts +7 -8
- package/dist/types/store.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +1 -2
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/general.d.ts +11 -1
- package/dist/utils/general.d.ts.map +1 -1
- package/dist/utils/graph.d.ts +2 -2
- package/dist/utils/graph.d.ts.map +1 -1
- package/dist/utils/layout.d.ts.map +1 -1
- package/dist/utils/store.d.ts +1 -14
- package/dist/utils/store.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ConnectionLineType } from '@aloudata/ink-core';
|
|
3
|
-
import { ConnectionLineComponent } from '../../types';
|
|
4
|
-
type ConnectionLineWrapperProps = {
|
|
3
|
+
import { ConnectionLineComponent, Node } from '../../types';
|
|
4
|
+
type ConnectionLineWrapperProps<NodeType extends Node = Node> = {
|
|
5
5
|
type: ConnectionLineType;
|
|
6
|
-
component?: ConnectionLineComponent
|
|
6
|
+
component?: ConnectionLineComponent<NodeType>;
|
|
7
7
|
containerStyle?: CSSProperties;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
export declare function ConnectionLineWrapper({ containerStyle, style, type, component, }: ConnectionLineWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ConnectionLineWrapper<NodeType extends Node = Node>({ containerStyle, style, type, component, }: ConnectionLineWrapperProps<NodeType>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectionLine/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,OAAO,CAAC;AAMnD,OAAO,EACL,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectionLine/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,OAAO,CAAC;AAMnD,OAAO,EACL,kBAAkB,EAKnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAgB,IAAI,EAAE,MAAM,aAAa,CAAC;AA+F1E,KAAK,0BAA0B,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI;IAC9D,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAUF,wBAAgB,qBAAqB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAClE,cAAc,EACd,KAAK,EACL,IAAI,EACJ,SAAS,GACV,EAAE,0BAA0B,CAAC,QAAQ,CAAC,2CA6BtC"}
|
|
@@ -2,16 +2,14 @@ import type { EdgeWrapperProps, Edge } from '../../types/edges';
|
|
|
2
2
|
import { EdgePosition } from '@aloudata/ink-core';
|
|
3
3
|
type EdgeUpdateAnchorsProps<EdgeType extends Edge = Edge> = {
|
|
4
4
|
edge: EdgeType;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onEdgeUpdateStart: EdgeWrapperProps<EdgeType>['onEdgeUpdateStart'];
|
|
11
|
-
onEdgeUpdateEnd: EdgeWrapperProps<EdgeType>['onEdgeUpdateEnd'];
|
|
5
|
+
isReconnectable: boolean | 'source' | 'target';
|
|
6
|
+
reconnectRadius: EdgeWrapperProps['reconnectRadius'];
|
|
7
|
+
onReconnect: EdgeWrapperProps<EdgeType>['onReconnect'];
|
|
8
|
+
onReconnectStart: EdgeWrapperProps<EdgeType>['onReconnectStart'];
|
|
9
|
+
onReconnectEnd: EdgeWrapperProps<EdgeType>['onReconnectEnd'];
|
|
12
10
|
setUpdateHover: (hover: boolean) => void;
|
|
13
|
-
|
|
11
|
+
setReconnecting: (updating: boolean) => void;
|
|
14
12
|
} & EdgePosition;
|
|
15
|
-
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({
|
|
13
|
+
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }: EdgeUpdateAnchorsProps<EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export {};
|
|
17
15
|
//# sourceMappingURL=EdgeUpdateAnchors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,
|
|
1
|
+
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAEL,YAAY,EAIb,MAAM,oBAAoB,CAAC;AAE5B,KAAK,sBAAsB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI;IAC1D,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC/C,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACrD,WAAW,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC;IACvD,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjE,cAAc,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7D,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C,GAAG,YAAY,CAAC;AAEjB,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC9D,eAAe,EACf,eAAe,EACf,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,EAAE,sBAAsB,CAAC,QAAQ,CAAC,2CAmHlC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Edge, EdgeWrapperProps } from '../../types';
|
|
2
|
-
export declare function EdgeWrapper<EdgeType extends Edge = Edge>({ id, edgesFocusable,
|
|
2
|
+
export declare function EdgeWrapper<EdgeType extends Edge = Edge>({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }: EdgeWrapperProps<EdgeType>): JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA8QjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Handle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAUf,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Handle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAUf,OAAO,EAIL,WAAW,IAAI,iBAAiB,EAEhC,SAAS,EAKV,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,WACf,SAAQ,iBAAiB,EACvB,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC;IAC5C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAkQD;;GAEG;AACH,eAAO,MAAM,MAAM,8GAtLiC,IAChD,OAAK,CAqLmD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NodeWrapper/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAgB,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAaxE,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,EAAE,EACjD,EAAE,EACF,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,IAAI,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,GACR,EAAE,gBAAgB,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NodeWrapper/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAgB,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAaxE,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,EAAE,EACjD,EAAE,EACF,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,IAAI,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,GACR,EAAE,gBAAgB,CAAC,QAAQ,CAAC,2CAqN5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node, Edge, InkFlowProps } from '../../types';
|
|
2
|
-
declare const InkFlowFieldsToTrack: readonly ["layoutConfig", "edges", "nodes", "defaultNodes", "defaultEdges", "nodesDraggable", "minZoom", "maxZoom", "nodeExtent", "elementsSelectable", "translateExtent", "defaultEdgeOptions", "fitView", "fitViewOptions", "nodeOrigin", "autoLayout", "centerConfig", "layoutTypes"];
|
|
2
|
+
declare const InkFlowFieldsToTrack: readonly ["layoutConfig", "edges", "nodes", "defaultNodes", "defaultEdges", "onConnect", "onConnectStart", "onConnectEnd", "onClickConnectStart", "onClickConnectEnd", "nodesDraggable", "nodesConnectable", "minZoom", "maxZoom", "nodeExtent", "elementsSelectable", "connectionMode", "translateExtent", "connectOnClick", "defaultEdgeOptions", "fitView", "fitViewOptions", "onNodesDelete", "onEdgesDelete", "onDelete", "onNodeDrag", "onNodeDragStart", "onNodeDragStop", "nodeOrigin", "isValidConnection", "autoLayout", "centerConfig", "layoutTypes", "autoPanSpeed"];
|
|
3
3
|
type InkFlowFieldsToTrack = (typeof InkFlowFieldsToTrack)[number];
|
|
4
4
|
type StoreUpdaterProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> = Pick<InkFlowProps<NodeType, EdgeType>, InkFlowFieldsToTrack> & {
|
|
5
5
|
rfId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StoreUpdater/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EAEJ,YAAY,EAGb,MAAM,aAAa,CAAC;AAKrB,QAAA,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StoreUpdater/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EAEJ,YAAY,EAGb,MAAM,aAAa,CAAC;AAKrB,QAAA,MAAM,oBAAoB,mjBAyDhB,CAAC;AAEX,KAAK,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAClE,KAAK,iBAAiB,CACpB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,IAC1B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,oBAAoB,CAAC,GAAG;IACjE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgCF,wBAAgB,YAAY,CAC1B,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,OA+E7C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { GraphViewProps } from '../GraphView';
|
|
3
3
|
import type { Edge, Node } from '../../types';
|
|
4
|
-
type EdgeRendererProps<EdgeType extends Edge = Edge> = Pick<GraphViewProps<Node, EdgeType>, 'onEdgeClick' | 'onEdgeDoubleClick' | 'defaultMarkerColor' | '
|
|
4
|
+
type EdgeRendererProps<EdgeType extends Edge = Edge> = Pick<GraphViewProps<Node, EdgeType>, 'onEdgeClick' | 'onEdgeDoubleClick' | 'defaultMarkerColor' | 'onlyRenderVisibleElements' | 'onReconnect' | 'onEdgeContextMenu' | 'onEdgeMouseEnter' | 'onEdgeMouseMove' | 'onEdgeMouseLeave' | 'onReconnectStart' | 'onReconnectEnd' | 'reconnectRadius' | 'noPanClassName' | 'rfId' | 'disableKeyboardA11y' | 'edgeTypes'> & {
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare function EdgeRendererComponent<EdgeType extends Edge = Edge>({ defaultMarkerColor, rfId, noPanClassName,
|
|
7
|
+
declare function EdgeRendererComponent<EdgeType extends Edge = Edge>({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y, }: EdgeRendererProps<EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare namespace EdgeRendererComponent {
|
|
9
9
|
var displayName: string;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/EdgeRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAgB,IAAI,EAAE,MAAM,aAAa,CAAC;AAK5D,KAAK,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CACzD,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,EAC5B,aAAa,GACb,mBAAmB,GACnB,oBAAoB,GACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/EdgeRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAgB,IAAI,EAAE,MAAM,aAAa,CAAC;AAK5D,KAAK,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CACzD,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,EAC5B,aAAa,GACb,mBAAmB,GACnB,oBAAoB,GACpB,2BAA2B,GAC3B,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,MAAM,GACN,qBAAqB,GACrB,WAAW,CACd,GAAG;IACF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAUF,iBAAS,qBAAqB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC3D,kBAAkB,EAClB,yBAAyB,EACzB,IAAI,EACJ,SAAS,EACT,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,GACpB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,2CAqC7B;kBAtDQ,qBAAqB;;;AA0D9B,eAAO,MAAM,YAAY,EAEpB,OAAO,qBAAqB,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type FlowRendererProps<NodeType extends Node = Node> = Omit<GraphViewProp
|
|
|
5
5
|
isControlledViewport: boolean;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare function FlowRendererComponent<NodeType extends Node = Node>({ children, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, defaultViewport, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport, }: FlowRendererProps<NodeType>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function FlowRendererComponent<NodeType extends Node = Node>({ children, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, defaultViewport, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport, paneClickDistance, nodeClickDistance, }: FlowRendererProps<NodeType>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare namespace FlowRendererComponent {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/FlowRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAgB,IAAI,EAAE,MAAM,aAAa,CAAC;AAMjD,MAAM,MAAM,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CAChE,cAAc,CAAC,QAAQ,CAAC,EACtB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,UAAU,GACV,oBAAoB,GACpB,8BAA8B,GAC9B,gBAAgB,GAChB,2BAA2B,GAC3B,mBAAmB,GACnB,oBAAoB,GACpB,MAAM,GACN,YAAY,CACf,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AASF,iBAAS,qBAAqB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC3D,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,WAAW,EAAE,YAAY,EACzB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,SAAS,EAAE,UAAU,EACrB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/FlowRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAgB,IAAI,EAAE,MAAM,aAAa,CAAC;AAMjD,MAAM,MAAM,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CAChE,cAAc,CAAC,QAAQ,CAAC,EACtB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,UAAU,GACV,oBAAoB,GACpB,8BAA8B,GAC9B,gBAAgB,GAChB,2BAA2B,GAC3B,mBAAmB,GACnB,oBAAoB,GACpB,MAAM,GACN,YAAY,CACf,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AASF,iBAAS,qBAAqB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC3D,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,WAAW,EAAE,YAAY,EACzB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,SAAS,EAAE,UAAU,EACrB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,2CA+D7B;kBArGQ,qBAAqB;;;AAyG9B,eAAO,MAAM,YAAY,EAEpB,OAAO,qBAAqB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Edge, Node, InkFlowProps } from '../../types';
|
|
2
|
-
export type GraphViewProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> = Omit<InkFlowProps<NodeType, EdgeType>, 'onSelectionChange' | 'nodes' | 'edges' | 'onMove' | 'onMoveStart' | 'onMoveEnd' | 'elevateEdgesOnSelect'> & Required<Pick<InkFlowProps<NodeType, EdgeType>, 'minZoom' | 'maxZoom' | '
|
|
2
|
+
export type GraphViewProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> = Omit<InkFlowProps<NodeType, EdgeType>, 'onSelectionChange' | 'nodes' | 'edges' | 'onMove' | 'onMoveStart' | 'onMoveEnd' | 'elevateEdgesOnSelect'> & Required<Pick<InkFlowProps<NodeType, EdgeType>, 'selectionKeyCode' | 'deleteKeyCode' | 'multiSelectionKeyCode' | 'connectionLineType' | 'onlyRenderVisibleElements' | 'translateExtent' | 'minZoom' | 'maxZoom' | 'defaultMarkerColor' | 'noDragClassName' | 'noWheelClassName' | 'noPanClassName' | 'defaultViewport' | 'disableKeyboardA11y' | 'paneClickDistance' | 'nodeClickDistance'>> & {
|
|
3
3
|
rfId: string;
|
|
4
4
|
};
|
|
5
|
-
declare function GraphViewComponent<NodeType extends Node = Node, EdgeType extends Edge = Edge>({ onNodeClick, onNodeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onEdgeClick, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeContextMenu, rfId, minZoom, maxZoom, noPanClassName, noDragClassName, nodeOrigin, viewport, disableKeyboardA11y, translateExtent, defaultViewport, nodeTypes, edgeTypes, elementsSelectable, defaultMarkerColor, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, onPaneClick, onPaneContextMenu, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, }: GraphViewProps<NodeType, EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function GraphViewComponent<NodeType extends Node = Node, EdgeType extends Edge = Edge>({ onNodeClick, onNodeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onEdgeClick, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeContextMenu, rfId, minZoom, maxZoom, noPanClassName, noDragClassName, nodeOrigin, viewport, disableKeyboardA11y, translateExtent, defaultViewport, nodeTypes, edgeTypes, elementsSelectable, defaultMarkerColor, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, onPaneClick, onPaneContextMenu, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, panOnDrag, selectionOnDrag, selectionMode, onlyRenderVisibleElements, paneClickDistance, nodeClickDistance, onReconnect, onReconnectStart, onReconnectEnd, reconnectRadius, deleteKeyCode, selectionKeyCode, multiSelectionKeyCode, noWheelClassName, }: GraphViewProps<NodeType, EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare namespace GraphViewComponent {
|
|
7
7
|
var displayName: string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/GraphView/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG5D,MAAM,MAAM,cAAc,CACxB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,IAC1B,IAAI,CACN,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC9B,mBAAmB,GACnB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,aAAa,GACb,WAAW,GACX,sBAAsB,CACzB,GACC,QAAQ,CACN,IAAI,CACF,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC9B,SAAS,GACT,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/GraphView/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG5D,MAAM,MAAM,cAAc,CACxB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,IAC1B,IAAI,CACN,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC9B,mBAAmB,GACnB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,aAAa,GACb,WAAW,GACX,sBAAsB,CACzB,GACC,QAAQ,CACN,IAAI,CACF,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAC9B,kBAAkB,GAClB,eAAe,GACf,uBAAuB,GACvB,oBAAoB,GACpB,2BAA2B,GAC3B,iBAAiB,GACjB,SAAS,GACT,SAAS,GACT,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,CACtB,CACF,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACJ,iBAAS,kBAAkB,CACzB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,EACA,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,cAAc,EACd,eAAe,EACf,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,GACjB,EAAE,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,2CAwEpC;kBA9HQ,kBAAkB;;;AAkI3B,eAAO,MAAM,SAAS,EAA+B,OAAO,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/InkFlow/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/InkFlow/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;yBAuB3C,QAAQ,SAAS,IAAI,SAAS,QAAQ,SAAS,IAAI,qGAmGlD,IAAK,OAAO;AAuE9B,wBAAwC"}
|
|
@@ -5,8 +5,9 @@ import { type ReactNode } from 'react';
|
|
|
5
5
|
import { InkFlowProps } from '../../types';
|
|
6
6
|
type PaneProps = {
|
|
7
7
|
isSelecting: boolean;
|
|
8
|
+
selectionKeyPressed: boolean;
|
|
8
9
|
children: ReactNode;
|
|
9
|
-
} & Partial<Pick<InkFlowProps, 'selectionMode' | 'panOnDrag' | 'onSelectionStart' | 'onSelectionEnd' | 'onPaneClick' | 'onPaneContextMenu' | 'onPaneScroll' | 'onPaneMouseEnter' | 'onPaneMouseMove' | 'onPaneMouseLeave'>>;
|
|
10
|
-
export declare function Pane({ isSelecting, selectionMode, panOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children, }: PaneProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
} & Partial<Pick<InkFlowProps, 'selectionMode' | 'panOnDrag' | 'onSelectionStart' | 'onSelectionEnd' | 'onPaneClick' | 'onPaneContextMenu' | 'onPaneScroll' | 'onPaneMouseEnter' | 'onPaneMouseMove' | 'onPaneMouseLeave' | 'selectionOnDrag'>>;
|
|
11
|
+
export declare function Pane({ isSelecting, selectionKeyPressed, selectionMode, selectionOnDrag, panOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children, }: PaneProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,YAAY,EAAgB,MAAM,aAAa,CAAC;AAOzD,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,YAAY,EACV,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,YAAY,EAAgB,MAAM,aAAa,CAAC;AAOzD,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,YAAY,EACV,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,CACpB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAkC,EAClC,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,2CAgPX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Viewport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Viewport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAWnD"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { InternalNode, Node } from '../types';
|
|
2
|
+
import { ConnectionState } from '@aloudata/ink-core';
|
|
3
|
+
/**
|
|
4
|
+
* The `useConnection` hook returns the current connection when there is an active
|
|
5
|
+
* connection interaction. If no connection interaction is active, it returns null
|
|
6
|
+
* for every property. A typical use case for this hook is to colorize handles
|
|
7
|
+
* based on a certain condition (e.g. if the connection is valid or not).
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
*import { useConnection } from '@xyflow/react';
|
|
14
|
+
*
|
|
15
|
+
*function App() {
|
|
16
|
+
* const connection = useConnection();
|
|
17
|
+
*
|
|
18
|
+
* return (
|
|
19
|
+
* <div> {connection ? `Someone is trying to make a connection from ${connection.fromNode} to this one.` : 'There are currently no incoming connections!'}
|
|
20
|
+
*
|
|
21
|
+
* </div>
|
|
22
|
+
* );
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @returns ConnectionState
|
|
27
|
+
*/
|
|
28
|
+
export declare function useConnection<NodeType extends Node = Node, SelectorReturn = ConnectionState<InternalNode<NodeType>>>(connectionSelector?: (connection: ConnectionState<InternalNode<NodeType>>) => SelectorReturn): SelectorReturn;
|
|
29
|
+
//# sourceMappingURL=useConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAgB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AA+B3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,cAAc,GAAG,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAExD,kBAAkB,CAAC,EAAE,CACnB,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,KAChD,cAAc,GAClB,cAAc,CAKhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalKeyHandler.d.ts","sourceRoot":"","sources":["../../src/hooks/useGlobalKeyHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useGlobalKeyHandler.d.ts","sourceRoot":"","sources":["../../src/hooks/useGlobalKeyHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAS7C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,qBAAqB,GACtB,EAAE;IACD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,qBAAqB,EAAE,OAAO,GAAG,IAAI,CAAC;CACvC,GAAG,IAAI,CAqBP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInkFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useInkFlow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,IAAI,EAA8B,MAAM,UAAU,CAAC;AASlE,OAAO,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useInkFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useInkFlow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,IAAI,EAA8B,MAAM,UAAU,CAAC;AASlE,OAAO,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpE;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,KACzB,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CA2NvC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for checking if a specific node is visible in the viewport.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
* @param nodeId - The id of the node to check visibility for
|
|
6
|
+
* @returns boolean indicating if the node is visible in the viewport
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare function useNodeInView(nodeId: string): boolean;
|
|
10
|
+
//# sourceMappingURL=useNodeInView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeInView.d.ts","sourceRoot":"","sources":["../../src/hooks/useNodeInView.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAsCrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Node } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for getting nodes that are currently visible in the viewport.
|
|
4
|
+
* Unlike getNodesInside, this hook does NOT force initial render visibility,
|
|
5
|
+
* making it suitable for lazy loading scenarios.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
* @returns array of visible nodes
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare function useNodesInView<NodeType extends Node = Node>(): NodeType[];
|
|
12
|
+
//# sourceMappingURL=useNodesInView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodesInView.d.ts","sourceRoot":"","sources":["../../src/hooks/useNodesInView.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,UAAU,CAAC;AAGnD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,EAAE,CAsCzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useViewportHelper.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewportHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useViewportHelper.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewportHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAcnD;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,QAAO,uBA8J7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|