
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
react-knowledge-graph
Advanced tools
a react component that can help you create a dynamic knowledge-graph built with Next.js.
English | 简体中文
a react component that can help you create a dynamic knowledge-graph built with Next.js
.
react
or use dom
type NodeProps = {
id: string;
name: string; // 节点名称
type: string; // 节点类型
hasMore: boolean; // 是否有子节点
direction: "root" | "inside" | "outside";
};
type EdgeProps = {
id: string; // 边id
fromId: string;
toId: string;
description: string;
};
Need to accept an asynchronous function, this library will return the parameter
id - Node Id
,node - current node
Need to returninside
in edge node,outside
out edge node,edge
array of edges
type explore = (id: React.Key) => Promise<{
inside: Node.NodeProps[];
outside: Node.NodeProps[];
edge: Edge.EdgeProps[];
}>;
npm install react-knowledge-graph
# or
yarn add react-knowledge-graph
import style files in the top file:
import "react-knowledge-graph/KnowledgeGraph/index.css";
Next:
<KnowledgeGraph
explore={explore}
basicDistence={width}
position={{ x: 100, y: 100 }}
node={{
id: "node-0",
type: "根节点",
hasMore: true,
direction: "root",
name: "根节点",
}}
onExploreEnd={() => {
message.info("已经到尾节点了!");
}}
edgeConfig={{
hoveredColor: "#e27272",
stroke: "#DEDEDE",
strokeWidth: 1,
}}
typeConfig={{
根节点: {
radius: 20,
fill: "#747ba6",
hoverStyle: {
fill: "#3949a3",
},
},
model: {
radius: 15,
fill: "#b4e5a2",
typeSize: 8,
nameSize: 8,
hoverStyle: {
fill: "#6be73e",
},
},
data: {
radius: 15,
fill: "#ea52ea",
typeSize: 8,
nameSize: 8,
hoverStyle: {
fill: "#e5a2e5",
},
},
test: {
radius: 13,
fill: "#89c4fb",
typeSize: 8,
nameSize: 8,
hoverStyle: {
fill: "#2f8fe8",
},
},
}}
/>
FAQs
a react component that can help you create a dynamic knowledge-graph built with Next.js.
The npm package react-knowledge-graph receives a total of 2 weekly downloads. As such, react-knowledge-graph popularity was classified as not popular.
We found that react-knowledge-graph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.