open-index/open-npm huggingface dataset:
npm package: @minecraft/gameplay-utilities
Description: Gameplay utilities for use with minecraft scripting modules
Author: Andrew Griffin
Latest version: 1.3.0

# Minecraft Gameplay Utilities

A set of utilities and functions for common gameplay operations. Major pieces are covered below.

## nextEvent() and EventPromise

`nextEvent()` is a function which takes a Minecraft event signal and wraps a promise around the next event being raised. The function returns an `EventPromise` object which is a promise type. When the event is raised, the promise will resolve with the event data, and unsubscribe from the event's signal. The `EventPromise` type also adds a `cancel()` function which will unsubscribe from the event's signal, and fulfill the promise with `undefined`.

### Can be awaited to receive the event

```ts
const event = await nextEvent(world.afterEvents.buttonPush);
```

### Can be used like a promise

```ts
await nextEvent(world.afterEvents.leverAction).then(
    (event) => {
        // do something with the event
    }).finally(() => {
        // something else to do
    });
```

### Optionally provide filters for the signal and use helper function

```ts
const creeperDeathEvent = await nextEvent(world.afterEvents.entityDie, { entityTypes: ['minecraft:creeper'] });
```

## How to use @minecraft/gameplay-utilities in your project

@minecraft/gameplay-utilities is published to NPM and follows standard semver semantics. To use it in your project,

