open-index/open-npm huggingface dataset:
npm package: @keupoz/r3f-utils
Description: Small set of utils for @react-three/fiber
Author: keupoz
Latest version: 2.0.2

# React Three Fiber utils

![NPM version](https://img.shields.io/npm/v/@keupoz/r3f-utils)

This is a small set of personal R3F utils I use in my projects.

## Installation

```sh
npm install @keupoz/r3f-utils @react-three/fiber @react-three/drei three camera-controls
```

## Usage

```tsx
import { CameraControls, Canvas, FocusControls, Grid, Lights } from '@keupoz/r3f-utils'
import { Box, PerspectiveCamera } from '@react-three/drei'

export function App() {
  return (
    <Canvas>
      <PerspectiveCamera makeDefault position={[32, 32, 32]} />
      <CameraControls makeDefault />

      <Lights />

      <Grid color={0x252525} />

      <FocusControls>
        <Box />
      </FocusControls>
    </Canvas>
  )
}
```

## Included components

### `CameraControls`

Adapted version of [CameraControls](https://drei.docs.pmnd.rs/controls/camera-controls) from Drei. It has fixes for the `demand` frameloop and a bit better structured code.

### `Canvas`

Just the Canvas component from R3F with some preconfigured properties such as `demand` frameloop and linear color space.

### `FocusControls`

A simple components that allows the user to focus the camera on scene object of their choice. Also includes a simple highlight of the hovered object.

How to use:

- Double click on any object to focus on them.
- Double click on empty space to reset focus.

### `Grid`

Just the [Grid](https://drei.docs.pmnd.rs/gizmos/grid) component from Drei with some preconfigured properties.

### `Lights`

A preset of scene lights.

## Included utils

### `setFocus(controls: CameraControls, object: Object3D)`

Internally used by FocusControls. Exposed to be able to set focus on any specified object.

## Known issues

- CameraControls doesn't properly update when its methods are called without enabled transition. I won't bother fixing as I only need them with enabled transition.
npm package: @keupoz/strict-queryselector
Description: A simple typeguard wrapper around document.querySelector for TypeScript
Author: keupoz
Latest version: 1.1.0

# strict-queryselector

## Usage
```typescript
import { querySelector } from "@keupoz/strict-queryselector";

// Same examples applies to querySelectorAll
// Gets body element with type of HTMLBodyElement
const body = querySelector("body", HTMLBodyElement);

// Throws TypeError as body element is not instance of HTMLDivElement
const bodyDiv = querySelector("body", HTMLDivElement);

// Throws Error if element doesn't exist
// If it exists, checks if it's instance of specified type
const meaningOfLife = querySelector(".life-meaning", HTMLDivElement);
```

### Wrappers
There are wrapper functions that allows to wrap the type guard around custom element. And they return the same function as regular `querySelector`.
```typescript
const bodyQuerySelector = wrapQuerySelector(document.body);
```
npm package: @keupoz/tson
Description: TypeScript JSON type validator inspired by Google's GSON
Author: keupoz
Latest version: 1.0.0

# TSON

TypeScript JSON validator inspired by Google's GSON from Java.

## Why?

There is a lot of JSON validators for TypeScript but they are either based on predefined schema or have no runtime check and just rely on type casting hoping the input is always correct.

## Installation

This library is available as NPM package:

```bash
npm install @keupoz/tson
```

## Usage

All you need is just to call the function that transforms the input to corresponding Json classes and returns a JsonElement:

```typescript
import { createJsonElement } from "@keupoz/tson";

const element = createJsonElement({ a: 1, b: { c: 2 }, d: 3 });
```

You can also parse a stringified json object and immediately transform it:

```typescript
import { parseJson } from "@keupoz/tson";

const element = parseJson("{ a: 1, b: { c: 2 }, d: 3 }");
```

All methods of JsonElement and other classes should be intuitive and are similar to their GSON alternatives.
npm package: @keupoz/typed-event-dispatcher
Description: Typed Event dispatcher for TypeScript
Author: keupoz
Latest version: 1.0.3

# Typed EventDispatcher

Just a simple strictly typed event dispatcher

## Installation

```bash
npm install @keupoz/typed-event-dispatcher
```

## Usage

```typescript
import { EventDispatcher } from "@keupoz/typed-event-dispatcher";

// EventDispatcher accepts any type
// but it should be a record of data types associated with event names
export interface IFooEvents {
  init: null;
  bar: {
    type: string;
    data: any;
  };
}

export class Foo extends EventDispatcher<IFooEvents> {
  constructor() {
    super();

    this.dispatch("init", null);
  }

  public bar(data: any): void {
    this.dispatch("bar", {
      type: "test data",
      data: data,
    });
  }
}

const foo = new Foo();

// data is null
foo.on("init", () => {
  console.log("Foo is initialized");
});

// data is { type: string; data: any; }
foo.on("bar", (data) => {
  console.log(`Got data of type '${data.type}'`, data.data);
});

foo.bar(["some", "random", "data"]);

// Remove all listeners
foo.dispose();
```
npm package: @keupoz/typescript-json
Description: Utility to get JSON elements typed correctly
Author: keupoz
Latest version: 1.0.0

# Typed JSON

A library inspired by Gson Java library.

## Install

```bash
npm i @keupoz/typescript-json
```

## Usage

Usage is pretty simple. To create an instance of Json element use `JsonElement.from(json)`.

```typescript
import { JsonElement } from "@keupoz/typescript-json";

const json = JsonElement.from({ a: 1, b: 2, c: 3 });
```

## Methods

All `getAsJson{type}` methods may return `JsonNull` instance.

### `JsonElement`

-   `JsonElement.from(value: any)`: inits a corresponding JsonElement subclass instance.
-   `JsonElement#isJsonArray()`: is a typeguard which tells that current instance is `JsonArray`.
-   `JsonElement#isJsonNull()`: is a typeguard which tells that current instance is `JsonNull`.
-   `JsonElement#isJsonObject()`: is a typeguard which tells that current instance is `JsonObject`.
-   `JsonElement#isJsonPrimitve()`: is a typeguard which tells that current instance is `JsonPrimitve`.

### `JsonArray`

-   `JsonArray#getAsJsonArray(index: number)`: returns value at specified index as `JsonArray`.
-   `JsonArray#getAsJsonObject(index: number)`: returns value at specified index as `JsonObject`.
-   `JsonArray#getAsJsonPrimitive(index: number)`: returns value at specified index as `JsonPrimitive`.
-   `JsonArray#getAsJsonArrayTuple()`: returns array of `JsonArray` instances.
-   `JsonArray#getAsJsonObjectTuple()`: returns array of `JsonObject` instances.
-   `JsonArray#getAsJsonPrimitiveTuple()`: returns array of `JsonPrimitive` instances.

### `JsonObject`

-   `JsonObject#getAsJsonArray(key: string)`: returns specified property as `JsonArray`.
-   `JsonObject#getAsJsonObject(key: string)`: returns specified property as `JsonObject`.
-   `JsonObject#getAsJsonPrimitive(key: string)`: returns specified property as `JsonPrimitive`.

### `JsonPrimitive`

-   `JsonPrimitive#isBoolean()`: returns boolean value representing if current primitive is boolean.
-   `JsonPrimitive#isNumber()`: returns boolean value representing if current primitive is number.
-   `JsonPrimitive#isString()`: returns boolean value representing if current primitive is string.
-   `JsonPrimitive#getAsBoolean()`: returns current primitive as boolean.
-   `JsonPrimitive#getAsNumber()`: returns current primitive as number.
-   `JsonPrimitive#getAsString()`: returns current primitive as string.
npm package: @kev1n-peters/wallet-aggregator-evm
Description: Implements the base abstractions for EVM-compatible blockchains, using [wagmi](https://github.com/wagmi-dev/wagmi) under the hood to handle connection implementations.
Latest version: 0.0.1-beta.1

## Wallet Aggregator - EVM

Implements the base abstractions for EVM-compatible blockchains, using [wagmi](https://github.com/wagmi-dev/wagmi) under the hood to handle connection implementations.

Wallets implemented so far:

| Wallet                        | Link                            |
| ----------------------------- | ------------------------------- |
| Injected wallets (e.g: Brave) |                                 |
| Metamask                      | https://metamask.io             |
| WalletConnect                 | https://walletconnect.com       |
| Bitget Wallet                 | https://web3.bitget.com         |
| Coinbase Wallet               | https://www.coinbase.com/wallet |
| Ledger Connect                | https://www.ledger.com          |

### Usage

The base EVMWallet configuration allows for the following parameters:

- `chains`: an array of chain information objects. While the information is the same as in the {@link https://eips.ethereum.org/EIPS/eip-3085 EIP-3085}, the structure is slightly different. Defaults to all chains.
- `preferredChain`: an EVM chain id (e.g. 5 for Görli, 43113 for Avalanche Fuji Testnet, etc.). When connecting, the wallet will try to switch to this chain if the provider's network's chain id differs.
- `autoSwitch`: indicates whether the wallet should attempt to switch the network back to the `preferredChain` upon detecting a `chainChanged` event (if set).
- `confirmations`: Amount of confirmations/blocks to wait a transaction for

Additionally, each specific wallet has its own specific options.

```ts
import {
  MetamaskWallet,
  WalletConnectWallet,
  BitgetWallet,
  CoinbaseWallet,
  LedgerWallet,
  InjectedWallet,
} from "@xlabs-libs/wallet-aggregator-evm";

const injected = new InjectedWallet();
const metamask = new MetamaskWallet({
  preferredChain: 5,
  autoSwitch: true,
});
const walletConnect = new WalletConnectWallet({
  preferredChain: 43113,
});
const bitgetWallet = new BitgetWallet({
  options: {
    appName: "My App",
  },
});
const coinbase = new CoinbaseWallet({
  options: {
    reloadOnDisconnect: false,
    appName: "My App",
  },
});
const ledger = new LedgerWallet();
```
npm package: @kev_nz/create
Description: Create a different types of apps, from modules, MDX slide deck, React based front ends and hapi.js backends with GraphQL
Author: Kevin Isom
Latest version: 3.2.5

# Create different types of apps

[![npm version](https://badge.fury.io/js/%40kev_nz%2Fcreate.svg)](https://badge.fury.io/js/%40kev_nz%2Fcreate)

This creates various apps. It can createa fullstack app with a Hapi based API and GraphQL server, a React based front end and Webpack to build the assets. It can also create just the back-end or just the front-end. Additionally it can create a base setup for writing modules and a MDX-Deck slide deck for creating a presentation.

## Usage

```
npm init @kev_nz myapp
```

### A module

```
npm init @kev_nz my-module -- -m
npm init @kev_nz my-module -- --module
```

### A React.JS Front-End

```
npm init @kev_nz web-app -- -w
npm init @kev_nz web-app -- --web
```

### A Hapi.js Back-End

```
npm init @kev_nz web-server -- -s
npm init @kev_nz web-server -- --server
```

### MDX-Deck Slide Deck

```
npm init @kev_nz my-slides -- -d
npm init @kev_nz my-slides -- --deck
```

## Application Types

### Back-End

For the database access it has an included Docker Compose file that includes PostgresSQL, MongoDB, Redis and Neo4j.

### Front-End

React.JS, and Webpack

### Module

Base module setup with Jest, coveralls, and @kev_nz/publisher installed.
npm package: @kev_nz/delayed-job
Description: Redis backed Node.js implementation of delayed job
Author: Kevin Isom
Latest version: 1.0.2

# delayed-job

delayed-job is a horizontally scalable Node.js implementation of Ruby's delayed_job. Using semaphore locks it aims to provide an atomic interface to a federation of workers operating on the same job queue. Initial work has focussed on a Redis backed database, however more backend implementations are possible.

![delayed-job](https://kevinisom.info/delayed-job/delayed-job.png)

## Installation

```bash
npm install @kev_nz/delayed-job
```

## Usage

```javascript
const Scheduler = require('@kev_nz/delayed-job')

const schedule = Scheduler.createSchedule({
  url: '',
  backend: {
    name: 'redis', // memory is also available
    jobHoldingBay: 'myUniqueListKey'
  }
})

schedule.on('job', job => {
  console.log('Received job',job);
})

const myJob = {
  title: 'Great Gig In The Sky'
}

schedule.delay(myJob, 2000)
```

## API

### schedular.delay(job, timeout)

Schedule a job for execution

## Assumptions

* errors thrown will result in re-establishing the scheduler [expand]
* Single atomic source of truth
* Db interactions are also atomic
* Jobs emitted have no immediate relationship to one another

## Prior Art

Originally based on [https://github.com/thatguydan/delayed-job](https://github.com/thatguydan/delayed-job) But that project hasn't been update in six years
npm package: @kev_nz/eslint-config
Description: ESLint config
Author: Kevin Isom
Latest version: 6.0.0

# @kev_nz/eslint-config

Eslint config for my current preferences including prettier and SonarJS

## Install

```bash
npm install @kev_nz/eslint-config --save-dev
```

## Usage

Add a `.eslintrc.json` file to your project

```json
{
  "extends": ["@kev_nz"]
}
```

## Reminder

ESLint is a peerDependency, so you must install it as well

```bash
npm install eslint --save-dev
```

## Extends

* Standard
* Prettier
* React
* SonarJS
* Import order
* Spellchecking
npm package: @kev_nz/etherscanner
Description: Receive all the ethereum transactions that have been included in the block, including 'internal' transactions
Author: kevin.isom@gmail.com
Latest version: 3.3.1

# EtherScanner

 Module for parse ethereum transactions or block and get from them all Eth transfers (normal and "internal")

## Warning

This module is deprecated, just like Ethereum should be.

Ethereum is junk and you almost certainly do not need a blockchain


## Installation

If you must.

```bash
npm install @kev_nz/etherscanner
```

## Usage

Please don't

```js
const EtherScanner = require('@kev_nz/etherscanner');

const etherScanner = await EtherScanner(`http://localhost:6082`);

```

##### Get all transfers by transaction hash

```js
const result = await etherScanner.scanTransaction('0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274');
console.log(result);
```

result:
```json
[{
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"to": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"value": 10000000000000000,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": false,
	"type": ""
}, {
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"to": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"value": 12468329110548072,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": true,
	"type": "CALL"
}]

```

type - "" || CALL || CREATION || SELFDESTRUCT

##### Get all transfers by block number

```js
etherScanner.scanBlock(1822433, (err, result) => {
	console.log(result);
});
```
npm package: @kev_nz/publisher
Description: Publish readme.md to gh-pages
Author: Kevin Isom
Latest version: 4.0.1

# Publisher

[![npm version](https://badge.fury.io/js/%40kev_nz%2Fpublisher.svg)](https://badge.fury.io/js/%40kev_nz%2Fpublisher)

Publish your readme to gh-pages.

## Usage

```bash
npm install @kev_nz/publisher --save-dev
```

Then run

```bash
npx publisher
```

## Custom config

To use custom  html create a folder called `.assets` in the root of your project and
add a `head.html` file with all the content before the readme contents, and a `foot.html`
in the `.assets` folder for all content after the readme contents. The code highlighting uses
[Highlightjs](https://highlightjs.org/) for styles.

Additonally, anything else placed in the `.assets` folder will be copied to the dist folder and published along with readme file.

### Setup

The structure

```
- .assets
-- head.html
-- foot.html
-- extends.css
-- myimage.jpg
- readme.md
```

The published `dist` folder content

```
- index.html
- styles.css
- extends.css
- myimage.jpg
```
npm package: @kevalgangani/mantine-table
Description: A fully featured Mantine V9 implementation of TanStack React Table V8, written from the ground up in TypeScript.
Author: Keval Gangani
Latest version: 2.0.0

# @kevalgangani/mantine-table

A fully featured Mantine V8 data table component built on [Mantine](https://mantine.dev/) and [TanStack Table V8](https://tanstack.com/table/v8).

Based on [Mantine React Table](https://www.mantine-react-table.com/) by Kevin Vandy.

## About

### _Quickly Create React Data Tables with Mantine_

### __Built with [Mantine <sup>V8</sup>](https://mantine.dev/) and [TanStack Table <sup>V8</sup>](https://tanstack.com/table/v8)__

## Getting Started

### Installation

1. Install peer dependencies (Mantine V8)

```bash
npm install @mantine/core @mantine/hooks @mantine/dates @tabler/icons-react clsx dayjs
```

2. Install @kevalgangani/mantine-table

```bash
npm install @kevalgangani/mantine-table
```

> `@tanstack/react-table`, `@tanstack/react-virtual`, and `@tanstack/match-sorter-utils` are internal dependencies — you do NOT need to install them yourself.

### Usage

```tsx
import { useMemo } from 'react';
import {
  MantineReactTable,
  useMantineReactTable,
} from '@kevalgangani/mantine-table';
import '@kevalgangani/mantine-table/styles.css';

const data = [
  { name: 'John', age: 30 },
  { name: 'Sara', age: 25 },
];

export default function App() {
  const columns = useMemo(
    () => [
      {
        accessorKey: 'name',
        header: 'Name',
      },
      {
        accessorKey: 'age',
        header: 'Age',
      },
    ],
    [],
  );

  const table = useMantineReactTable({
    columns,
    data,
    enableColumnOrdering: true,
    enableRowSelection: true,
    enablePagination: false,
  });

  return <MantineReactTable table={table} />;
}
```

### Locales

Import locale files for i18n support (35+ languages):

```tsx
import { MRT_Localization_ES } from '@kevalgangani/mantine-table/locales/es';

const table = useMantineReactTable({
  columns,
  data,
  localization: MRT_Localization_ES,
});
```

## Features

- Advanced TypeScript Generics Support
- Aggregation and Grouping
- Click To Copy Cell Values
- Column Action Dropdown Menu
- Column Hiding, Ordering, Pinning, Resizing
- Data Editing (4 editing modes + IME support)
- Density Toggle
- Detail Panels (Expansion)
- Filtering (client-side and server-side)
- Filter Match Highlighting
- Full Screen Mode
- Global Filtering (ranked results)
- Header Groups & Footers
- Localization (i18n) — 35+ languages
- Mantine ScrollArea integration (`withScrollArea`)
- Pagination (client-side and server-side)
- Row Actions, Numbers, Ordering, Selection, Pinning
- SSR compatible
- Sorting (client-side and server-side)
- Theming (Mantine V8 theme)
- Toolbars (custom action buttons)
- Tree Data / Expanding Sub-rows
- Virtualization (@tanstack/react-virtual)

## Peer Dependencies

| Package | Version |
|---------|---------|
| `@mantine/core` | `^8.0.0` |
| `@mantine/dates` | `^8.0.0` |
| `@mantine/hooks` | `^8.0.0` |
| `@tabler/icons-react` | `>=2.23.0` |
| `clsx` | `>=2` |
| `dayjs` | `>=1.11` |
| `react` | `>=18.0` |
| `react-dom` | `>=18.0` |

## License

MIT
npm package: @kevalgangani/nestjs-telegraf
Description: Telegraf module for NestJS
Author: 0x467
Latest version: 2.8.1

<p align="center">
  <img src="https://raw.githubusercontent.com/robot-mafia/nestjs-telegraf/main/.github/logo.svg" />
</p>

# ![npm](https://img.shields.io/npm/dm/nestjs-telegraf) ![GitHub last commit](https://img.shields.io/github/last-commit/0x467/nestjs-telegraf) ![NPM](https://img.shields.io/npm/l/nestjs-telegraf)

NestJS Telegraf – powerful solution for creating Telegram bots.

This package uses the best of the NodeJS world under the hood. [Telegraf](https://github.com/telegraf/telegraf) is the most powerful library for creating bots and [NestJS](https://github.com/nestjs) is a progressive framework for creating well-architectured applications. This module provides fast and easy way for creating Telegram bots and deep integration with your NestJS application. 

**Features**

- Simple. Easy to use.
- Ton of decorators available out of the box for handling bot actions.
- Ability to create custom decorators.
- Scenes support.
- Telegraf plugins and custom plugins support.
- Ability to run multiple bots simultaneously.
- Full support of NestJS guards, interceptors, filters and pipes!

**User stories**
- [Новогодняя история одного телеграм-бота на NestJS](https://habr.com/ru/company/tinkoff/blog/596287/) by [Tinkoff Bank](https://github.com/Tinkoff)

**Chat**

* [Telegram](https://t.me/nestjs_telegraf)
## Installation

```bash
$ npm i nestjs-telegraf telegraf
```

## Documentation
Check out the [documentation site](https://nestjs-telegraf.0x467.com/).

## Activity
![Alt](https://repobeats.axiom.co/api/embed/3a0b83192feaeff27d8a7f78f53e5cb951f94dac.svg "Repobeats analytics image")
npm package: @kevbarrios/cordova-plugin-zbtprinter
Description: Cordova/Phonegap driver for Zebra bluetooth printers
Latest version: 1.0.0

# zbtprinter
A Cordova driver for Zebra printers

Plugin based of: https://github.com/michael79bxl/zbtprinter

Example:

Printer ZPL:
```
cordova.plugins.zbtprinter.print("AC:3F:A4:52:73:C4","^XA^FO10,10^AFN,26,13^FDHello, World!^FS^XZ",
    (success) => { 
        alert("Print ok"); 
    }, function(fail) => { 
        alert(fail); 
    }
);
```
List Linked Devices:
```
window.cordova.plugins.zbtprinter.find(
  (data) => {
    alert(JSON.stringify(data)); 
    console.log(data);
  },
  (fail) => {
    alert(fail);
  }
);
```

Install Cordova

```
cordova plugin add https://github.com/kevbarrios/zbtprinter.git
```
ZPL - Zebra Programming Language
For more information about ZPL please see the  [PDF Official Manual](https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf)