@graphty/layout 1.6.1 → 1.6.2

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 (33) hide show
  1. package/dist/layout.js.map +1 -1
  2. package/dist/src/algorithms/optimization/index.d.ts +1 -3
  3. package/dist/src/algorithms/optimization/index.d.ts.map +1 -1
  4. package/dist/src/algorithms/optimization/index.js +1 -3
  5. package/dist/src/algorithms/optimization/index.js.map +1 -1
  6. package/dist/src/algorithms/optimization/kamada-kawai-solver.d.ts +0 -9
  7. package/dist/src/algorithms/optimization/kamada-kawai-solver.d.ts.map +1 -1
  8. package/dist/src/algorithms/optimization/kamada-kawai-solver.js +1 -1
  9. package/dist/src/algorithms/optimization/kamada-kawai-solver.js.map +1 -1
  10. package/dist/src/algorithms/planarity/embedding.d.ts +0 -8
  11. package/dist/src/algorithms/planarity/embedding.d.ts.map +1 -1
  12. package/dist/src/algorithms/planarity/embedding.js +1 -1
  13. package/dist/src/algorithms/planarity/embedding.js.map +1 -1
  14. package/dist/src/algorithms/planarity/index.d.ts +1 -3
  15. package/dist/src/algorithms/planarity/index.d.ts.map +1 -1
  16. package/dist/src/algorithms/planarity/index.js +1 -3
  17. package/dist/src/algorithms/planarity/index.js.map +1 -1
  18. package/dist/src/algorithms/planarity/special-graphs.d.ts +0 -7
  19. package/dist/src/algorithms/planarity/special-graphs.d.ts.map +1 -1
  20. package/dist/src/algorithms/planarity/special-graphs.js +1 -1
  21. package/dist/src/algorithms/planarity/special-graphs.js.map +1 -1
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +3 -1
  24. package/src/algorithms/optimization/index.ts +1 -3
  25. package/src/algorithms/optimization/kamada-kawai-solver.ts +1 -1
  26. package/src/algorithms/planarity/embedding.ts +1 -1
  27. package/src/algorithms/planarity/index.ts +1 -3
  28. package/src/algorithms/planarity/special-graphs.ts +1 -1
  29. package/dist/src/algorithms/index.d.ts +0 -6
  30. package/dist/src/algorithms/index.d.ts.map +0 -1
  31. package/dist/src/algorithms/index.js +0 -6
  32. package/dist/src/algorithms/index.js.map +0 -1
  33. package/src/algorithms/index.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphty/layout",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "graph layout algorithms based on networkx",
5
5
  "author": "Adam Powers <apowers@ato.ms>",
6
6
  "main": "dist/layout.js",
@@ -77,6 +77,8 @@
77
77
  "coverage": "vitest run --coverage",
78
78
  "coverage:preview": "npx serve coverage -p 9052",
79
79
  "lint": "eslint && tsc --noEmit",
80
+ "lint:fix": "eslint --fix",
81
+ "lint:knip": "cd .. && pnpm run lint:knip -- --workspace layout",
80
82
  "typecheck": "tsc --noEmit",
81
83
  "build": "tsc",
82
84
  "build:bundle": "node scripts/build-bundle.js",
@@ -2,7 +2,5 @@
2
2
  * Re-export all optimization algorithms
3
3
  */
4
4
 
5
- export { _computeShortestPathDistances, _kamadaKawaiCostfn,_kamadaKawaiSolve } from "./kamada-kawai-solver";
6
- export { _lbfgsDirection } from "./lbfgs";
7
- export { _backtrackingLineSearch } from "./line-search";
5
+ export { _computeShortestPathDistances, _kamadaKawaiSolve } from "./kamada-kawai-solver";
8
6
  export type { DistanceMap } from "./types";
@@ -148,7 +148,7 @@ export function _kamadaKawaiSolve(distMatrix: number[][], positions: number[][],
148
148
  * @param dim - Dimension of layout
149
149
  * @returns Array with [cost, gradient]
150
150
  */
151
- export function _kamadaKawaiCostfn(
151
+ function _kamadaKawaiCostfn(
152
152
  posVec: number[],
153
153
  invDist: number[][],
154
154
  meanWeight: number,
@@ -94,7 +94,7 @@ export function createTriangulationEmbedding(nodes: Node[], edges: Edge[], seed:
94
94
  * @param adjMap - Adjacency map
95
95
  * @returns Cycle as array of nodes, or null if none found
96
96
  */
97
- export function findCycle(nodes: Node[], _edges: Edge[], adjMap: Record<Node, Set<Node>>): Node[] | null {
97
+ function findCycle(nodes: Node[], _edges: Edge[], adjMap: Record<Node, Set<Node>>): Node[] | null {
98
98
  if (nodes.length === 0) {return null;}
99
99
  if (nodes.length <= 2) {return nodes;} // Not a real cycle but handle it
100
100
 
@@ -3,6 +3,4 @@
3
3
  */
4
4
 
5
5
  export { checkPlanarity } from "./check";
6
- export { combinatorialEmbeddingToPos,createTriangulationEmbedding, findCycle } from "./embedding";
7
- export { lrPlanarityTest } from "./lr-test";
8
- export { isK5, isK33, tryFindBipartitePartition } from "./special-graphs";
6
+ export { combinatorialEmbeddingToPos } from "./embedding";
@@ -67,7 +67,7 @@ export function isK33(nodes: Node[], edges: Edge[]): boolean {
67
67
  * @param edges - List of edges
68
68
  * @returns Array of two partitions, or null if not bipartite
69
69
  */
70
- export function tryFindBipartitePartition(nodes: Node[], edges: Edge[]): [Node[], Node[]] | null {
70
+ function tryFindBipartitePartition(nodes: Node[], edges: Edge[]): [Node[], Node[]] | null {
71
71
  const colorMap: Record<Node, number> = {};
72
72
  const adjList: Record<Node, Node[]> = {};
73
73
 
@@ -1,6 +0,0 @@
1
- /**
2
- * Re-export all algorithm utilities
3
- */
4
- export * from "./optimization";
5
- export * from "./planarity";
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/algorithms/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Re-export all algorithm utilities
3
- */
4
- export * from "./optimization";
5
- export * from "./planarity";
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/algorithms/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Re-export all algorithm utilities
3
- */
4
-
5
- export * from "./optimization";
6
- export * from "./planarity";