- Download `@minecraft/gameplay-utilities` from NPM by doing `npm install @minecraft/gameplay-utilities` within your scripts pack. By using `@minecraft/gameplay-utilities`, you will need to do some sort of bundling to merge the library into your packs code. We recommend using [esbuild](https://esbuild.github.io/getting-started/#your-first-bundle) for simplicity.
npm package: @minecraft/markup-generators-plugin
Description: Plugin for @minecraft/api-docs-generator containing core markup generators and template files
Author: Jake Shirley
Latest version: 1.5.0

# @minecraft/markup-generators-plugin

This package extends [@minecraft/api-docs-generator](../api-docs-generator/README.md) with a core set of markup generators used to generate Minecraft API scripting types and documentation.

## Markup Generators

The optional `run-generators` argument uses a list of markup generator IDs described in the table below. If `run-generators` is not provided, then the generators marked as default will run:

| ID | Name | Default? | Description |
| :-- | :-- | :-: | :-- |
| msdocs | MSDocs | :heavy_check_mark: | Markdown documentation for Minecraft APIs. |
| ts | Typescript Definitions | :heavy_check_mark: | TypeScript type definitions for Minecraft APIs. |
| ts-source | Typescript Source | :heavy_check_mark: | TypeScript source generation for Minecraft `vanilla-data` APIs. |
| npm | NPM | :heavy_check_mark: | NPM module packaging. Requires `ts` and `ts-source`. |
| typedoc | TypeDoc | :heavy_check_mark: | TypeDoc formatted documentation. Requires `ts` and `ts-source`. |
| changelog | Changelog | :heavy_check_mark: | Markdown formatted changelog output for differences between API module versions. |
| changelog-json | Changelog JSON | | JSON changelog output. |
npm package: @minecraft/math
Description: Math utilities for use with minecraft scripting modules
Author: Raphael Landaverde
Latest version: 2.4.0

# Minecraft Math

A set of utilities and functions for common math operations. Major pieces are covered below.

## Vector3

A set of utility functions and a wrapper class for common vector3 operations. Two distinct patterns are supported, a more pure computational approach operating on the Vector3 interface with no mutation, and a separate wrapper object oriented approach following a "builder" pattern. It is mostly preference whether you prefer the more "mutation" heavy pattern or the functional pattern, it depends on the structure of your code. Under the covers, the same helpers are used.

### Pure Functional Style

```ts
import { Vector3, world } from '@minecraft/server';
import { MinecraftDimensionTypes } from '@minecraft/vanilla-data';
import { Vector3Utils } from '@minecraft/math';

const vectorA: Vector3 = {x: 1, y: 2, z:3};
const vectorB: Vector3 = {x: 4, y: 5, z:6};

const resultAdd = Vector3Utils.add(vectorA, vectorB); // {x:5, y:7, z:9}
const resultSubtract = Vector3Utils.subtract(vectorA, vectorB); // {x:-3, y:-3, z:-3}
const resultAdd = Vector3Utils.cross(vectorA, vectorB); // {x:-3, y:6, z:-3}

console.log(toString(vectorA)); // Prints out "1, 2, 3"

// Use your vectors with any @minecraft/server API
const = dimension = world.getDimension(MinecraftDimensionTypes.Overworld);
dimension.spawnParticle("minecraft:colored_flame_particle", resultAdd);
```

### Builder Style

```ts
import { Vector3, world } from '@minecraft/server';
import { Vector3Builder } from '@minecraft/math';
import { MinecraftDimensionTypes } from '@minecraft/vanilla-data';

const vectorA: Vector3Builder = new Vector3Builder({x: 1, y: 2, z:3});
const vectorB: Vector3 = {x: 4, y: 5, z:6};
const vectorC: Vector3 = {x: 1, y: 3, z:5};

// Mutates vectorA directly each time
vectorA.add(vectorB).subtract(vectorC).cross(vectorB); // Final result {x:4, y:-8, z:4}

console.log(vectorA.toString()); // Prints out "4, -8, 4"

// Vector3Builder type can directly be used in APIs that accept Vector3
const dimension = world.getDimension(MinecraftDimensionTypes.Overworld);
dimension.spawnParticle("minecraft:colored_flame_particle", vectorA);
```

## How to use @minecraft/math in your project

@minecraft/math is published to NPM and follows standard semver semantics. To use it in your project,

- Download `@minecraft/math` from NPM by doing `npm install @minecraft/math` within your scripts pack. By using `@minecraft/math`, you will need to do some sort of bundling to merge the library into your packs code. We recommend using [esbuild](https://esbuild.github.io/getting-started/#your-first-bundle) for simplicity.
npm package: @minecraftts/buffered-image
Description: A simple wrapper around node-canvas
Author: MinecraftTS
Latest version: 1.1.0

# buffered-image

Not to be confused with Java BufferedImages, I just couldn't think of a better name (lawl). This is just a thin wrapper on top of `node-canvas`

### Usage

```ts
import { BufferedImage } from "@minecraftts/buffered-image"

const bufferedImage = new BufferedImage(200, 200);
const graphics = bufferedImage.getGraphics();

graphics.fillStyle = "red";
graphics.fillRect(50, 50, 100, 100);

// before querying pixels you have to do this
bufferedImage.refresh();

let pixel = bufferedImage.getPixel(0, 0);
console.log(pixel); // => { r: 0, g: 0, b: 0, a: 0 }
pixel = bufferedImage.getPixel(100, 100);
console.log(pixel); // => { r: 255, g: 0, b: 0, a: 255 }
```

### Installation

Run
```
npm install @minecraftts/buffered-image
```

### License

Everything here is licensed under the MIT license
npm package: @minecraftts/glfw
Description: GLFW bindings for Node.js
Author: zani
Latest version: 2.0.1

# node-glfw

Node.js bindings to GLFW3

### Installation

Please ensure you have CMake as well as a full C++ toolchain for your OS then you can install with

```
npm install @minecraftts/glfw
```

### Building

Building is extremely simple, make sure you have all required build tools then run

```
npm run build
```

### Testing

We have no unit tests currently, PRs are gladly accepted.

### License

This package is licensed under the MIT license
npm package: @minecraftts/logger
Description: Logger used in MinecraftTS
Author: MinecraftTS
Latest version: 1.0.0

# logger

A simple logger, used in MinecraftTS.

### Usage

First install with `npm install @minecraftts/logger` then initialize the logger via

```ts
import { Logger } from "@minecraftts/logger";

new Logger();
```

You can then either log via methods exposed by `console` or via any of the `Logger` methods
npm package: @minecraftts/opengl
Description: OpenGL & GLEW bindings for Node.js
Author: zani
Latest version: 2.1.1

# node-opengl

Node.js bindings to OpenGL & GLEW

### Installation

Please ensure you have CMake as well as a full C++ toolchain for your OS then you can install with

```
npm install @minecraftts/opengl
```

### Building

Building is extremely simple, make sure you have all required build tools then run

```
npm run build
```

### Testing

We have no unit tests currently, PRs are gladly accepted.

### License

This package is licensed under the MIT license
npm package: @minedeljkovic/redux-devtools-inspector
Description: Redux DevTools Diff Monitor
Author: Alexander
Latest version: 0.3.6-0

# redux-devtools-inspector

[![npm version](https://badge.fury.io/js/redux-devtools-inspector.svg)](https://badge.fury.io/js/redux-devtools-inspector)

A state monitor for [Redux DevTools](https://github.com/gaearon/redux-devtools) that provides a convenient way to inspect "real world" app states that could be complicated and deeply nested.

![](demo.gif)

### Installation

```
npm install --save-dev redux-devtools-inspector
```

### Usage

You can use `Inspector` as the only monitor in your app:

##### `containers/DevTools.js`

```js
import React from 'react';
import { createDevTools } from 'redux-devtools';
import Inspector from 'redux-devtools-inspector';

export default createDevTools(
  <Inspector />
);
```

Then you can render `<DevTools>` to any place inside app or even into a separate popup window.

Alternative, you can use it together with [`DockMonitor`](https://github.com/gaearon/redux-devtools-dock-monitor) to make it dockable.  
Consult the [`DockMonitor` README](https://github.com/gaearon/redux-devtools-dock-monitor) for details of this approach.

[Read how to start using Redux DevTools.](https://github.com/gaearon/redux-devtools)

### Features

The inspector displays a list of actions and a preview panel which shows the state after the selected action and a diff with the previous state. If no actions are selected, the last state is shown.

You may pin a certain part of the state to only track its changes.

### Props

Name               | Type             | Description
------------------ | ---------------- | -------------
`theme`            | Object or string | Contains either [base16](https://github.com/chriskempson/base16) theme name or object, that can be `base16` colors map or object containing classnames or styles.
`supportImmutable` | Boolean          | Better `Immutable` rendering in `Diff` (can affect performance if state has huge objects/arrays). `false` by default.

### License

MIT
npm package: @mineew/components-ui
Description: React UI Components Library
Author: Alexandr Mineev
Latest version: 0.1.11

## About

UI Components Library built with ⚛️ **React**, 💨 **TailwindCSS** and ⚡️ **Zag**
for use in my personal projects

Compatible with 📋 **React Hook Form**

## Installation

First, install the package:

```bash
npm install @mineew/components-ui
```

Then be sure to configure your template paths in `tailwind.config.js`:

```js
module.exports = {
  content: ['./node_modules/@mineew/components-ui/**/*'],
};
```

## Documentation

There is no documentation as such because I don't think anyone can be
interested in this library except myself.

But you can see examples in 📚 [Storybook](https://mineew.github.io/components-ui/).
npm package: @minefinance/sdk-core
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 1.0.0

# Uniswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/Uniswap/uniswap-sdk/workflows/CI/badge.svg)](https://github.com/Uniswap/uniswap-sdk)
[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/Uniswap/uniswap-sdk.git
```

Move into the uniswap-sdk working directory

```sh
cd uniswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```