dagre-d3-es
Advanced tools
Comparing version 7.0.6 to 7.0.8
{ | ||
"name": "dagre-d3-es", | ||
"version": "7.0.6", | ||
"version": "7.0.8", | ||
"description": "", | ||
@@ -10,6 +10,8 @@ "author": "Thibaut Lassalle", | ||
"scripts": { | ||
"generate_types": "tsc src/*.js --declaration --allowJs --emitDeclarationOnly; prettier --write .", | ||
"generate_types": "tsc --build --clean && tsc --build && prettier --write .", | ||
"prepack": "npm run generate_types", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix .", | ||
"format": "prettier --write .", | ||
"my_publish": "echo update_package_version ; git clean -xdf ; npm ci ; npm publish", | ||
"compile_js_as_ts": "tsc src/index.js --AllowJs --checkJs --outDir dist/" | ||
@@ -25,3 +27,3 @@ }, | ||
"dependencies": { | ||
"d3": "^7.7.0", | ||
"d3": "^7.8.2", | ||
"lodash-es": "^4.17.21" | ||
@@ -32,6 +34,6 @@ }, | ||
"@types/lodash-es": "^4.17.6", | ||
"eslint": "^8.29.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"prettier": "^2.8.1", | ||
"typescript": "^4.9.4" | ||
"eslint": "^8.33.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"prettier": "^2.8.3", | ||
"typescript": "^4.9.5" | ||
}, | ||
@@ -38,0 +40,0 @@ "files": [ |
@@ -1,2 +0,10 @@ | ||
export var arrows: any; | ||
export function setArrows(value: any): any; | ||
export namespace arrows { | ||
export { normal }; | ||
export { vee }; | ||
export { undirected }; | ||
} | ||
export function setArrows(value: any): void; | ||
declare function normal(parent: any, id: any, edge: any, type: any): void; | ||
declare function vee(parent: any, id: any, edge: any, type: any): void; | ||
declare function undirected(parent: any, id: any, edge: any, type: any): void; | ||
export {}; |
export function createClusters(selection: any, g: any): any; | ||
export function setCreateClusters(value: any): any; | ||
export function setCreateClusters(value: any): void; |
export function createEdgeLabels(selection: any, g: any): any; | ||
export function setCreateEdgeLabels(value: any): any; | ||
export function setCreateEdgeLabels(value: any): void; |
@@ -25,3 +25,3 @@ import * as d3 from 'd3'; | ||
var edge = g.edge(e); | ||
var label = addLabel(root, g.edge(e), 0, 0).classed('label', true); | ||
var label = addLabel(root, g.edge(e), 0).classed('label', true); | ||
var bbox = label.node().getBBox(); | ||
@@ -28,0 +28,0 @@ |
export function createEdgePaths(selection: any, g: any, arrows: any): any; | ||
export function setCreateEdgePaths(value: any): any; | ||
export function setCreateEdgePaths(value: any): void; |
@@ -88,2 +88,3 @@ import * as d3 from 'd3'; | ||
function createLine(edge, points) { | ||
// @ts-expect-error | ||
var line = (d3.line || d3.svg.line)() | ||
@@ -90,0 +91,0 @@ .x(function (d) { |
export function createNodes(selection: any, g: any, shapes: any): any; | ||
export function setCreateNodes(value: any): any; | ||
export function setCreateNodes(value: any): void; |
export function render(): { | ||
(svg: any, g: any): void; | ||
createNodes(...args: any[]): typeof createNodes; | ||
createClusters(value: any, ...args: any[]): typeof createClusters; | ||
createEdgeLabels(value: any, ...args: any[]): typeof createEdgeLabels; | ||
createEdgePaths(value: any, ...args: any[]): typeof createEdgePaths; | ||
shapes(value: any, ...args: any[]): typeof shapes | any; | ||
arrows(value: any, ...args: any[]): typeof arrows | any; | ||
createNodes(value: any, ...args: any[]): (selection: any, g: any, shapes: any) => any; | ||
createClusters(value: any, ...args: any[]): (selection: any, g: any) => any; | ||
createEdgeLabels(value: any, ...args: any[]): (selection: any, g: any) => any; | ||
createEdgePaths(value: any, ...args: any[]): (selection: any, g: any, arrows: any) => any; | ||
shapes( | ||
value: any, | ||
...args: any[] | ||
): | ||
| { | ||
rect: (parent: any, bbox: any, node: any) => any; | ||
ellipse: (parent: any, bbox: any, node: any) => any; | ||
circle: (parent: any, bbox: any, node: any) => any; | ||
diamond: (parent: any, bbox: any, node: any) => any; | ||
} | ||
| any; | ||
arrows( | ||
value: any, | ||
...args: any[] | ||
): | ||
| { | ||
normal: (parent: any, id: any, edge: any, type: any) => void; | ||
vee: (parent: any, id: any, edge: any, type: any) => void; | ||
undirected: (parent: any, id: any, edge: any, type: any) => void; | ||
} | ||
| any; | ||
}; | ||
import { createNodes } from './create-nodes.js'; | ||
import { createClusters } from './create-clusters.js'; | ||
import { createEdgeLabels } from './create-edge-labels.js'; | ||
import { createEdgePaths } from './create-edge-paths.js'; | ||
import * as shapes from './shapes.js'; | ||
import * as arrows from './arrows.js'; |
@@ -1,2 +0,12 @@ | ||
export var shapes: any; | ||
export function setShapes(value: any): any; | ||
export namespace shapes { | ||
export { rect }; | ||
export { ellipse }; | ||
export { circle }; | ||
export { diamond }; | ||
} | ||
export function setShapes(value: any): void; | ||
declare function rect(parent: any, bbox: any, node: any): any; | ||
declare function ellipse(parent: any, bbox: any, node: any): any; | ||
declare function circle(parent: any, bbox: any, node: any): any; | ||
declare function diamond(parent: any, bbox: any, node: any): any; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export function greedyFAS(g: any, weightFn: any): any; | ||
export function greedyFAS(g: any, weightFn: any): any[]; |
@@ -27,4 +27,3 @@ import * as _ from 'lodash-es'; | ||
return g.outEdges(e.v, e.w); | ||
}), | ||
true | ||
}) | ||
); | ||
@@ -31,0 +30,0 @@ } |
import * as acyclic from './acyclic.js'; | ||
import * as normalize from './normalize.js'; | ||
import { rank } from './rank.js'; | ||
import { rank } from './rank/index.js'; | ||
import { layout } from './layout.js'; | ||
export { acyclic, normalize, rank, layout }; |
@@ -246,2 +246,3 @@ import * as _ from 'lodash-es'; | ||
node.maxRank = g.node(node.borderBottom).rank; | ||
// @ts-expect-error | ||
maxRank = _.max(maxRank, node.maxRank); | ||
@@ -248,0 +249,0 @@ } |
@@ -56,3 +56,5 @@ import * as _ from 'lodash-es'; | ||
attrs.height = edgeLabel.height; | ||
// @ts-expect-error | ||
attrs.dummy = 'edge-label'; | ||
// @ts-expect-error | ||
attrs.labelpos = edgeLabel.labelpos; | ||
@@ -59,0 +61,0 @@ } |
@@ -1,1 +0,15 @@ | ||
export function barycenter(g: any, movable: any): any; | ||
export function barycenter( | ||
g: any, | ||
movable: any | ||
): ( | ||
| { | ||
v: any; | ||
barycenter?: undefined; | ||
weight?: undefined; | ||
} | ||
| { | ||
v: any; | ||
barycenter: number; | ||
weight: any; | ||
} | ||
)[]; |
@@ -47,4 +47,3 @@ import * as _ from 'lodash-es'; | ||
); | ||
}), | ||
true | ||
}) | ||
); | ||
@@ -64,2 +63,3 @@ | ||
_.forEach( | ||
// @ts-expect-error | ||
southEntries.forEach(function (entry) { | ||
@@ -69,6 +69,9 @@ var index = entry.pos + firstIndex; | ||
var weightSum = 0; | ||
// @ts-expect-error | ||
while (index > 0) { | ||
// @ts-expect-error | ||
if (index % 2) { | ||
weightSum += tree[index + 1]; | ||
} | ||
// @ts-expect-error | ||
index = (index - 1) >> 1; | ||
@@ -75,0 +78,0 @@ tree[index] += entry.weight; |
@@ -1,1 +0,1 @@ | ||
export function initOrder(g: any): any; | ||
export function initOrder(g: any): any[][]; |
@@ -1,1 +0,1 @@ | ||
export function resolveConflicts(entries: any, cg: any): any; | ||
export function resolveConflicts(entries: any, cg: any): Pick<any, string>[]; |
@@ -41,3 +41,5 @@ import * as _ from 'lodash-es'; | ||
if (!_.isUndefined(entry.barycenter)) { | ||
// @ts-expect-error | ||
tmp.barycenter = entry.barycenter; | ||
// @ts-expect-error | ||
tmp.weight = entry.weight; | ||
@@ -57,2 +59,3 @@ } | ||
var sourceSet = _.filter(mappedEntries, function (entry) { | ||
// @ts-expect-error | ||
return !entry.indegree; | ||
@@ -59,0 +62,0 @@ }); |
@@ -7,3 +7,3 @@ export function sortSubgraph( | ||
): { | ||
vs: any; | ||
vs: any[]; | ||
}; |
@@ -38,3 +38,3 @@ import * as _ from 'lodash-es'; | ||
if (bl) { | ||
result.vs = _.flatten([bl, result.vs, br], true); | ||
result.vs = _.flatten([bl, result.vs, br]); | ||
if (g.predecessors(bl).length) { | ||
@@ -64,4 +64,3 @@ var blPred = g.node(g.predecessors(bl)[0]), | ||
return v; | ||
}), | ||
true | ||
}) | ||
); | ||
@@ -68,0 +67,0 @@ }); |
@@ -5,3 +5,3 @@ export function sort( | ||
): { | ||
vs: any; | ||
vs: any[]; | ||
}; |
@@ -31,3 +31,3 @@ import * as _ from 'lodash-es'; | ||
var result = { vs: _.flatten(vs, true) }; | ||
var result = { vs: _.flatten(vs) }; | ||
if (weight) { | ||
@@ -34,0 +34,0 @@ result.barycenter = sum / weight; |
@@ -1,6 +0,8 @@ | ||
export function positionX(g: any): any; | ||
export function positionX(g: any): { | ||
[x: string]: any; | ||
}; | ||
export function findType1Conflicts(g: any, layering: any): {}; | ||
export function findType2Conflicts(g: any, layering: any): {}; | ||
export function addConflict(conflicts: any, v: any, w: any): void; | ||
export function hasConflict(conflicts: any, v: any, w: any): any; | ||
export function hasConflict(conflicts: any, v: any, w: any): boolean; | ||
export function verticalAlignment( | ||
@@ -24,2 +26,7 @@ g: any, | ||
export function findSmallestWidthAlignment(g: any, xss: any): any; | ||
export function balance(xss: any, align: any): any; | ||
export function balance( | ||
xss: any, | ||
align: any | ||
): { | ||
[x: string]: any; | ||
}; |
@@ -67,2 +67,3 @@ import * as _ from 'lodash-es'; | ||
}); | ||
// @ts-expect-error | ||
scanPos = i + 1; | ||
@@ -109,2 +110,3 @@ k0 = k1; | ||
scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); | ||
// @ts-expect-error | ||
southPos = southLookahead; | ||
@@ -111,0 +113,0 @@ prevNorthPos = nextNorthPos; |
@@ -1,6 +0,6 @@ | ||
export function addDummyNode(g: any, type: any, attrs: any, name: any): any; | ||
export function addDummyNode(g: any, type: any, attrs: any, name: any): string; | ||
export function simplify(g: any): Graph; | ||
export function asNonCompoundGraph(g: any): Graph; | ||
export function successorWeights(g: any): any; | ||
export function predecessorWeights(g: any): any; | ||
export function successorWeights(g: any): import('lodash').Dictionary<{}>; | ||
export function predecessorWeights(g: any): import('lodash').Dictionary<{}>; | ||
export function intersectRect( | ||
@@ -13,6 +13,6 @@ rect: any, | ||
}; | ||
export function buildLayerMatrix(g: any): any; | ||
export function buildLayerMatrix(g: any): any[][]; | ||
export function normalizeRanks(g: any): void; | ||
export function removeEmptyRanks(g: any): void; | ||
export function addBorderNode(g: any, prefix: any, rank: any, order: any, ...args: any[]): any; | ||
export function addBorderNode(g: any, prefix: any, rank: any, order: any, ...args: any[]): string; | ||
export function maxRank(g: any): any; | ||
@@ -19,0 +19,0 @@ export function partition( |
@@ -1,1 +0,1 @@ | ||
export function dijkstraAll(g: any, weightFunc: any, edgeFunc: any): any; | ||
export function dijkstraAll(g: any, weightFunc: any, edgeFunc: any): {}; |
import * as _ from 'lodash-es'; | ||
import * as PriorityQueue from '../data/priority-queue.js'; | ||
import { PriorityQueue } from '../data/priority-queue.js'; | ||
@@ -4,0 +4,0 @@ export { dijkstra }; |
@@ -1,1 +0,1 @@ | ||
export function findCycles(g: any): any; | ||
export function findCycles(g: any): any[]; |
@@ -22,3 +22,3 @@ /** | ||
*/ | ||
has(key: any): any; | ||
has(key: any): boolean; | ||
/** | ||
@@ -25,0 +25,0 @@ * Returns the priority for **key**. If **key** is not present in the queue |
@@ -7,4 +7,4 @@ export class Graph { | ||
_label: any; | ||
_defaultNodeLabelFn: any; | ||
_defaultEdgeLabelFn: any; | ||
_defaultNodeLabelFn: () => any; | ||
_defaultEdgeLabelFn: () => any; | ||
_nodes: {}; | ||
@@ -26,9 +26,9 @@ _parent: {}; | ||
nodeCount(): number; | ||
nodes(): any; | ||
sources(): any; | ||
sinks(): any; | ||
nodes(): string[]; | ||
sources(): string[]; | ||
sinks(): string[]; | ||
setNodes(vs: any, value: any, ...args: any[]): Graph; | ||
setNode(v: any, value: any, ...args: any[]): Graph; | ||
node(v: any): any; | ||
hasNode(v: any): any; | ||
hasNode(v: any): boolean; | ||
removeNode(v: any): Graph; | ||
@@ -38,6 +38,6 @@ setParent(v: any, parent: any): Graph; | ||
parent(v: any): any; | ||
children(v: any): any; | ||
predecessors(v: any): any; | ||
successors(v: any): any; | ||
neighbors(v: any): any; | ||
children(v: any): string[]; | ||
predecessors(v: any): string[]; | ||
successors(v: any): string[]; | ||
neighbors(v: any): string[]; | ||
isLeaf(v: any): boolean; | ||
@@ -47,13 +47,13 @@ filterNodes(filter: any): any; | ||
edgeCount(): number; | ||
edges(): any; | ||
edges(): any[]; | ||
setPath(vs: any, value: any, ...args: any[]): Graph; | ||
setEdge(...args: any[]): Graph; | ||
edge(v: any, w: any, name: any, ...args: any[]): any; | ||
hasEdge(v: any, w: any, name: any, ...args: any[]): any; | ||
hasEdge(v: any, w: any, name: any, ...args: any[]): boolean; | ||
removeEdge(v: any, w: any, name: any, ...args: any[]): Graph; | ||
inEdges(v: any, u: any): any; | ||
outEdges(v: any, w: any): any; | ||
nodeEdges(v: any, w: any): any; | ||
inEdges(v: any, u: any): any[]; | ||
outEdges(v: any, w: any): any[]; | ||
nodeEdges(v: any, w: any): any[]; | ||
_nodeCount: number; | ||
_edgeCount: number; | ||
} |
@@ -134,2 +134,3 @@ import * as _ from 'lodash-es'; | ||
// @ts-expect-error | ||
this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); | ||
@@ -259,2 +260,3 @@ if (this._isCompound) { | ||
filterNodes(filter) { | ||
// @ts-expect-error | ||
var copy = new this.constructor({ | ||
@@ -276,2 +278,3 @@ directed: this._isDirected, | ||
_.each(this._edgeObjs, function (e) { | ||
// @ts-expect-error | ||
if (copy.hasNode(e.v) && copy.hasNode(e.w)) { | ||
@@ -380,2 +383,3 @@ copy.setEdge(e, self.edge(e)); | ||
// @ts-expect-error | ||
this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); | ||
@@ -382,0 +386,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147571
136
4997
Updatedd3@^7.8.2