open-index/open-npm huggingface dataset:
npm package: @switchdreams/lint-config
Description: This package provides Switch Dreams' eslint and prettier config as an extensible shared config.
Author: PedroAugustoRamalhoDuarte
Latest version: 0.1.0
Deprecated: this package has been deprecated

# @switchdreams/lint-config

This package provides Switch Dreams' eslint and prettier config as an extensible shared config.

## Installation

```bash
pnpm add -D @switchdreams/lint-config eslint
```

## Usage

Usage for eslint > 9.0.0

```js
// eslint.config.mjs
import eslintConfigSwitchDreams from "@switchdreams/lint-config";

export default [
  ...eslintConfigSwitchDreams,
  {
    // Add your overrides here
  },
]

```

```js
// .prettierrc.mjs
import switchDreamsConfig from "@switchdreams/lint-config/prettier";

const config = {
  ...switchDreamsConfig,
  // ...your overrides
};

export default config;

```

## Requirements

- Using tailwindcss
npm package: @switchit/nestjs-casbin
Description: NestJS casbin Integration by SWITCH IT CONSULTING
Author: Switch IT - Consulting
Latest version: 0.1.5

# Casbin Module [![CircleCI](https://circleci.com/gh/switchit-conseil/nestjs-casbin-module.svg?style=svg)](https://circleci.com/gh/switchit-conseil/nestjs-casbin-module)

> **IMPORTANT NOTICE**: This module only works with Monggose or File Adapter at the moment
>

