open-index/open-npm huggingface dataset:
npm package: @rbxts/serikanum
Description: Onoe Serika's go-to big number library for small and large-scale incremental games!
Author: evilbocchi
Latest version: 1.6.0

# SerikaNum

Onoe Serika's go-to big number library for small and large-scale incremental games! 

<p align="center">
  <img alt="Data" src="assets/serikanum ad.jpg"></img>
</p>

SerikaNum is the base library used for basic big number calculations, utilising two number primitives to reach up to 10^(10^308). Which is pretty huge! Not that huge, though. If you want something truly outstanding, check out [OmegaNum](https://create.roblox.com/store/asset/11646892509/OmegaNum-Readable), going even above Graham's 
number.

To truly enjoy SerikaNum's benefits, try using OnoeNum! It's a wrapper library to balance performance and development speed, being fast enough that
you wouldn't have to worry while keeping it simple.

Okkei? Ah, okkei.
npm package: @rbxts/server-networked-values
Description: A Roblox-TS library for networking persistent values from the server to the client
Author: Bytebit
Latest version: 0.0.15

# roblox-ServerNetworkedValues
A Roblox-TS library for networking values from the server to the client

## Installation
### roblox-ts
Simply install to your [roblox-ts](https://roblox-ts.com/) project as follows:
```
npm i @rbxts/server-networked-values
```

### Wally
[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:
```
ServerNetworkedValues = "bytebit/server-networked-values@0.0.12"
```

Then just run `wally install`.

### From model file
Model files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/roblox-ServerNetworkedValues/releases) and load it into your project however you see fit.

### From model asset
New versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/7874542045/Server-Networked-Values-Package)

# Why is this still version 0.x?
Because this package does not yet have thorough unit testing, it cannot really be trusted to be a 1.x release. Once thorough unit testing is added, then this package can have a high enough degree of trust to release version 1.0.0!
npm package: @rbxts/set-timeout
Description: Functions for setTimeout and setInterval
Author: littensy
Latest version: 1.1.2

## ⏱️ [set-timeout](https://npmjs.com/package/@rbxts/set-timeout)

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/littensy/set-timeout/ci.yml?branch=master&style=for-the-badge&logo=github)
[![npm version](https://img.shields.io/npm/v/@rbxts/set-timeout.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/set-timeout)
[![npm downloads](https://img.shields.io/npm/dt/@rbxts/set-timeout.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rbxts/set-timeout)
[![GitHub license](https://img.shields.io/github/license/littensy/set-timeout?style=for-the-badge)](LICENSE.md)

A simple implementation of `setTimeout` and `setInterval` for Roblox TypeScript.

&nbsp;

### 📦 Installation

This package is available for Roblox TypeScript on NPM:

```console
$ npm install @rbxts/set-timeout
```

```console
$ pnpm add @rbxts/set-timeout
```

&nbsp;

### 📚 Usage

#### `setTimeout(callback, time)`

```ts
const cleanup = setTimeout(() => {
	print("Hello, world!");
}, 1);

cleanup();
```

#### `setInterval(callback, time)`

```ts
const cleanup = setInterval(() => {
	print("Hello, world!");
}, 1);

cleanup();
```

#### `setCountdown(callback, time, interval)`

```ts
const promise = setCountdown((secondsLeft) => {
	print(secondsLeft);
}, 3);

promise.then(() => {
	print("Done!");
});

// 3, 2, 1, Done!
```

#### `throttle(callback, time, options)`

Creates a throttled function that only invokes `callback` at most once per every `wait` seconds.

```ts
const throttled = throttle((value: number) => {
	print(`Throttled: ${value}`);
}, 1);

for (const index of $range(0, 10)) {
	throttled(index);
	task.wait(0.25);
}

// Throttled: 0
// Throttled: 4
// Throttled: 8
```

#### `debounce(callback, time, options)`

Creates a debounced function that delays invoking `callback` until after `wait` seconds have elapsed since the last time the debounced function was invoked.

```ts
const debounced = debounce((value: number) => {
	print(`Debounced: ${value}`);
}, 1);

for (const index of $range(0, 10)) {
	debounced(index);
	task.wait(0.25);
}

task.wait(2);
debounced(11);

// Debounced: 10
// Debounced: 11
```

&nbsp;

## 📝 License

set-timeout is licensed under the [MIT License](LICENSE.md).
npm package: @rbxts/shapecasthitbox
Description: A shapecast-centric solution to melee hitboxes. Successor to RaycastHitbox. (TS typings)
Author: ophidie
Latest version: 0.2.5

> [!NOTE]
> This repo was created for the utilization of this package with roblox-ts, the only difference is the typescript typings.

<p align="center">
 <img href="https://www.npmjs.com/package/@rbxts/shapecasthitbox" alt="NPM Version" src="https://img.shields.io/npm/v/%40rbxts%2Fshapecasthitbox?logo=npm">
</p>

---

# ShapecastHitbox
A shapecast-centric solution to melee hitboxes on Roblox. Successor to RaycastHitbox.

## Installation
To do
npm package: @rbxts/sheetvalues
Description: Use Google Sheets as a live value updater for Roblox games. roblox-ts typings for SheetValues by boatbomber
Author: boatbomber
Latest version: 2.0.3-ts.1

# SheetValues

TS typings for boatbomber's SheetValues.

- [**SheetValues repository**](https://github.com/boatbomber/SheetValues)
- [**SheetValues documentation**](https://devforum.community/t/364)
- [**This package's repository**](https://github.com/tacheometry/rbxts-sheetvalues)

## Installation

[![NPM](https://nodei.co/npm/@rbxts/sheetvalues.png)](https://npmjs.org/package/@rbxts/sheetvalues)

Run `npm i @rbxts/sheetvalues` in your project directory.

## Usage

With a sheet like this:

| Name | SomeKey | SomeOtherKey |
| ---- | ------- | ------------ |
| Foo  | 50      | test         |
| Bar  | 90      | test2        |

One can extract values with the following code:

```ts
import SheetValues from "@rbxts/sheetvalues";

// The type parameter represents the sheet
const sheet = new SheetValues<{
  Foo: {
    SomeKey: number;
    SomeOtherKey: string;
  };
  Bar: {
    SomeKey: number;
    SomeOtherKey: string;
  };
}>("Spread id extracted from the URL");

const a = sheet.Values.Foo.SomeKey; // 50
const b = sheet.Values.Bar.SomeOtherKey; // "test2"
```

---

To contribute to SheetValues, please file Pull Requests and Issues in [its GitHub repository](https://github.com/boatbomber/SheetValues), and not in the repository of this package. The types here will reflect the most recent release of the Luau code.
npm package: @rbxts/shieldcore
Description: Shieldcore is a Roblox framework for creating command-based systems.
Author: Rüfat
Latest version: 0.0.6

# 🛡️ ShieldCore Chat Command System

A simple command system for Roblox-TS.

## ✨ Features

- Easy command registration via `ShieldCore.registerCommand(...)`
- Supports command descriptions
- Chat-based command execution using `/command args...`
- Clean architecture

## 📦 Installation

`npm i @rbxts/shieldcore`

## 🧠 Usage

### Registering a Command

Create a command:

```ts
import { Command } from "@rbxts/shieldcore";
import { ShieldCore } from "@rbxts/shieldcore";

const flyCommand = new Command(
    "fly",
    (args) => {
        print("Fly command executed with args:", args);
    },
    "Fly",
    "/fly <player>",
    (player) => player.UserId === 123456,
);

ShieldCore.registerCommand(flyCommand);
ShieldCore.start(); // Start Shieldcore
```

# Getting Started

## Installation

```bash
npm install @rbxts/shieldcore
```

## Starting Shieldcore
Centurion only needs to be started once on the server

```ts
import { Shieldcore } from "@rbxts/shieldcore";

Shieldcore.start()
```

## Registration

Here is a example of how you can register a command

```ts
import { COMMAND } from "./path/file"
import { Shieldcore } from "@rbxts/shieldcore";

Shieldcore.RegisterCommand(COMMAND);
```

# Examples

## Kick Command
```ts
import { Command } from "@rbxts/shieldcore";
import { Players } from "@rbxts/services";

const Moderators = [12345678];

function isModerator(player: Player): boolean {
	return Moderators.includes(player.UserId);
}

export const kickCommand = new Command(
	"kick",
	(args: string[], player: Player) => {
		const targetName = args[0];

		const target = Players.FindFirstChild(targetName) as Player | undefined;
		if (!target || !target.IsA("Player")) {
			player.Kick(`Player "${targetName}" not found.`);
			return;
		}

		target.Kick(`You were kicked by ${player.Name}.`);
		print(`${player.Name} kicked ${target.Name}`);
	},
	"Kicks a player from the server.",
	"/kick [player]",
	isModerator,
);

```

# Defining commands

Commands are defined using the command class

A command can be defined like so:
```ts
import { Command, Shieldcore } from "@rbxts/shieldcore";

const printCommand = new Command(
    "print",
    (args, player) => {
        print(`Arguments: ${args.join(", ")} from ${player}`)
    },
    "print something",
    "/print <args...>",
    (player) => player.UserId === 1,
)
```

# Registering commands

A command can be register like so:
```ts
// server
import { YOURCOMMAND } from "./path/file"; // import your command
import { Shieldcore } from "@rbxts/shieldcore";

Shieldcore.RegisterCommand(YOURCOMMAND);
```

# Starting Shieldcore

Centurion only needs to be started once on the server

```ts
// server
import { Shieldcore } from "@rbxts/shieldcore";

Shieldcore.start()
```
npm package: @rbxts/signals-tooling
Description: Simple, base-level tooling for working with signals in Roblox.
Author: Bytebit
Latest version: 1.0.8

# roblox-SignalsTooling
Simple, base-level tooling for working with signals in Roblox.

## Installation
### roblox-ts
Simply install to your [roblox-ts](https://roblox-ts.com/) project as follows:
```
npm i @rbxts/signals-tooling
```

### Wally
[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:
```
FiniteStateMachine = "bytebit/signals-tooling@1.0.8"
```

Then just run `wally install`.

### From model file
Model files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/roblox-SignalsTooling/releases) and load it into your project however you see fit.

### From model asset
New versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/7876489428/Signals-Tooling-Package)
npm package: @rbxts/simple-path
Description: A typed port of grayzcale's simple path!
Author: doqe
Latest version: 1.0.1

![](https://devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/0/7/9/079f2967c6063a0052eb4809633b1d1e498a345a.png)

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/grayzcale/simplepath/docs.yml?branch=main&label=docs&style=plastic)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Zeref-Z/rblx-simplepath?sort=semver&style=plastic)
![GitHub](https://img.shields.io/github/license/Zeref-Z/rblx-simplepath?style=plastic)

A typed version of SimplePath, an open-source pathfinding module that gives you the ability to quickly create a pathfinding script for humanoids and non-humanoids with just a few lines of code. Pathfinding is done using [Roblox's PathfindingService](https://developer.roblox.com/en-us/api-reference/class/PathfindingService).

<br>

## Installation

(This can be replaced with any package manager!)
```sh
$ npm i @rbxts/simplepath
```

### Example

```ts
import SimplePath from "@rbxts/simplepath"
import {Workspace} from "@rbxts/services"

const Path = new SimplePath(Workspace.WaitForChild("Dummy"))

Path.Run(Workspace.WaitForChild("Goal"))

```

<br>

## Other Links

- <a href=https://grayzcale.github.io/simplepath/ target=_blank>Documentation/Examples</a>
- <a href=https://devforum.roblox.com/t/1196762 target=_blank>DevForum</a>
- <a href=https://www.roblox.com/library/6744337775/SimplePath-Pathfinding-Module target=_blank>Roblox</a>
npm package: @rbxts/skilift
Description: A session lockless general datastore library
Author: alicesaidhi
Latest version: 0.3.1

# Skilift

Skilift is a modern lockless data storage library with transactions. It does not use session locks, guaranteeing that players will be able to access their data aslong as DataStoreService is available.

[Documentation](https://alicesaidhi.github.io/skilift/)
npm package: @rbxts/snapdragon
Description: A library that allows UI to be draggable in/and snappable to the viewport
Author: vorlias
Latest version: 2.0.0-beta.1

<div align="center">
	<img src="https://assets.vorlias.com/i1/snapdragon.png"/>


</div>
<div align="center">
  	<h1>Snapdragon</h1>
	<a href="https://www.npmjs.com/package/@rbxts/snapdragon">
		<img src="https://badge.fury.io/js/%40rbxts%2Fsnapdragon.svg"></img>
	</a>
</div>

Library for UI dragging support, with snapping capabilities in Roblox.

Documentation for Snapdragon can be found at https://roblox-aurora.github.io/rbx-snapdragon


# Basic Usage
```ts
// Typescript
import { createDragController } from "@rbxts/snapdragon";
const controller = createDragController(gui, {SnapEnabled: true});
controller.Connect() // Attaches the controller to the gui you specify

controller.Disconnect() // Will disconnect the drag controller from the Gui
```

```lua
-- Lua
local Snapdragon = require(snapdragonModule)
local controller = Snapdragon.createDragController(gui, {SnapEnabled = true})
controller:Connect() -- Attaches the controller to the gui you specify

controller:Disconnect() -- Will disconnect the drag controller from the Gui
```

## Usage with Roact
If you want to use Snapdragon with Roact, simply use `Roact.Ref` with the object you want to be draggable, and create and assign a controller in the `didMount` method to the ref's instance.

# FAQ
## Why not just use `GuiObject.Draggable`?
`Draggable` is deprecated. It never worked well and isn't flexible - as discussed [here](https://devforum.roblox.com/t/draggable-property-is-hidden-on-gui-objects/107689/5?u=vorlias).

This library aims to add the ability to make your UI draggable without the extra work on your part, as well as make it more flexible with snapping capabilities and constraints (soon&trade;)

## What about controller support?
I would like to add the ability for controllers to drag UI elements at some point. Some console games actually have a faux-mouse type dragging system, it would function in a similar fashion.

# API
The API for Snapdragon can be found [here](index.d.ts)

There will eventually&trade; be proper docs for this library.
npm package: @rbxts/sound-manager
Description: A sound manager for Roblox-Typescript projects.
Author: Easy-Build-Studio
Latest version: 2.3.4

<h1 align="center">
	<a href="https://www.npmjs.com/package/@rbxts/sound-manager">
		<img src="https://github.com/dev-lukas0/Sound-Manager/blob/master/public/logo.png?raw=true" alt="Sound-Manager" width="200" />
	</a>
	<br />
	<b>Sound Manager</b>
    
</h1>

<div align="center">

![npm](https://img.shields.io/npm/dt/@rbxts/sound-manager?style=flat-square) ![npm](https://img.shields.io/npm/v/@rbxts/sound-manager?style=flat-square) ![GitHub](https://img.shields.io/github/license/dev-lukas0/Sound-Manager?style=flat-square)

</div>

---

&nbsp;


## 🔉 Sound Manager

**Sound Manager** is a roblox sound-management library built with Roblox-TS, designed to simplify sound handling in your roblox projects.

&nbsp;

## 📦 Installation

To use the Sound Manager library in your Roblox-TS project, install it via npm:

```bash
npm install @rbxts/sound-manager
```

&nbsp;

## 🚀 Quick Start

[See the Documentation ->](https://dev-lukas0.github.io/Sound-Manager/)

### ⚡ Starting with Sound Manager

Sound-Manager uses [`createSoundRegistry`](https://dev-lukas0.github.io/Sound-Manager/docs/reference/create-sound-registry) and [`createSoundCategoryRegistry`](https://dev-lukas0.github.io/Sound-Manager/docs/reference/create-sound-category-registry) to create sounds and categories.

```ts
import { createSoundRegistry } from "@rbxts/sound-manager";

const Sounds = createSoundRegistry({
    SCP096: {
        id: "rbxassetid://4714389545",
        volume: 1,
        loop: false,
    },

    Test: {
        id: "rbxassetid://17771398985",
        volume: 1,
        loop: true,
    }
});
```

### 🎵 Playing Sounds

To play a sound, you can use the [`play`](https://dev-lukas0.github.io/Sound-Manager-Docs/docs/API/play) method on the sound registry:

```ts
Sounds.play("SCP096");
```

&nbsp;

## 🗺️ Roadmap
-------
See the [Roadmap](./Roadmap.md) for planned features and current progress.

&nbsp;

## 📝 License

**Sound Manager** is licensed under the [MIT LICENSE](./LICENSE).

&nbsp;

For more Details:
https://dev-lukas0.github.io/Sound-Manager/
npm package: @rbxts/soundspace
Description: Lightweight utility library for Roblox's new sound API
Author: teakzc
Latest version: 0.1.0

<div align="center">
  <h1 align="center"><b>soundspace</b></h1>
  <p align="center"></p>

    Lightweight utility library for Roblox's new sound API

[![License](https://img.shields.io/github/license/teakzc/soundspace?style=for-the-badge)](https://github.com/teakzc/soundspace/blob/main/LICENSE)

</div>

## 🔊 Features

- Convert sound ids into a `AudioPlayer`
- Auto `Wire` connection between listeners and players/emitters
- Insert audio effects with ease
- Create `AudioListener` & `AudioDeviceOutput`
- Auto cleanup

## 📦 Installation

[npm](https://www.npmjs.com/package/@rbxts/soundspace):

```zsh
npm add @rbxts/soundspace
```
npm package: @rbxts/stagemanager
Description: Allocate isolated stages with lifecycle management
Author: teakzc
Latest version: 0.1.1


<div align="center">

  <h1 align="center"><b>stage manager</b></h1>
  <p align="center"></p>

  Allocate isolated stages with lifecycle management

  [![License](https://img.shields.io/github/license/teakzc/stagemanager?style=for-the-badge)](https://github.com/teakzc/stagemananger/blob/main/LICENSE)
</div>

## 🪄 What does stage manager do?
- Automatically allocate stage's `Position` without conflicts
- Tracks added `Instance`s for automatic cleanup
- Manage `stage`'s lifecycle events with ease
- Unique metadata per stage for identification
- Relative positioning for quality of life

## 📦 Installation
[npm](https://www.npmjs.com/package/@rbxts/stagemananger):
```zsh
npm add @rbxts/stagemanager
```

## 🗃️ Documentation

There are JSDoc comments in the code
npm package: @rbxts/streamable
Description: Observe instances that stream in and out of existence
Author: sleitnick
Latest version: 0.1.0

# Streamable
A common problem in streamed Roblox experiences is dealing with the existence of instances on the client. 

The Streamable package seeks to solve this complexity by providing a series of helper functions. These functions observe the existence of instances as they stream in and out of existence.

## `observeChild`
```ts
function observeChild(
	parent: Instance,
	childName: string,
	observer: (child: Instance) => () => void,
): () => void
```
Observe the existence of a given child within a parent instance. The observer function is called each time that the child comes into existence, and the returned callback is called when the instance goes away.

The function returns a "stop" callback which can be called to stop and clean up the observation process entirely. If called while the given instance exists, the inner returned function (i.e. the function that runs when the instance goes away) is called too.

If the top-level parent is destroyed, the observation is automatically stopped.
```ts
const stop = observeChild(workspace, "Baseplate", (baseplate) => {
	print("Baseplate exists");
	return () => {
		print("Baseplate is gone");
	};
});
```

## `observeDescendant`
```ts
function observeDescendant(
	parent: Instance,
	descendantName: string,
	observer: (descendant: Instance) => () => void,
): () => void
```
This is the same as `observeChild`, except it observes across all descendants of the given `parent` instance.

## `observeChildren`
```ts
function observeChildren<T extends string>(
	parent: Instance,
	childrenNames: Record<T, string>,
	observer: (children: Record<T, Instance>) => () => void,
): () => void
```
Observes a collection of children within the given `parent` instance. When _all_ children are present, the `observer` will be called. When _any_ of the children are no longer present, the observer's returned function is called. In other words, this observer can guarantee the existence of a compound group of instances.

The returned function can be called to stop the observation process, which is also automatically called if the `parent` instance is destroyed.

```ts
const stop = observeChildren(
	workspace,
	{
		// Custom mapping of keys to instance names:
		Ground: "Baseplate",
		Spawn: "SpawnLocation",
	},
	(children) => {
		// Use the same keys from above to access the actual instances:
		print(children.Ground, children.Spawn);
		return () => {
			print("Ground and/or spawn no longer present");
		};
	},
)
```

## `observeDescendants`
```ts
function observeDescendants<T extends string>(
	parent: Instance,
	descendantNames: Record<T, string>,
	observer: (descendants: Record<T, Instance>) => () => void,
): () => void
```
This is the same as `observeChildren`, except it observes across all descendants of the given `parent` instance.
npm package: @rbxts/strict-map
Description: A simple class that looks like a regular map but that throws if indexed by a missing key.
Author: Bytebit
Latest version: 1.0.2

# Strict Map
<p align="center">
  <a href="https://github.com/Bytebit-Org/roblox-StrictMap/actions">
      <img src="https://github.com/Bytebit-Org/roblox-StrictMap/workflows/CI/badge.svg" alt="CI status" />
  </a>
  <a href="http://makeapullrequest.com">
    <img src="https://img.shields.io/badge/PRs-welcome-blue.svg" alt="PRs Welcome" />
  </a>
  <a href="https://opensource.org/licenses/MIT">
    <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" />
  </a>
  <a href="https://discord.gg/QEz3v8y">
    <img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" alt="Discord server" />
  </a>
</p>

Strict Map is a simple class that looks like a regular map but that throws if indexed by a missing key.

## Installation
### roblox-ts
Simply install to your [roblox-ts](https://roblox-ts.com/) project as follows:
```
npm i @rbxts/strict-map
```

### Wally
[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:
```
StrictMap = "bytebit/strict-map@1.0.2"
```

Then just run `wally install`.

### From model file
Model files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/roblox-StrictMap/releases) and load it into your project however you see fit.

### From model asset
New versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/1234567890/Strict-Map-Package)

## Documentation
Documentation can be found [here](https://github.com/Bytebit-Org/roblox-StrictMap/tree/master/docs), is included in the TypeScript files directly, and was generated using [TypeDoc](https://typedoc.org/).

## Example
A brief description of the example

<details>
  <summary>roblox-ts example</summary>

  ```ts
  import { PackageClass, packageFunction } from "@rbxts/strict-map";

  export class PackageConsumer {
  }
  ```
</details>

<details>
  <summary>Luau example</summary>

  ```lua
  local PackageClass = require(path.to.modules["strict-map"]).PackageClass
  local packageFunction = require(path.to.modules["strict-map"]).packageFunction

  local PackageConsumer = {}
  PackageConsumer.__index = PackageConsumer

  function new()
    local self = {}
    setmetatable(self, PackageConsumer)

    return self
  end
  
  return {
    new = new
  }
  ```
</details>
npm package: @rbxts/sweet-charm
Description: Library for @rbxts/charm that allows to create atom classes and sync them using repositories
Author: sumer_real
Latest version: 1.4.2

# 🌸 Sweet Charm

Library for charm that allows to create atom classes and sync them using repositories

# ⚙️ Credits
littensy - creator of original library [Charm](https://github.com/littensy/charm)

SUMER - creator of this library (discord: sumer_real)

# 🌩 Installation
``npm install @rbxts/sweet-charm``

# 📖 Documentation

## AtomClass

```ts
const myAtom = new AtomClass(1);

const unsubscribe = myAtom.subscribe((newData) => {
	print(newData);
});

myAtom.update(10);
myAtom.update((current) => current + 100);

print("current data", myAtom.getData());
print("raw atom", myAtom.getAtom());
```

## AtomRepository

```ts
type Event = {
	name: string,
	until: number,
}

type Item = {
	name: string,
	power: number,
}

type MyAtoms = {
	events: AtomClass<Event[]>,
	items: AtomClass<Item[]>,
}

const repo = new AtomRepository<MyAtoms>();

repo.define({
	events: new AtomClass([]),
	items: new AtomClass([]),
});

print("events", repo.get("events").getData());
print("items", repo.get("items").getData());
print("all atoms", repo.getAtoms());

const subRepo = repo.subdivide();

print("parent events", subRepo.get("events"));

repo.remove("events")  // you can remove atom by name from repository
```

### AtomRepository syncer

```ts
type Event = {
	name: string,
	until: number,
}

type Item = {
	name: string,
	power: number,
}

type MyAtoms = {
	events: AtomClass<Event[]>,
	items: AtomClass<Item[]>,
}

const repo = new AtomRepository<MyAtoms>();

repo.define({
	events: new AtomClass([]),
	items: new AtomClass([]),
});

repo.syncer.watchDispatch((player, payload) => {
	// send payload to player somehow
})

repo.syncer.hydrate(player);  // will call watchDispatch with all atoms
repo.syncer.start(0);  // optional interval 
```

## AtomRepositoryView

```ts
type Event = {
	name: string,
	until: number,
}

type Item = {
	name: string,
	power: number,
}

type MyAtoms = {
	events: AtomClass<Event[]>,
	items: AtomClass<Item[]>,
}

const repoView = new AtomRepositoryView<MyAtoms>();

// use this method to sync payload from AtomRepository syncer
repoView.syncer.sync(payload);

print("events", repoView.get("events"));
```
npm package: @rbxts/table-authenticator
Description: Simple type checker for tables.
Author: bortantle
Latest version: 1.0.2

## Warning 
Sadly this dosen't support arrays :(

## Example Usage 
```typescript
import AuthenticateData from "@rbxts/table-authenticator"
interface PlayerInfo {
    Coins: number,
    Gems: number,
    Level: number
}
const defaultPlayerData: PlayerInfo = {
    Coins: 0,
    Gems: 0,
    Level: 1
}

const dataToBePatched = {
    Coins: "hey",
    Gems: 2,
    Level: false
}

AuthenticateData<PlayerInfo>(defaultPlayerData, dataToBePatched) 
/*
returns {
    Coins: 0,
    Gems: 2,
    Level: 1
}
*/
```
npm package: @rbxts/tally-store
Description: A Roblox TypeScript library for managing in-game global counters stores.
Author: UrbanIndigo
Latest version: 1.0.3

# Tally Store

This library provides an efficient way to create global counters that are automatically updated across all services.

For example, it could be used to show the number of a type of pet or car collected.

It makes use of [Skilift](https://alicesaidhi.github.io/skilift/) under the hood, which is a datastore library without session locking.

## Quick Start

```ts
type Pet = "dog" | "cat" | "rat";

type PetTally = { [P in Pet]?: number };

// create a tally store
const pets = new TallyStore<PetTally>(
	"PetTally",
	(data) => {
		// do something with the data, like showing in a pet index
	},
	{
		defaultData: {},
	},
);

// increment the amount of dogs collected by 1
pets.increment("dog", 1);
```

## 📦 Installation

[Take me to the NPM package →](https://www.npmjs.com/package/@rbxts/tally-store)

```bash
npm install @rbxts/tally-store
```

## 🪪 License

Tally Store is available under the MIT license. See the [LICENSE.md](LICENSE.md) file for more info.
npm package: @rbxts/task-event-emitter
Description: Event emitter for roblox-ts using stravant's GoodSignal
Author: littensy
Latest version: 1.2.1

# @rbxts/task-event-emitter

Event emitter for roblox-ts using [stravant's GoodSignal class](https://devforum.roblox.com/t/lua-signal-class-comparison-optimal-goodsignal-class/1387063).

## Installation

```
npm i @rbxts/task-event-emitter
```

## Usage

Create an EventEmitter with an array of parameters:

```ts
const emitter = new EventEmitter<[player: Player]>(janitor);
```

Or, wrap an existing Roblox event:

```ts
const onChildAdded = EventEmitter.wrap(object.ChildAdded, janitor);
```

## Example

```ts
import EventEmitter from "@rbxts/task-event-emitter";

const onChange = new EventEmitter<[property: string]>();

onChange.subscribe((property) => print(`Property ${property} changed!`));

onChange.emit("Name");
```

```ts
import EventEmitter from "@rbxts/task-event-emitter";

const emitter = new EventEmitter();

const subscription = emitter.subscribe(() => {});

if (!subscription.closed) {
	subscription.unsubscribe();
}
```
npm package: @rbxts/task-queue
Description: Queue of cancellable tasks that is shifted and resumed whenever a task finishes
Author: Rimuy
Latest version: 1.0.0

# TaskQueue

In the example below, we add two tasks to the queue, and the first one yields longer than the main thread does. Because the cancel request is sent before the `task.wait(3)` in the first task had finished, "b" and "c" will not print.

```js
import TaskQueue from "@rbxts/task-queue";

const queue = new TaskQueue();

queue.AddTask(() => {
    print("a");
    task.wait(3);
    print("b");
    task.wait(1);
});

queue.AddTask(() => {
    print("c");
});

task.wait(2);
queue.Clear();
```

Events can be registered as dependencies for the queue, so that when one of its events is fired, the queue will cancel all the tasks that contains that event.

```js
import { myEvent } from "./events";

queue.AddTask(() => {
    task.wait(3);
    print("hello there");
}, [myEvent]);

// will prevent the task from printing "hello there"
myEvent.Fire();
```

Additionally, there is a method exclusive to promises, but the way it works is different from `AddTask`. Instead of resolving the promise when its thread is consumed by the queue, it'll be cancelled.

```js
const promise = new Promise((resolve) => {
    const status = getPlayerStatus();
    resolve(status);
}).timeout(60);

queue.AddTask(() => { ... });
// ...

queue.AddPromise(promise);
```

This is essentially a sugar for:
```js
queue.AddTask(() => {
    promise.cancel();
});
```
npm package: @rbxts/teakzc-crunchyroll
Description: just a fork of @rbxts/crunchyroll
Author: ffrostfall
Latest version: 0.2.0-ts.4

# Crunchyroll


https://github.com/user-attachments/assets/51bbde10-b439-431e-9e85-a808a9303f0f


no Animator!

---

Crunchyroll is a dedicated library for calculating coordinates frames of a rig from an array of animation tracks. You can define a rig by calling `crunchyroll.create_rig`, which is a representation of Roblox Motor6Ds. You can then pass this rig into `crunchyroll.solve_animation`, which also takes animation tracks. These are tables which are similar to Roblox's `AnimationTrack`s. Similar to AnimationTracks, you need an animation "asset". You can load a Roblox animation by calling `crunchyroll.load_keyframe_sequence`. Crunchyroll will then give you the coordinate frames of the "limbs" (think Torso, Head, "Left Leg", UpperTorso etc.), and that's it!

# Why use this?

If you don't intend on using Crunchyroll to write your own animation player:

- No instances! You can calculate how an animation looks at any given time without affecting your game in any way. This means you could implement things like proper ping compensation and secure hit detection (secure headshot detection!)
- Allows for extremely convenient still shots of characters
- Great for characters in viewport frames! Animations

If you do write your own animation player:

- Numerical priorities! No more Action1, Action2, Action3.
- No more :LoadAnimation() or any asset ID management.
- Immediate stops! No more forced 0.05s fade time.
- Very fast and performant :3
- potential for things like easy animation skipping!
- remove the physics from animations, makes it significantly easier to write your own animation replication!

# Future support

Eventually, I may consider making a custom animation format which supports things like sinusoidal easing, additive blending, and other features. I do not know how popular this would be though so I am not sure I will implement these right now.

# Example

```luau
local rig = require(...) -- Path to a Crunchyroll R6 rig
local crunchyroll = require(...) -- Path to Crunchyroll

local crunchyroll_animation = crunchyroll.load_keyframe_sequence(ReplicatedStorage.assets.TestAnimation)

crunchyroll_animation.solve_animation(rig, {
	[crunchyroll_animation] = {
		stop_fade_time = 0.25, -- 0.25 seconds
		start_fade_time = 0.25,

		weight = 1, -- Supports blending!
		priority = 1, -- Supports numerical priorities!

		alpha = 0.5 -- Halfway through the animation
	}
})

-- placed into a result table for optimal performance
local left_arm_cframe = rig.result_coordinate_frames["Left Arm"]
```