\r
// array.js\r
interface _Array {\r
- (array: any[], fallback?: any): _Array;\r
+ new (array?: any[], fallback?: any): _Array;\r
value: any[];\r
morph(array: any[]): this;\r
settle(): number;\r
split(string: string): any[];\r
reverse(): this;\r
}\r
- interface Library { Array(array: any[], fallback?: any): void }\r
+ interface Library { Array: _Array }\r
\r
// attr.js\r
interface Element {\r
\r
// bare.js\r
export interface Bare extends Element {\r
- (element: string, inherit?: any): Bare;\r
+ new (element: string, inherit?: any): Bare;\r
words(text: any): this;\r
}\r
interface Parent {\r
element(element: string, inherit?: any): Bare;\r
symbol(): Bare;\r
}\r
- interface Library { Bare(element: string, inherit?: any): void; }\r
+ interface Library { Bare: Bare; }\r
\r
// boxes.js\r
export interface BBox {\r
- (element?: Element)\r
+ new (element?: Element)\r
height: number;\r
width: number;\r
y: number;\r
tbox(): TBox;\r
}\r
interface Library {\r
- BBox(element?: Element): void;\r
- RBox(element?: Element): void;\r
- TBox(element?: Element): void;\r
+ BBox: BBox;\r
+ RBox: RBox;\r
+ TBox: TBox;\r
}\r
\r
// clip.js\r
clipper: ClipPath;\r
unclip(): this;\r
}\r
- interface Library { ClipPath(): void; }\r
+ interface Library { ClipPath: ClipPath; }\r
\r
// color.js\r
export interface Color {\r
- (color: string): Color;\r
- (color: Color): Color;\r
+ new (color: string): Color;\r
+ new (color: Color): Color;\r
r: number;\r
g: number;\r
b: number;\r
morph(color: string): Color;\r
at(pos: number): Color;\r
}\r
- interface Library {\r
- Color(color: string): void;\r
- Color(color: Color): void;\r
- }\r
+ interface Library { Color: Color; }\r
\r
// container.js\r
export interface Container extends Parent {\r
viewbox(): ViewBox;\r
viewbox(v): this;\r
}\r
- interface Library { Container(): void }\r
+ interface Library { Container: Container }\r
\r
// data.js\r
interface Element {\r
\r
// defs.js\r
export interface Defs extends Container { }\r
- interface Library { Defs(): void }\r
+ interface Library { Defs: Defs }\r
\r
// doc.js\r
export interface Doc extends Container {\r
- (selector: string): Doc;\r
- (domElement: HTMLElement): Doc;\r
+ new (selector: string): Doc;\r
+ new (domElement: HTMLElement): Doc;\r
namespace(): this;\r
defs(): Defs;\r
parent(): HTMLElement;\r
remove(): this;\r
}\r
interface Library {\r
- Doc(selector: string): void;\r
- Doc(domElement: HTMLElement): void;\r
+ Doc: Dec;\r
}\r
\r
// element.js\r
svg(svg: string): this;\r
is(cls: any): boolean;\r
}\r
- interface Library { Element(): void; }\r
+ interface Library { Element: Element; }\r
\r
// ellipse.js\r
interface CircleMethods extends Shape {\r
ellipse(width?: any, height?: any): Ellipse;\r
}\r
interface Library {\r
- Circle(): void;\r
- Ellipse(): void;\r
+ Circle: Circle;\r
+ Ellipse: Ellipse;\r
}\r
\r
// event.js\r
update(opts: { color: string | Color, offset: number | _Number, opacity: number | _Number }): this;\r
}\r
export interface Gradient extends Container {\r
- (type: string): Gradient;\r
+ new (type: string): Gradient;\r
at(offset?: number | _Number, color?: any, opacity?: number | _Number): Stop;\r
at(opts: { color: string | Color, offset: number | _Number, opacity: number | _Number }): Stop;\r
update(block?: Function): this;\r
to(x, y): this;\r
radius(x: number, y?: number): this;\r
}\r
- interface Container { gradient(type: string, block?: (stop: Gradient) => any): Gradient; }\r
- interface Library { gradient(type: string): void }\r
+ interface Container {\r
+ gradient(type: string, block?: (stop: Gradient) => any): Gradient;\r
+ }\r
+ interface Library {\r
+ Gradient: Gradient;\r
+ Stop: Stop;\r
+ }\r
\r
// group.js\r
export interface G extends Container {\r
gbox(): BBox;\r
}\r
interface Container { group(): G; }\r
- interface Library { G(): void; }\r
+ interface Library { G: G; }\r
\r
// hyperlink.js\r
export interface A extends Container {\r
linkTo(url: string): A;\r
linkTo(url: (link: A) => any): A;\r
}\r
- interface Library { A(): void; }\r
+ interface Library { A: A; }\r
\r
// image.js\r
export interface Image extends Shape {\r
load(url?: string): this;\r
loaded(cb: (image: Image, info: { width: number, height: number, ratio: number, url: string }) => any): this;\r
+ error(cb: (image: Image, info: { width: number, height: number, ratio: number, url: string }) => any): this;\r
}\r
interface Container {\r
image(): Image;\r
image(href: string, size?: number): Image;\r
image(href: string, width?: number, height?: number): Image;\r
}\r
- interface Library { Image(): void; }\r
+ interface Library { Image: Image; }\r
\r
// line.js\r
export interface Line extends Shape {\r
line(points: number[][]): Line;\r
line(x1: number, y1: number, x2: number, y2: number): Line;\r
}\r
- interface Library { Line(): void; }\r
+ interface Library { Line: Line; }\r
\r
// marker.js\r
export interface Marker extends Container {\r
update(block: (marker: Marker) => any): this;\r
toString(): string;\r
}\r
- interface Container { marker(width?: number, height?: number, block?: (marker: Marker) => any): Marker }\r
- interface Defs { marker(width?: number, height?: number, block?: (marker: Marker) => any): Marker }\r
- interface _marker {\r
+ interface Container {\r
+ marker(width?: number, height?: number, block?: (marker: Marker) => any): Marker\r
+ }\r
+ interface Defs {\r
+ marker(width?: number, height?: number, block?: (marker: Marker) => any): Marker\r
+ }\r
+ interface Line {\r
+ marker(position: string, width?: number, height?: number, block?: (marker: Marker) => any): Marker;\r
+ marker(position: string, marker: Marker): Marker;\r
+ }\r
+ interface Polyline {\r
+ marker(position: string, width?: number, height?: number, block?: (marker: Marker) => any): Marker;\r
+ marker(position: string, marker: Marker): Marker;\r
+ }\r
+ interface Polygon {\r
marker(position: string, width?: number, height?: number, block?: (marker: Marker) => any): Marker;\r
marker(position: string, marker: Marker): Marker;\r
}\r
- interface Line extends _marker { }\r
- interface Polyline extends _marker { }\r
- interface Polygon extends _marker { }\r
- interface Path extends _marker { }\r
- interface Library { Marker(): void; }\r
+ interface Path {\r
+ marker(position: string, width?: number, height?: number, block?: (marker: Marker) => any): Marker;\r
+ marker(position: string, marker: Marker): Marker;\r
+ }\r
+ interface Library {\r
+ Marker: Marker;\r
+ }\r
\r
// mask.js\r
export interface Mask extends Container {\r
masker: Mask;\r
unmask(): this;\r
}\r
- interface Library { Mask(): void; }\r
+ interface Library { Mask: Mask; }\r
\r
// matrix.js\r
interface MatrixExtract {\r
matrix: Matrix;\r
}\r
export interface Matrix {\r
- (source: any): Matrix;\r
+ new (): Matrix;\r
+ new (source: string): Matrix;\r
+ new (element: Element): Matrix;\r
+ new (a: number, b: number, c: number, d: number, e: number, f: number): Matrix;\r
+ new (source: {a: number, b: number, c: number, d: number, e: number, f: number}): Matrix;\r
a: number;\r
b: number;\r
c: number;\r
ctm(): Matrix;\r
screenCTM(): Matrix;\r
}\r
- interface Library { Martix(): void }\r
+ interface Library { Matrix: Matrix }\r
\r
// memory.js\r
interface Element {\r
// nested.js\r
export interface Nested extends Container { }\r
interface Container { nested(): Nested; }\r
- interface Library { Nested(): void; }\r
+ interface Library { Nested: Nested; }\r
\r
// number.js\r
interface _Number {\r
- (value: any, unit?: any): _Number;\r
+ new (): _Number;\r
+ new (value: _Number): _Number;\r
+ new (value: string): _Number;\r
+ new (value: number, unit?: any): _Number;\r
toString(): string;\r
toJSON(): Object;\r
valueOf(): number;\r
morph(number: any): this;\r
at(pos: number): _Number;\r
}\r
- interface Library { Number(value: any, unit?: any): _Number; }\r
+ interface Library { Number: _Number; }\r
\r
// parent.js\r
export interface Parent extends Element {\r
clear(): this;\r
defs(): Defs;\r
}\r
+ interface Library{ Parent: Parent }\r
\r
// path.js\r
export interface Path extends Shape {\r
path(d: string): Path;\r
plot(pathArray: PathArray): Path;\r
}\r
+ interface Library{ Path: Path }\r
\r
// pathArray.js\r
interface PathArrayPoint extends Array<any> { }\r
export interface PathArray extends _Array {\r
- (d: string): PathArray;\r
- (array: PathArrayPoint[]): PathArray;\r
+ new (d: string): PathArray;\r
+ new (array: PathArrayPoint[]): PathArray;\r
move(x: number, y: number): this;\r
size(width: number, height: number): this;\r
parse(array: any[]): any[];\r
bbox(): BBox;\r
}\r
- interface Library {\r
- PathArray(d: string): void;\r
- PathArray(points: PathArrayPoint[]): void;\r
- }\r
+ interface Library { PathArray: PathArray; }\r
\r
// pattern.js\r
export interface Pattern extends Container {\r
interface Container {\r
pattern(width?: number, height?: number, block?: (pattern: Pattern) => any): Pattern\r
}\r
- interface Library { Pattern(): void }\r
+ interface Library { Pattern: Pattern }\r
\r
// point.js\r
interface ArrayPoint extends Array<number> { }\r
export interface Point {\r
- (): Point;\r
- (position: ArrayPoint): Point;\r
- (position: { x: number, y: number }): Point;\r
- (x: number, y: number): Point;\r
+ new (): Point;\r
+ new (position: ArrayPoint): Point;\r
+ new (position: Point): Point;\r
+ new (position: { x: number, y: number }): Point;\r
+ new (x: number, y: number): Point;\r
\r
clone(): Point;\r
morph(point: Point): Point;\r
native(): SVGPoint;\r
transform(matrix: Matrix): Point;\r
}\r
- interface Library {\r
- Point(): void;\r
- Point(position: ArrayPoint): void;\r
- Point(position: { x: number, y: number }): void;\r
- Point(x: number, y: number): void;\r
- }\r
+ interface Library { Point: Point; }\r
interface Element {\r
point(): Point;\r
point(position: ArrayPoint): Point;\r
\r
// pointArray.js\r
export interface PointArray extends _Array {\r
- (points: string): PointArray;\r
- (points: ArrayPoint[]): PointArray;\r
+ new (points: string): PointArray;\r
+ new (points: ArrayPoint[]): PointArray;\r
toStirng(): string;\r
toLine(): {\r
x1: number;\r
size(width: number, height: number): this;\r
bbox(): BBox;\r
}\r
- interface Library {\r
- PointArray(points: string): void;\r
- PointArray(points: ArrayPoint[]): void;\r
- }\r
+ interface Library { PointArray: PointArray }\r
\r
// poly.js\r
interface poly extends Shape {\r
size(width: number, height: number): this;\r
}\r
export interface PolyLine extends poly { }\r
- interface Library { PolyLine(): void; }\r
+ interface Library { PolyLine: PolyLine; }\r
interface Container {\r
polyLine(points: string): PolyLine;\r
polyLine(points: ArrayPoint[]): PolyLine;\r
}\r
export interface Polygon extends poly { }\r
- interface Library { Polygon(): void; }\r
+ interface Library { Polygon: Polygon; }\r
interface Container {\r
polygon(points: string): Polygon;\r
polygon(points: ArrayPoint[]): Polygon;\r
\r
// rect.js\r
export interface Rect extends Shape { }\r
- interface Library { Rect(): void; }\r
+ interface Library { Rect: Rect; }\r
interface Container {\r
rect(width?: number, height?: number): Rect;\r
}\r
\r
// set.js\r
export interface Set {\r
- (members?: Element[]): Set;\r
+ new (members?: Element[]): Set;\r
add(...elments: Element[]): this;\r
remove(element: Element): this;\r
each(block: Function): this;\r
bbox(): BBox;\r
}\r
interface Container { set(members?: Element[]): Set; }\r
- interface Library { Set(members?: Element[]): void; }\r
+ interface Library { Set: Set; }\r
\r
// shape.js\r
export interface Shape extends Element { }\r
- interface Library { Shape(): void; }\r
+ interface Library { Shape: Shape; }\r
\r
// style.js\r
interface Element {\r
scale(scale: number): this;\r
translate(x: number, y: number): this;\r
flip(a: any, offset?: number): this;\r
- martix(m: any): this;\r
+ matrix(m: any): this;\r
opacity(o: number): this;\r
opacity(): number;\r
dx(x: number): this;\r
text(text: any): Text;\r
plain(text: any): Text;\r
}\r
- interface Library { Text(): void; }\r
+ interface Library { Text: Text; }\r
export interface Tspan extends Shape {\r
text(): string;\r
text(text: any): this;\r
clear(): this;\r
length(): number;\r
}\r
+ interface Library { Tspan: Tspan; }\r
\r
// textpath.js\r
export interface TextPath extends Parent { }\r
track(): Element;\r
textPath(): Element;\r
}\r
- interface Library { TextPath(): void; }\r
+ interface Library { TextPath: TextPath; }\r
\r
// transform.js\r
interface Element {\r
f?: number;\r
}\r
export interface Transformation {\r
- (...Transform): Transformation;\r
- (source: Transform, inversed?: boolean): Transformation;\r
+ new (...Transform): Transformation;\r
+ new (source: Transform, inversed?: boolean): Transformation;\r
at(pos: number): Matrix;\r
}\r
export interface Translate extends Transformation { }\r
export interface Rotate extends Transformation { }\r
export interface Scale extends Transformation { }\r
export interface Skew extends Transformation { }\r
+ interface Library {\r
+ Transformation: Transformation;\r
+ Translate: Translate;\r
+ Rotate: Rotate;\r
+ Scale: Scale;\r
+ Skew: Skew;\r
+ }\r
\r
// ungroup.js\r
interface Parent {\r
interface Container {\r
use(element: Element, file?: string): Use;\r
}\r
- interface Library { Use(): void; }\r
+ interface Library { Use: Use; }\r
\r
// utilities.js\r
interface Library {\r
\r
// viewbox.js\r
interface ViewBox {\r
- (source: Element): ViewBox;\r
- (source: string): ViewBox;\r
- (source: any[]): ViewBox;\r
+ new (source: Element): ViewBox;\r
+ new (source: string): ViewBox;\r
+ new (source: any[]): ViewBox;\r
x: number;\r
y: number;\r
width: number;\r
morph(v: any[]): this;\r
// at(pos:number):ViewBox;\r
}\r
- interface Library {\r
- ViewBox(source: Element): void;\r
- ViewBox(source: string): void;\r
- ViewBox(source: any[]): void;\r
- }\r
+ interface Library { ViewBox: ViewBox; }\r
\r
export interface Animation {\r
stop(): Animation;\r