open-index/open-npm huggingface dataset:
npm package: @phbai/upload-solana
Description: Solana NodeJS token client for Irys network bundlers
Author: Irys maintainers
Latest version: 0.1.10

# solana-node

Solana NodeJS token client for Irys network bundlers.

## Docs

https://docs.irys.xyz/build/d/irys-in-the-browser#solana

## Installation

```sh
npm install @irys/upload-solana
```
npm package: @phbalance/contrast-colour
Description: Small library for calculating contrasting colours.
Author: Peter Hunnisett
Latest version: 0.0.6

# Finding the highest contrast colour
Utility for determining the highest constrasting colour. Built on [color](https://github.com/Qix-/color). It is implemented in [TypeScript](https://www.typescriptlang.org/).

## Getting Started


### Installation

```
npm install --save @phbalance/contrast-colour # Note the non-American spelling

npm install --save color # This is a peer dependency for contrast-colour. Install if you don't already use it in your project.
```

### Use

```
import { chooseHighestContrastColour } from "@phbalance/constrast-colour";

...

const contrastColour: string = chooseHighestContrastColour(foregroundColour, foregroundOpacity, backgroundColour)

```

### API

`chooseHighestContrastColour` was created with itch to have the highest contrast (black or white) text on the blended colour of a surface. It makes the assumption that both of the 2 possible surfaces that can blend can each be represented by a single colour. The method requires 1 parameter for the simple case of no opacity, but supports up to 3 parameters for more complex cases:
* `foregroundColour` (*required*) is the colour of the surface you want to put your text on.
* `foregroundOpacity` (*optional* - default is 1.0) is the opacity of the surface you want to put your text on. You can omit this if the surface you're painting on is not see through at all. Otherwise, you should provide this and the backgroundColour so the effective blended colour can be determined.
* `backgroundColour` (*optional* - default is white) is the colour of the surface behind the main surface that the text will be put on.

The return value is a colour, either white or black, as a 3 byte RGB hex value `string`.

### Reporting Issues

You can report [bugs here](https://github.com/phBalance/contrast-colour/issues). Feel free to make suggestions as well.
npm package: @phbalance/d3-tooltip
Description: Small library for generating svg tooltips using foreignObject.
Author: Peter Hunnisett
Latest version: 1.0.1

# A tooltip library for D3

Add tooltips to your [D3](https://d3js.org/) charts. Implemented using [TypeScript](https://www.typescriptlang.org/).

Version 0.1.2 is the last version that supports D3 versions 1 through 5 (i.e. version that use d3-selection@1). Versions 1.0.1+ supports D3 versions 6+.

## Getting Started


### Installation
```sh
npm install --save @phbalance/d3-tooltip
```

Prior to version 1.0 you needed to install the peer `d3-selection` yourself although NPM 7 does this for you now. 
```sh
npm install --save @phbalance/d3-tooltip
npm install --save d3-selection # peer dependency of a library
```

### Use

```
import { ITooltipConfig, Tooltip } from "@phbalance/d3-tooltip";

...

// Setup your d3 selection to have the data.tooltip property. It should be sufficient
// to have your datum to contain the tooltip property and then make sure you're doing
// a join. Something like this:
const svg = create("svg");
const selection = svg
    .selectAll("rect")
    .data(yourData);

const tooltipConfig: ITooltipConfig<IFlexibleBarChartDatum> = {
    rounded: true,
    bubbleWidth: bubbleWidth,
    bubbleHeight: -1,
    bubbleStroke: "red",
    bubbleStrokeWidth: bubbleWidth / 150,
    bubbleTip: {tipOffset: (3 / 4 * bubbleWidth / 9), h: 10, edgeOffset: bubbleWidth / 9},
    chartWidth: width,
    chartHeight: width,
    backgroundColour: "#F8F8F8",
    backgroundOpacity: 0.9,
    getData: (d: IFlexibleBarChartDatum) => d.tooltip,
};

const tooltip = new Tooltip<IFlexibleBarChartDatum>(svg, tooltipConfig);
const tooltipMouseover = tooltip.mouseoverHandler();
const tooltipMouseout = tooltip.mouseoutHandler();
const tooltipMousemove = tooltip.mousemoveHandler();

// Bind it to the d3 selection(s) that you want to show tooltips.
selection
    .enter()
        .on("mouseover", tooltipMouseover)
        .on("mouseout",  tooltipMouseout)
        .on("mousemove", tooltipMousemove);
```

### API

When creating a new Tooltip you pass in the svg that needs the tooltips. Inside this svg, the Tooltip will create a `g` element with a class of `tooltip-group`. Creating Tooltip (i.e. `new Tooltip(svg, ...)`) more than once is fine with the same svg as it will reuse an already existing `g.tooltip-group`.

The generated tooltip object contains 3 event handlers. You will want to bind at least the mouseover and mouseout handlers, but if you don't want your tooltip to follow the mouse around inside the selection, you don't need to bind it. If you don't being the mousemove, the tooltip will be pointing to the spot you entered the selection.

When an event handler is called, the getData function that was passed into the `tooltipConfig` is called to find the tooltip HTML.

### Reporting Issues

You can report [bugs here](https://github.com/phBalance/d3-tooltip/issues). Feel free to make suggestions as well.