{"id":13553465,"url":"https://github.com/heithemmoumni/svelte-mindmap","last_synced_at":"2025-04-30T07:09:27.763Z","repository":{"id":36305520,"uuid":"222165122","full_name":"heithemmoumni/svelte-mindmap","owner":"heithemmoumni","description":"Svelte component for MindMap ","archived":false,"fork":false,"pushed_at":"2024-02-24T02:15:32.000Z","size":122,"stargazers_count":145,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T07:09:21.544Z","etag":null,"topics":["d3","javascript","mindmap","svelte","sveltejs","tree","tunisia"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/heithemmoumni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["heithemmoumni"]}},"created_at":"2019-11-16T22:05:57.000Z","updated_at":"2025-02-03T08:53:04.000Z","dependencies_parsed_at":"2024-08-01T12:22:55.433Z","dependency_job_id":null,"html_url":"https://github.com/heithemmoumni/svelte-mindmap","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":"0.41666666666666663","last_synced_commit":"9987de72374e08326fd7458ea25f85bf3b111c04"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heithemmoumni%2Fsvelte-mindmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heithemmoumni%2Fsvelte-mindmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heithemmoumni%2Fsvelte-mindmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heithemmoumni%2Fsvelte-mindmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heithemmoumni","download_url":"https://codeload.github.com/heithemmoumni/svelte-mindmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658212,"owners_count":21622822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["d3","javascript","mindmap","svelte","sveltejs","tree","tunisia"],"created_at":"2024-08-01T12:02:25.594Z","updated_at":"2025-04-30T07:09:27.717Z","avatar_url":"https://github.com/heithemmoumni.png","language":"JavaScript","funding_links":["https://github.com/sponsors/heithemmoumni","https://www.buymeacoffee.com/Zukzhjx"],"categories":["JavaScript","javascript"],"sub_categories":[],"readme":"# SvelteMindmap\n\n\u003e SvelteMindmap is a svelte component for mindnode maps inspired by [react-mindmap](https://github.com/learn-anything/react-mindmap).\n\n![MIT License](https://badgen.net/badge/license/MIT/blue \"MIT License\")\n[![view on npm](https://img.shields.io/npm/v/svelte-mindmap.svg?colorB=red)](https://www.npmjs.com/package/svelte-mindmap)\n [![Svelte v3](https://img.shields.io/badge/svelte-v3-blueviolet.svg)](https://svelte.dev)\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"svelte-mindmap\" src=\"https://raw.githubusercontent.com/heithemmoumni/svelte-mindmap/master/mindmap.png\" /\u003e\n\u003c/p\u003e\n\n\n## Installation\n\n```bash\nnpm install --save svelte-mindmap\n```\n\n## Usage\n\n### Bundler (Webpack, Rollup)\n\n```js\nimport Mindmap from 'svelte-mindmap';\n\n```\n\n```html\nlet map = {\n  title: null,\n  nodes: [],\n  connections: []\n}\n\n\u003cMindmap \n    map={map}\n/\u003e\n```\n\n## Props\n\n| Prop            | Type    | Default | Description                                            |\n|-----------------|:-------:|---------|--------------------------------------------------------|\n| **nodes**       | Array   | [ ]      | Array of objects used to render nodes.                |\n| **connections** | Array   | [ ]      | Array of objects used to render connections.          |\n| **subnodes**    | Array   | [ ]      | Array of objects used to render subnodes.             |\n| **editable**    | Boolean | false   | Enable editor mode, which allows to move around nodes. |\n\n### nodes\n\nArray of objects used to render nodes. Below an example of the node structure.\n\n```json\n{\n  \"text\": \"python\",\n  \"url\": \"http://www.wikiwand.com/en/Python_(programming_language)\",\n  \"fx\": -13.916222252976013,\n  \"fy\": -659.1641376795345,\n  \"category\": \"wiki\",\n  \"note\": \"\"\n}\n```\n\nThe possible attributes are:\n\n- **text**: title of the node\n- **url**: url contained in the node\n- **fx** and **fy**: coordinates (if not present they'll be generated)\n- **category**: category used to generate an emoji\n- **note**: note that will be visible on hover\n\n### connections\n\nArray of objects used to render connections. Below an example of the connection\nstructure.\n\n```json\n{\n  \"source\": \"python\",\n  \"target\": \"basics\",\n  \"curve\": {\n    \"x\": -43.5535,\n    \"y\": 299.545\n  }\n}\n```\n\nThe possible attributes are:\n\n- **source**: title of the node where the connection starts\n- **target**: title of the node where the connection ends\n- **curve.x** and **curve.y**: coordinates of the control point of a quadratic bezier curve\n(if not specified the connection will be straight)\n\n### subnodes\nArray of objects used to render subnodes. The structure is the same as for nodes\nwith two additional attributes:\n\n- **parent**: title of the parent node\n- **color**: used for the margin color, needs to be a valid CSS color\n\n\n## Styling\nHere's a list of all CSS classes for styling:\n\n- **.mindmap-svg**: main `svg` element containing the map;\n- **.mindmap-node**: `foreignObject` element representing a node;\n- **.mindmap-node--editable**: `foreignObject` element representing a node in editor mode;\n- **.mindmap-subnode-group-text**: `foreignObject` element containing all subnodes of a given node;\n- **.mindmap-subnode-text**: `div` element containing a subnode;\n- **.mindmap-connection**: `path` element for each connection;\n- **.mindmap-emoji**: `img` tag for emoji\n\n\nFeedback would be much appreciated, questions, suggestions, issues are more than welcome.\n\n---\n\nIf you like to support my open-source contributions and feeling generous, feel free to:\n\n\u003ca href=\"https://www.buymeacoffee.com/Zukzhjx\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheithemmoumni%2Fsvelte-mindmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheithemmoumni%2Fsvelte-mindmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheithemmoumni%2Fsvelte-mindmap/lists"}