@squeed/flow-sdk 0.1.4 → 0.1.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.d.ts CHANGED
@@ -1,17 +1,6 @@
1
1
  import { JSX as JSX_2 } from 'react/jsx-runtime';
2
2
  import { MutableRefObject } from 'react';
3
3
 
4
- export declare function applyAutoCollapse(data: any, collapseEveryN: number): any;
5
-
6
- export declare interface AutoCollapseConfig {
7
- /** Min lines threshold to trigger (default: 800) */
8
- minLines?: number;
9
- /** Min depth threshold to trigger (default: 5) */
10
- minDepth?: number;
11
- /** Collapse every Nth depth level (default: 3) */
12
- collapseEveryNLevels?: number;
13
- }
14
-
15
4
  export declare type BackgroundPattern = "dot" | "steel" | "grid" | "none";
16
5
 
17
6
  /** Props passed to custom bottom bar renderer */
@@ -49,25 +38,17 @@ export declare const contentObjTheme: (color: any) => {
49
38
  number: string;
50
39
  };
51
40
 
52
- export declare function createFlowDiagram(jsnObjct: any, path?: string, nodes?: any[], edges?: any[], activeLabel?: string, flowConfig?: any, nodeConfig?: any, ctx?: DiagramContext): {
41
+ export declare function createFlowDiagram(jsnObjct: any, path?: string, nodes?: any[], edges?: any[], activeLabel?: string, flowConfig?: any, nodeConfig?: any): {
53
42
  nodes: any[];
54
43
  edges: any[];
55
44
  };
56
45
 
57
- declare interface DiagramContext {
58
- invrtdRtPths: string[];
59
- initalObjIds: {
60
- ids: any[];
61
- jsnObjct: any;
62
- } | null;
63
- }
64
-
65
46
  export declare const DynamicIcon: ({ name, ...props }: {
66
47
  [x: string]: any;
67
48
  name: any;
68
49
  }) => JSX_2.Element;
69
50
 
70
- export declare function FlowDiagram({ json, title, nodes: externalNodes, edges: externalEdges, config, callbacks, className, style, showBottomBar, }: FlowDiagramProps & {
51
+ export declare function FlowDiagram({ title, nodes, edges, config, callbacks, className, style, showBottomBar, }: FlowDiagramProps & {
71
52
  showBottomBar?: boolean;
72
53
  }): JSX_2.Element;
73
54
 
@@ -172,8 +153,6 @@ export declare interface FlowDiagramConfig {
172
153
  renderSelectedEdgeToolbar?: (props: SelectedEdgeToolbarProps) => React.ReactNode;
173
154
  /** Custom render function to replace the entire built-in bottom bar */
174
155
  renderBottomBar?: (props: BottomBarRenderProps) => React.ReactNode;
175
- /** Auto-collapse deep nodes for large data. `true` uses defaults, or pass config for custom thresholds */
176
- autoCollapse?: AutoCollapseConfig | boolean;
177
156
  /** Custom node view components to override SDK defaults. Keys: objectView, arrayView, text, parentContainer */
178
157
  customViews?: Record<string, React.ComponentType<any>>;
179
158
  /** Disable built-in keyboard shortcuts (Z/M/D) when the consumer handles its own */
@@ -217,13 +196,11 @@ export declare interface FlowDiagramNode {
217
196
 
218
197
  /** Top-level props for the FlowDiagram component */
219
198
  export declare interface FlowDiagramProps {
220
- /** JSON object to render as a flow diagram */
221
- json?: any;
222
199
  /** Title shown on the root node */
223
200
  title?: string;
224
- /** Pre-computed nodes (alternative to json) */
201
+ /** Pre-computed nodes */
225
202
  nodes?: FlowDiagramNode[];
226
- /** Pre-computed edges (alternative to json) */
203
+ /** Pre-computed edges */
227
204
  edges?: FlowDiagramEdge[];
228
205
  /** Diagram configuration */
229
206
  config?: FlowDiagramConfig;
@@ -251,12 +228,6 @@ export declare const getColorVariant: (color: string) => {
251
228
 
252
229
  export declare function getDarkerHexColor(hex: string, factor?: number): string;
253
230
 
254
- export declare function getJsonSize(data: any): {
255
- lines: number;
256
- depth: number;
257
- nodes: number;
258
- };
259
-
260
231
  export declare type LayoutAlgorithm = "dagre" | "elk" | "tidytree" | "concentric" | "cose";
261
232
 
262
233
  /** Actions shown in the hover overlay above nodes */