open-index/open-npm huggingface dataset:
npm package: @fluffys/alertcomponent
Description: ## Installation
Latest version: 1.0.16

# AlertComponent

## Installation

You can add this package to your project by using these options:

#### yarn:
```bash
  yarn add @fluffys/alertcomponent
```

#### npm:
```bash
  npm i @fluffys/alertcomponent
```

## Usage

Add the AlertComponent to the component of your choice and set an origin.
```tsx
import {AlertComponent} from "@fluffys/alertcomponent";

function App() {
    
    return (
        <>
            <AlertComponent origin={"Main-Window"}/>
        </>
    )
}
```

To send a message to an AlertComponent, you can import and use the MessengerHelper helper tool.

```tsx
import {MessengerHelper} from "@fluffys/alertcomponent";
//...
const messengerHelper = new MessengerHelper();

messengerHelper.sendMessage({
    message: "Hello World",
    severity: "success",
    duration: 1000,
    destination: "Main-Window"
})
//...
```

## Important to know

This is the base layout of a message:

- __message:__ is containing alert content
- __severity:__ contains the type of alert
- __duration:__ contains number of seconds in milliseconds (is not needed)
- __origin:__ contains string where it should appear __(must match with any AlertComponent origin)__
```tsx
export interface AlertMessage {
    message: string;
    severity: "success" | "warning" | "error" | "info";
    duration?: number | undefined;
    destination: string;
}
```

## Optional Usage

The Message helper is basically just a broadcast channel. As log as you name it "triggerAlert" and respect the message layout, it will work.
```ts
channel = new BroadcastChannel("triggerAlert");

channel.postMessage({
    message: "Hello World",
    severity: "success",
    duration: 1000,
    destination: "Main-Window"
});
```

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @fluggo/graphlib
Description: A directed and undirected multi-graph library
Author: Chris Pettitt
Latest version: 0.1.1

# Graphlib

Graphlib is a JavaScript library that provides data structures for undirected and directed multi-graphs along with algorithms that can be used with them.

<h2 style="color: red;">About this version</h2>

This is a TypeScript port of Graphlib and probably soon several of its companion libraries.
Graphlib was originally written and maintained by Chris Pettitt.

I, Brian Crowell, am exploring Graphlib and its other libraries.
I am publishing my packages, but at this time I am not committing to maintaining them, and I certainly don't guarantee I won't make breaking changes in the future.
I am happy to accept pull requests, though.

You can find the original Graphlib [here](https://github.com/dagrejs/graphlib).

# License

Graphlib is licensed under the terms of the MIT License. See the [LICENSE](LICENSE) file for details.

[npm package manager]: http://npmjs.org/