open-index/open-npm huggingface dataset:
npm package: @rbxts/types
Description: TypeScript typings for the Roblox platform. Partially handwritten and partially automatically generated.
Author: roblox-ts
Latest version: 1.0.915

# @rbxts/types

TypeScript typings for the Roblox platform. Partially handwritten and partially automatically generated.

## Installation

To install @rbxts/types into your project, run the following command:

`npm install -D @rbxts/types`

Then, make sure `node_modules/@rbxts` is listed in your `compilerOptions.typeRoots` field in your project's `tsconfig.json` like so:

```json
{
	"compilerOptions": {
		"typeRoots": ["node_modules/@rbxts"]
	}
}
```

<!-- hidden change to force deploy 3 -->
npm package: @rbxts/ui-labs
Description: Utilities for UI-Labs, a storybook-like plugin for roblox
Author: PepeElToro
Latest version: 2.4.2

[![npm version](https://img.shields.io/npm/v/@rbxts/ui-labs.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/ui-labs)

# UI Labs Utilities for Roblox-ts

### UI Labs is a Storybook-like plugin for roblox that allows you to visualize stories in real-time without needing to run your code

You can find the plugin here:

-   [Roblox Store](https://create.roblox.com/store/asset/14293316215/)

-   [Github](https://github.com/PepeElToro41/ui-labs)

---

### This package offers you utilities and typings for UI Labs

Visit the [Documentation](https://ui-labs-roblox.github.io/ui-labs-docs/).
npm package: @rbxts/ui-scaler
Description: This library will allow you to scalable ui
Author: tesmi
Latest version: 0.2.6

# 📐 UI Scaler
This library will allow you to scalable ui

# ☄️ Installation

## NPM(https://www.npmjs.com/package/@rbxts/ui-scaler)
``npm i @rbxts/ui-scaler``

# 📚 Documentation

## Scaler
You need to create a scaler

```tsx
const BASE_RESOLUTION = new Vector2(1920, 1080);
const scaleApi = useScaler(BASE_RESOLUTION);
```

## Scale calculator

You can now use the scale-aware counting functions

```tsx
scaleApi.px(100);
scaleApi.unscale(100);
```

## Hooks

You can also use hooks that will re-render your component, after changing the scale

```tsx
scaleApi.usePx();
scaleApi.useUnscale();
```

# ❤️ Credits
Tesmi (Discord: tesmi)
npm package: @rbxts/utility-ai
Description: A small Utility Ai Framework
Author: Tim Meier
Latest version: 0.0.3

# Utility Ai

## A small Utility Ai Framework

### Install

```sh
npm install @rbxts/utility-ai
```

### Usage

```ts
import { UtilityAi } from "./index";

interface EnemyEntity {}

interface PlayerEntity {
	isStuck(): boolean;
	distanceTo(enemy: EnemyEntity): number;
	gunEmpty(): boolean;
	nextCoverDistance(): number;
	isInCover(): boolean;
}

interface WorldData {
	player: PlayerEntity;
	enemy: EnemyEntity;
}

const utility_ai = new UtilityAi<WorldData>();

// define your actions e.g "Move to Enemy", "Fire at Enemy", "Move to Cover", "Reload Gun"
utility_ai.addAction("Move to Enemy", (action) => {
	// pre-conditions for actions, if not fulfilled all actions will be skipped
	action.condition(({ player }) => {
		if (player.isStuck()) return false;

		// explicit return of true needed to fulfill condition
		return true;
	});

	// each score expects a number as return value, the higher the better the action will be weighted
	action.score("Distance to Enemy", ({ player, enemy }) => player.distanceTo(enemy));

	action.score("Gun is not loaded", ({ player }) => player.gunEmpty() && -100);
});

utility_ai.addAction("Fire at Enemy", (action) => {
	action.score("Proximity to Enemy < 50", ({ player, enemy }) => player.distanceTo(enemy) < 50 && 75);

	action.score("Cannot make it to cover", ({ player }) => player.nextCoverDistance() > 25 && 50);

	action.score("Gun is not loaded", ({ player }) => player.gunEmpty() && -125);
});

utility_ai.addAction("Move to Cover", (action) => {
	action.score("Is not in cover", ({ player }) => !player.isInCover() && 50);

	action.score("Proximity to Cover < 50", ({ player }) => player.nextCoverDistance() < 50 && 50);
});

utility_ai.addAction("Reload Gun", (action) => {
	action.score("Gun is not loaded", ({ player }) => player.gunEmpty() && 75);

	action.score("Is in Cover", ({ player }) => player.isInCover() && 50);

	action.score("Gun is loaded", ({ player }) => !player.gunEmpty() && -125);
});

const data: WorldData = {
	player: {
		isStuck() {
			return false;
		},
		distanceTo(enemy) {
			return 0;
		},
		gunEmpty() {
			return false;
		},
		nextCoverDistance() {
			return 0;
		},
		isInCover() {
			return false;
		},
	},
	enemy: {},
};

// starts the evaluation of a given world state and returns its best action
const result = utility_ai.evaluate(data);
// e.g. result = { action: "Move to Cover", score: 100 }
```
npm package: @rbxts/uuid-transform
Description: A transformer for roblox-ts to change Enum values to UUIDs during compile time
Author: PrintedScript
Latest version: 1.0.1

# @rbxts/uuid-transform
#### Last updated for roblox-ts V3.0.0
A really simple compile-time UUID generator for [roblox-ts](https://roblox-ts.com/), useful for obfuscating internal names like network remotes to protect them from malicious actors. This is meant as a partial drop-in replacement for [rbxts-transform-guid](https://github.com/roblox-aurora/rbxts-transform-guid)

## Installation

Add `@rbxts/uuid-transform` to your project dependencies
```
npm install @rbxts/uuid-transform
```

Modify `tsconfig.json` to add the transformer to your roblox-ts plugins
```json
{
    "compilerOptions": {
        // ...
        "plugins": [
            // ...
            {
                "transform": "@rbxts/uuid-transform"
            }
        ]
    }
}
```
Note: Make sure to restart the roblox-ts compiler if it is already running for the changes to take effect

## Usage

The transformer will only generate UUIDs for `const enum` which has a `uuid` JSDoc tag.
```ts
/**
 * @uuid
 */
export const enum RemoteId {
    GetPlayerInventory = "GetPlayerInventory", // The values can be anything you want as it will be replaced
    UpdatePlayerInventory = "UpdatePlayerInventory",
    DropInventoryItem = "DropInventoryItem"
}

const getPlayerInventoryRemoteName = RemoteId.GetPlayerInventory
const updatePlayerInventoryRemoteName = RemoteId.UpdatePlayerInventory
const dropInventoryItemRemoteName = RemoteId.DropInventoryItem

const Remotes = {
    [RemoteId.GetPlayerInventory]: "Test"
}
```
This will compile to
```lua
local getPlayerInventoryRemoteName = "73850d5d-b09f-4dca-8f59-fd34b0fc9d17"
local updatePlayerInventoryRemoteName = "dd3758e4-6ba4-4aef-bff5-d57558962e77"
local dropInventoryItemRemoteName = "d94e3150-df1c-48e7-a51b-059b4d94c074"

local Remotes = {
    ["73850d5d-b09f-4dca-8f59-fd34b0fc9d17"] = "Test"
}
```
The UUIDs will change everytime during compilation
npm package: @rbxts/valibot
Description: A Runtime Typechecker for Roblox
Author: Ivan Leontev
Latest version: 0.1.0

# rbx-valibot

Source: https://github.com/fabian-hiller/valibot
Site: https://valibot.dev/

Synced to v0.42.1 (October 27/2024)
Commit: https://github.com/fabian-hiller/valibot/tree/a7cd7b1aaee50714738c66c7aa5ea748d16b5a92
npm package: @rbxts/vector
Description: A port of RobloxianDemo's Vector module.
Author: RobloxianDemo
Latest version: 1.1.0

# Vector

Vector is a highly lightweight utility, served as an addition to Roblox's traditional Vector2 / Vector3 libraries.

## Installation

### 📦 — NPM:

```
npm i @rbxts/vector
```

### 🧶 — Yarn:

```
yarn add @rbxts/vector
```

### 📀 — pnPM:

```
pnpm add @rbxts/vector
```

## Vector API

### `Vector.FromVector2XY`

```ts
function FromVector2XY<T extends Vector>(vector2: Vector2): Vector3 | T;
```

Create a Vector3 from a Vector2 within the XY plane.

### `Vector.FromVector2XZ`

```ts
function FromVector2XZ<T extends Vector>(vector2: Vector2): Vector3 | T;
```

Create a Vector3 from a Vector2 within the XZ plane.

### `Vector.GetAngleRad`

```ts
function GetAngleRad<T extends Vector>(vectorA: Vector2, vectorB: Vector2): number | T;
```

Compute the angle between two vectors in radians.

### `Vector.AngleBetweenVectors`

```ts
function AngleBetweenVectors<T extends Vector>(vectorA: Vector2, vectorB: Vector2): number | T;
```

Compute the angle between two vectors.

### `Vector.Round`

```ts
function Round<T extends Vector>(vectorA: Vector3, amount: number): Vector3 | T;
```

Round the Vector3 to the nearest number.

### `Vector.ClampMagnitude`

```ts
function ClampMagnitude<T extends Vector>(vectorA: Vector, amount: number): number | T;
```

Clamp the magnitude of a vector so it is only a certain length.

### `Vector.AngleBetween`

```ts
function AngleBetween<T extends Vector>(vectorA: Vector, vectorB: Vector): number | T;
```

Finds the angle in radians between two vectors.

### `Vector.AngleBetweenSigned`

```ts
function AngleBetweenSigned<T extends Vector>(vectorA: Vector, vectorB: Vector, axisVector: Vector): number | T;
```

Return a random unit vector (could be used for equal distribution around a sphere).

### `Vector.GetRandomUnitVector`

```ts
function GetRandomUnitVector<T extends Vector3>(): Vector3 | T;
```

Return a random unit vector (could be used for equal distribution around a sphere).

## Example

```ts
// Services
import { Workspace } from "@rbxts/services";

// Modules
import { GetRandomUnitVector, AngleBetweenSigned } from "@rbxts/vector";

// Functions
const Part = new Instance("Part");
Part.Name = "Part";
Part.Position = GetRandomUnitVector();
Part.Size = GetRandomUnitVector();
Part.Parent = Workspace;

const angleBetweenSigned = AngleBetweenSigned(Part.Position, Part.Size, new Vector3(1, 1, 1));

print(angleBetweenSigned);
```