@crazyhappyone/auto-graph 0.2.8 → 0.2.10

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.cts CHANGED
@@ -436,7 +436,8 @@ interface ConstraintSolverInput {
436
436
  minSiblingGap?: number;
437
437
  distributeContainedChildren?: boolean | "spread";
438
438
  /** When "spread" or true, distribute children inside non-contract
439
- * swimlane lane content boxes (Issue #60). Default "spread". */
439
+ * swimlane lane content boxes (Issue #60). Opt-in: no redistribution
440
+ * occurs unless explicitly set. */
440
441
  distributeSwimlaneChildren?: boolean | "spread";
441
442
  boxes: ReadonlyMap<string, Box>;
442
443
  /** Swimlanes for lane-aware child distribution (Issue #60). */
@@ -769,6 +770,18 @@ interface RouteEdgeInput {
769
770
  hardObstacleIndex?: BoxSpatialIndex;
770
771
  /** Maximum greedy rerouting iterations (default 5). */
771
772
  maxRoutingAttempts?: number;
773
+ /** Corridor expansion margin in px for corner-graph prefilter (default 32).
774
+ * Larger values include more obstacles in the local routing window. */
775
+ corridorMargin?: number;
776
+ /** Route-length / direct-distance ratio above which a backtracking
777
+ * warning is emitted (default 20). */
778
+ maxBacktrackingRatio?: number;
779
+ /** Max corner-graph vertices. Undefined → adaptive (derived from
780
+ * corridor size + obstacle count, clamped to a safe range). */
781
+ maxCorners?: number;
782
+ /** Max grid A* nodes. Undefined → adaptive (derived from obstacle
783
+ * count + corridor, clamped to a safe range). */
784
+ maxNodes?: number;
772
785
  }
773
786
  interface RouteEdgeResult {
774
787
  points: Point[];
@@ -806,7 +819,7 @@ interface SolveDiagramOptions {
806
819
  minSiblingGap?: number;
807
820
  distributeContainedChildren?: boolean | "spread";
808
821
  /** When "spread", distribute children within non-contract swimlane
809
- * lanes (Issue #60). Default "spread". */
822
+ * lanes (Issue #60). Opt-in: no redistribution occurs unless explicitly set. */
810
823
  distributeSwimlaneChildren?: boolean | "spread";
811
824
  pageBounds?: {
812
825
  width: number;
@@ -831,6 +844,15 @@ interface SolveDiagramOptions {
831
844
  labelPlacement?: "beside" | "on-path";
832
845
  /** Pixels to offset edge labels from the edge path when labelPlacement is "beside". */
833
846
  labelOffset?: number;
847
+ /** Corridor expansion margin for corner-graph prefilter.
848
+ * - number: fixed px margin
849
+ * - "auto" (default): max(200, contentDiagonal * 0.3)
850
+ * Larger margins include more obstacles in the local routing window,
851
+ * improving path quality on dense diagrams at the cost of more vertices. */
852
+ corridorMargin?: number | "auto";
853
+ /** Route-length / direct-distance ratio above which a backtracking
854
+ * warning is emitted (default 20). */
855
+ maxBacktrackingRatio?: number;
834
856
  }
835
857
  interface PortShiftingOptions {
836
858
  enabled?: boolean;
package/dist/index.d.ts CHANGED
@@ -436,7 +436,8 @@ interface ConstraintSolverInput {
436
436
  minSiblingGap?: number;
437
437
  distributeContainedChildren?: boolean | "spread";
438
438
  /** When "spread" or true, distribute children inside non-contract
439
- * swimlane lane content boxes (Issue #60). Default "spread". */
439
+ * swimlane lane content boxes (Issue #60). Opt-in: no redistribution
440
+ * occurs unless explicitly set. */
440
441
  distributeSwimlaneChildren?: boolean | "spread";
441
442
  boxes: ReadonlyMap<string, Box>;
442
443
  /** Swimlanes for lane-aware child distribution (Issue #60). */
@@ -769,6 +770,18 @@ interface RouteEdgeInput {
769
770
  hardObstacleIndex?: BoxSpatialIndex;
770
771
  /** Maximum greedy rerouting iterations (default 5). */
771
772
  maxRoutingAttempts?: number;
773
+ /** Corridor expansion margin in px for corner-graph prefilter (default 32).
774
+ * Larger values include more obstacles in the local routing window. */
775
+ corridorMargin?: number;
776
+ /** Route-length / direct-distance ratio above which a backtracking
777
+ * warning is emitted (default 20). */
778
+ maxBacktrackingRatio?: number;
779
+ /** Max corner-graph vertices. Undefined → adaptive (derived from
780
+ * corridor size + obstacle count, clamped to a safe range). */
781
+ maxCorners?: number;
782
+ /** Max grid A* nodes. Undefined → adaptive (derived from obstacle
783
+ * count + corridor, clamped to a safe range). */
784
+ maxNodes?: number;
772
785
  }
773
786
  interface RouteEdgeResult {
774
787
  points: Point[];
@@ -806,7 +819,7 @@ interface SolveDiagramOptions {
806
819
  minSiblingGap?: number;
807
820
  distributeContainedChildren?: boolean | "spread";
808
821
  /** When "spread", distribute children within non-contract swimlane
809
- * lanes (Issue #60). Default "spread". */
822
+ * lanes (Issue #60). Opt-in: no redistribution occurs unless explicitly set. */
810
823
  distributeSwimlaneChildren?: boolean | "spread";
811
824
  pageBounds?: {
812
825
  width: number;
@@ -831,6 +844,15 @@ interface SolveDiagramOptions {
831
844
  labelPlacement?: "beside" | "on-path";
832
845
  /** Pixels to offset edge labels from the edge path when labelPlacement is "beside". */
833
846
  labelOffset?: number;
847
+ /** Corridor expansion margin for corner-graph prefilter.
848
+ * - number: fixed px margin
849
+ * - "auto" (default): max(200, contentDiagonal * 0.3)
850
+ * Larger margins include more obstacles in the local routing window,
851
+ * improving path quality on dense diagrams at the cost of more vertices. */
852
+ corridorMargin?: number | "auto";
853
+ /** Route-length / direct-distance ratio above which a backtracking
854
+ * warning is emitted (default 20). */
855
+ maxBacktrackingRatio?: number;
834
856
  }
835
857
  interface PortShiftingOptions {
836
858
  enabled?: boolean;