{"id":50373126,"url":"https://github.com/rtugeek/mindmap","last_synced_at":"2026-05-30T08:04:09.316Z","repository":{"id":342727702,"uuid":"1157878412","full_name":"rtugeek/mindmap","owner":"rtugeek","description":"A React MindMap component using AntV X6","archived":false,"fork":false,"pushed_at":"2026-03-07T02:26:30.000Z","size":835,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-07T09:49:08.737Z","etag":null,"topics":["mind-map","mindmap","react"],"latest_commit_sha":null,"homepage":"https://widgetjs.cn","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtugeek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T12:52:28.000Z","updated_at":"2026-03-07T02:26:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rtugeek/mindmap","commit_stats":null,"previous_names":["rtugeek/mindmap"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rtugeek/mindmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Fmindmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Fmindmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Fmindmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Fmindmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtugeek","download_url":"https://codeload.github.com/rtugeek/mindmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Fmindmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33684419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mind-map","mindmap","react"],"created_at":"2026-05-30T08:04:08.432Z","updated_at":"2026-05-30T08:04:09.308Z","avatar_url":"https://github.com/rtugeek.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @widget-js/mindmap\n\nA React MindMap component using AntV X6.\n\n![MindMap Screenshot](./screenshot.png)\n\n## Installation\n\n```bash\nnpm install @widget-js/mindmap\n# or\npnpm add @widget-js/mindmap\n# or\nyarn add @widget-js/mindmap\n```\n\n## Usage\n\n```tsx\nimport type { MindNode } from '@widget-js/mindmap'\nimport { MindMap } from '@widget-js/mindmap'\nimport { useState } from 'react'\nimport '@widget-js/mindmap/style.css'\n\nconst data: MindNode = {\n  id: 'root',\n  name: 'Root Node',\n  children: [\n    {\n      id: 'child1',\n      name: 'Child 1',\n    },\n    {\n      id: 'child2',\n      name: 'Child 2',\n    },\n  ],\n}\n\nfunction App() {\n  const [isDarkMode, setIsDarkMode] = useState(false)\n\n  return (\n    \u003cdiv style={{ height: '100vh', width: '100%' }}\u003e\n      \u003cMindMap\n        data={data}\n        title=\"My MindMap\"\n        isDarkMode={isDarkMode}\n        onNodeChange={(newData, type) =\u003e {\n          console.log('Node changed:', type, newData)\n        }}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| `data` | `MindNode` | Required | The data structure for the mind map. |\n| `title` | `string` | `'思维导图'` | The title displayed in the top left corner. |\n| `isDarkMode` | `boolean` | `false` | Controls the theme of the mind map. |\n| `readonly` | `boolean` | `false` | If true, editing is disabled. |\n| `onNodeChange` | `(data: MindNode, type: string) =\u003e void` | - | Callback triggered when nodes are changed. |\n\n## Data Structure (MindNode)\n\n```typescript\ninterface MindNode {\n  id: string\n  name: string\n  type?: string\n  checked?: boolean\n  url?: string\n  collapsed?: boolean\n  children?: MindNode[]\n}\n```\n\n## Keyboard Shortcuts\n\nWhen a node is selected:\n\n- `Tab`: Create a child node.\n- `Enter`: Create a sibling node.\n- `Delete`: Delete the selected node.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtugeek%2Fmindmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtugeek%2Fmindmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtugeek%2Fmindmap/lists"}