UNPKG

1.33 kBTypeScriptView Raw
1export interface RectData {
2 x: number;
3 y: number;
4 fill: string;
5 width: number;
6 height: number;
7 stroke: string;
8 class?: string;
9 color?: string;
10 rx?: number;
11 ry?: number;
12 attrs?: Record<string, string | number>;
13 anchor?: string;
14 name?: string;
15}
16export interface Bound {
17 startx: number;
18 stopx: number;
19 starty: number;
20 stopy: number;
21 fill: string;
22 stroke: string;
23}
24export interface TextData {
25 x: number;
26 y: number;
27 anchor: string;
28 text: string;
29 textMargin: number;
30 class?: string;
31}
32export interface TextObject {
33 x: number;
34 y: number;
35 width: number;
36 height: number;
37 fill?: string;
38 anchor?: string;
39 'text-anchor': string;
40 style: string;
41 textMargin: number;
42 rx: number;
43 ry: number;
44 tspan: boolean;
45 valign?: string;
46}
47export type D3RectElement = d3.Selection<SVGRectElement, unknown, Element | null, unknown>;
48export type D3UseElement = d3.Selection<SVGUseElement, unknown, Element | null, unknown>;
49export type D3ImageElement = d3.Selection<SVGImageElement, unknown, Element | null, unknown>;
50export type D3TextElement = d3.Selection<SVGTextElement, unknown, Element | null, unknown>;
51export type D3TSpanElement = d3.Selection<SVGTSpanElement, unknown, Element | null, unknown>;