This modules integrates the [Casbin](https://casbin.org) into a [NestJS Application](https://nestjs.com).

## Installation

```bash
npm install --save @switchit/nestjs-casbin # or yarn install @switchit/nestjs-casbin
```

## Usage

Import the CasbinModule into the root AppModule.

```typescript
//app.module.ts
import { Module } from '@nestjs/common';
import { CasbinModule } from '@switchit/nestjs-casbin';

@Module({
    imports: [
        CasbinModule.forRoot({
            model: __dirname + '/model/rbac-model.conf', // Change this
            adapter: {
                url: 'mongodb://localhost:27017/casbin', // Change this
                options: {
                    useNewUrlParser: true,
                    useCreateIndex: true
                }
            }
        }),
    ],
})
export class AppModule {}
```

The module can also works with static policy files in CSV format:

```typescript
//app.module.ts
import { Module } from '@nestjs/common';
import { CasbinModule } from '@switchit/nestjs-casbin';

@Module({
    imports: [
        CasbinModule.forRoot({
            model: __dirname + '/model/rbac-model.conf', // Change this
            adapter: __dirname + '/model/policy.csv', // Change this
        }),
    ],
})
export class AppModule {}
```

Of course you can use an async configuration:

```typescript
//app.module.ts
import { Module } from '@nestjs/common';
import { CasbinModule } from '@switchit/nestjs-casbin';

@Module({
    imports: [
        CasbinModule.forRootAsync({
            useFactory: () => ({
                model: __dirname + '/model/rbac-model.conf', // Change this
                adapter: {
                    url: 'mongodb://localhost:27017/casbin', // Change this
                    options: {
                        useNewUrlParser: true,
                        useCreateIndex: true
                    }
                }
            })
        }),
    ],
})
export class AppModule {}
```

## Getting the enforcer and the adapter

If you need you have 2 decorators that can be used to retrieve the Casbin `Enforcer` and the Casbin `Adapter`: 
`@InjectEnforcer()` and `@InjectAdapter()`.

```typescript
@Injectable()
export class MyService {

    constructor(
        @InjectEnforcer()
        private readonly enforcer: Enforcer
    ) {}

    async doSomething() {
        // Uses the enforcer
        await this.enforcer.addGroupingPolicy(command.userId, 'owner', command.organizationId);
    }
}
```
npm package: @switchkeys/ts-client
Description: The TypeScript client facilitates seamless management and interaction with the SwitchKeys system. It empowers users to effortlessly create organizations, establish projects within them, and subsequently create environments. Users can efficiently add users
Author: Mahmoud Emad
Latest version: 1.5.1

# SwitchKeys TS Client

The SwitchKeys TS Client is a TypeScript client library for interacting with the SwitchKeys system.
It provides convenient methods for `User authentication`, `Organization Management`, `Project Management`, and other operations within the SwitchKeys system.

## Features

- **User Authentication**: Register new users, log in to existing users, and manage user tokens.
- **Organization Management**: Create, retrieve, update, and delete organizations. Add and remove members from organizations.
- **Project Management**: Create, retrieve, update, and delete projects.
- **Environment Management**: Create, retrieve, update, and delete environments.

## Installation

You can install the SwitchKeys TS Client via npm:

```bash
npm install @switchkeys/ts-client
# or
yarn add @switchkeys/ts-client
```

## Usage

Here's a basic example of how to use the SwitchKeys TS Client:

```typescript
// Import the SwitchKeys class from the client library.
import SwitchKeys, { DeviceTypeSelection } from "@switchkeys/ts-client";

export async function main() {
  // Create an instance of the SwitchKeys client.
  const switchkeys = new SwitchKeys();

  // --------------------------------------------------------------------------------------------------------------------
  // Logging in to SwitchKeys
  // --------------------------------------------------------------------------------------------------------------------
  // First, log in to SwitchKeys with valid credentials.
  await switchkeys.auth.login({
    email: "user@example.com",
    password: "###",
  });

  console.log("Logged in successfully.");
}

main();
```

For more detailed usage instructions, refer to the [examples folder](./examples/).

## Organization Management

The SwitchKeys TS Client allows you to manage organizations within the SwitchKeys system. Here are some examples of organization-related operations:

### Creating an Organization

```typescript
const organization = await switchkeys.organizations.create({ name: "Test Organization" });
console.log(`Organization created. ID: ${organization.id}`);
```

## Configuration

Before using the SwitchKeys TS Client, make sure to set up the necessary environment variables and configuration files. Refer to the [configuration documentation](./docs/configuration.md) for details.

## Contributing

Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.

## License

This project is licensed under the [MIT License](./LICENSE)
npm package: @switchlabs/verify-ai-react-native
Description: React Native SDK for Verify AI - photo verification with AI vision processing
Author: Switch Labs
Latest version: 2.4.3

# @switchlabs/verify-ai-react-native

React Native SDK for Verify AI photo verification.

## Install

Core SDK (client, hooks, types):

```bash
npm install @switchlabs/verify-ai-react-native
```

With built-in camera scanner:

```bash
npm install @switchlabs/verify-ai-react-native expo-camera expo-image-manipulator
```

For offline queue support, also install `@react-native-async-storage/async-storage`.

If you want on-device inference, also install `expo-file-system`,
`react-native-fast-tflite`, and configure `react-native-fast-tflite` for the
delegates you plan to use.

## Quick Start

```tsx
import { useVerifyAI } from '@switchlabs/verify-ai-react-native';

function ParkingScreen() {
  const { verify } = useVerifyAI({ apiKey: 'vai_your_api_key' });

  const onPhoto = async (base64: string) => {
    const result = await verify({
      image: base64,
      policy: 'scooter_parking',
    });
    if (result?.is_compliant) {
      console.log('PASS');
    }
  };

  return null;
}
```

## Scanner Component

The scanner is exported from a separate subpath to avoid pulling in `expo-camera` for consumers that only need the client.

```tsx
import { useVerifyAI } from '@switchlabs/verify-ai-react-native';
import { VerifyAIScanner } from '@switchlabs/verify-ai-react-native/scanner';

function ScannerScreen() {
  const { verify } = useVerifyAI({ apiKey: 'vai_your_api_key' });
  return (
    <VerifyAIScanner
      onCapture={(base64) =>
        verify({ image: base64, policy: 'scooter_parking' })
      }
      onResult={(result) => console.log(result.is_compliant ? 'PASS' : 'FAIL')}
    />
  );
}
```

## Offline Mode

Requires `@react-native-async-storage/async-storage` to be installed.

Set `offlineMode: true` to queue transient failures (network, timeout, 429, 5xx) and retry later.

```tsx
const { verify, queueSize, processQueue } = useVerifyAI({
  apiKey: 'vai_your_api_key',
  offlineMode: true,
});

const result = await verify({ image: base64, policy: 'scooter_parking' });
await processQueue();
```

## API Docs

Full API docs: https://verify.switchlabs.dev/docs
npm package: @switchxfi/alm-sdk
Description: SwitchX ALM SDK
Author: switchx
Latest version: 1.2.0

# SwitchX ALM SDK
This SDK provides utilities for interacting with SwitchX ALM vaults, designed to simplify integration into your project.

## 📦 Installation
Using npm:
```bash
npm install @switchxfi/alm-sdk
```
or yarn:
```bash
yarn add @switchxfi/alm-sdk
```

## 📚 Vault GET Methods

- `getVaultsByPool`

Get a list of vault addresses associated with a specific pool
```ts
const vaultAddresses: string[] = await getVaultsByPool(poolAddress, chainId);
```

- `getTotalAmounts`

Returns the total number of both tokens stored in the vault
```ts
const [totalAmount0, totalAmount1] = await getTotalAmounts(
    vaultAddress,
    provider,
    true,
    token0.decimals,
    token1.decimals
);
```

- `getTotalSupply`
  
Returns the total number of vault shares
```ts
const totalSupply = await getTotalSupply(vaultAddress, provider)
```

## 👤 User Data in Vaults

- `getUserAmounts`

Returns the user's token balances and share count in the vault. If the `raw` flag is set, values are returned as BigNumbers
```ts
const [userAmount0, userAmount1, shares] = await getUserAmounts(
    account,
    vaultAddress,
    provider,
    token0.decimals,
    token1.decimals,
    true
);
```

- `calculateUserDepositTokenPNL`

Calculates the user’s PNL and ROI in terms of the deposit token
```ts
const { pnl, roi } = await calculateUserDepositTokenPNL(
    account,
    vaultAddress,
    userAmount0.toString(),
    userAmount1.toString(),
    token0.decimals,
    token1.decimals,
    provider
);
```

## 🚀 Transactions

- `approveDepositToken` 

Approves a token for deposit. Must be called before using the `deposit()` method. The amount can be a string or number in major units.
```ts
const tx = await approveDepositToken(
    accountAddress,
    0, // token idx can be 0 or 1
    vaultAddress,
    provider,
    amount // (optional)
);
```

- `deposit` / `depositNativeToken`

Performs a deposit into the vault. The `amount0` and `amount1` parameters represent the amounts of each token in major units.
```ts
if (useNativeToken) {
    const tx = await depositNativeToken(
        account,
        vault.allowTokenA ? amount : "0",
        vault.allowTokenB ? amount : "0",
        vaultAddress,
        provider
    );
} else {
    const tx = await deposit(
        account,
        vault.allowTokenA ? amount : "0",
        vault.allowTokenB ? amount : "0",
        vaultAddress,
        provider
    );
}
```

- `withdraw` / `withdrawNativeToken`

Withdraws a specified number of shares from the vault, returning both underlying tokens to the user. The share amount should be a string or number in major units.
```ts
const percentMultiplier = 1; // 100%
const shareToWithdraw = Number(userShare) * percentMultiplier;
const slippage = 1 // 1%

if (useNativeToken) {
   const tx = await withdrawNativeToken(
        account,
        shareToWithdraw,
        vaultAddress,
        provider,
        slippage
    );
} else {
   const tx = await withdrawWithSlippage(
        account,
        shareToWithdraw,
        vaultAddress,
        provider,
        slippage
    );
}
```
npm package: @switchxfi/v4-sdk
Description: ## Description
Author: dao
Latest version: 1.1.1

# SwitchX V4 SDK

## Description

SwitchX V4 SDK is a library for interacting with the SwitchX V4 protocol.

## Usage

```bash
yarn add @switchxfi/v4-sdk
```

## Contributing

1. Clone the repository
```bash
git clone https://github.com/switchx-labs/switchx-v4-sdk.git
cd switchx-v4-sdk
yarn install
yarn build
```

2. Create a new branch
```bash
git checkout -b feature/new-feature
```

4. Make your changes and commit them.
```bash
git add .
git commit -m "feat: add new feature"
```

3. Update the package.json version and commit the changes.

```bash
yarn commit
```

Push the changes to the remote repository.

```bash
git push
```
npm package: @swithuns/react-native-keyboard-textinput
Description: A versatile, scalable, one-size-fits-all solution to the fiddly problem of handling keyboard interactions in react native. This also can be configured to act as a form modal that sticks to the keyboard.
Author: Timothy Frankland
Latest version: 1.0.3

# react-native-keyboard-textinput

A react native package to provide a versatile and easy to implement solution to the overcomplicated problem of how to handle keyboards on different screens throughout a mobile app.

The package is designed for true separation of concerns when it comes to your screens and keyboard interactions. It also allows much easier handling on accessability and user experience.

![App Demo](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExcjE0cjZhZ2lzc3pwdGxlbW04cG5ibDYwaWx5c2hlYzRvYXFheDJzMCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JE2zLcz00x0OhIGDSI/giphy.gif)
![App Demo ios](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMTMzam1jbTlxaXJlZHdpcnVreXJ0M2E0dXIwaHJrZzdjc3p2d210NCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gu2PEtl6OQoCTpoPel/giphy.gif)

# Installation

```bash
npm i @swithuns/react-native-keyboard-textinput
```

# Usage

Place the handler at your root component, optional to wrap your app in the dismiss handler if you want keyboard to dismiss when user presses outside of inputs and pressables.

```jsx
import {
  InputKeyboardHandler,
  KeyboardDismissWrapper,
} from "react-native-keyboard-textinput";

export default function App() {
  return (
    <KeyboardDismissWrapper>
      ...rest of app
      <InputKeyboardHandler style={styles.textInputStyle} />
    </KeyboardDismissWrapper>
  );
}
```

## Usage across app

```jsx
import { TextInput } from "react-native-keyboard-textinput";

<TextInput {...props} />;
```

## Recent updates 1.0.2

-Improved handler for onSubmitEditing to allow local state objects to be handled in the function without any complicated state handling.
-Unrendering of textinput closes keyboard.
-forwarding of ref to allow ref functions eg: ref.current?.focus()

## Future Plans

Additional supportive package that gives custom keyboard sticky inputs, cases to do:
-Search keyboard with tags (as seen in example 3)
-Chat messanger ui with gif and image upload for users to plugin handlers for.
-Short form with check boxes and/or radios and a single textbox.

Please feel free to message me with additional ideas, or look at example 3 for how to implement customs and fire in a PR for me to add to the new package.

tim.frank@hotmail.co.uk
npm package: @switmer/dcp-spec
Description: Design Component Protocol - JSON Schema definitions and OpenAPI specification
Author: Steve Witmer
Latest version: 1.0.0
Deprecated: Please use 'dcp-spec' instead - same package, cleaner name


# @dcp/spec

Design Component Protocol (DCP) specification package containing JSON schemas, OpenAPI definitions, and MCP manifest.

## Overview

This package contains the **contract** definition for the Design Component Protocol:

- 📋 **JSON Schemas** - Component, config, manifest, and theme definitions
- 🔗 **OpenAPI Spec** - HTTP API contract for DCP services  
- 🔌 **MCP Manifest** - Model Context Protocol integration specification

## Installation

```bash
npm install @dcp/spec
```

## Usage

### Import Schemas

```javascript
import { componentSchema, configSchema, schemas } from '@dcp/spec';

// Validate a component against the schema
import Ajv, { addFormats } from '@dcp/spec';

const ajv = new Ajv();
addFormats(ajv);
const validate = ajv.compile(componentSchema);

if (validate(myComponent)) {
  console.log('Valid component!');
} else {
  console.error('Validation errors:', validate.errors);
}
```

### Access OpenAPI Spec

```javascript
import { openApiSpec } from '@dcp/spec';

// Use for API client generation, documentation, etc.
console.log(openApiSpec.info.title); // "DCP API"
```

### MCP Integration

```javascript
import { mcpManifest } from '@dcp/spec';

// Use for MCP server setup
console.log(mcpManifest.capabilities.tools);
```

## Schema Definitions

- `dcp.component.schema.json` - Individual component definition
- `config.schema.json` - DCP configuration file format  
- `manifest.schema.json` - Registry manifest structure
- `theme.schema.json` - Design token/theme definitions

## API Contract

The OpenAPI specification defines:

- `/extract` - Component extraction endpoints
- `/mutate` - Registry mutation operations  
- `/validate` - Schema validation services
- `/query` - Registry search and filtering

## Contributing

This package contains only the DCP **specification**. For implementation changes, see the `@dcp/toolkit` package.

To modify schemas or API contracts:

1. Update relevant files in this package
2. Increment version according to semver (breaking changes = major bump)
3. Update dependent packages (`@dcp/toolkit`, etc.)

## Versioning

- **Major** - Breaking schema changes, API contract changes
- **Minor** - New optional fields, backward-compatible API additions  
- **Patch** - Documentation updates, clarifications

Current version: **1.0.0**
npm package: @switt/pouchdb-adapter-react-native-sqlite
Description: PouchDB adapter using ReactNative SQLite Plugin as its data store.
Author: Takuya Matsuyama
Latest version: 3.0.2

# pouchdb-adapter-react-native-sqlite

PouchDB adapter using ReactNative SQLite as its backing store.

## Why?

SQLite storage performs much faster than AsyncStorage, especially with secondary index.
Here is benchmark results:

| 1) `allDocs` speed | min  | max  | mean |
| ------------------ | ---- | ---- | ---- |
| AsyncStorage       | 72ms | 94ms | 77ms |
| SQLite             | 27ms | 39ms | 28ms |

