@hpcc-js/react 3.2.1 → 3.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/react",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "description": "hpcc-js - Viz React",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
@@ -37,12 +37,12 @@
37
37
  "update-major": "npx --yes npm-check-updates -u"
38
38
  },
39
39
  "dependencies": {
40
- "@hpcc-js/common": "^3.3.0"
40
+ "@hpcc-js/common": "^3.3.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@hpcc-js/esbuild-plugins": "^1.4.0",
44
- "@preact/preset-vite": "2.9.2",
45
- "preact": "10.25.0"
43
+ "@hpcc-js/esbuild-plugins": "^1.4.2",
44
+ "@preact/preset-vite": "2.10.1",
45
+ "preact": "10.26.5"
46
46
  },
47
47
  "repository": {
48
48
  "type": "git",
@@ -55,5 +55,5 @@
55
55
  "url": "https://github.com/hpcc-systems/Visualization/issues"
56
56
  },
57
57
  "homepage": "https://github.com/hpcc-systems/Visualization",
58
- "gitHead": "ed4453ec6a4a8af9c0beb11b46c7f4365bc0669e"
58
+ "gitHead": "c54b3bd37ed839305001ba47f2657a1f8eb8628a"
59
59
  }
package/src/ImageChar.tsx CHANGED
@@ -1,5 +1,4 @@
1
- import { FunctionComponent } from "preact";
2
- import { useMemo } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Utility } from "@hpcc-js/common";
4
3
 
