Skip to content

Commit

Permalink
release v0.2-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslaneconkling committed Oct 14, 2020
1 parent d08c03c commit 4607253
Show file tree
Hide file tree
Showing 71 changed files with 2,381 additions and 1,360 deletions.
24 changes: 24 additions & 0 deletions dist/controls/zoom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Node } from '../';
export declare type Options = {
top: number;
left: number;
right: number;
bottom: number;
onZoomIn: (event: MouseEvent) => any;
onZoomOut: (event: MouseEvent) => any;
};
export declare type ViewportChangeOptions = {
padding: number;
};
export declare const zoomTo: (nodes: Node[], options?: Partial<ViewportChangeOptions> | undefined) => {
zoom: number;
position: number[];
};
export declare const fit: (zoom: number, position: [number, number], nodes: Node[], options?: Partial<ViewportChangeOptions> | undefined) => {
zoom: number;
position: number[];
};
export declare const clampZoom: (min: number, max: number, zoom: number) => number;
export declare const Control: (options: {
container: HTMLDivElement;
}) => (options: Partial<Options>) => void;
121 changes: 121 additions & 0 deletions dist/controls/zoom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/controls/zoom.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { NodeStyle, EdgeStyle } from './renderers/pixi';
export declare type Node<E extends Edge = Edge, Style = Partial<NodeStyle>> = {
id: string;
radius: number;
x?: number | undefined;
y?: number | undefined;
label?: string | undefined;
style?: Style;
subGraph?: {
nodes: Node<E>[];
edges: E[];
options?: {};
} | undefined;
};
export declare type Edge<Style = Partial<EdgeStyle>> = {
id: string;
source: string;
target: string;
label?: string;
style?: Style;
};
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 0 additions & 29 deletions dist/layout/force/bindings/react.d.ts

This file was deleted.

48 changes: 0 additions & 48 deletions dist/layout/force/bindings/react.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/layout/force/bindings/react.js.map

This file was deleted.

51 changes: 12 additions & 39 deletions dist/layout/force/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Node, Edge, PositionNode } from '../../types';
import { Extend } from '../../types';
import { Node, Edge } from '../../';
export declare type LayoutOptions = {
nodeStrength: number;
linkDistance: number;
Expand All @@ -7,46 +8,18 @@ export declare type LayoutOptions = {
nodePadding: number;
tick: number;
};
export declare class ForceLayout<N extends Node<E>, E extends Edge> {
worker: Worker;
dispose: () => void;
handler: (graph: {
nodes: PositionNode<N, E>[];
edges: E[];
}) => void;
nodes: N[];
edges: E[];
nodesById: {
[id: string]: N;
};
edgesById: {
[id: string]: E;
};
positionedNodes: PositionNode<N, E>[];
positionedNodesById: {
[id: string]: PositionNode<N, E>;
};
private options;
private run;
constructor(handler?: (graph: {
nodes: PositionNode<N, E>[];
edges: E[];
}) => void);
apply: ({ nodes, edges, options }: {
export declare const LAYOUT_OPTIONS: LayoutOptions;
export declare const Layout: () => {
<N extends Node<E, Partial<import("../../renderers/pixi").NodeStyle>>, E extends Edge<Partial<import("../../renderers/pixi").EdgeStyle>>>(graph: {
nodes: N[];
edges: E[];
options?: Partial<LayoutOptions> | undefined;
}) => this;
}
export declare const Layout: <N extends Node<E>, E extends Edge>(handler?: (graph: {
nodes: PositionNode<N, E>[];
edges: E[];
}) => void) => {
(graph: {
nodes: N[];
}): Promise<{
nodes: Extend<N, {
x: number;
y: number;
}>[];
edges: E[];
options?: Partial<LayoutOptions> | undefined;
}): ForceLayout<N, E>;
nodes(): PositionNode<N, E>[];
edges(): E[];
}>;
delete(): void;
};
Loading

0 comments on commit 4607253

Please sign in to comment.