open-index/open-npm huggingface dataset:
npm package: @steffo/nest-react-wordcloud
Description: Simple React + D3 wordcloud component with powerful features.
Author: Chris Zhou
Latest version: 1.2.11

# ☁️ react-wordcloud

Simple React + D3 wordcloud component with powerful features. Uses the [`d3-cloud`](https://github.com/jasondavies/d3-cloud) layout.

![image](/public/wordcloud.png)

## Install

```sh
npm install react-wordcloud
```

Note that `react-wordcloud` requires `react^16.13.0` as a peer dependency.

## Use

### Simple

```js
import React from 'react';
import ReactWordcloud from 'react-wordcloud';

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

const words = [
  {
    text: 'told',
    value: 64,
  },
  {
    text: 'mistake',
    value: 11,
  },
  {
    text: 'thought',
    value: 16,
  },
  {
    text: 'bad',
    value: 17,
  },
]

function SimpleWordcloud() {
  return <ReactWordcloud words={words} />
}
```

By default, `ReactWordcloud` is configured with animated tooltips enabled and requires CSS for styling. Tippy provides base styling in the resources above or you can create your own.

### Kitchen Sink

An example showing various features (callbacks, options, size).

```js
const callbacks = {
  getWordColor: word => word.value > 50 ? "blue" : "red",
  onWordClick: console.log,
  onWordMouseOver: console.log,
  getWordTooltip: word => `${word.text} (${word.value}) [${word.value > 50 ? "good" : "bad"}]`,
}
const options = {
  rotations: 2,
  rotationAngles: [-90, 0],
};
const size = [600, 400];
const words = [...];

function MyWordcloud() {
  return (
    <ReactWordcloud
      callbacks={callbacks}
      options={options}
      size={size}
      words={words}
    />
  );
}
```

## Examples

View all documented examples and gallery of `react-wordcloud` applications at https://react-wordcloud.netlify.com/.

You can also run the examples locally:

```sh
git clone git@github.com:chrisrzhou/react-wordcloud

cd react-wordcloud
npm install && npm run docs
```

### No props

[![Edit react-wordcloud-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/bgov9)

### Responsive

[![Edit react-wordcloud-simple](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/55sb8)

### Configurable Options

[![Edit react-wordcloud-interactive](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/fnk8w)

### Callbacks

[![Edit react-wordcloud-interactive](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/4lecp)

## Wordcloud Generator

Create wordclouds using this wordcloud generator: https://wordcloud-generator.netlify.com/

Features supported:

- Edit and Upload text inputs
- Various NLP features (stopwords, ngrams)
- Wordcloud configurations
- Export/save/share wordclouds

## Contributing

The code is written in `typescript`, linted with `xo`, and built with `microbundle`. Examples and documentations are built with `docz`.

Feel free to contribute by submitting a pull request.
npm package: @steffy/core
Description: `S`mar`t` `E`nterpise `F`ramework `F`or `Y`ou
Author: David Onofer
Latest version: 1.9.8

# @steffy/core

Package containing `core` functionalities for `S`mar`t` `E`nterpise `F`ramework `F`or `Y`ou application.

## Installation

```shell
npm i -S @steffy/core @steffy/di
```

## Usage

After installing import the required module from `@steffy/core` and `@steffy/di`.

```typescript
import {} from '@steffy/core';
import {} from '@steffy/di';
```

## Bootstrap application

### index.ts

```typescript
import { storage } from '@steffy/di';
import { Application } from './application';
import { boot } from './boot.sequence';

export async function main() {
  await boot();
  const app = storage.get(Application);
  await app.start();
}

main();
```

### application.ts

```typescript
import { LoggerPlugin } from '@steffy/core';
import { Inject, Optional, Singleton } from '@steffy/di';

@Singleton()
export class Application {
  constructor(@Inject() private logger: LoggerPlugin, @Optional('SteffyConfig') private config: any) {}

  public async start() {
    this.logger.log('my application', 'hello world!');
    console.log(this.config);
  }
}
```

### boot.sequence.ts

```typescript
import { moduleLoader, jsonLoader } from '@steffy/core';

const boot = async () => {
  await jsonLoader('./configs', 'config');
  await moduleLoader('./lib/plugins', 'plugin');
};

export { boot };
```

### logger.plugin.ts

```typescript
import { IPlugin, Logger } from '@steffy/core';
import { Singleton } from '@steffy/di';

@Singleton()
export class LoggerPlugin implements IPlugin {
  public pluginName = 'Logger';
  private _logger = new Logger();
  public debug = (mod: string, ...messages: any[]) => this._logger.debug(mod, ...messages);
  public error = (mod: string, ...messages: any[]) => this._logger.error(mod, ...messages);
  public info = (mod: string, ...messages: any[]) => this._logger.info(mod, ...messages);
  public log = (mod: string, ...messages: any[]) => this._logger.log(mod, ...messages);
}
```
npm package: @steffy/http
Description: Steffy HTTP plugin
Author: David Onofer
Latest version: 1.9.50

# @steffy/http

## Usage

In your `@steffy` application setup your server something like this:

### boot.sequence.ts

```typescript
import { injector, jsonLoader, moduleLoader, SYMBOLS } from '@steffy/core';
import '@steffy/http';
import { registerLogger } from '@steffy/logger';
import { Application } from './application';

export const boot = async () => {
  ...
  await moduleLoader('./lib/controllers', 'controller'); // path to your controllers
  ...
};
```

### application.ts

```typescript
import { IInjectable, inject, injectable } from '@steffy/core';
import { HttpServerPlugin } from '@steffy/http';
import { LoggerPlugin } from '@steffy/logger';
import IO from 'koa-socket-2'; // only if you want to use socket.io

@injectable()
export class Application {
  private socket = new IO(); // only if you want to use socket.io
  constructor(
    @inject('LoggerPlugin') private logger: LoggerPlugin,
    @inject('SteffyConfig') private config: IInjectable,
    @inject('HttpServerPlugin') private server: HttpServerPlugin
  ) {}

  public async start() {
    this.logger.info('Steffy API Server', 'Starting');
    this.server.warmup(); // path to your static serves
    this.server.listen('public/'); // path to your static serves
    // or 
    this.server.listen(this.socket); // socket.io handler
    // or 
    this.server.listen('public/', this.socket); // path to your static serves, and your socket.io handler
  }
}
```

and finally setup your controller

### base.controller.ts

for your functions simply use `koa` syntax

```typescript
import { IInjectable, inject, injectable } from '@steffy/core';
import { get } from '@steffy/http';
import { LoggerPlugin } from '@steffy/logger';

@injectable()
export class BaseController {
  constructor(@inject('SteffyConfig') private config: IInjectable, @inject('LoggerPlugin') private logger: LoggerPlugin) {}

  @get('/tick') // register your endpoint in router
  public async getTick(ctx: any) {
    ctx.body = 'tick';
  }
}
```
npm package: @stefgootzen/payload-plugin-versioning
Description: PayloadCMS plugin that sets up all necessary fields and hooks to enable collection versioning.
Latest version: 1.0.2

# Payload-Plugin-Versioning
PayloadCMS plugin that sets up all necessary fields and hooks to enable collection versioning.

## Installation
1. Run `npm install @stefgootzen/payload-plugin-versioning` or `yarn add @stefgootzen/payload-plugin-versioning`.

2. Add the following to the `plugin` section of the payload config. Use your own collections.

```javascript
 withVersioning({
  enabled: true,
  relations: [
    {
      baseSlug: MyBaseCollection.slug,
      versionSlug: MyVersionCollection.slug,
    },
  ],
})
```

## Payload Compatibility
| Payload | Plugin-Versioning |
|---------|-------------------|
| 2.x     | Compatible        |
| 3.x     | Untested          |


## Effects
**_One-to-many_ relationship management:**
- Adds `versions` field _(many)_ on `base` collection.
- Adds `base` field _(one)_ on `version` collection.

**Adds cascade behaviour:**
- On `version` delete: Deletes `version` on `base`.
- On `base` delete: Deletes all corresponding `versions`.

**Automatic versioning on versions:**
- Adds an automatically incremented `versionNumber` field on _version_.

**Utility for easy version creation:**
- Easily create first `version` on `base` creation, like:
  ```javascript
   axios.post(`${url}/api/base`, {
     ...baseData,
    version: {
       ...versionData
    }
  })
  ```

## Why use this instead of build-in versioning?
Payload's build-in versioning is useful when you've got a concept of a (latest) _published_ document. This plugin is for you if versions are supposed to be "published".