@likec4/diagram 1.0.0-next.2 → 1.0.0

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.
Files changed (124) hide show
  1. package/dist/LikeC4Diagram.css.d.ts +0 -1
  2. package/dist/LikeC4Diagram.d.ts +1 -2
  3. package/dist/LikeC4Diagram.props.d.ts +24 -25
  4. package/dist/StaticLikeC4Diagram.d.ts +1 -2
  5. package/dist/globals.css.d.ts +1 -0
  6. package/dist/hooks/index.d.ts +2 -3
  7. package/dist/hooks/useSetState.d.ts +3 -0
  8. package/dist/hooks/useUpdateEffect.d.ts +4 -0
  9. package/dist/icons/Clipboard.d.ts +0 -1
  10. package/dist/icons/Link.d.ts +0 -1
  11. package/dist/icons/ZoomIn.d.ts +0 -1
  12. package/dist/icons/index.d.ts +0 -1
  13. package/dist/index.d.ts +1 -4
  14. package/dist/index.mjs +9388 -0
  15. package/dist/mantine/EnsureMantine.d.ts +2 -4
  16. package/dist/mantine/theme.d.ts +3 -0
  17. package/dist/mantine.css.d.ts +1 -0
  18. package/dist/state/DiagramContext.d.ts +386 -0
  19. package/dist/state/WhenInitialized.d.ts +3 -0
  20. package/dist/state/diagramStore.d.ts +428 -0
  21. package/dist/state/index.d.ts +4 -2
  22. package/dist/state/useDiagramStore.d.ts +387 -0
  23. package/dist/style.css +1212 -1
  24. package/dist/theme.css.d.ts +16 -2
  25. package/dist/ui/Camera.d.ts +0 -1
  26. package/dist/ui/KeepAspectRatio.css.d.ts +0 -1
  27. package/dist/ui/KeepAspectRatio.d.ts +0 -1
  28. package/dist/ui/OptionsPanel.css.d.ts +0 -1
  29. package/dist/ui/OptionsPanel.d.ts +0 -1
  30. package/dist/ui/index.d.ts +0 -1
  31. package/dist/ui/options/NodeOptions.d.ts +0 -1
  32. package/dist/xyflow/FitviewOnDiagramChange.d.ts +1 -5
  33. package/dist/xyflow/SyncWithDiagram.d.ts +5 -0
  34. package/dist/xyflow/XYFlowBackground.d.ts +0 -1
  35. package/dist/xyflow/XYFlowEvents.d.ts +5 -15
  36. package/dist/xyflow/XYFlowWrapper.d.ts +4 -5
  37. package/dist/xyflow/const.d.ts +1 -2
  38. package/dist/xyflow/diagram-to-xyflow.d.ts +4 -2
  39. package/dist/xyflow/edges/RelationshipEdge.d.ts +7 -7
  40. package/dist/xyflow/edges/edges.css.d.ts +2 -1
  41. package/dist/xyflow/edges/utils.d.ts +3 -4
  42. package/dist/xyflow/hooks/index.d.ts +2 -37
  43. package/dist/xyflow/hooks/{use-layout-/321/201onstraints.d.ts → useLayoutConstraints.d.ts} +2 -4
  44. package/dist/xyflow/hooks/useXYFlow.d.ts +266 -0
  45. package/dist/xyflow/nodes/compound/CompoundNode.css.d.ts +0 -1
  46. package/dist/xyflow/nodes/compound/CompoundNode.d.ts +0 -1
  47. package/dist/xyflow/nodes/compound/index.d.ts +0 -1
  48. package/dist/xyflow/nodes/element/ElementIcon.d.ts +1 -2
  49. package/dist/xyflow/nodes/element/ElementLink.css.d.ts +0 -1
  50. package/dist/xyflow/nodes/element/ElementLink.d.ts +1 -2
  51. package/dist/xyflow/nodes/element/ElementNode.d.ts +1 -3
  52. package/dist/xyflow/nodes/element/ElementShapeSvg.d.ts +2 -3
  53. package/dist/xyflow/nodes/element/element.css.d.ts +0 -1
  54. package/dist/xyflow/nodes/element/index.d.ts +1 -2
  55. package/dist/xyflow/nodes/shared/NavigateToBtn.d.ts +0 -1
  56. package/dist/xyflow/types.d.ts +20 -8
  57. package/dist/xyflow/utils.d.ts +0 -1
  58. package/package.json +36 -34
  59. package/src/LikeC4Diagram.css.ts +31 -0
  60. package/src/LikeC4Diagram.props.ts +154 -0
  61. package/src/LikeC4Diagram.tsx +119 -0
  62. package/src/StaticLikeC4Diagram.tsx +39 -0
  63. package/src/globals.css.ts +128 -0
  64. package/src/hooks/index.ts +2 -0
  65. package/src/hooks/useSetState.ts +19 -0
  66. package/src/hooks/useUpdateEffect.ts +28 -0
  67. package/src/icons/Clipboard.tsx +24 -0
  68. package/src/icons/Link.tsx +23 -0
  69. package/src/icons/ZoomIn.tsx +25 -0
  70. package/src/icons/index.ts +3 -0
  71. package/src/index.ts +11 -0
  72. package/src/mantine/EnsureMantine.tsx +14 -0
  73. package/src/mantine/theme.ts +19 -0
  74. package/src/mantine.css.ts +4 -0
  75. package/src/reset.d.ts +2 -0
  76. package/src/state/DiagramContext.tsx +42 -0
  77. package/src/state/WhenInitialized.tsx +24 -0
  78. package/src/state/diagramStore.ts +358 -0
  79. package/src/state/index.ts +4 -0
  80. package/src/state/useDiagramStore.ts +39 -0
  81. package/src/theme.css.ts +64 -0
  82. package/src/ui/Camera.tsx +174 -0
  83. package/src/ui/KeepAspectRatio.css.ts +7 -0
  84. package/src/ui/KeepAspectRatio.tsx +35 -0
  85. package/src/ui/OptionsPanel.css.ts +10 -0
  86. package/src/ui/OptionsPanel.tsx +65 -0
  87. package/src/ui/index.ts +3 -0
  88. package/src/ui/options/NodeOptions.tsx +253 -0
  89. package/src/xyflow/FitviewOnDiagramChange.tsx +93 -0
  90. package/src/xyflow/SyncWithDiagram.tsx +113 -0
  91. package/src/xyflow/XYFlowBackground.tsx +33 -0
  92. package/src/xyflow/XYFlowEvents.tsx +100 -0
  93. package/src/xyflow/XYFlowWrapper.tsx +166 -0
  94. package/src/xyflow/const.ts +7 -0
  95. package/src/xyflow/diagram-to-xyflow.ts +197 -0
  96. package/src/xyflow/edges/RelationshipEdge.tsx +288 -0
  97. package/src/xyflow/edges/edges.css.ts +124 -0
  98. package/src/xyflow/edges/utils.ts +110 -0
  99. package/src/xyflow/hooks/index.ts +2 -0
  100. package/src/xyflow/hooks/useLayoutConstraints.ts +289 -0
  101. package/src/xyflow/hooks/useXYFlow.ts +20 -0
  102. package/src/xyflow/nodes/compound/CompoundNode.css.ts +191 -0
  103. package/src/xyflow/nodes/compound/CompoundNode.tsx +105 -0
  104. package/src/xyflow/nodes/compound/index.ts +1 -0
  105. package/src/xyflow/nodes/element/ElementIcon.tsx +44 -0
  106. package/src/xyflow/nodes/element/ElementLink.css.ts +67 -0
  107. package/src/xyflow/nodes/element/ElementLink.tsx +94 -0
  108. package/src/xyflow/nodes/element/ElementNode.tsx +225 -0
  109. package/src/xyflow/nodes/element/ElementShapeSvg.tsx +181 -0
  110. package/src/xyflow/nodes/element/element.css.ts +261 -0
  111. package/src/xyflow/nodes/element/index.ts +1 -0
  112. package/src/xyflow/nodes/shared/NavigateToBtn.tsx +25 -0
  113. package/src/xyflow/types.ts +100 -0
  114. package/src/xyflow/utils.ts +12 -0
  115. package/dist/EmbeddedLikeC4Diagram.css.d.ts +0 -6
  116. package/dist/EmbeddedLikeC4Diagram.d.ts +0 -18
  117. package/dist/bundle.d.ts +0 -3
  118. package/dist/hooks/use-set-state.d.ts +0 -2
  119. package/dist/hooks/use-update-effect.d.ts +0 -4
  120. package/dist/index.css.d.ts +0 -2
  121. package/dist/index.js +0 -13043
  122. package/dist/mantine/index.d.ts +0 -3
  123. package/dist/state/DiagramState.d.ts +0 -162
  124. package/dist/xyflow/UpdateOnDiagramChange.d.ts +0 -10