5
4
  export interface ImageCharProps {
@@ -14,7 +13,7 @@ export interface ImageCharProps {
14
13
  fontWeight?: number;
15
14
  }
16
15
 
17
- export const ImageChar: FunctionComponent<ImageCharProps> = ({
16
+ export const ImageChar: PReact.FunctionComponent<ImageCharProps> = ({
18
17
  x,
19
18
  y = 0,
20
19
  height = 12,
@@ -25,7 +24,7 @@ export const ImageChar: FunctionComponent<ImageCharProps> = ({
25
24
  fontWeight
26
25
  }) => {
27
26
 
28
- const renderChar = useMemo(() => {
27
+ const renderChar = PReact.useMemo(() => {
29
28
  return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
30
29
  }, [char, fontFamily]);
31
30
 
package/src/edge.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { VertexProps } from "./vertex.tsx";
3
3
  import { Text } from "./text.tsx";
4
4
 
@@ -23,7 +23,7 @@ export interface EdgeProps<V extends VertexProps = VertexProps> {
23
23
  curveDepth?: number;
24
24
  }
25
25
 
26
- export const Edge: FunctionComponent<EdgeProps> = ({
26
+ export const Edge: PReact.FunctionComponent<EdgeProps> = ({
27
27
  label,
28
28
  labelPos,
29
29
  labelFill = "black",
package/src/icon.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { Palette } from "@hpcc-js/common";
3
3
  import { Image } from "./image.tsx";
4
4
  import { ImageChar } from "./ImageChar.tsx";
@@ -22,7 +22,7 @@ export interface IconProps {
22
22
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
23
23
  }
24
24
 
25
- export const Icon: FunctionComponent<IconProps> = ({
25
+ export const Icon: PReact.FunctionComponent<IconProps> = ({
26
26
  shape = "circle",
27
27
  width,
28
28
  height = 32,
@@ -78,7 +78,7 @@ export interface IconsProps {
78
78
  icons: IconEx[];
79
79
  }
80
80
 
81
- export const Icons: FunctionComponent<IconsProps> = ({
81
+ export const Icons: PReact.FunctionComponent<IconsProps> = ({
82
82
  icons = []
83
83
  }) => {
84
84
  const IconComponents = icons.map(cat => {
package/src/image.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
 
3
3
  interface ImageProps {
4
4
  href: string;
@@ -8,7 +8,7 @@ interface ImageProps {
8
8
  yOffset?: number;
9
9
  }
10
10
 
11
- export const Image: FunctionComponent<ImageProps> = ({
11
+ export const Image: PReact.FunctionComponent<ImageProps> = ({
12
12
  href,
13
13
  x,
14
14
  y = 0,
package/src/shape.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
 
3
3
  interface CircleProps {
4
4
  radius?: number;
@@ -8,7 +8,7 @@ interface CircleProps {
8
8
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
9
9
  }
10
10
 
11
- export const Circle: FunctionComponent<CircleProps> = ({
11
+ export const Circle: PReact.FunctionComponent<CircleProps> = ({
12
12
  radius = 32,
13
13
  fill = "navy",
14
14
  stroke = fill,
@@ -31,7 +31,7 @@ interface SquareProps {
31
31
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
32
32
  }
33
33
 
34
- export const Square: FunctionComponent<SquareProps> = ({
34
+ export const Square: PReact.FunctionComponent<SquareProps> = ({
35
35
  radius = 30,
36
36
  cornerRadius = 0,
37
37
  fill = "white",
@@ -61,7 +61,7 @@ interface RectangleProps {
61
61
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
62
62
  }
63
63
 
64
- export const Rectangle: FunctionComponent<RectangleProps> = ({
64
+ export const Rectangle: PReact.FunctionComponent<RectangleProps> = ({
65
65
  width = 30,
66
66
  height = 30,
67
67
  cornerRadius = 0,
@@ -95,7 +95,7 @@ interface ShapeProps {
95
95
  cornerRadius?: number;
96
96
  }
97
97
 
98
- export const Shape: FunctionComponent<ShapeProps> = ({
98
+ export const Shape: PReact.FunctionComponent<ShapeProps> = ({
99
99
  shape = "circle",
100
100
  height = 128,
101
101
  width,
package/src/span.tsx CHANGED
@@ -1,9 +1,9 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
 
3
3
  export interface SpanProps {
4
4
  text: string;
5
5
  }
6
6
 
7
- export const Span: FunctionComponent<SpanProps> = ({
7
+ export const Span: PReact.FunctionComponent<SpanProps> = ({
8
8
  text
9
9
  }) => <span>{text}</span>;
package/src/subgraph.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { Utility } from "@hpcc-js/common";
3
3
  import { Rectangle } from "./shape.tsx";
4
4
  import { Text } from "./text.tsx";
@@ -15,7 +15,7 @@ export interface SubgraphProps {
15
15
  fontFamily?: string;
16
16
  }
17
17
 
18
- export const Subgraph: FunctionComponent<SubgraphProps> = ({
18
+ export const Subgraph: PReact.FunctionComponent<SubgraphProps> = ({
19
19
  text,
20
20
  width = 100,
21
21
  height = 100,
package/src/text.tsx CHANGED
@@ -1,5 +1,4 @@
1
- import { FunctionComponent } from "preact";
2
- import { useCallback, useEffect, useLayoutEffect, useMemo, useState } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Utility } from "@hpcc-js/common";
4
3
  import { Icon } from "./icon.tsx";
5
4
  import { Rectangle } from "./shape.tsx";
@@ -13,7 +12,7 @@ export interface TextLineProps {
13
12
  fill?: string;
14
13
  }
15
14
 
16
- export const TextLine: FunctionComponent<TextLineProps> = ({
15
+ export const TextLine: PReact.FunctionComponent<TextLineProps> = ({
17
16
  text,
18
17
  height = 12,
19
18
  anchor = "middle",
@@ -38,33 +37,33 @@ export interface TextProps {
38
37
  onSizeUpdate?: (size: { width: number, height: number }) => void;
39
38
  }
40
39
 
41
- export const Text: FunctionComponent<TextProps> = ({
40
+ export const Text: PReact.FunctionComponent<TextProps> = ({
42
41
  text,
43
42
  height = 12,
44
43
  fontFamily = "Verdana",
45
44
  fill = "black",
46
45
  onSizeUpdate
47
46
  }) => {
48
- const [totalWidth, setTotalWidth] = useState(0);
49
- const [totalHeight, setTotalHeight] = useState(0);
47
+ const [totalWidth, setTotalWidth] = PReact.useState(0);
48
+ const [totalHeight, setTotalHeight] = PReact.useState(0);
50
49
 
51
- useEffect(() => {
50
+ PReact.useEffect(() => {
52
51
  if (onSizeUpdate) {
53
52
  onSizeUpdate({ width: totalWidth, height: totalHeight });
54
53
  }
55
54
  }, [totalWidth, totalHeight, onSizeUpdate]);
56
55
 
57
- const parts = useMemo(() => {
56
+ const parts = PReact.useMemo(() => {
58
57
  return text.split("\n");
59
58
  }, [text]);
60
59
 
61
- useLayoutEffect(() => {
60
+ PReact.useLayoutEffect(() => {
62
61
  const size = Utility.textSize(parts, fontFamily, height);
63
62
  setTotalWidth(size.width);
64
63
  setTotalHeight(size.height);
65
64
  }, [fontFamily, height, parts]);
66
65
 
67
- const TextLines = useMemo(() => {
66
+ const TextLines = PReact.useMemo(() => {
68
67
  const yOffset = -(totalHeight / 2) + (height / 2);
69
68
  return parts.map((p, i) => {
70
69
  return <g key={`key-${i}`} transform={`translate(0 ${yOffset + i * (height + 2)})`}>
@@ -95,7 +94,7 @@ export interface TextBoxProps {
95
94
  onSizeUpdate?: (size: { width: number, height: number }) => void;
96
95
  }
97
96
 
98
- export const TextBox: FunctionComponent<TextBoxProps> = ({
97
+ export const TextBox: PReact.FunctionComponent<TextBoxProps> = ({
99
98
  text,
100
99
  height = 12,
101
100
  fontFamily = "Verdana",
@@ -107,16 +106,16 @@ export const TextBox: FunctionComponent<TextBoxProps> = ({
107
106
  cornerRadius = 0,
108
107
  onSizeUpdate
109
108
  }) => {
110
- const [textWidth, setTextWidthUpdate] = useState(0);
111
- const [textHeight, setTextHeightUpdate] = useState(0);
109
+ const [textWidth, setTextWidthUpdate] = PReact.useState(0);
110
+ const [textHeight, setTextHeightUpdate] = PReact.useState(0);
112
111
 
113
- useEffect(() => {
112
+ PReact.useEffect(() => {
114
113
  if (onSizeUpdate) {
115
114
  onSizeUpdate({ width: textWidth, height: textHeight });
116
115
  }
117
116
  }, [textWidth, textHeight, onSizeUpdate]);
118
117
 
119
- const onTextSizeUpdate = useCallback(size => {
118
+ const onTextSizeUpdate = PReact.useCallback(size => {
120
119
  setTextWidthUpdate(size.width);
121
120
  setTextHeightUpdate(size.height);
122
121
  }, []);
@@ -151,7 +150,7 @@ export interface LabelledRect extends TextBoxProps {
151
150
  fontSize?: number;
152
151
  }
153
152
 
154
- export const LabelledRect: FunctionComponent<LabelledRect> = ({
153
+ export const LabelledRect: PReact.FunctionComponent<LabelledRect> = ({
155
154
  text,
156
155
  height = 12,
157
156
  width = 12,
@@ -166,16 +165,16 @@ export const LabelledRect: FunctionComponent<LabelledRect> = ({
166
165
  onSizeUpdate
167
166
  }) => {
168
167
 
169
- const [actualWidth, setActualWidthUpdate] = useState(width);
170
- const [actualHeight, setActualHeightUpdate] = useState(height);
168
+ const [actualWidth, setActualWidthUpdate] = PReact.useState(width);
169
+ const [actualHeight, setActualHeightUpdate] = PReact.useState(height);
171
170
 
172
- useLayoutEffect(() => {
171
+ PReact.useLayoutEffect(() => {
173
172
  const size = Utility.textSize(text, fontFamily, fontSize);
174
173
  setActualWidthUpdate(size.width + padding * 2);
175
174
  setActualHeightUpdate(size.height + padding * 2);
176
175
  }, [text, fontFamily, fontSize, padding]);
177
176
 
178
- useLayoutEffect(() => {
177
+ PReact.useLayoutEffect(() => {
179
178
  if (onSizeUpdate) {
180
179
  onSizeUpdate({ width: actualWidth, height: actualHeight });
181
180
  }
@@ -209,7 +208,7 @@ export interface IconLabelledRect extends LabelledRect {
209
208
  iconFontSize?: number;
210
209
  }
211
210
 
212
- export const IconLabelledRect: FunctionComponent<IconLabelledRect> = ({
211
+ export const IconLabelledRect: PReact.FunctionComponent<IconLabelledRect> = ({
213
212
  icon,
214
213
  iconFontFamily,
215
214
  text,
package/src/vertex.tsx CHANGED
@@ -1,5 +1,4 @@
1
- import { FunctionComponent } from "preact";
2
- import { useCallback, useEffect, useState } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Icon, IconProps } from "./icon.tsx";
4
3
  import { TextBox } from "./text.tsx";
5
4
 
@@ -10,7 +9,7 @@ export interface AnnotationsProps {
10
9
  stepSize?: number;
11
10
  }
12
11
 
13
- export const Annotations: FunctionComponent<AnnotationsProps> = ({
12
+ export const Annotations: PReact.FunctionComponent<AnnotationsProps> = ({
14
13
  x,
15
14
  y,
16
15
  annotationIDs = [],
@@ -48,7 +47,7 @@ export interface VertexProps {
48
47
  scale?: number
49
48
  }
50
49
 
51
- export const Vertex: FunctionComponent<VertexProps> = ({
50
+ export const Vertex: React.FunctionComponent<VertexProps> = ({
52
51
  categoryID = "",
53
52
  text = "",
54
53
  textHeight = 12,
@@ -71,10 +70,10 @@ export const Vertex: FunctionComponent<VertexProps> = ({
71
70
  ...icon
72
71
  };
73
72
 
74
- const [textBoxWidth, setTextBoxWidthUpdate] = useState(0);
75
- const [textBoxHeight, setTextBoxHeightUpdate] = useState(0);
73
+ const [textBoxWidth, setTextBoxWidthUpdate] = PReact.useState(0);
74
+ const [textBoxHeight, setTextBoxHeightUpdate] = PReact.useState(0);
76
75
 
77
- useEffect(() => {
76
+ PReact.useEffect(() => {
78
77
  if (onSizeUpdate) {
79
78
  onSizeUpdate({ width: 0, height: 0 });
80
79
  }
@@ -90,7 +89,7 @@ export const Vertex: FunctionComponent<VertexProps> = ({
90
89
  annotationOffsetY -= textBoxHeight + textPadding;
91
90
  }
92
91
 
93
- const onTextBoxSizeUpdate = useCallback(size => {
92
+ const onTextBoxSizeUpdate = PReact.useCallback(size => {
94
93
  setTextBoxWidthUpdate(size.width);
95
94
  setTextBoxHeightUpdate(size.height);
96
95
  }, []);
package/src/vertex2.tsx CHANGED
@@ -1,11 +1,10 @@
1
- import { FunctionComponent } from "preact";
2
- import { useMemo } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Utility } from "@hpcc-js/common";
4
3
  import { Icon, IconProps } from "./icon.tsx";
5
4
  import { TextBox } from "./text.tsx";
6
5
  import { Annotations, VertexProps } from "./vertex.tsx";
7
6
 
8
- export const Vertex2: FunctionComponent<VertexProps> = ({
7
+ export const Vertex2: PReact.FunctionComponent<VertexProps> = ({
9
8
  categoryID = "",
10
9
  text = "",
11
10
  textHeight = 12,
@@ -27,7 +26,7 @@ export const Vertex2: FunctionComponent<VertexProps> = ({
27
26
  ...icon
28
27
  };
29
28
  const textBoxHeight = textHeight + textPadding * 2;
30
- const { width } = useMemo(() => {
29
+ const { width } = PReact.useMemo(() => {
31
30
  return Utility.textSize(text, textFontFamily, textHeight, false);
32
31
  }, [text, textFontFamily, textHeight]);
33
32
 
package/src/vertex3.tsx CHANGED
@@ -1,5 +1,4 @@
1
- import { FunctionComponent } from "preact";
2
- import { useMemo } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Utility } from "@hpcc-js/common";
4
3
  import { Icon, IconProps } from "./icon.tsx";
5
4
  import { TextBox, TextBoxProps } from "./text.tsx";
@@ -30,7 +29,7 @@ export interface Vertex3Props extends VertexProps {
30
29
  scale?: number;
31
30
  }
32
31
 
33
- export const Vertex3: FunctionComponent<Vertex3Props> = ({
32
+ export const Vertex3: PReact.FunctionComponent<Vertex3Props> = ({
34
33
  text = "",
35
34
  textHeight = 10,
36
35
  textPadding = 4,
@@ -80,7 +79,7 @@ export const Vertex3: FunctionComponent<Vertex3Props> = ({
80
79
 
81
80
  const annoOffsetY = 0;
82
81
 
83
- const labelWidth = useMemo(() => {
82
+ const labelWidth = PReact.useMemo(() => {
84
83
  return Utility.textSize(text, textFontFamily, textHeight, false).width;
85
84
  }, [text, textFontFamily, textHeight]);
86
85
 
@@ -175,7 +174,7 @@ export const Vertex3: FunctionComponent<Vertex3Props> = ({
175
174
  </g >;
176
175
  };
177
176
 
178
- export const CentroidVertex3: FunctionComponent<Vertex3Props> = function ({
177
+ export const CentroidVertex3: PReact.FunctionComponent<Vertex3Props> = function ({
179
178
  id,
180
179
  categoryID = "",
181
180
  text = "",
package/src/vertex4.tsx CHANGED
@@ -1,5 +1,4 @@
1
- import { FunctionComponent } from "preact";
2
- import { useMemo } from "preact/hooks";
1
+ import * as PReact from "./preact-shim.ts";
3
2
  import { Utility } from "@hpcc-js/common";
4
3
  import { Icon, IconProps } from "./icon.tsx";
5
4
  import { TextBox, TextBoxProps } from "./text.tsx";
@@ -33,7 +32,7 @@ export interface IVertex4 extends VertexProps {
33
32
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
34
33
  }
35
34
 
36
- export const Vertex4: FunctionComponent<IVertex4> = ({
35
+ export const Vertex4: PReact.FunctionComponent<IVertex4> = ({
37
36
  categoryID = "",
38
37
  text = "",
39
38
  textHeight = 10,
@@ -87,7 +86,7 @@ export const Vertex4: FunctionComponent<IVertex4> = ({
87
86
  };
88
87
 
89
88
  const annoOffsetY = 0;
90
- const labelWidth = useMemo(() => {
89
+ const labelWidth = PReact.useMemo(() => {
91
90
  return Utility.textSize(text, textFontFamily, textHeight, false).width;
92
91
  }, [text, textFontFamily, textHeight]);
93
92
 
@@ -212,7 +211,7 @@ export const Vertex4: FunctionComponent<IVertex4> = ({
212
211
  ;
213
212
  };
214
213
 
215
- export const CentroidVertex4: FunctionComponent<IVertex4> = function ({
214
+ export const CentroidVertex4: PReact.FunctionComponent<IVertex4> = function ({
216
215
  id,
217
216
  categoryID = "",
218
217
  text = "",
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  export interface ImageCharProps {
3
3
  x?: number;
4
4
  y?: number;
@@ -10,4 +10,4 @@ export interface ImageCharProps {
10
10
  yOffset?: number;
11
11
  fontWeight?: number;
12
12
  }
13
- export declare const ImageChar: FunctionComponent<ImageCharProps>;
13
+ export declare const ImageChar: PReact.FunctionComponent<ImageCharProps>;
package/types/edge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { VertexProps } from "./vertex.tsx";
3
3
  type Point = [number, number];
4
4
  export interface EdgeProps<V extends VertexProps = VertexProps> {
@@ -19,5 +19,5 @@ export interface EdgeProps<V extends VertexProps = VertexProps> {
19
19
  points?: Array<[number, number]>;
20
20
  curveDepth?: number;
21
21
  }
22
- export declare const Edge: FunctionComponent<EdgeProps>;
22
+ export declare const Edge: PReact.FunctionComponent<EdgeProps>;
23
23
  export {};
package/types/icon.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  export interface IconProps {
3
3
  shape?: "circle" | "square" | "rectangle";
4
4
  width?: number;
@@ -16,11 +16,11 @@ export interface IconProps {
16
16
  cornerRadius?: number;
17
17
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
18
18
  }
19
- export declare const Icon: FunctionComponent<IconProps>;
19
+ export declare const Icon: PReact.FunctionComponent<IconProps>;
20
20
  export interface IconEx extends IconProps {
21
21
  id: string;
22
22
  }
23
23
  export interface IconsProps {
24
24
  icons: IconEx[];
25
25
  }
26
- export declare const Icons: FunctionComponent<IconsProps>;
26
+ export declare const Icons: PReact.FunctionComponent<IconsProps>;
package/types/image.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  interface ImageProps {
3
3
  href: string;
4
4
  x?: number;
@@ -6,5 +6,5 @@ interface ImageProps {
6
6
  height?: number;
7
7
  yOffset?: number;
8
8
  }
9
- export declare const Image: FunctionComponent<ImageProps>;
9
+ export declare const Image: PReact.FunctionComponent<ImageProps>;
10
10
  export {};
package/types/shape.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  interface CircleProps {
3
3
  radius?: number;
4
4
  fill?: string;
@@ -6,7 +6,7 @@ interface CircleProps {
6
6
  strokeWidth?: number;
7
7
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
8
8
  }
9
- export declare const Circle: FunctionComponent<CircleProps>;
9
+ export declare const Circle: PReact.FunctionComponent<CircleProps>;
10
10
  interface SquareProps {
11
11
  radius?: number;
12
12
  cornerRadius?: number;
@@ -15,7 +15,7 @@ interface SquareProps {
15
15
  strokeWidth?: number;
16
16
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
17
17
  }
18
- export declare const Square: FunctionComponent<SquareProps>;
18
+ export declare const Square: PReact.FunctionComponent<SquareProps>;
19
19
  interface RectangleProps {
20
20
  width?: number;
21
21
  height?: number;
@@ -25,7 +25,7 @@ interface RectangleProps {
25
25
  strokeWidth?: number;
26
26
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
27
27
  }
28
- export declare const Rectangle: FunctionComponent<RectangleProps>;
28
+ export declare const Rectangle: PReact.FunctionComponent<RectangleProps>;
29
29
  interface ShapeProps {
30
30
  shape?: "circle" | "square" | "rectangle";
31
31
  height?: number;
@@ -36,5 +36,5 @@ interface ShapeProps {
36
36
  shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision";
37
37
  cornerRadius?: number;
38
38
  }
39
- export declare const Shape: FunctionComponent<ShapeProps>;
39
+ export declare const Shape: PReact.FunctionComponent<ShapeProps>;
40
40
  export {};
package/types/span.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  export interface SpanProps {
3
3
  text: string;
4
4
  }
5
- export declare const Span: FunctionComponent<SpanProps>;
5
+ export declare const Span: PReact.FunctionComponent<SpanProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  export interface SubgraphProps {
3
3
  id: string;
4
4
  origData?: any;
@@ -10,4 +10,4 @@ export interface SubgraphProps {
10
10
  fontHeight?: number;
11
11
  fontFamily?: string;
12
12
  }
13
- export declare const Subgraph: FunctionComponent<SubgraphProps>;
13
+ export declare const Subgraph: PReact.FunctionComponent<SubgraphProps>;
package/types/text.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  export interface TextLineProps {
3
3
  text: string;
4
4
  height?: number;
@@ -7,7 +7,7 @@ export interface TextLineProps {
7
7
  fontFamily?: string;
8
8
  fill?: string;
9
9
  }
10
- export declare const TextLine: FunctionComponent<TextLineProps>;
10
+ export declare const TextLine: PReact.FunctionComponent<TextLineProps>;
11
11
  export interface TextProps {
12
12
  text: string;
13
13
  height?: number;
@@ -18,7 +18,7 @@ export interface TextProps {
18
18
  height: number;
19
19
  }) => void;
20
20
  }
21
- export declare const Text: FunctionComponent<TextProps>;
21
+ export declare const Text: PReact.FunctionComponent<TextProps>;
22
22
  export interface TextBoxProps {
23
23
  text: string;
24
24
  height?: number;
@@ -35,15 +35,15 @@ export interface TextBoxProps {
35
35
  height: number;
36
36
  }) => void;
37
37
  }
38
- export declare const TextBox: FunctionComponent<TextBoxProps>;
38
+ export declare const TextBox: PReact.FunctionComponent<TextBoxProps>;
39
39
  export interface LabelledRect extends TextBoxProps {
40
40
  width?: number;
41
41
  fontSize?: number;
42
42
  }
43
- export declare const LabelledRect: FunctionComponent<LabelledRect>;
43
+ export declare const LabelledRect: PReact.FunctionComponent<LabelledRect>;
44
44
  export interface IconLabelledRect extends LabelledRect {
45
45
  icon: string;
46
46
  iconFontFamily?: string;
47
47
  iconFontSize?: number;
48
48
  }
49
- export declare const IconLabelledRect: FunctionComponent<IconLabelledRect>;
49
+ export declare const IconLabelledRect: PReact.FunctionComponent<IconLabelledRect>;
package/types/vertex.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { IconProps } from "./icon.tsx";
3
3
  export interface AnnotationsProps {
4
4
  x: number;
@@ -6,7 +6,7 @@ export interface AnnotationsProps {
6
6
  annotationIDs: string[];
7
7
  stepSize?: number;
8
8
  }
9
- export declare const Annotations: FunctionComponent<AnnotationsProps>;
9
+ export declare const Annotations: PReact.FunctionComponent<AnnotationsProps>;
10
10
  export interface VertexProps {
11
11
  id: string | number;
12
12
  origData?: any;
@@ -29,4 +29,4 @@ export interface VertexProps {
29
29
  showLabel?: boolean;
30
30
  scale?: number;
31
31
  }
32
- export declare const Vertex: FunctionComponent<VertexProps>;
32
+ export declare const Vertex: React.FunctionComponent<VertexProps>;
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { VertexProps } from "./vertex.tsx";
3
- export declare const Vertex2: FunctionComponent<VertexProps>;
3
+ export declare const Vertex2: PReact.FunctionComponent<VertexProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "preact";
1
+ import * as PReact from "./preact-shim.ts";
2
2
  import { IconProps } from "./icon.tsx";
3
3
  import { TextBoxProps } from "./text.tsx";
4
4
  import { VertexProps } from "./vertex.tsx";
@@ -29,5 +29,5 @@ export interface Vertex3Props extends VertexProps {
29
29
  expansionIcon?: IconProps;
30
30
  scale?: number;
31
31
  }
32
- export declare const Vertex3: FunctionComponent<Vertex3Props>;
33
- export declare const CentroidVertex3: FunctionComponent<Vertex3Props>;
32
+ export declare const Vertex3: PReact.FunctionComponent<Vertex3Props>;
33
+ export declare const CentroidVertex3: PReact.FunctionComponent<Vertex3Props>;