| 2) `query` speed | min     | max     | mean    |
| ---------------- | ------- | ------- | ------- |
| AsyncStorage     | 1,075ms | 1,117ms | 1,092ms |
| SQLite           | 33ms    | 39ms    | 35ms    |

- Device: iPhone 6s
- Documents: 434
- Update seq: 453
- Iterations: 100
- Used options: `{ include_docs: true }`

### On Simulator

- Device: iPad Pro 9.7" (Simulator) - iOS 10.3.2
- Documents: 5000

| 3) `bulkDocs` speed | total    | mean   |
| ------------------- | -------- | ------ |
| AsyncStorage        | 25.821ms | 5.16ms |
| SQLite              | 22.213ms | 4.44ms |

| 4) `allDocs` speed | total     | mean    |
| ------------------ | --------- | ------- |
| AsyncStorage       | 189,379ms | 37.87ms |
| SQLite             | 30,527ms  | 6.10ms  |

- `allDocs` options: `{ include_docs: true, attachments: true }`
- Using this test [script](https://gist.github.com/hnq90/972f6597a0927f45d9075b8627892783)

## How to use it

Check out the [craftzdog/pouchdb-react-native](https://github.com/craftzdog/pouchdb-react-native) repository.

## Changelog

- 3.0.1
  - Fix dependency and import
- 3.0.0
  - Use [@craftzdog/pouchdb-adapter-websql-core](https://github.com/craftzdog/pouchdb-adapter-websql-core) #11
- 2.0.0
  - Upgrade pouchdb-adapter-websql-core to 7.0.0
- 1.0.3
  - Remove `pouchdb-utils` dependency
- 1.0.2
  - Upgrade pouchdb-util & pouchdb-adapter-websql-core to 6.2.0
  - Update benchmark result
- 1.0.1
  - Remove unnecessary console output
- 1.0.0
  - Initial release