├── .arcconfig ├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .npmignore ├── .nvmrc ├── .storybook ├── config.js └── webpack.config.js ├── .travis.yml ├── LICENCE ├── README.md ├── __mocks__ ├── .eslintrc ├── d3-force.js └── global.js ├── bin └── deploy-docs.sh ├── config ├── env.js ├── jest │ ├── CSSStub.js │ └── FileStub.js ├── paths.js ├── polyfills.js └── webpack.config.prod.js ├── docs ├── ForceGraph.md ├── InteractiveForceGraph.md └── react-vis-force.gif ├── package-lock.json ├── package.json ├── scripts ├── build.js └── test.js ├── src ├── .eslintrc ├── components │ ├── ForceGraph.css │ ├── ForceGraph.js │ ├── ForceGraphArrowLink.js │ ├── ForceGraphLink.js │ ├── ForceGraphNode.js │ ├── InteractiveForceGraph.js │ ├── ZoomableSVGGroup.js │ └── __tests__ │ │ ├── .eslintrc │ │ ├── ForceGraph.test.js │ │ ├── ForceGraphLink.test.js │ │ ├── ForceGraphNode.test.js │ │ ├── InteractiveForceGraph.test.js │ │ └── ZoomableSVGGroup.test.js ├── index.js ├── propTypes │ ├── link.js │ ├── node.js │ └── simulation.js └── utils │ ├── __mocks__ │ ├── .eslintrc │ └── raf.js │ ├── __tests__ │ ├── .eslintrc │ ├── d3-force.test.js │ ├── raf.test.js │ └── sets-equal.test.js │ ├── d3-force.js │ ├── raf.js │ └── sets-equal.js ├── stories ├── demo-styles.css ├── index.js └── les-miserables.json └── yarn.lock /.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "phabricator.uri": "https://code.uberinternal.com/", 3 | "git.default-relative-commit": "origin/master" 4 | } 5 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-app"] 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # Indentation override for all JS under lib directory 12 | [*.js] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | # Matches the exact files either package.json or .travis.yml 17 | [{package.json,.travis.yml}] 18 | indent_style = space 19 | indent_size = 2 20 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/** 2 | build/** 3 | dist/** 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "react-app" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # testing 7 | coverage 8 | 9 | # production 10 | build 11 | dist 12 | 13 | # misc 14 | .DS_Store 15 | npm-debug.log 16 | 17 | .idea/ 18 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # testing 7 | coverage 8 | 9 | # misc 10 | .DS_Store 11 | npm-debug.log 12 | 13 | # superfluous files 14 | bin/ 15 | config/ 16 | docs/ 17 | public/ 18 | scripts/ 19 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 4.1 2 | -------------------------------------------------------------------------------- /.storybook/config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Uber Technologies, Inc. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | import { configure } from '@kadira/storybook'; 22 | 23 | function loadStories() { 24 | require('../stories'); 25 | } 26 | 27 | configure(loadStories, module); 28 | -------------------------------------------------------------------------------- /.storybook/webpack.config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Uber Technologies, Inc. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | // you can use this file to add your custom webpack plugins, loaders and anything you like. 22 | // This is just the basic way to add addional webpack configurations. 23 | // For more information refer the docs: https://goo.gl/qPbSyX 24 | 25 | // IMPORTANT 26 | // When you add this file, we won't add the default configurations which is similar 27 | // to "React Create App". This only has babel loader to load JavaScript. 28 | var autoprefixer = require('autoprefixer'); 29 | 30 | module.exports = { 31 | plugins: [ 32 | // your custom plugins 33 | ], 34 | module: { 35 | loaders: [ 36 | // "postcss" loader applies autoprefixer to our CSS. 37 | // "css" loader resolves paths in CSS and adds assets as dependencies. 38 | // "style" loader turns CSS into JS modules that inject