react-wordcloud

☁️ Simple React + D3 wordcloud component with powerful features.

MIT License

Downloads
58.3K
Stars
208
Committers
10

Bot releases are hidden (Show)

react-wordcloud - v1.2.7 Latest Release

Published by chrisrzhou about 4 years ago

Overview

  • Internal code cleanup (detypscriptify source code)
  • Update docs, readme and other configs.

'Breaking' Changes: Tooltip CSS and Typings

Decoupled the tippy CSS from the package. This will improve future versioning of the project, and is also the recommendation set by the tippy project. Tooltips with this new versions might look off without CSS styles, but not considering this a breaking change because you can easily add the following imports to address the issue:

import 'tippy.js/dist/tippy.css';
import 'tippy.js/animations/scale.css'

Some rarely used typings are no longer exported (e.g. Enter, Spiral, WordToStringCallback, WordEventCallback, MinMaxPair, AttributeValue). While this is a breaking change, taking the liberty to assume this as non-breaking in an effort to constrain the exposed typings for improved future versioning of the project.

react-wordcloud - v1.2.6

Published by chrisrzhou about 4 years ago

  • Correctly expose typings that were missing in v1.2.5.
  • Fix docs deploy by adding .node-version.
react-wordcloud - v1.2.5 [deprecated]

Published by chrisrzhou about 4 years ago

[deprecated]: This release is missing Typescript definitions. Avoid it if you depend on it.

v1.2.4 is a working build, but it accidentally shipped .docz cache to the NPM registry... Fix this by explicitly setting files in package.json.

react-wordcloud - v.1.2.4 [deprecated]

Published by chrisrzhou about 4 years ago

[deprecated]: This release includes unnecessary .doc cache files in the build and is necessarily large.

  • Added ...rest props (@davidjb)
  • Added tooltipOptions to options (@davidjb) to configure tippy tooltips.
  • Added svgAttributes and textAttributes to options to configure attributes on svg and text nodes.
  • Development: updated dependencies, XO lint rules, use absolute imports with ~, spaces over tabs, microbundle over rollup, npm over yarn.
  • Updated docs
react-wordcloud - v.1.2.0

Published by chrisrzhou over 4 years ago

1.2.0 (2020-03-07)

This release is largely internal refactoring and updating dependencies, as well as 'de-typescripting' the codebase

API additions:

  • Improve rendering performance for larger clouds and multiple cloud instances with the options.enableOptimizations flag.

Small Typescript breaking changes:

  • Spiral and Scale enums are removed in favor of whitelisted string values. As part of moving to ambient declarations, these enums will not materialize in the compiled code.

Internal code changes:

  • Update underlying dependencies via yarn upgrade --latest. Remove a ton of unneeded dependencies and correctly move @types/* deps to devDependencies.
  • Remove custom eslint, prettier config and use xo for a simpler linting setup.
  • Add husky pre-push hook.
  • Update and improve documentation with [email protected]. Improved various doc pages (Common Issues) and added the Optimizations and Home page
  • Take the approach in various projects (e.g. three) to "de-typescript" the codebase and use *.d.ts files for typing in development. Continue to expose Typescript types to consumers.
react-wordcloud - v1.1.1

Published by chrisrzhou about 5 years ago

1.1.1 (2019-09-27)

  • Update dependencies and fix eval error in seedrandom package (link).
react-wordcloud - v1.1.0

Published by chrisrzhou about 5 years ago

1.1.0 (2019-09-08)

  • Update dev configs + dependencies. Check with yarn audit.
  • Add documentation for Options and Callbacks props.
  • Remove ignored Typescript errors, and fix typings in render.ts.
  • Simplify code in hooks.ts.
  • Simplify typed code.
  • Expose MouseEvent object in onWordClick, onWordMouseOut and onWordMouseOver callbacks
react-wordcloud - v1.0.7

Published by chrisrzhou over 5 years ago

Fix Typescript types

Emit typescript types for the module, so that various types can be used correctly in consumers.

react-wordcloud - v1.0.6

Published by chrisrzhou over 5 years ago

Support deterministic behavior + Improve dev tooling

  • Support deterministic behavior for randomn layout and colors by configuring the options.deterministic field. This makes testing and creating fixed wordcloud views convenient.
  • Expose Typescript types.
  • Use various d3-* packages instead of importing d3 entirely.
  • Update docz and docs. Add Codesandbox examples.
  • Move prettier rules from .eslintrc.js to .prettierrc.js. This supports better formatting in MDX files with VSCode.
react-wordcloud - v1.0.5

Published by chrisrzhou over 5 years ago

Bug fixes and FAQ

New:

  • Added FAQ page explaining common 'bugs', and updated Options page with more examples
  • Handled recursive attempts to layout 'bad' clouds. Provide a console warning when max attempts have been made to layout 'bad' clouds.
  • Changed default minSize and options.fontSizes value to make things less buggy.

Bug fixes:

  • Fixed a bug where rotationAngles was mutated.
react-wordcloud - v1.0.4

Published by chrisrzhou over 5 years ago

Improve React hooks

Improve and simplify React hooks code after detailed understanding of: https://overreacted.io/a-complete-guide-to-useeffect/

Also updated the PropsTable docs with prop descriptions.

Bug fixes:

  • Handle words that don't fit in the boundary of the SVG by applying a font-size scale factor
  • Handle large number of words
  • Fix up some types
react-wordcloud - v1.0.3

Published by chrisrzhou over 5 years ago

Bug Fixes

Fixing the following bugs:

Tooltip bug is fixed by programmatically creating and destroying the tippy instance. Word implosion and missing words are related to https://github.com/jasondavies/d3-cloud/issues/36, and is fixed with a recursive solution.

react-wordcloud - v1.0.2

Published by chrisrzhou over 5 years ago

npm-ready!

Thanks to @warlock for transferring the react-wordcloud package ownership to me!

react-wordcloud - v1.0.1

Published by chrisrzhou over 5 years ago

Update word.count to word.value

react-wordcloud - v1.0.0

Published by chrisrzhou over 5 years ago

Modern rewrite

Features

As part of learning and ramping up with better JS tools and frameworks, v1.0.0 is a modern rewrite that focuses on:

  • Simplifying and decoupling React/D3 code with React hooks.
  • Document examples with docz.
  • Typescript support.
  • Minimize build size with rollup and bundlesize.

Breaking Changes

Compared to v0, there are a number of breaking changes.

  • React Dependency: You need at least react^16.8.3 installed to access hook functionality.
  • Features: Most features of the component still remain the same (e.g. tooltips, min/max font size, responsive).
  • Props: Many v0 props have been merged into options and callbacks with potentially different names. Please refer to the documentation or index.tsx to see how to apply props correctly.
  • Development: Previous developments were done in flow and a lot of dev dependencies have changed. The scripts in package.json should help handle most of these changes.
react-wordcloud - v0.1.1

Published by chrisrzhou over 5 years ago

This React wordcloud component is based on the d3-cloud wordcloud layout written by Jason Davies.

It includes the following features that can be easily controlled with props.

  • Control orientations of words by setting min/max angles.
  • Inherits parent node's height/width or accepts explicit values.
  • Customize colors by passing an array of colors or callback.
  • Customize font family.
  • Customize layout/placement of words.
  • Customize tooltips using callback.
  • Customize click actions on words using callback.
  • Set limit of maximum words displayed.
Package Rankings
Top 2.02% on Npmjs.org
Badges
Extracted from project README
Edit react-wordcloud-simple Edit react-wordcloud-simple Edit react-wordcloud-interactive Edit react-wordcloud-interactive
Related Projects