{"_id":"d3-state-visualizer@3.0.1","bugs":{"url":"https://github.com/reduxjs/redux-devtools/issues"},"dist":{"shasum":"12ad9e4e30ccd8e633ff15f05da8f762e0845676","tarball":"http://registry-npm.ywwl.com/d3-state-visualizer/download/d3-state-visualizer-3.0.1.tgz","fileCount":18,"integrity":"sha512-57lgbQREENmx5xPidd8l5Ab3X7XV3xHScYofJxwE+h0yMgb3+H5y8r8Eymmoi+NXDh+eqMdK8hUjTfmpMppfzw==","signatures":[{"sig":"MEQCIAPyqp+9ahspr28v4VmEl92XHFGCmWS9aUVQZ5EnlBY6AiBTu9vnk4VVVjVGGdMNAk2FJgh4X0XBo/EvKoHkEFS4Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDsDYvyJ4FUeVC9aiTLRVCJvIKeoRq9HhwC4Z5XLTy1ZQIhALSq809DefuZf/t+8OhMzfGq+2iASaX8H+xE63rEJryT"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/d3-state-visualizer@3.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47627,"size":12579,"noattachment":false,"key":"/d3-state-visualizer/-/d3-state-visualizer-3.0.1.tgz"},"name":"d3-state-visualizer","type":"module","author":"romseguy","exports":"./lib/index.js","license":"MIT","scripts":{"build":"tsc","clean":"rimraf lib","type-check":"tsc --noEmit"},"version":"3.0.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5656d534-9db8-4058-968b-6f7d39cae7a7"}},"homepage":"https://github.com/reduxjs/redux-devtools/tree/master/packages/d3-state-visualizer","keywords":["d3","state","store","tree","visualization"],"repository":{"url":"https://github.com/reduxjs/redux-devtools.git","type":"git"},"description":"Visualize your app state with a range of reusable charts","directories":{},"maintainers":[{"name":"timdorr","email":"timdorr@timdorr.com"},{"name":"romseguy","email":"rom.seguy@gmail.com"},{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},{"name":"methuselah96","email":"nbierema@gmail.com"}],"sideEffects":false,"dependencies":{"d3":"^7.9.2","ramda":"^0.32.0","map2tree":"^4.0.1","@types/d3":"^7.4.3","d3tooltip":"^4.0.1","deepmerge":"^4.3.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.4","typescript":"^7.0.2","@types/ramda":"^0.32.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/d3-state-visualizer_3.0.1_1794268892274_0.648315770396671"},"readme":"# d3-state-visualizer\n\nEnables real-time visualization of your application state.\n\nCreated by [@romseguy](https://github.com/romseguy) and merged from [`reduxjs/d3-state-visualizer`](https://github.com/reduxjs/d3-state-visualizer).\n\n[Demo](http://reduxjs.github.io/d3-state-visualizer)\n\n## Installation\n\n`yarn install d3-state-visualizer`\n\n## Usage\n\n```javascript\nimport { tree } from 'd3-state-visualizer';\n\nconst appState = {\n  todoStore: {\n    todos: [\n      { title: 'd3' },\n      { title: 'state' },\n      { title: 'visualizer' },\n      { title: 'tree' },\n    ],\n    completedCount: 1,\n  },\n};\n\nconst render = tree(document.getElementById('root'), {\n  state: appState,\n  id: 'treeExample',\n  size: 1000,\n  aspectRatio: 0.5,\n  isSorted: false,\n  widthBetweenNodesCoeff: 1.5,\n  heightBetweenNodesCoeff: 2,\n  chartStyles: { border: '1px solid black' },\n  tooltipOptions: { offset: { left: 30, top: 10 }, indentationSize: 2 },\n});\n\nrender();\n```\n\n## Charts API\n\nThe APIs are minimal and consists of a single function you provide with:\n\n- a DOM element\n- a plain old JS object for options.\n\n#### Tree\n\nThis chart is a bit special as it accepts either one of the two following options, but **not both**:\n\n- `tree`: a properly formed tree structure such as one generated by [map2tree](https://github.com/reduxjs/redux-devtools/tree/master/packages/map2tree) or [react2tree](https://github.com/romseguy/react2tree)\n- `state`: a plain javascript object mapping arbitrarily nested keys to values – which will be transformed into a tree structure, again using [map2tree](https://github.com/reduxjs/redux-devtools/tree/master/packages/map2tree).\n\nOther options are listed below and have reasonable default values if you want to omit them:\n\n| Option                    | Type    | Default                                                                          | Description                                                                                                                                                                                                                                                                                  |\n| ------------------------- | ------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id`                      | String  | `'d3svg'`                                                                        | Sets the identifier of the SVG element —i.e your chart— that will be added to the DOM element you passed as first argument                                                                                                                                                                   |\n| `chartStyles`             | Object  | `{}`                                                                             | Sets the CSS style of the chart                                                                                                                                                                                                                                                              |\n| `size`                    | Number  | `500`                                                                            | Sets size of the chart in pixels                                                                                                                                                                                                                                                             |\n| `aspectRatio`             | Float   | `1.0`                                                                            | Sets the chart height to `size * aspectRatio` and [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox) in order to preserve the aspect ratio of the chart. [Great video](https://www.youtube.com/watch?v=FCOeMy7HrBc) if you want to learn more about how SVG works |\n| `widthBetweenNodesCoeff`  | Float   | `1.0`                                                                            | Alters the horizontal space between each node                                                                                                                                                                                                                                                |\n| `heightBetweenNodesCoeff` | Float   | `1.0`                                                                            | Alters the vertical space between each node                                                                                                                                                                                                                                                  |\n| `isSorted`                | Boolean | `false`                                                                          | Sorts the chart in alphabetical order                                                                                                                                                                                                                                                        |\n| `transitionDuration`      | Number  | `750`                                                                            | Sets the duration of all the transitions used by the chart                                                                                                                                                                                                                                   |\n| `tooltipOptions`          | Object  | [here](https://github.com/reduxjs/redux-devtools/tree/master/packages/d3tooltip) | Sets the options for the [tooltip](https://github.com/reduxjs/redux-devtools/tree/master/packages/d3tooltip) that is showing up when you're hovering the nodes                                                                                                                               |\n| `rootKeyName`             | String  | `'state'`                                                                        | Sets the first node's name of the resulting tree structure. **Warning**: only works if you provide a `state` option                                                                                                                                                                          |\n| `pushMethod`              | String  | `'push'`                                                                         | Sets the method that shall be used to add array children to the tree. **Warning**: only works if you provide a `state` option                                                                                                                                                                |\n\nMore to come...\n\n## Roadmap\n\n- Threshold for large arrays so only a single node is displayed instead of all the children. That single node would be exclude from searching until selected.\n","publish_time":1794268892350,"_cnpm_publish_time":1794268892350,"dist-tags":{"latest":"3.0.1"}}