@hpcc-js/react 2.54.0 → 3.1.0
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.
- package/dist/index.js +2 -575
- package/dist/index.js.map +7 -1
- package/package.json +34 -33
- package/src/ImageChar.tsx +12 -9
- package/src/__package__.ts +2 -2
- package/src/edge.tsx +3 -3
- package/src/icon.tsx +10 -10
- package/src/image.tsx +3 -3
- package/src/index.ts +15 -13
- package/src/render.ts +46 -17
- package/src/shape.tsx +15 -15
- package/src/span.tsx +9 -0
- package/src/subgraph.tsx +3 -3
- package/src/text.tsx +58 -39
- package/src/vertex.tsx +17 -14
- package/src/vertex2.tsx +5 -5
- package/src/vertex3.tsx +11 -11
- package/src/vertex4.tsx +10 -11
- package/types/ImageChar.d.ts +4 -5
- package/types/__package__.d.ts +2 -3
- package/types/edge.d.ts +2 -3
- package/types/icon.d.ts +6 -7
- package/types/image.d.ts +3 -4
- package/types/index.d.ts +15 -14
- package/types/render.d.ts +16 -8
- package/types/shape.d.ts +9 -10
- package/types/span.d.ts +5 -0
- package/types/subgraph.d.ts +1 -2
- package/types/text.d.ts +11 -13
- package/types/vertex.d.ts +5 -6
- package/types/vertex2.d.ts +2 -3
- package/types/vertex3.d.ts +8 -9
- package/types/vertex4.d.ts +4 -5
- package/dist/index.es6.js +0 -542
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/types/ImageChar.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/edge.d.ts.map +0 -1
- package/types/icon.d.ts.map +0 -1
- package/types/image.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/render.d.ts.map +0 -1
- package/types/shape.d.ts.map +0 -1
- package/types/subgraph.d.ts.map +0 -1
- package/types/text.d.ts.map +0 -1
- package/types/vertex.d.ts.map +0 -1
- package/types/vertex2.d.ts.map +0 -1
- package/types/vertex3.d.ts.map +0 -1
- package/types/vertex4.d.ts.map +0 -1
- package/types-3.4/ImageChar.d.ts +0 -14
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/edge.d.ts +0 -30
- package/types-3.4/icon.d.ts +0 -27
- package/types-3.4/image.d.ts +0 -11
- package/types-3.4/index.d.ts +0 -15
- package/types-3.4/render.d.ts +0 -27
- package/types-3.4/shape.d.ts +0 -41
- package/types-3.4/subgraph.d.ts +0 -14
- package/types-3.4/text.d.ts +0 -51
- package/types-3.4/vertex.d.ts +0 -33
- package/types-3.4/vertex2.d.ts +0 -4
- package/types-3.4/vertex3.d.ts +0 -34
- package/types-3.4/vertex4.d.ts +0 -32
package/src/vertex.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Icon } from "./icon";
|
|
3
|
-
import { TextBox } from "./text";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Icon, IconProps } from "./icon.tsx";
|
|
3
|
+
import { TextBox } from "./text.tsx";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface AnnotationsProps {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
8
8
|
annotationIDs: string[];
|
|
9
9
|
stepSize?: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const Annotations: React.FunctionComponent<
|
|
12
|
+
export const Annotations: React.FunctionComponent<AnnotationsProps> = ({
|
|
13
13
|
x,
|
|
14
14
|
y,
|
|
15
15
|
annotationIDs = [],
|
|
@@ -35,7 +35,7 @@ export interface VertexProps {
|
|
|
35
35
|
text: string;
|
|
36
36
|
textHeight?: number;
|
|
37
37
|
textPadding?: number;
|
|
38
|
-
icon?:
|
|
38
|
+
icon?: IconProps;
|
|
39
39
|
annotationsHeight?: number;
|
|
40
40
|
annotationIDs?: string[];
|
|
41
41
|
textFill?: string;
|
|
@@ -52,7 +52,7 @@ export const Vertex: React.FunctionComponent<VertexProps> = ({
|
|
|
52
52
|
text = "",
|
|
53
53
|
textHeight = 12,
|
|
54
54
|
textPadding = 4,
|
|
55
|
-
icon = {},
|
|
55
|
+
icon = {} as IconProps,
|
|
56
56
|
annotationsHeight = 12,
|
|
57
57
|
annotationIDs = [],
|
|
58
58
|
textFill,
|
|
@@ -63,19 +63,22 @@ export const Vertex: React.FunctionComponent<VertexProps> = ({
|
|
|
63
63
|
showLabel = true,
|
|
64
64
|
scale = 1
|
|
65
65
|
}) => {
|
|
66
|
-
const [textBoxWidth, setTextBoxWidthUpdate] = React.useState(0);
|
|
67
|
-
const [textBoxHeight, setTextBoxHeightUpdate] = React.useState(0);
|
|
68
|
-
|
|
69
|
-
React.useEffect(() => {
|
|
70
|
-
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
|
|
71
|
-
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
72
|
-
|
|
73
66
|
icon = {
|
|
74
67
|
imageChar: "fa-question",
|
|
75
68
|
height: 32,
|
|
76
69
|
fill: "transparent",
|
|
77
70
|
...icon
|
|
78
71
|
};
|
|
72
|
+
|
|
73
|
+
const [textBoxWidth, setTextBoxWidthUpdate] = React.useState(0);
|
|
74
|
+
const [textBoxHeight, setTextBoxHeightUpdate] = React.useState(0);
|
|
75
|
+
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (onSizeUpdate) {
|
|
78
|
+
onSizeUpdate({ width: 0, height: 0 });
|
|
79
|
+
}
|
|
80
|
+
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
81
|
+
|
|
79
82
|
let width = textBoxWidth;
|
|
80
83
|
width += 4;
|
|
81
84
|
let offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
|
package/src/vertex2.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Utility } from "@hpcc-js/common";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Annotations, VertexProps } from "./vertex";
|
|
3
|
+
import { Icon, IconProps } from "./icon.tsx";
|
|
4
|
+
import { TextBox } from "./text.tsx";
|
|
5
|
+
import { Annotations, VertexProps } from "./vertex.tsx";
|
|
6
6
|
|
|
7
7
|
export const Vertex2: React.FunctionComponent<VertexProps> = ({
|
|
8
8
|
categoryID = "",
|
|
9
9
|
text = "",
|
|
10
10
|
textHeight = 12,
|
|
11
11
|
textPadding = 4,
|
|
12
|
-
icon = {},
|
|
12
|
+
icon = {} as IconProps,
|
|
13
13
|
textFill = "black",
|
|
14
14
|
textboxFill = "white",
|
|
15
15
|
textboxStroke = "black",
|
package/src/vertex3.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Utility } from "@hpcc-js/common";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { VertexProps } from "./vertex";
|
|
3
|
+
import { Icon, IconProps } from "./icon.tsx";
|
|
4
|
+
import { TextBox, TextBoxProps } from "./text.tsx";
|
|
5
|
+
import { VertexProps } from "./vertex.tsx";
|
|
6
6
|
|
|
7
7
|
export interface Vertex3Props extends VertexProps {
|
|
8
8
|
id: string;
|
|
@@ -12,8 +12,8 @@ export interface Vertex3Props extends VertexProps {
|
|
|
12
12
|
textHeight?: number;
|
|
13
13
|
textPadding?: number;
|
|
14
14
|
textboxStrokeWidth?: number;
|
|
15
|
-
icon?:
|
|
16
|
-
annotations?:
|
|
15
|
+
icon?: IconProps;
|
|
16
|
+
annotations?: IconProps[];
|
|
17
17
|
annotationsHeight?: number;
|
|
18
18
|
annotationGutter?: number;
|
|
19
19
|
textFill?: string;
|
|
@@ -21,11 +21,11 @@ export interface Vertex3Props extends VertexProps {
|
|
|
21
21
|
textboxStroke?: string;
|
|
22
22
|
textFontFamily?: string;
|
|
23
23
|
cornerRadius?: number;
|
|
24
|
-
subText?:
|
|
24
|
+
subText?: TextBoxProps;
|
|
25
25
|
onSizeUpdate?: (size: { width: number, height: number }) => void;
|
|
26
26
|
showLabel?: boolean;
|
|
27
27
|
noLabelRadius?: number;
|
|
28
|
-
expansionIcon?:
|
|
28
|
+
expansionIcon?: IconProps;
|
|
29
29
|
scale?: number;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -41,8 +41,8 @@ export const Vertex3: React.FunctionComponent<Vertex3Props> = ({
|
|
|
41
41
|
annotationGutter = 2,
|
|
42
42
|
annotations = [],
|
|
43
43
|
cornerRadius = 3,
|
|
44
|
-
icon = {},
|
|
45
|
-
subText = { text: "" },
|
|
44
|
+
icon = {} as IconProps,
|
|
45
|
+
subText = { text: "" } as TextBoxProps,
|
|
46
46
|
showLabel = true,
|
|
47
47
|
noLabelRadius = 5,
|
|
48
48
|
expansionIcon,
|
|
@@ -98,7 +98,7 @@ export const Vertex3: React.FunctionComponent<Vertex3Props> = ({
|
|
|
98
98
|
fullAnnotationWidth += annoShapeWidth + annotationGutter;
|
|
99
99
|
const annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
|
|
100
100
|
annotationArr.push(
|
|
101
|
-
<g key={idx}
|
|
101
|
+
<g key={idx} className="vertex3-anno" data-click={"annotation"} data-click-data={JSON.stringify(anno)} transform={`translate(${annoOffsetX} ${annoOffsetY})`}>
|
|
102
102
|
<Icon
|
|
103
103
|
{...anno}
|
|
104
104
|
shape="square"
|
package/src/vertex4.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Utility } from "@hpcc-js/common";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { VertexProps } from "./vertex";
|
|
3
|
+
import { Icon, IconProps } from "./icon.tsx";
|
|
4
|
+
import { TextBox, TextBoxProps } from "./text.tsx";
|
|
5
|
+
import { VertexProps } from "./vertex.tsx";
|
|
7
6
|
|
|
8
|
-
export interface IVertex4Annotation extends
|
|
7
|
+
export interface IVertex4Annotation extends IconProps {
|
|
9
8
|
shapeOffsetX?: number;
|
|
10
9
|
shapeOffsetY?: number;
|
|
11
10
|
}
|
|
@@ -47,8 +46,8 @@ export const Vertex4: React.FunctionComponent<IVertex4> = ({
|
|
|
47
46
|
annotations = [],
|
|
48
47
|
iconAnnotations = [],
|
|
49
48
|
cornerRadius = 3,
|
|
50
|
-
icon = {},
|
|
51
|
-
subText = {},
|
|
49
|
+
icon = {} as IconProps,
|
|
50
|
+
subText = {} as TextBoxProps,
|
|
52
51
|
showLabel = true,
|
|
53
52
|
noLabelRadius = 5,
|
|
54
53
|
|
|
@@ -99,7 +98,7 @@ export const Vertex4: React.FunctionComponent<IVertex4> = ({
|
|
|
99
98
|
const textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2);
|
|
100
99
|
|
|
101
100
|
const textShapeHeight = textHeight + (annotationGutter * 2) + (textboxStrokeWidth * 2);
|
|
102
|
-
const annoWidthArr = annotations.map((anno
|
|
101
|
+
const annoWidthArr = annotations.map((anno) => {
|
|
103
102
|
return Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width;
|
|
104
103
|
});
|
|
105
104
|
const annotationArr = [];
|
|
@@ -110,7 +109,7 @@ export const Vertex4: React.FunctionComponent<IVertex4> = ({
|
|
|
110
109
|
_labelAnnoOffsetX += annoWidthArr[i] + annotationGutter;
|
|
111
110
|
const annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2);
|
|
112
111
|
annotationArr.push(
|
|
113
|
-
<g key={i}
|
|
112
|
+
<g key={i} className="vertex3-anno" data-click={"annotation"} data-click-data={JSON.stringify(anno)} transform={`translate(${annoOffsetX} ${annoOffsetY})`}>
|
|
114
113
|
<Icon
|
|
115
114
|
{...anno}
|
|
116
115
|
shape="rectangle"
|
|
@@ -133,7 +132,7 @@ export const Vertex4: React.FunctionComponent<IVertex4> = ({
|
|
|
133
132
|
const x = anno.shapeOffsetX;
|
|
134
133
|
const y = anno.shapeOffsetY;
|
|
135
134
|
iconAnnotationArr.push(
|
|
136
|
-
<g key={i}
|
|
135
|
+
<g key={i} className="vertex3-iconAnno" data-click={"icon-annotation"} data-click-data={JSON.stringify(anno)} transform={`translate(${x} ${y})`}>
|
|
137
136
|
<Icon
|
|
138
137
|
{...anno}
|
|
139
138
|
shape={anno.shape ?? "square"}
|
package/types/ImageChar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ImageCharProps {
|
|
3
3
|
x?: number;
|
|
4
4
|
y?: number;
|
|
5
5
|
height?: number;
|
|
@@ -8,7 +8,6 @@ interface ImageChar {
|
|
|
8
8
|
fontFamily?: string;
|
|
9
9
|
char?: string;
|
|
10
10
|
yOffset?: number;
|
|
11
|
+
fontWeight?: number;
|
|
11
12
|
}
|
|
12
|
-
export declare const ImageChar: React.FunctionComponent<
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=ImageChar.d.ts.map
|
|
13
|
+
export declare const ImageChar: React.FunctionComponent<ImageCharProps>;
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/react";
|
|
2
|
-
export declare const PKG_VERSION = "
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
4
|
-
//# sourceMappingURL=__package__.d.ts.map
|
|
2
|
+
export declare const PKG_VERSION = "3.1.0";
|
|
3
|
+
export declare const BUILD_VERSION = "3.2.0";
|
package/types/edge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { VertexProps } from "./vertex";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VertexProps } from "./vertex.tsx";
|
|
3
3
|
type Point = [number, number];
|
|
4
4
|
export interface EdgeProps<V extends VertexProps = VertexProps> {
|
|
5
5
|
id: string | number;
|
|
@@ -21,4 +21,3 @@ export interface EdgeProps<V extends VertexProps = VertexProps> {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const Edge: React.FunctionComponent<EdgeProps>;
|
|
23
23
|
export {};
|
|
24
|
-
//# sourceMappingURL=edge.d.ts.map
|
package/types/icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface IconProps {
|
|
3
3
|
shape?: "circle" | "square" | "rectangle";
|
|
4
4
|
width?: number;
|
|
5
5
|
height?: number;
|
|
@@ -16,12 +16,11 @@ export interface Icon {
|
|
|
16
16
|
cornerRadius?: number;
|
|
17
17
|
shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
|
|
18
18
|
}
|
|
19
|
-
export declare const Icon: React.FunctionComponent<
|
|
20
|
-
export interface IconEx extends
|
|
19
|
+
export declare const Icon: React.FunctionComponent<IconProps>;
|
|
20
|
+
export interface IconEx extends IconProps {
|
|
21
21
|
id: string;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface IconsProps {
|
|
24
24
|
icons: IconEx[];
|
|
25
25
|
}
|
|
26
|
-
export declare const Icons: React.FunctionComponent<
|
|
27
|
-
//# sourceMappingURL=icon.d.ts.map
|
|
26
|
+
export declare const Icons: React.FunctionComponent<IconsProps>;
|
package/types/image.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ImageProps {
|
|
3
3
|
href: string;
|
|
4
4
|
x?: number;
|
|
5
5
|
y?: number;
|
|
6
6
|
height?: number;
|
|
7
7
|
yOffset?: number;
|
|
8
8
|
}
|
|
9
|
-
export declare const Image: React.FunctionComponent<
|
|
9
|
+
export declare const Image: React.FunctionComponent<ImageProps>;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=image.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
export * from "./edge";
|
|
3
|
-
export * from "./ImageChar";
|
|
4
|
-
export * from "./icon";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./edge.tsx";
|
|
3
|
+
export * from "./ImageChar.tsx";
|
|
4
|
+
export * from "./icon.tsx";
|
|
5
|
+
export * from "./image.tsx";
|
|
6
|
+
export * from "./render.ts";
|
|
7
|
+
export * from "./shape.tsx";
|
|
8
|
+
export * from "./span.tsx";
|
|
9
|
+
export * from "./text.tsx";
|
|
10
|
+
export * from "./vertex.tsx";
|
|
11
|
+
export * from "./vertex2.tsx";
|
|
12
|
+
export * from "./vertex3.tsx";
|
|
13
|
+
export * from "./vertex4.tsx";
|
|
14
|
+
export * from "./subgraph.tsx";
|
|
15
|
+
import React from "react";
|
|
14
16
|
export { React };
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
package/types/render.d.ts
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Root } from "react-dom/client";
|
|
1
3
|
import { HTMLWidget, SVGWidget } from "@hpcc-js/common";
|
|
2
|
-
|
|
3
|
-
export declare function render<P>(C: React.FunctionComponent<P>, props: Readonly<P>, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text): void;
|
|
4
|
-
export interface FunctionComponent<T> extends React.FunctionComponent<T> {
|
|
5
|
-
}
|
|
6
|
-
export declare function svgRender<P>(C: React.FunctionComponent<P>, props: Readonly<P>, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text): void;
|
|
4
|
+
export declare function render<P>(C: React.FunctionComponent<P>, props: Readonly<P>, parent: Element | Document | ShadowRoot | DocumentFragment): void;
|
|
7
5
|
export declare class HTMLAdapter<P> extends HTMLWidget {
|
|
8
6
|
protected readonly _component: React.FunctionComponent<P>;
|
|
9
|
-
protected
|
|
7
|
+
protected _root: Root;
|
|
10
8
|
props(): P;
|
|
11
9
|
props(_: Partial<P>): this;
|
|
12
10
|
prop<K extends keyof P>(_: K): P[K];
|
|
13
11
|
prop<K extends keyof P>(_: K, value: P[K]): this;
|
|
14
12
|
constructor(_component: React.FunctionComponent<P>);
|
|
13
|
+
enter(domNode: any, element: any): void;
|
|
15
14
|
update(domNode: any, element: any): void;
|
|
15
|
+
exit(domNode: any, element: any): void;
|
|
16
|
+
}
|
|
17
|
+
export interface HTMLAdapter<P> {
|
|
18
|
+
_props: P;
|
|
16
19
|
}
|
|
17
20
|
export declare class SVGAdapter<P> extends SVGWidget {
|
|
18
21
|
protected readonly _component: React.FunctionComponent<P>;
|
|
19
|
-
protected
|
|
22
|
+
protected _root: Root;
|
|
20
23
|
props(): P;
|
|
21
24
|
props(_: Partial<P>): this;
|
|
22
25
|
prop<K extends keyof P>(_: K): P[K];
|
|
23
26
|
prop<K extends keyof P>(_: K, value: P[K]): this;
|
|
24
27
|
constructor(_component: React.FunctionComponent<P>);
|
|
28
|
+
_c2: React.ReactElement;
|
|
29
|
+
enter(domNode: any, element: any): void;
|
|
25
30
|
update(domNode: any, element: any): void;
|
|
31
|
+
exit(domNode: any, element: any): void;
|
|
32
|
+
}
|
|
33
|
+
export interface SVGAdapter<P> {
|
|
34
|
+
_props: P;
|
|
26
35
|
}
|
|
27
|
-
//# sourceMappingURL=render.d.ts.map
|
package/types/shape.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface CircleProps {
|
|
3
3
|
radius?: number;
|
|
4
4
|
fill?: string;
|
|
5
5
|
stroke?: string;
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
|
|
8
8
|
}
|
|
9
|
-
export declare const Circle: React.FunctionComponent<
|
|
10
|
-
interface
|
|
9
|
+
export declare const Circle: React.FunctionComponent<CircleProps>;
|
|
10
|
+
interface SquareProps {
|
|
11
11
|
radius?: number;
|
|
12
12
|
cornerRadius?: number;
|
|
13
13
|
fill?: string;
|
|
@@ -15,8 +15,8 @@ interface Square {
|
|
|
15
15
|
strokeWidth?: number;
|
|
16
16
|
shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
|
|
17
17
|
}
|
|
18
|
-
export declare const Square: React.FunctionComponent<
|
|
19
|
-
interface
|
|
18
|
+
export declare const Square: React.FunctionComponent<SquareProps>;
|
|
19
|
+
interface RectangleProps {
|
|
20
20
|
width?: number;
|
|
21
21
|
height?: number;
|
|
22
22
|
cornerRadius?: number;
|
|
@@ -25,8 +25,8 @@ interface Rectangle {
|
|
|
25
25
|
strokeWidth?: number;
|
|
26
26
|
shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
|
|
27
27
|
}
|
|
28
|
-
export declare const Rectangle: React.FunctionComponent<
|
|
29
|
-
interface
|
|
28
|
+
export declare const Rectangle: React.FunctionComponent<RectangleProps>;
|
|
29
|
+
interface ShapeProps {
|
|
30
30
|
shape?: "circle" | "square" | "rectangle";
|
|
31
31
|
height?: number;
|
|
32
32
|
width?: number;
|
|
@@ -36,6 +36,5 @@ interface Shape {
|
|
|
36
36
|
shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
|
|
37
37
|
cornerRadius?: number;
|
|
38
38
|
}
|
|
39
|
-
export declare const Shape: React.FunctionComponent<
|
|
39
|
+
export declare const Shape: React.FunctionComponent<ShapeProps>;
|
|
40
40
|
export {};
|
|
41
|
-
//# sourceMappingURL=shape.d.ts.map
|
package/types/span.d.ts
ADDED
package/types/subgraph.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface SubgraphProps {
|
|
3
3
|
id: string;
|
|
4
4
|
origData?: any;
|
|
@@ -11,4 +11,3 @@ export interface SubgraphProps {
|
|
|
11
11
|
fontFamily?: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const Subgraph: React.FunctionComponent<SubgraphProps>;
|
|
14
|
-
//# sourceMappingURL=subgraph.d.ts.map
|
package/types/text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TextLineProps {
|
|
3
3
|
text: string;
|
|
4
4
|
height?: number;
|
|
5
5
|
anchor?: string;
|
|
@@ -7,8 +7,8 @@ interface TextLine {
|
|
|
7
7
|
fontFamily?: string;
|
|
8
8
|
fill?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const TextLine: React.FunctionComponent<
|
|
11
|
-
interface
|
|
10
|
+
export declare const TextLine: React.FunctionComponent<TextLineProps>;
|
|
11
|
+
export interface TextProps {
|
|
12
12
|
text: string;
|
|
13
13
|
height?: number;
|
|
14
14
|
fontFamily?: string;
|
|
@@ -18,8 +18,8 @@ interface Text {
|
|
|
18
18
|
height: number;
|
|
19
19
|
}) => void;
|
|
20
20
|
}
|
|
21
|
-
export declare const Text: React.FunctionComponent<
|
|
22
|
-
export interface
|
|
21
|
+
export declare const Text: React.FunctionComponent<TextProps>;
|
|
22
|
+
export interface TextBoxProps {
|
|
23
23
|
text: string;
|
|
24
24
|
height?: number;
|
|
25
25
|
fontFamily?: string;
|
|
@@ -35,17 +35,15 @@ export interface TextBox {
|
|
|
35
35
|
height: number;
|
|
36
36
|
}) => void;
|
|
37
37
|
}
|
|
38
|
-
export declare const TextBox: React.FunctionComponent<
|
|
39
|
-
export interface LabelledRect extends
|
|
38
|
+
export declare const TextBox: React.FunctionComponent<TextBoxProps>;
|
|
39
|
+
export interface LabelledRect extends TextBoxProps {
|
|
40
40
|
width?: number;
|
|
41
41
|
fontSize?: number;
|
|
42
42
|
}
|
|
43
|
+
export declare const LabelledRect: React.FunctionComponent<LabelledRect>;
|
|
43
44
|
export interface IconLabelledRect extends LabelledRect {
|
|
44
45
|
icon: string;
|
|
45
|
-
iconFontFamily
|
|
46
|
-
iconFontSize
|
|
46
|
+
iconFontFamily?: string;
|
|
47
|
+
iconFontSize?: number;
|
|
47
48
|
}
|
|
48
|
-
export declare const LabelledRect: React.FunctionComponent<LabelledRect>;
|
|
49
49
|
export declare const IconLabelledRect: React.FunctionComponent<IconLabelledRect>;
|
|
50
|
-
export {};
|
|
51
|
-
//# sourceMappingURL=text.d.ts.map
|
package/types/vertex.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconProps } from "./icon.tsx";
|
|
3
|
+
export interface AnnotationsProps {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
annotationIDs: string[];
|
|
7
7
|
stepSize?: number;
|
|
8
8
|
}
|
|
9
|
-
export declare const Annotations: React.FunctionComponent<
|
|
9
|
+
export declare const Annotations: React.FunctionComponent<AnnotationsProps>;
|
|
10
10
|
export interface VertexProps {
|
|
11
11
|
id: string | number;
|
|
12
12
|
origData?: any;
|
|
@@ -15,7 +15,7 @@ export interface VertexProps {
|
|
|
15
15
|
text: string;
|
|
16
16
|
textHeight?: number;
|
|
17
17
|
textPadding?: number;
|
|
18
|
-
icon?:
|
|
18
|
+
icon?: IconProps;
|
|
19
19
|
annotationsHeight?: number;
|
|
20
20
|
annotationIDs?: string[];
|
|
21
21
|
textFill?: string;
|
|
@@ -30,4 +30,3 @@ export interface VertexProps {
|
|
|
30
30
|
scale?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare const Vertex: React.FunctionComponent<VertexProps>;
|
|
33
|
-
//# sourceMappingURL=vertex.d.ts.map
|
package/types/vertex2.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { VertexProps } from "./vertex";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VertexProps } from "./vertex.tsx";
|
|
3
3
|
export declare const Vertex2: React.FunctionComponent<VertexProps>;
|
|
4
|
-
//# sourceMappingURL=vertex2.d.ts.map
|
package/types/vertex3.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { VertexProps } from "./vertex";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconProps } from "./icon.tsx";
|
|
3
|
+
import { TextBoxProps } from "./text.tsx";
|
|
4
|
+
import { VertexProps } from "./vertex.tsx";
|
|
5
5
|
export interface Vertex3Props extends VertexProps {
|
|
6
6
|
id: string;
|
|
7
7
|
origData?: any;
|
|
@@ -10,8 +10,8 @@ export interface Vertex3Props extends VertexProps {
|
|
|
10
10
|
textHeight?: number;
|
|
11
11
|
textPadding?: number;
|
|
12
12
|
textboxStrokeWidth?: number;
|
|
13
|
-
icon?:
|
|
14
|
-
annotations?:
|
|
13
|
+
icon?: IconProps;
|
|
14
|
+
annotations?: IconProps[];
|
|
15
15
|
annotationsHeight?: number;
|
|
16
16
|
annotationGutter?: number;
|
|
17
17
|
textFill?: string;
|
|
@@ -19,16 +19,15 @@ export interface Vertex3Props extends VertexProps {
|
|
|
19
19
|
textboxStroke?: string;
|
|
20
20
|
textFontFamily?: string;
|
|
21
21
|
cornerRadius?: number;
|
|
22
|
-
subText?:
|
|
22
|
+
subText?: TextBoxProps;
|
|
23
23
|
onSizeUpdate?: (size: {
|
|
24
24
|
width: number;
|
|
25
25
|
height: number;
|
|
26
26
|
}) => void;
|
|
27
27
|
showLabel?: boolean;
|
|
28
28
|
noLabelRadius?: number;
|
|
29
|
-
expansionIcon?:
|
|
29
|
+
expansionIcon?: IconProps;
|
|
30
30
|
scale?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare const Vertex3: React.FunctionComponent<Vertex3Props>;
|
|
33
33
|
export declare const CentroidVertex3: React.FunctionComponent<Vertex3Props>;
|
|
34
|
-
//# sourceMappingURL=vertex3.d.ts.map
|
package/types/vertex4.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { VertexProps } from "./vertex";
|
|
4
|
-
export interface IVertex4Annotation extends
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconProps } from "./icon.tsx";
|
|
3
|
+
import { VertexProps } from "./vertex.tsx";
|
|
4
|
+
export interface IVertex4Annotation extends IconProps {
|
|
5
5
|
shapeOffsetX?: number;
|
|
6
6
|
shapeOffsetY?: number;
|
|
7
7
|
}
|
|
@@ -29,4 +29,3 @@ export interface IVertex4 extends VertexProps {
|
|
|
29
29
|
}
|
|
30
30
|
export declare const Vertex4: React.FunctionComponent<IVertex4>;
|
|
31
31
|
export declare const CentroidVertex4: React.FunctionComponent<IVertex4>;
|
|
32
|
-
//# sourceMappingURL=vertex4.d.ts.map
|