@@ -1,7 +1,15 @@
1
1
  export declare const vars: {
2
+ default: {
3
+ font: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
4
+ };
2
5
  likec4: {
3
6
  font: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
4
- backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
7
+ background: {
8
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
9
+ pattern: {
10
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
11
+ };
12
+ };
5
13
  };
6
14
  compound: {
7
15
  font: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
@@ -19,10 +27,17 @@ export declare const vars: {
19
27
  labelColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
20
28
  labelBgColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
21
29
  };
30
+ optionsPanel: {
31
+ top: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
32
+ right: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
33
+ };
22
34
  };
23
35
  export declare const xyvars: {
24
36
  background: {
25
37
  color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
38
+ pattern: {
39
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
40
+ };
26
41
  };
27
42
  edge: {
28
43
  stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
@@ -41,4 +56,3 @@ export declare const xyvars: {
41
56
  borderRadius: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
42
57
  };
43
58
  };
44
- //# sourceMappingURL=theme.css.d.ts.map
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  declare const CameraMemo: import('react').NamedExoticComponent<object>;
3
3
  export default CameraMemo;
4
- //# sourceMappingURL=Camera.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const wrapper: string;
2
- //# sourceMappingURL=KeepAspectRatio.css.d.ts.map
@@ -7,4 +7,3 @@ type KeepAspectRatioProps = HTMLAttributes<HTMLDivElement> & {
7
7
  };
8
8
  export declare function KeepAspectRatio({ children, width, height, enabled, className, style, ...rest }: KeepAspectRatioProps): JSX.Element;
9
9
  export {};
10
- //# sourceMappingURL=KeepAspectRatio.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const panel: string;
2
- //# sourceMappingURL=OptionsPanel.css.d.ts.map
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  declare const OptionsPanelMemo: import('react').NamedExoticComponent<object>;
3
3
  export default OptionsPanelMemo;
4
- //# sourceMappingURL=OptionsPanel.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { KeepAspectRatio } from './KeepAspectRatio';
2
2
  export { default as OptionsPanel } from './OptionsPanel';
3
- //# sourceMappingURL=index.d.ts.map
@@ -18,4 +18,3 @@ export type ColorKey = typeof colors[0]['key'];
18
18
  export declare function NodeOptions({ selectedNodeIds }: {
19
19
  selectedNodeIds: string[];
20
20
  }): JSX.Element | null;
21
- //# sourceMappingURL=NodeOptions.d.ts.map
@@ -1,6 +1,2 @@
1
1
  /// <reference types="react" />
2
- /**
3
- * Fits the view when the view changes and nodes are initialized
4
- */
5
- export declare const FitviewOnDiagramChange: import('react').NamedExoticComponent<object>;
6
- //# sourceMappingURL=FitviewOnDiagramChange.d.ts.map
2
+ export declare const FitViewOnDiagramChange: import('react').MemoExoticComponent<() => JSX.Element | null>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Syncs the diagram state with the XYFlow instance
4
+ */
5
+ export declare const SyncWithDiagram: import('react').MemoExoticComponent<() => null>;
@@ -8,4 +8,3 @@ export type XYBackgroundProps = XYBackgroundVariant | OverrideProperties<Backgro
8
8
  export declare const XYFlowBackground: import('react').NamedExoticComponent<{
9
9
  background: XYBackgroundProps;
10
10
  }>;
11
- //# sourceMappingURL=XYFlowBackground.d.ts.map
@@ -1,25 +1,15 @@
1
1
  import { XYFlowEdge, XYFlowNode } from './types';
2
- import { Change, LikeC4DiagramEventHandlers } from '../LikeC4Diagram.props';
3
- import { default as React, PropsWithChildren } from 'react';
4
- import { EdgeMouseHandler, NodeMouseHandler } from '@xyflow/react';
2
+ import { MouseEvent as ReactMouseEvent } from 'react';
3
+ import { EdgeMouseHandler, NodeMouseHandler, OnMoveEnd } from '@xyflow/react';
5
4
 
6
5
  type XYFlowEventHandlers = {
7
- onNavigateTo: (xynodeId: string, event: React.MouseEvent) => void;
8
- onPanelClick: (event: React.MouseEvent) => void;
6
+ onPaneClick: (event: ReactMouseEvent) => void;
9
7
  onNodeContextMenu: NodeMouseHandler<XYFlowNode>;
10
8
  onEdgeContextMenu: EdgeMouseHandler<XYFlowEdge>;
11
- onPaneContextMenu: (event: React.MouseEvent | MouseEvent) => void;
9
+ onPaneContextMenu: (event: ReactMouseEvent | MouseEvent) => void;
12
10
  onNodeClick: NodeMouseHandler<XYFlowNode>;
13
11
  onEdgeClick: EdgeMouseHandler<XYFlowEdge>;
14
- onChange: (change: Change) => void;
12
+ onMoveEnd: OnMoveEnd;
15
13
  };
16
14
  export declare function useXYFlowEvents(): XYFlowEventHandlers;
17
- type Props = PropsWithChildren<{
18
- eventHandlers: LikeC4DiagramEventHandlers;
19
- }>;
20
- /**
21
- * Bridge between ReactFlow and LikeC4Diagram event handlers
22
- */
23
- export declare function XYFlowEventHandlers({ children, eventHandlers }: Props): JSX.Element;
24
15
  export {};
25
- //# sourceMappingURL=XYFlowEvents.d.ts.map
@@ -1,15 +1,14 @@
1
1
  import { XYFlowEdge, XYFlowNode } from './types';
2
2
  import { LikeC4DiagramProperties } from '../LikeC4Diagram.props';
3
- import { Simplify } from 'type-fest';
3
+ import { SetNonNullable, Simplify } from 'type-fest';
4
4
  import { CSSProperties, PropsWithChildren } from 'react';
5
5
 
6
- type OnlyExpectedProps = Required<Omit<LikeC4DiagramProperties, 'view' | 'disableHovercards' | 'controls' | 'background' | 'initialWidth' | 'initialHeight' | 'keepAspectRatio'>>;
7
- type XYFlowWrapperProps = Simplify<PropsWithChildren<OnlyExpectedProps & {
6
+ type OnlyExpectedProps = Required<Pick<LikeC4DiagramProperties, 'className' | 'controls' | 'pannable' | 'zoomable' | 'background'>>;
7
+ type XYFlowWrapperProps = Simplify<PropsWithChildren<SetNonNullable<OnlyExpectedProps> & {
8
8
  defaultNodes: XYFlowNode[];
9
9
  defaultEdges: XYFlowEdge[];
10
10
  style?: CSSProperties | undefined;
11
11
  }>>;
12
- declare function XYFlowWrapper({ className, children, defaultNodes, defaultEdges, fitView, colorMode: colorModeProp, readonly, pannable, zoomable, nodesSelectable, nodesDraggable, fitViewPadding, style }: XYFlowWrapperProps): JSX.Element;
12
+ declare function XYFlowWrapper({ className, children, defaultNodes, defaultEdges, pannable, zoomable, controls, background, style }: XYFlowWrapperProps): JSX.Element;
13
13
  export declare const XYFlow: typeof XYFlowWrapper;
14
14
  export {};
15
- //# sourceMappingURL=XYFlowWrapper.d.ts.map
@@ -3,5 +3,4 @@ export declare const ZIndexes: {
3
3
  readonly Edge: 2;
4
4
  readonly Element: 3;
5
5
  };
6
- export declare const MinZoom = 0.2;
7
- //# sourceMappingURL=const.d.ts.map
6
+ export declare const MinZoom = 0.05;
@@ -1,5 +1,7 @@
1
1
  import { XYFlowData } from '../xyflow/types';
2
2
  import { DiagramView } from '@likec4/core';
3
3
 
4
- export declare function diagramViewToXYFlowData(view: Pick<DiagramView, 'nodes' | 'edges'>, dragEnabled?: boolean): XYFlowData;
5
- //# sourceMappingURL=diagram-to-xyflow.d.ts.map
4
+ export declare function diagramViewToXYFlowData(view: Pick<DiagramView, 'nodes' | 'edges'>, opts: {
5
+ draggable: boolean;
6
+ selectable: boolean;
7
+ }): XYFlowData;
@@ -1,15 +1,18 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { EdgeProps } from '@xyflow/react';
2
3
 
3
4
  export declare const RelationshipEdge: import('react').NamedExoticComponent<EdgeProps<{
4
5
  source: string;
5
6
  target: string;
6
- style?: import("react").CSSProperties;
7
+ style?: CSSProperties;
7
8
  id: string;
9
+ zIndex?: number;
10
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
11
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
8
12
  hidden?: boolean;
9
13
  selected?: boolean;
10
14
  selectable?: boolean;
11
15
  deletable?: boolean;
12
- zIndex?: number;
13
16
  ariaLabel?: string;
14
17
  className?: string;
15
18
  focusable?: boolean;
@@ -17,16 +20,13 @@ export declare const RelationshipEdge: import('react').NamedExoticComponent<Edge
17
20
  sourceHandle?: string | null;
18
21
  targetHandle?: string | null;
19
22
  animated?: boolean;
20
- markerStart?: import("@xyflow/react").EdgeMarkerType;
21
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
22
23
  interactionWidth?: number;
23
- labelStyle?: import("react").CSSProperties;
24
+ labelStyle?: CSSProperties;
24
25
  labelShowBg?: boolean;
25
- labelBgStyle?: import("react").CSSProperties;
26
+ labelBgStyle?: CSSProperties;
26
27
  labelBgPadding?: [number, number];
27
28
  labelBgBorderRadius?: number;
28
29
  updatable?: import("@xyflow/react").EdgeUpdatable;
29
30
  data: import("../types").RelationshipData;
30
31
  type: "relationship";
31
32
  }>>;
32
- //# sourceMappingURL=RelationshipEdge.d.ts.map
@@ -2,6 +2,7 @@ export declare const container: string;
2
2
  export declare const edgePathBg: string;
3
3
  export declare const fillStrokeCtx: string;
4
4
  export declare const cssEdgePath: string;
5
+ export declare const varLabelX: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
6
+ export declare const varLabelY: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
5
7
  export declare const edgeLabel: string;
6
8
  export declare const edgeLabelBody: string;
7
- //# sourceMappingURL=edges.css.d.ts.map
@@ -1,8 +1,8 @@
1
- import { XYFlowNode } from '../types';
1
+ import { InternalXYFlowNode } from '../types';
2
2
  import { Position, XYPosition } from '@xyflow/react';
3
3
 
4
- export declare function getPointPosition(node: XYFlowNode, intersectionPoint: XYPosition): readonly [number, number, Position];
5
- export declare function getEdgeParams(source: XYFlowNode, target: XYFlowNode): {
4
+ export declare function getPointPosition(node: InternalXYFlowNode, intersectionPoint: XYPosition): readonly [number, number, Position];
5
+ export declare function getEdgeParams(source: InternalXYFlowNode, target: InternalXYFlowNode): {
6
6
  sx: number;
7
7
  sy: number;
8
8
  tx: number;
@@ -10,4 +10,3 @@ export declare function getEdgeParams(source: XYFlowNode, target: XYFlowNode): {
10
10
  sourcePos: Position;
11
11
  targetPos: Position;
12
12
  };
13
- //# sourceMappingURL=utils.d.ts.map
@@ -1,37 +1,2 @@
1
- import { XYFlowNode } from '../types';
2
-
3
- export declare const useXYFlow: () => import('@xyflow/react').ReactFlowInstance<XYFlowNode, {
4
- source: string;
5
- target: string;
6
- style?: import("react").CSSProperties;
7
- id: string;
8
- hidden?: boolean;
9
- selected?: boolean;
10
- selectable?: boolean;
11
- deletable?: boolean;
12
- zIndex?: number;
13
- ariaLabel?: string;
14
- className?: string;
15
- focusable?: boolean;
16
- label?: import("react").ReactNode;
17
- sourceHandle?: string | null;
18
- targetHandle?: string | null;
19
- animated?: boolean;
20
- markerStart?: import("@xyflow/react").EdgeMarkerType;
21
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
22
- interactionWidth?: number;
23
- labelStyle?: import("react").CSSProperties;
24
- labelShowBg?: boolean;
25
- labelBgStyle?: import("react").CSSProperties;
26
- labelBgPadding?: [number, number];
27
- labelBgBorderRadius?: number;
28
- updatable?: import("@xyflow/react").EdgeUpdatable;
29
- data: import("../types").RelationshipData;
30
- type: "relationship";
31
- }>;
32
- export declare const useXYNodesData: {
33
- (nodeId: string): Pick<XYFlowNode, "id" | "type" | "data"> | null;
34
- (nodeIds: string[]): Pick<XYFlowNode, "id" | "type" | "data">[];
35
- };
36
- export { useLayoutConstraints } from './use-layout-сonstraints';
37
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './useLayoutConstraints';
2
+ export * from './useXYFlow';
@@ -1,11 +1,9 @@
1
- import { XYFlowInstance, XYFlowNode } from '../types';
2
- import { RefObject } from 'react';
1
+ import { XYFlowNode } from '../types';
3
2
  import { ReactFlowProps } from '@xyflow/react';
4
3
 
5
4
  type LayoutConstraints = Required<Pick<ReactFlowProps<XYFlowNode>, 'onNodeDragStart' | 'onNodeDrag' | 'onNodeDragStop'>>;
6
5
  /**
7
6
  * Keeps the layout constraints (parent nodes and children) when dragging a node
8
7
  */
9
- export declare function useLayoutConstraints(xyflow: RefObject<XYFlowInstance | undefined>): LayoutConstraints;
8
+ export declare function useLayoutConstraints(): LayoutConstraints;
10
9
  export {};
11
- //# sourceMappingURL=use-layout-%D1%81onstraints.d.ts.map
@@ -0,0 +1,266 @@
1
+ import { XYFlowNode, XYFlowState } from '../types';
2
+
3
+ export declare const useXYFlow: () => import('@xyflow/react').ReactFlowInstance<XYFlowNode, {
4
+ source: string;
5
+ target: string;
6
+ style?: import("react").CSSProperties;
7
+ id: string;
8
+ zIndex?: number;
9
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
10
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
11
+ hidden?: boolean;
12
+ selected?: boolean;
13
+ selectable?: boolean;
14
+ deletable?: boolean;
15
+ ariaLabel?: string;
16
+ className?: string;
17
+ focusable?: boolean;
18
+ label?: import("react").ReactNode;
19
+ sourceHandle?: string | null;
20
+ targetHandle?: string | null;
21
+ animated?: boolean;
22
+ interactionWidth?: number;
23
+ labelStyle?: import("react").CSSProperties;
24
+ labelShowBg?: boolean;
25
+ labelBgStyle?: import("react").CSSProperties;
26
+ labelBgPadding?: [number, number];
27
+ labelBgBorderRadius?: number;
28
+ updatable?: import("@xyflow/react").EdgeUpdatable;
29
+ data: import("../types").RelationshipData;
30
+ type: "relationship";
31
+ }>;
32
+ export declare const useXYNodesData: {
33
+ (nodeId: string): Pick<XYFlowNode, "id" | "type" | "data"> | null;
34
+ (nodeIds: string[]): Pick<XYFlowNode, "id" | "type" | "data">[];
35
+ };
36
+ export declare function useXYStore<StateSlice = unknown>(selector: (state: XYFlowState) => StateSlice, equalityFn?: (a: StateSlice, b: StateSlice) => boolean): StateSlice;
37
+ export declare const useXYStoreApi: () => {
38
+ getState: () => import('@xyflow/react').ReactFlowState<XYFlowNode, {
39
+ source: string;
40
+ target: string;
41
+ style?: import("react").CSSProperties;
42
+ id: string;
43
+ zIndex?: number;
44
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
45
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
46
+ hidden?: boolean;
47
+ selected?: boolean;
48
+ selectable?: boolean;
49
+ deletable?: boolean;
50
+ ariaLabel?: string;
51
+ className?: string;
52
+ focusable?: boolean;
53
+ label?: import("react").ReactNode;
54
+ sourceHandle?: string | null;
55
+ targetHandle?: string | null;
56
+ animated?: boolean;
57
+ interactionWidth?: number;
58
+ labelStyle?: import("react").CSSProperties;
59
+ labelShowBg?: boolean;
60
+ labelBgStyle?: import("react").CSSProperties;
61
+ labelBgPadding?: [number, number];
62
+ labelBgBorderRadius?: number;
63
+ updatable?: import("@xyflow/react").EdgeUpdatable;
64
+ data: import("../types").RelationshipData;
65
+ type: "relationship";
66
+ }>;
67
+ setState: (partial: import('@xyflow/react').ReactFlowState<XYFlowNode, {
68
+ source: string;
69
+ target: string;
70
+ style?: import("react").CSSProperties;
71
+ id: string;
72
+ zIndex?: number;
73
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
74
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
75
+ hidden?: boolean;
76
+ selected?: boolean;
77
+ selectable?: boolean;
78
+ deletable?: boolean;
79
+ ariaLabel?: string;
80
+ className?: string;
81
+ focusable?: boolean;
82
+ label?: import("react").ReactNode;
83
+ sourceHandle?: string | null;
84
+ targetHandle?: string | null;
85
+ animated?: boolean;
86
+ interactionWidth?: number;
87
+ labelStyle?: import("react").CSSProperties;
88
+ labelShowBg?: boolean;
89
+ labelBgStyle?: import("react").CSSProperties;
90
+ labelBgPadding?: [number, number];
91
+ labelBgBorderRadius?: number;
92
+ updatable?: import("@xyflow/react").EdgeUpdatable;
93
+ data: import("../types").RelationshipData;
94
+ type: "relationship";
95
+ }> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
96
+ source: string;
97
+ target: string;
98
+ style?: import("react").CSSProperties;
99
+ id: string;
100
+ zIndex?: number;
101
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
102
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
103
+ hidden?: boolean;
104
+ selected?: boolean;
105
+ selectable?: boolean;
106
+ deletable?: boolean;
107
+ ariaLabel?: string;
108
+ className?: string;
109
+ focusable?: boolean;
110
+ label?: import("react").ReactNode;
111
+ sourceHandle?: string | null;
112
+ targetHandle?: string | null;
113
+ animated?: boolean;
114
+ interactionWidth?: number;
115
+ labelStyle?: import("react").CSSProperties;
116
+ labelShowBg?: boolean;
117
+ labelBgStyle?: import("react").CSSProperties;
118
+ labelBgPadding?: [number, number];
119
+ labelBgBorderRadius?: number;
120
+ updatable?: import("@xyflow/react").EdgeUpdatable;
121
+ data: import("../types").RelationshipData;
122
+ type: "relationship";
123
+ }>> | ((state: import('@xyflow/react').ReactFlowState<XYFlowNode, {
124
+ source: string;
125
+ target: string;
126
+ style?: import("react").CSSProperties;
127
+ id: string;
128
+ zIndex?: number;
129
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
130
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
131
+ hidden?: boolean;
132
+ selected?: boolean;
133
+ selectable?: boolean;
134
+ deletable?: boolean;
135
+ ariaLabel?: string;
136
+ className?: string;
137
+ focusable?: boolean;
138
+ label?: import("react").ReactNode;
139
+ sourceHandle?: string | null;
140
+ targetHandle?: string | null;
141
+ animated?: boolean;
142
+ interactionWidth?: number;
143
+ labelStyle?: import("react").CSSProperties;
144
+ labelShowBg?: boolean;
145
+ labelBgStyle?: import("react").CSSProperties;
146
+ labelBgPadding?: [number, number];
147
+ labelBgBorderRadius?: number;
148
+ updatable?: import("@xyflow/react").EdgeUpdatable;
149
+ data: import("../types").RelationshipData;
150
+ type: "relationship";
151
+ }>) => import('@xyflow/react').ReactFlowState<XYFlowNode, {
152
+ source: string;
153
+ target: string;
154
+ style?: import("react").CSSProperties;
155
+ id: string;
156
+ zIndex?: number;
157
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
158
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
159
+ hidden?: boolean;
160
+ selected?: boolean;
161
+ selectable?: boolean;
162
+ deletable?: boolean;
163
+ ariaLabel?: string;
164
+ className?: string;
165
+ focusable?: boolean;
166
+ label?: import("react").ReactNode;
167
+ sourceHandle?: string | null;
168
+ targetHandle?: string | null;
169
+ animated?: boolean;
170
+ interactionWidth?: number;
171
+ labelStyle?: import("react").CSSProperties;
172
+ labelShowBg?: boolean;
173
+ labelBgStyle?: import("react").CSSProperties;
174
+ labelBgPadding?: [number, number];
175
+ labelBgBorderRadius?: number;
176
+ updatable?: import("@xyflow/react").EdgeUpdatable;
177
+ data: import("../types").RelationshipData;
178
+ type: "relationship";
179
+ }> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
180
+ source: string;
181
+ target: string;
182
+ style?: import("react").CSSProperties;
183
+ id: string;
184
+ zIndex?: number;
185
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
186
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
187
+ hidden?: boolean;
188
+ selected?: boolean;
189
+ selectable?: boolean;
190
+ deletable?: boolean;
191
+ ariaLabel?: string;
192
+ className?: string;
193
+ focusable?: boolean;
194
+ label?: import("react").ReactNode;
195
+ sourceHandle?: string | null;
196
+ targetHandle?: string | null;
197
+ animated?: boolean;
198
+ interactionWidth?: number;
199
+ labelStyle?: import("react").CSSProperties;
200
+ labelShowBg?: boolean;
201
+ labelBgStyle?: import("react").CSSProperties;
202
+ labelBgPadding?: [number, number];
203
+ labelBgBorderRadius?: number;
204
+ updatable?: import("@xyflow/react").EdgeUpdatable;
205
+ data: import("../types").RelationshipData;
206
+ type: "relationship";
207
+ }>>), replace?: boolean | undefined) => void;
208
+ subscribe: (listener: (state: import('@xyflow/react').ReactFlowState<XYFlowNode, {
209
+ source: string;
210
+ target: string;
211
+ style?: import("react").CSSProperties;
212
+ id: string;
213
+ zIndex?: number;
214
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
215
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
216
+ hidden?: boolean;
217
+ selected?: boolean;
218
+ selectable?: boolean;
219
+ deletable?: boolean;
220
+ ariaLabel?: string;
221
+ className?: string;
222
+ focusable?: boolean;
223
+ label?: import("react").ReactNode;
224
+ sourceHandle?: string | null;
225
+ targetHandle?: string | null;
226
+ animated?: boolean;
227
+ interactionWidth?: number;
228
+ labelStyle?: import("react").CSSProperties;
229
+ labelShowBg?: boolean;
230
+ labelBgStyle?: import("react").CSSProperties;
231
+ labelBgPadding?: [number, number];
232
+ labelBgBorderRadius?: number;
233
+ updatable?: import("@xyflow/react").EdgeUpdatable;
234
+ data: import("../types").RelationshipData;
235
+ type: "relationship";
236
+ }>, prevState: import('@xyflow/react').ReactFlowState<XYFlowNode, {
237
+ source: string;
238
+ target: string;
239
+ style?: import("react").CSSProperties;
240
+ id: string;
241
+ zIndex?: number;
242
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
243
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
244
+ hidden?: boolean;
245
+ selected?: boolean;
246
+ selectable?: boolean;
247
+ deletable?: boolean;
248
+ ariaLabel?: string;
249
+ className?: string;
250
+ focusable?: boolean;
251
+ label?: import("react").ReactNode;
252
+ sourceHandle?: string | null;
253
+ targetHandle?: string | null;
254
+ animated?: boolean;
255
+ interactionWidth?: number;
256
+ labelStyle?: import("react").CSSProperties;
257
+ labelShowBg?: boolean;
258
+ labelBgStyle?: import("react").CSSProperties;
259
+ labelBgPadding?: [number, number];
260
+ labelBgBorderRadius?: number;
261
+ updatable?: import("@xyflow/react").EdgeUpdatable;
262
+ data: import("../types").RelationshipData;
263
+ type: "relationship";
264
+ }>) => void) => () => void;
265
+ };
266
+ export type XYStoreApi = ReturnType<typeof useXYStoreApi>;
@@ -3,4 +3,3 @@ export declare const cssCompound: string;
3
3
  export declare const cssTitle: string;
4
4
  export declare const cssIndicator: string;
5
5
  export declare const cssNavigateBtn: string;
6
- //# sourceMappingURL=CompoundNode.css.d.ts.map
@@ -4,4 +4,3 @@ import { NodeProps } from '@xyflow/react';
4
4
  type CompoundNodeProps = Pick<NodeProps<CompoundXYFlowNode>, 'id' | 'data' | 'width' | 'height' | 'selected'>;
5
5
  export declare const CompoundNodeMemo: import('react').NamedExoticComponent<CompoundNodeProps>;
6
6
  export {};
7
- //# sourceMappingURL=CompoundNode.d.ts.map
@@ -1,2 +1 @@
1
1
  export { CompoundNodeMemo as CompoundNode } from './CompoundNode';
2
- //# sourceMappingURL=index.d.ts.map
@@ -6,6 +6,5 @@ type ElementIconProps = {
6
6
  paddingX?: number | undefined;
7
7
  paddingY?: number | undefined;
8
8
  };
9
- export declare function ElementIcon({ node, maxWidth, paddingX, paddingY }: ElementIconProps): JSX.Element | null;
9
+ export declare function ElementIcon({ node, paddingY }: ElementIconProps): JSX.Element | null;
10
10
  export {};
11
- //# sourceMappingURL=ElementIcon.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare const elementLink: string;
2
2
  export declare const trigger: string;
3
3
  export declare const linkButton: string;
4
- //# sourceMappingURL=ElementLink.css.d.ts.map
@@ -3,6 +3,5 @@ import { XYFlowNode } from '../../types';
3
3
  type ElementLinkProps = {
4
4
  element: XYFlowNode['data']['element'];
5
5
  };
6
- export declare function ElementLink({ element }: ElementLinkProps): JSX.Element | null;
6
+ export declare function ElementLink({ element }: ElementLinkProps): JSX.Element;
7
7
  export {};
8
- //# sourceMappingURL=ElementLink.d.ts.map
@@ -2,7 +2,5 @@ import { ElementXYFlowNode } from '../../types';
2
2
  import { NodeProps } from '@xyflow/react';
3
3
 
4
4
  type ElementNodeProps = NodeProps<ElementXYFlowNode>;
5
- declare function ElementNode({ id, data: { element }, selected, width, height }: ElementNodeProps): JSX.Element;
6
- export declare const ElementNodeMemo: typeof ElementNode;
5
+ export declare function ElementNode({ id, data: { element }, dragging, selected, width, height }: ElementNodeProps): JSX.Element;
7
6
  export {};
8
- //# sourceMappingURL=ElementNode.d.ts.map
@@ -5,10 +5,9 @@ type ElementShapeSvgProps = {
5
5
  w: number;
6
6
  h: number;
7
7
  };
8
- export declare const ElementShapeSvg: import('react').NamedExoticComponent<ElementShapeSvgProps>;
8
+ export declare function ElementShapeSvg({ shape, w, h }: ElementShapeSvgProps): JSX.Element;
9
9
  /**
10
10
  * When element is selected, this component is used to render the indicator
11
11
  */
12
- export declare const SelectedIndicator: import('react').NamedExoticComponent<ElementShapeSvgProps>;
12
+ export declare function SelectedIndicator({ shape, w, h }: ElementShapeSvgProps): JSX.Element;
13
13
  export {};
14
- //# sourceMappingURL=ElementShapeSvg.d.ts.map
@@ -12,4 +12,3 @@ export declare const iconMaxH: `var(--${string})` | `var(--${string}, ${string})
12
12
  export declare const elementIcon: string;
13
13
  export declare const cssShapeSvg: string;
14
14
  export declare const cssNavigateBtn: string;
15
- //# sourceMappingURL=element.css.d.ts.map
@@ -1,2 +1 @@
1
- export { ElementNodeMemo as ElementNode } from './ElementNode';
2
- //# sourceMappingURL=index.d.ts.map
1
+ export { ElementNode } from './ElementNode';
@@ -4,4 +4,3 @@ export type NavigateToBtnProps = {
4
4
  className?: string;
5
5
  };
6
6
  export declare function NavigateToBtn({ xynodeId, className }: NavigateToBtnProps): JSX.Element;
7
- //# sourceMappingURL=NavigateToBtn.d.ts.map