npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mindmapr

v1.0.5

Published

```bash # Yarn yarn add mindmapr # NPM npm install --save mindmapr ```

Downloads

14

Readme

Storyboard here

NPM registry NPM license

Install

# Yarn
yarn add mindmapr
# NPM
npm install --save mindmapr

Props

| name | required | type | default | Description | |----------------------------------|----------|----------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | items | x | object | | A nested object that provides id and children keys. idcan be string or number, children are a list of objects, that also provide id and children. Example: {id: 5, optionalParameter: "will be center item", children: [{id: 6, optionalParameter: "will be child of center item", children: []}]} | | renderItem | x | function | | A function that returns the ReactNode you want to render as the items of the mindmap. You get the item, the nested depth, and the state as arguments. The state currently only includes isSelected, so you can change the appearance of the rendered item, if it got selected through click or keyboard navigation. Also choose a background color to your item to prevent overlap with the lines. Example: const renderItem = (item, depth, {isSelected}) => (<div>{item.optionalParameter}</div>) | | side | | string | both | Can either be both, left or right. both will make an usual mindmap, where items are placed left and right of the center item. With left and right you can make a tree, that will only expand in the chosen direction. | | addChildKey | | string | Tab | The key to press, if you want to create a child item to the currently selected item. Possible key codes are here. | | addChildOnParentLevelKey | | string | Enter | The key to press, if you want to create an item on the same level as the currently selected item. | | deleteItemKey | | string | Delete | The key to press, if want to delete the currently selected item | | setData | | function | | A function to feed back the changes to your state outside the component. If not provided, the mindmap will be read only | | createNewItem | | function | | A function that creates new items. The items will be inserted at the correct positions according to the key inputs. As a paraemter, the parent item is available. If you choose to return undefined instead of an item, no item will be added. | | overwriteLineStyle | | function | | If you want to customize the css properties of the connection lines, you can use this function. Example: const overwriteLineStyle = (depth) => ({stroke: "#ddd", strokeWidth: 1}) |