open-index/open-npm huggingface dataset:
npm package: @hmans/signal
Description: A super duper simple signal implementation.
Author: Hendrik Mans
Latest version: 0.2.2

[![Tests](https://github.com/hmans/signal/actions/workflows/tests.yml/badge.svg)](https://github.com/hmans/signal/actions/workflows/tests.yml)
[![Version](https://img.shields.io/npm/v/@hmans/signal)](https://www.npmjs.com/package/@hmans/signal)
[![Downloads](https://img.shields.io/npm/dt/@hmans/signal.svg)](https://www.npmjs.com/package/@hmans/signal)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@hmans/signal?label=bundle%20size)](https://bundlephobia.com/result?p=@hmans/signal)

# @hmans/signal

A super duper simple signal implementation that I use in many of my other projects. It doesn't do anything terribly exciting, but provides some API niceties for added convenience.

Signals represent distinct signals -- or events -- that allow interested parties to add callbacks to them that will be evoked whenever the signal is emitted. Unlike `eventemitter` and friends, distinct signals are expressed as separate instances -- there is no key-based routing (in fact, there aren't even any keys to begin with!)

## Projects using @hmans/signal

- [miniplex](https://github.com/hmans/miniplex)
- [controlfreak](https://github.com/hmans/controlfreak)
- [Trinity](https://github.com/hmans/trinity)

## Usage

```tsx
import { Signal } from "@hmans/signal"

const signal = new Signal<number>()
signal.add((n) => console.log(n))
signal.emit()
```

Callbacks are added through `add` and removed through `remove`.

```tsx
const callback = (n) => console.log(n)
signal.add(callback)
signal.remove(callback)
```

`clear` discards all registered listeners:

```tsx
signal.clear()
```

Signals optionally accept a listener through their constructor (just a bit of syntactical sugar for convenience):

```tsx
const signal = new Signal(() => console.log("I've been signalled!"))
signal.emit()
```

Interactions with `Signal` instances can be chained:

```tsx
new Signal<string>()
  .add((name) => console.log(`Hello ${name}!`))
  .add((name) => console.log(`Hi again ${name}!`))
  .emit()
```
npm package: @hmans/things
Description: The complete collection of hmans' things.
Author: Hendrik Mans
Latest version: 0.0.9

# @hmans/things

## Summary

This is a kitchen-sink package containing all micropackages from the [@hmans/things](https://github.com/hmans/things) repository (to make it a little more convenient to use these in a project.) Please refer to the [monorepo's README](https://github.com/hmans/things) for more information.
npm package: @hmans/trinity
Description: Trinity.
Latest version: 0.2.0

# Trinity

### Goals:

- Provide wrapper components for the entire THREE namespace, with a similar API to react-three-fiber
- Allow for stacked scene rendering
- Allow for per-scene virtual resolution scaling
- On-Demand Rendering first (ticker callbacks that warrant a re-render must declare this)
- Provide a solid game-ready ticker (with late & fixed step stages) out of the box
- React 18+, with full support for new concurrent features

### TODO:

Big Features:

- [x] Ticker
- [x] Custom cameras
- [ ] Pointer Event Handling
- [ ] On-Demand Rendering everywhere?

Misc:

- [x] Rename "Scene" to eg. "View"
npm package: @hmans/types
Description: A collection of utility types for TypeScript.
Author: Hendrik Mans
Latest version: 0.0.3

# @hmans/types

## Summary

A collection of utility types for TypeScript.

## License

```
Copyright (c) 2022 Hendrik Mans

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
npm package: @hmans/ui
Description: Game UI.
Latest version: 0.2.0

# Trinity

### Goals:

- Provide wrapper components for the entire THREE namespace, with a similar API to react-three-fiber
- Allow for stacked scene rendering
- Allow for per-scene virtual resolution scaling
- On-Demand Rendering first (ticker callbacks that warrant a re-render must declare this)
- Provide a solid game-ready ticker (with late & fixed step stages) out of the box
- React 18+, with full support for new concurrent features

### TODO:

Big Features:

- [x] Ticker
- [x] Custom cameras
- [ ] Pointer Event Handling
- [ ] On-Demand Rendering everywhere?

Misc:

- [x] Rename "Scene" to eg. "View"
npm package: @hmans/use-animation-frame
Description: Provides `useAnimationFrame`, a simple hook that lets you mount callback functions into `requestAnimationFrame`.
Author: Hendrik Mans
Latest version: 0.0.2

# @hmans/use-animation-frame

## Summary

`useAnimationFrame` is a React hook that allows you to subscribe to the browser's animation frame. A single argument will be passed back into this callback, containing the previous frame's delta time. This delta time value is clamped to 1 second, to prevent the animation from going haywire if the browser tab has been inactive for a while.

```tsx
import { useAnimationFrame } from "@hmans/use-animation-frame"

function MyComponent() {
  useAnimationFrame((dt) => {
    /* Will be executed every frame */
  })
}
```

By default, this per-frame callback will be unmounted and remounted every time your component re-renders. You may optionally provide a second argument to `useAnimationFrame` that will be used as a dependency array for the effect hook that is used internally. This way, you can ensure that the callback will only be called when the dependencies change:

```tsx
function MyComponent({ thing }) {
  useAnimationFrame(
    (dt) => {
      /* Do something with thing */
    },
    [thing]
  )
}
```

## License

```
Copyright (c) 2022 Hendrik Mans

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
npm package: @hmans/use-const
Description: A simple `useConst` hook for when you don't trust `useMemo`. ;-)
Author: Hendrik Mans
Latest version: 0.0.1

# @hmans/use-const

## Summary

`useConst`, a simple hook that allows you to define a contant value that will never change during the lifetime of the component.

```tsx
import { useConst } from "@hmans/use-const"

const MyComponent = () => {
  const foo = useConst(() => new Foo())
  /* ... */
}
```

## Motivation

Typically, you might use `useMemo` or `useState` for these things. `useMemo` doesn't give you a guarantee that it will never re-run its initializar function (which can be bad, depending on what kind of value you're dealing with), and `useState` adds state tracking overhead that sometimes is not needed.
npm package: @hmans/use-list
Description: A simple `useList` hook for simple reactive lists management.
Author: Hendrik Mans
Latest version: 0.0.1

# @hmans/use-list

## Summary

`useList` returns a reactive list of items together with functions to add and remove items to and from the list.

```tsx
const [list, addItem, removeItem, setList] = useList<T>()
```

If no argument is passed, the list will be initialized as an array of the given type, but you can also pass an initial value:

```tsx
useList([thing1, thing2])
```

Or pass a constructor function:

```tsx
useList(() => [thing1, thing2])
```

## Example

```tsx
import { useList } from "@hmans/use-list"

export const provideModuleRegistration = () => {
  const [things, addThing, removeThing] = useList<Thing>()

  return (
    <div>
      <button onClick={() => addThing(new Thing())} />
      <ul>
        {things.forEach((thing) => (
          <li>
            {thing.name}
            <button onClick={() => removeThing(thing)} />
          </li>
        ))}
      </ul>
    </div>
  )
}
```

## License

```
Copyright (c) 2022 Hendrik Mans

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
npm package: @hmans/use-rerender
Description: A hook providing a function that will cause the component to re-render, no questions asked.
Author: Hendrik Mans
Latest version: 0.0.2

# @hmans/use-rerender

## Summary

`useRerender` returns a function that, when called, will cause the component to re-render, no questions asked.

```tsx
import { useRerender } from "@hmans/use-rerender"

const MyComponent = () => {
  const rerender = useRerender()

  useEffect(() => {
    console.log("This component was rendered!")
  })

  return (
    <div>
      <button onClick={rerender}>Bump</button>
    </div>
  )
}
```
npm package: @hmans/use-version
Description: A hook providing a version number, and a function to increment it.
Author: Hendrik Mans
Latest version: 0.0.2

# @hmans/use-version

## Summary

`useVersion` provides a numerical version number as well as a function that will bump it up by one. This is a simple mechanism for writing components that need to re-render on specific occasions, and have side effects that need to react to the version number increasing.

```tsx
import { useVersion } from "@hmans/use-version"

const MyComponent = () => {
  const [version, bump] = useVersion()

  useEffect(() => {
    console.log("Someone bumped the version to", version)
  }, [version])

  return (
    <div>
      <p>Version: {version}</p>
      <button onClick={bump}>Bump</button>
    </div>
  )
}
```
npm package: @hmbanan666/chat-game-api
Description: Chat Game API: all communication with Server in one place
Author: Nick Kosarev
Latest version: 0.1.18

# chat-game-api

Chat Game API: all communication with Server in one place

## How to use

```shell
npm i @hmbanan666/chat-game-api
```

Import from lib. Init it as a new class, provide Bearer Token. Use available typed methods.

```ts
import { ChatGameAPI } from '@hmbanan666/chat-game-api'

const server = new ChatGameAPI('<your token>')

const test = await server.method()
if (test instanceof Error) {
  // Some error
}
```

## Changelog

See CHANGELOG.md
npm package: @hmcs/elmer
Description: Default character mod that spawns Elmer and manages idle, grab, and sitting animations with cursor look-at
Author: notelm
Latest version: 0.1.0-alpha.5

# Elmer Mod

This package contains the default character mod for Desktop Homunculus.

## Purpose

- Define the Elmer mod package entrypoint.
- Serve as the base package for the default character behavior.
npm package: @hmcs/menu
Description: Right-click context menu mod that provides a WebView-based HUD overlay for quick in-app actions
Author: notelm
Latest version: 0.1.0-alpha.5

# Menu Mod

This package provides the context menu HUD UI for Desktop Homunculus.

## Purpose

- Build and ship the menu web UI asset.
- Expose a mod package for in-app menu interactions.
npm package: @hmcs/sdk
Description: TypeScript SDK for building mods and extensions for Desktop Homunculus
Author: notelm
Latest version: 0.1.0-alpha.5

# @hmcs/sdk

TypeScript SDK for building mods and extensions for [Desktop Homunculus](https://github.com/not-elm/desktop_homunculus).

## Install

```bash
npm install @hmcs/sdk@https://github.com/desktop-homunculus/typescript-sdk
```

## Quick Start

```typescript
import { Vrm } from "@hmcs/sdk";
// Spawn a VRM character
const vrm = await Vrm.spawn("my-mod:avatar");
```

## Function Style

For SDK source code under `src/`, use the following style:

- Use `function` / `async function` declarations for top-level public API functions and reusable top-level helpers.
- Use arrow functions for inline callbacks (for example, array methods and event listeners).

This keeps API boundaries explicit while preserving readability in callback-heavy code.

## License

MIT
npm package: @hmcs/voicevox
Description: VoiceVox TTS integration for Desktop Homunculus
Author: notelm
Latest version: 0.1.0-alpha.5

# VoiceVox Mod

This package provides VoiceVox text-to-speech integration for Desktop Homunculus.

## Purpose

- Integrate VoiceVox-based speech features.
- Provide command entrypoints for initialize, speaker listing, and speech.