@ts-graphviz/react 0.10.6 → 0.11.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/CHANGELOG.md +487 -0
- package/README.md +630 -67
- package/example/example.tsx +1 -1
- package/lib/react.d.ts +198 -96
- package/lib/react.js +558 -215
- package/package.json +15 -20
- package/tsconfig.test.json +11 -0
- package/lib/react.cjs +0 -457
- package/src/components/Digraph.spec.tsx +0 -18
- package/src/components/Digraph.tsx +0 -41
- package/src/components/Edge.tsx +0 -17
- package/src/components/Graph.spec.tsx +0 -18
- package/src/components/Graph.tsx +0 -36
- package/src/components/GraphPortal.tsx +0 -22
- package/src/components/Node.spec.tsx +0 -101
- package/src/components/Node.tsx +0 -21
- package/src/components/Subgraph.tsx +0 -30
- package/src/contexts/CurrentGraph.ts +0 -5
- package/src/contexts/GraphContainer.ts +0 -5
- package/src/contexts/GraphMap.ts +0 -5
- package/src/contexts/GraphvizContext.ts +0 -11
- package/src/hooks/__tests__/wrapper.tsx +0 -58
- package/src/hooks/useCurrentGraph.spec.ts +0 -56
- package/src/hooks/useCurrentGraph.ts +0 -18
- package/src/hooks/useDigraph.spec.ts +0 -15
- package/src/hooks/useDigraph.ts +0 -33
- package/src/hooks/useEdge.spec.ts +0 -46
- package/src/hooks/useEdge.ts +0 -35
- package/src/hooks/useGraph.spec.ts +0 -15
- package/src/hooks/useGraph.ts +0 -33
- package/src/hooks/useGraphAttributes.ts +0 -32
- package/src/hooks/useGraphContainer.spec.ts +0 -45
- package/src/hooks/useGraphContainer.ts +0 -10
- package/src/hooks/useGraphMap.ts +0 -7
- package/src/hooks/useGraphvizContext.spec.ts +0 -26
- package/src/hooks/useGraphvizContext.ts +0 -16
- package/src/hooks/useHasAttributes.ts +0 -16
- package/src/hooks/useHasComment.ts +0 -8
- package/src/hooks/useNode.spec.ts +0 -16
- package/src/hooks/useNode.ts +0 -29
- package/src/hooks/useRenderedID.spec.tsx +0 -28
- package/src/hooks/useRenderedID.ts +0 -6
- package/src/hooks/useSubgraph.spec.ts +0 -41
- package/src/hooks/useSubgraph.ts +0 -39
- package/src/react.ts +0 -16
- package/src/reconciler.ts +0 -272
- package/src/render.test.tsx +0 -71
- package/src/render.ts +0 -142
- package/src/renderHTMLLike.ts +0 -9
- package/src/renderId.ts +0 -9
- package/src/types.ts +0 -107
- package/tsconfig.json +0 -8
- package/typedoc.json +0 -5
- package/vite.config.ts +0 -31
package/src/types.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
EdgeAttributesObject,
|
|
3
|
-
EdgeTargetLikeTuple,
|
|
4
|
-
GraphAttributesObject,
|
|
5
|
-
HTMLLikeLabel,
|
|
6
|
-
HasComment,
|
|
7
|
-
NodeAttributesObject,
|
|
8
|
-
SubgraphAttributesObject,
|
|
9
|
-
} from '@ts-graphviz/common';
|
|
10
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
11
|
-
|
|
12
|
-
/** Common attribute values of objects under cluster */
|
|
13
|
-
export interface GraphBaseAttributesProps {
|
|
14
|
-
/** Attribute value for Edges */
|
|
15
|
-
edge?: EdgeAttributesObject;
|
|
16
|
-
/** Attribute value for Nodes */
|
|
17
|
-
node?: NodeAttributesObject;
|
|
18
|
-
/** Attribute value for Graphs */
|
|
19
|
-
graph?: SubgraphAttributesObject;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Options for RootGraph */
|
|
23
|
-
export interface RootGraphOptions
|
|
24
|
-
extends GraphAttributesObject,
|
|
25
|
-
GraphBaseAttributesProps {
|
|
26
|
-
/** Cluster id */
|
|
27
|
-
id?: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** Options for Subgraph */
|
|
31
|
-
export interface SubgraphOptions
|
|
32
|
-
extends SubgraphAttributesObject,
|
|
33
|
-
GraphBaseAttributesProps,
|
|
34
|
-
HasComment {
|
|
35
|
-
/** Cluster id */
|
|
36
|
-
id?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Options for Edge */
|
|
40
|
-
export interface EdgeOptions extends EdgeAttributesObject {}
|
|
41
|
-
|
|
42
|
-
/** Options for Node */
|
|
43
|
-
export interface NodeOptions extends NodeAttributesObject {}
|
|
44
|
-
|
|
45
|
-
/** Props for RootGraph component */
|
|
46
|
-
export interface RootGraphProps extends Omit<RootGraphOptions, 'label'> {
|
|
47
|
-
label?: ReactElement | string;
|
|
48
|
-
children?: ReactNode;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Props for Edge component */
|
|
52
|
-
export interface EdgeProps extends Omit<EdgeOptions, 'label'> {
|
|
53
|
-
/** Edge targets */
|
|
54
|
-
targets: EdgeTargetLikeTuple;
|
|
55
|
-
/** Edge label */
|
|
56
|
-
label?: ReactElement | string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** Props for Node component */
|
|
60
|
-
export interface NodeProps extends Omit<NodeOptions, 'label' | 'xlabel'> {
|
|
61
|
-
/** Node id */
|
|
62
|
-
id: string;
|
|
63
|
-
/** Node label */
|
|
64
|
-
label?: ReactElement | string;
|
|
65
|
-
/** Node xlabel */
|
|
66
|
-
xlabel?: ReactElement | string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** Props for Subgraph component */
|
|
70
|
-
export interface SubgraphProps extends Omit<SubgraphOptions, 'label'> {
|
|
71
|
-
/** Subgraph label */
|
|
72
|
-
label?: ReactElement | string;
|
|
73
|
-
children?: ReactNode;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** Props for GraphPortal component */
|
|
77
|
-
export interface GraphPortalProps {
|
|
78
|
-
/**
|
|
79
|
-
* id of the cluster you want to target for the portal.
|
|
80
|
-
* If not specified, target the cluster that is the container to the portal.
|
|
81
|
-
*/
|
|
82
|
-
id?: string;
|
|
83
|
-
children?: ReactNode;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare global {
|
|
87
|
-
namespace JSX {
|
|
88
|
-
interface IntrinsicElements {
|
|
89
|
-
'dot:port': { children: string };
|
|
90
|
-
'dot:table': HTMLLikeLabel.TableAttributes & { children?: ReactNode };
|
|
91
|
-
'dot:tr': HTMLLikeLabel.TrAttributes & { children?: ReactNode };
|
|
92
|
-
'dot:td': HTMLLikeLabel.TdAttributes & { children?: ReactNode };
|
|
93
|
-
'dot:font': HTMLLikeLabel.FontAttributes & { children?: ReactNode };
|
|
94
|
-
'dot:br': HTMLLikeLabel.BrAttributes;
|
|
95
|
-
'dot:img': HTMLLikeLabel.ImgAttributes;
|
|
96
|
-
'dot:i': HTMLLikeLabel.IAttributes & { children?: ReactNode };
|
|
97
|
-
'dot:b': HTMLLikeLabel.BAttributes & { children?: ReactNode };
|
|
98
|
-
'dot:u': HTMLLikeLabel.UAttributes & { children?: ReactNode };
|
|
99
|
-
'dot:o': HTMLLikeLabel.OAttributes & { children?: ReactNode };
|
|
100
|
-
'dot:sub': HTMLLikeLabel.SubAttributes & { children?: ReactNode };
|
|
101
|
-
'dot:sup': HTMLLikeLabel.SupAttributes & { children?: ReactNode };
|
|
102
|
-
'dot:s': HTMLLikeLabel.SAttributes & { children?: ReactNode };
|
|
103
|
-
'dot:hr': HTMLLikeLabel.HrAttributes;
|
|
104
|
-
'dot:vr': HTMLLikeLabel.VrAttributes;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
package/tsconfig.json
DELETED
package/typedoc.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import dts from 'vite-plugin-dts';
|
|
2
|
-
import { defineConfig } from 'vitest/config';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
build: {
|
|
6
|
-
target: 'ES2022',
|
|
7
|
-
outDir: './lib',
|
|
8
|
-
minify: false,
|
|
9
|
-
lib: {
|
|
10
|
-
entry: {
|
|
11
|
-
react: './src/react.ts',
|
|
12
|
-
},
|
|
13
|
-
formats: ['es', 'cjs'],
|
|
14
|
-
},
|
|
15
|
-
rollupOptions: {
|
|
16
|
-
external: [
|
|
17
|
-
'react',
|
|
18
|
-
'react/jsx-runtime',
|
|
19
|
-
'react-dom',
|
|
20
|
-
'react-dom/server',
|
|
21
|
-
'react-reconciler',
|
|
22
|
-
'ts-graphviz',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
plugins: [
|
|
27
|
-
dts({
|
|
28
|
-
rollupTypes: true,
|
|
29
|
-
}),
|
|
30
|
-
],
|
|
31
|
-
});
|