@particle-academy/fancy-flow 0.22.0 → 0.24.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 (39) hide show
  1. package/dist/{chunk-ZB4HHQMR.js → chunk-OWENS2H5.js} +11 -3
  2. package/dist/chunk-OWENS2H5.js.map +1 -0
  3. package/dist/{chunk-YZTBRXBZ.js → chunk-QAA4CA22.js} +8 -4
  4. package/dist/chunk-QAA4CA22.js.map +1 -0
  5. package/dist/{chunk-O7F6SGV4.js → chunk-ZS6DVGB3.js} +17 -5
  6. package/dist/chunk-ZS6DVGB3.js.map +1 -0
  7. package/dist/engine.js +1 -1
  8. package/dist/index.cjs +2409 -525
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +15 -5
  11. package/dist/index.d.ts +15 -5
  12. package/dist/index.js +182 -37
  13. package/dist/index.js.map +1 -1
  14. package/dist/layout/index.d.cts +30 -0
  15. package/dist/layout/index.d.ts +30 -0
  16. package/dist/layout.cjs +1693 -0
  17. package/dist/layout.cjs.map +1 -0
  18. package/dist/layout.js +1691 -0
  19. package/dist/layout.js.map +1 -0
  20. package/dist/registry/index.d.cts +2 -2
  21. package/dist/registry/index.d.ts +2 -2
  22. package/dist/registry.cjs +4 -0
  23. package/dist/registry.cjs.map +1 -1
  24. package/dist/registry.js +3 -3
  25. package/dist/runtime/index.d.cts +13 -1
  26. package/dist/runtime/index.d.ts +13 -1
  27. package/dist/runtime.cjs +13 -1
  28. package/dist/runtime.cjs.map +1 -1
  29. package/dist/runtime.js +2 -2
  30. package/dist/styles.css +20 -0
  31. package/dist/styles.css.map +1 -1
  32. package/dist/{types-DneUoivl.d.cts → types-BekE5JTG.d.cts} +7 -0
  33. package/dist/{types-CFEtuRWJ.d.ts → types-DwRpXXNy.d.ts} +7 -0
  34. package/dist/ux.d.cts +1 -1
  35. package/dist/ux.d.ts +1 -1
  36. package/package.json +12 -1
  37. package/dist/chunk-O7F6SGV4.js.map +0 -1
  38. package/dist/chunk-YZTBRXBZ.js.map +0 -1
  39. package/dist/chunk-ZB4HHQMR.js.map +0 -1
@@ -0,0 +1,30 @@
1
+ import { F as FlowGraph, a as FlowNode } from '../types-CMSrWVYM.cjs';
2
+ import '@xyflow/react';
3
+
4
+ type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
5
+ type AutoLayoutOptions = {
6
+ /** Rank direction. Default "LR" (left→right). */
7
+ direction?: AutoLayoutDirection;
8
+ /** Separation between nodes in the same rank. Default 48. */
9
+ nodeSep?: number;
10
+ /** Separation between ranks. Default 96. */
11
+ rankSep?: number;
12
+ /**
13
+ * Lay out only the children of this node (relative coords) — the lane-scoped
14
+ * "tidy this lane". Omit to lay out the top-level (parentless) graph.
15
+ */
16
+ scope?: string;
17
+ defaultWidth?: number;
18
+ defaultHeight?: number;
19
+ };
20
+ /**
21
+ * Auto-arrange a graph into a tidy DAG layout with dagre. Returns the nodes with
22
+ * new positions (edges untouched). `scope` restricts the layout to one parent's
23
+ * children — powering a lane-scoped tidy. dagre is bundled, so consumers who
24
+ * never call this still pay nothing to install it, and it works headlessly.
25
+ *
26
+ * React-free: reachable from anywhere, testable without a DOM.
27
+ */
28
+ declare function autoLayout(graph: FlowGraph, options?: AutoLayoutOptions): FlowNode[];
29
+
30
+ export { type AutoLayoutDirection, type AutoLayoutOptions, autoLayout };
@@ -0,0 +1,30 @@
1
+ import { F as FlowGraph, a as FlowNode } from '../types-CMSrWVYM.js';
2
+ import '@xyflow/react';
3
+
4
+ type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
5
+ type AutoLayoutOptions = {
6
+ /** Rank direction. Default "LR" (left→right). */
7
+ direction?: AutoLayoutDirection;
8
+ /** Separation between nodes in the same rank. Default 48. */
9
+ nodeSep?: number;
10
+ /** Separation between ranks. Default 96. */
11
+ rankSep?: number;
12
+ /**
13
+ * Lay out only the children of this node (relative coords) — the lane-scoped
14
+ * "tidy this lane". Omit to lay out the top-level (parentless) graph.
15
+ */
16
+ scope?: string;
17
+ defaultWidth?: number;
18
+ defaultHeight?: number;
19
+ };
20
+ /**
21
+ * Auto-arrange a graph into a tidy DAG layout with dagre. Returns the nodes with
22
+ * new positions (edges untouched). `scope` restricts the layout to one parent's
23
+ * children — powering a lane-scoped tidy. dagre is bundled, so consumers who
24
+ * never call this still pay nothing to install it, and it works headlessly.
25
+ *
26
+ * React-free: reachable from anywhere, testable without a DOM.
27
+ */
28
+ declare function autoLayout(graph: FlowGraph, options?: AutoLayoutOptions): FlowNode[];
29
+
30
+ export { type AutoLayoutDirection, type AutoLayoutOptions, autoLayout };