open-index/open-npm huggingface dataset:
npm package: @koding/keyconfig
Description: stores keyboard shortcut definitions
Latest version: 0.8.0

# keyconfig

stores keyboard shortcut definitions.

# usage

```js
var keyconfig = new Keyconfig({
  x: [ 
    { 
      name: 'foo', 
      binding: [ [ 'ctrl+z' ], [ 'command+z' ] ]
    } 
  ]
});

keyconfig
  .on('change', function (collection, model) { });
  .find({ name: 'x '})
  .find({ name: 'foo' })
  .update({ binding: ['command+d'] });
```

# spec

Below is an example of a collection:

```json
{
  "editor":
  [
    {
      "name": "save",
      "description": "Save",
      "binding": [
        [ "ctrl+s" ],
        [ "command+s" ]
      ],
      "options": {
        "enabled": true
      }
    }
  ]
}
```

### fields

- `name` must be unique
- `binding` is an array of two arrays that defines win and mac shortcuts respectively
- `description` is description text
- `options` is always extended when you do `update`

# api

# keyconfig(collections={})

# Collection(name, models=[])

## .add(model)
## .update(name, value={}, silent=false)
## .toJSON()
## .getCollidingWin()
## .getCollidingMac()

`Keyconfig` and `Collection` instances also proxy underscore methods.

# Model(value={})

## .update(value={}, silent=false)
## .getWinKeys()
## .getMacKeys()
## .getWinChecksum()
## .getMacChecksum()
## .toJSON()

Updating a model triggers a `change` event that bubble up.

# license

mit
npm package: @koding/shortcuts
Description: manages keyboard shortcuts in browser
Latest version: 0.6.0

# shortcuts

manages keyboard shortcuts in browser.

# usage

```js
var shortcuts = new Shortcuts({
  foo: [
    { name: 'bar', binding: [ ['ctrl+x'], ['command+x'] ]}
  ]
});
shorcuts.on('key:foo', function () { })
```

See [keyconfig](https://github.com/tetsuo/keyconfig) for spec.

# api

# ctor(defaults={})

Returns an `events.EventEmitter`.

# .get(collectionName, modelName)
# .update(collectionName, modelName, value, silent)
# .getCollisions(collectionName)

# events

# `key:collectionName`
# `change`

# todo

* do not use mousetrap

# license

mit
npm package: @kodingdotninja/use-toggle
Description: Toggle custom hook and component wrapper for React 🔦
Author: Griko Nibras
Latest version: 1.0.1

<!-- markdownlint-disable MD033 MD036 MD041 -->

# use-toggle

![npm](https://badgen.net/npm/v/@kodingdotninja/use-toggle)
![packagephobia/install](https://badgen.net/packagephobia/install/@kodingdotninja/use-toggle)
![packagephobia/publish](https://badgen.net/packagephobia/publish/@kodingdotninja/use-toggle)

Toggle custom hook and component wrapper for React 🔦

---

**Table of contents**

- [Installing](#installing)
- [Example usage](#example-usage)
  - [Toggle hook - `useToggle()`](#toggle-hook---usetoggle)
  - [Toggle wrapper - `<ToggleWrap />`](#toggle-wrapper---togglewrap-)
  - [`<ClientOnly />`](#clientonly-)
- [API](#api)
- [Maintainers](#maintainers)
- [License](#license)

---

## Installing

```sh
pnpm install @kodingdotninja/use-toggle
```

## Example usage

### Toggle hook - `useToggle()`

Use it as your usual hooks. `disable`, `enable`, or `toggle` does not accept parameters so you can use it on `onClick` handlers.

```jsx
import { useToggle } from "@kodingdotninja/use-toggle";

function App() {
  const { state, disable, enable, set, toggle } = useToggle();
  return (
    <div>
      <span>State: {state ? "enabled" : "disabled"}</span>
      <button onClick={disable}>toggle</button>
      <button onClick={enable}>toggle</button>
      <button onClick={() => set(true)}>set true</button>
      <button onClick={toggle}>toggle</button>
    </div>
  );
}
```

### Toggle wrapper - `<ToggleWrap />`

Component which wraps the children with its internal hooks. Use this if you do not want to declare another component and just wrap it.

```jsx
import { ToggleWrap } from "@kodingdotninja/use-toggle";

function App() {
  return (
    <ToggleWrap>
      {({ state, disable, enable, set, toggle }) => (
        <div>
          <span>State: {state ? "enabled" : "disabled"}</span>
          <button onClick={disable}>toggle</button>
          <button onClick={enable}>toggle</button>
          <button onClick={() => set(true)}>set true</button>
          <button onClick={toggle}>toggle</button>
        </div>
      )}
    </ToggleWrap>
  );
}
```

### `<ClientOnly />`

Same as `<ToggleWrap enableOnMount initialState={false} />`, usually used on client-side only components.

```jsx
import { ClientOnly } from "@kodingdotninja/use-toggle";

function App() {
  return (
    <ClientOnly>
      <div>...</div>
    </ClientOnly>
  );
}
```

## API

Read the full API documentation on <https://kodingdotninja.github.io/use-toggle/>.

## Maintainers

- Griko Nibras ([@grikomsn](https://github.com/grikomsn))

## License

[MIT License, Copyright (c) 2024 Koding Ninja](./LICENSE)
npm package: @kodio.io/medusa-js-fetch
Description: A fetch API based version of the Medusa JS Client
Author: Kodio
Latest version: 0.3.0

# Medusa JS Client based on Fetch API

[![Version](https://img.shields.io/npm/v/@kodio.io/medusa-js-fetch.svg)](https://www.npmjs.org/package/@kodio.io/medusa-js-fetch)

The Medusa JS Client provides easy access to the Medusa API from a client written in Typescript.

## Why replace Axios with `fetch`?

On Next.js projects, the official Axios based client does not work on middleware functions, or anything running on the Edge runtime.
Using fetch allows you to use the client on the Edge.

## Documentation

In most cases, this client should be a drop-in replacement for the Axios based one. Beware that this client is not considered stable, and you may experience some issues.

To learn more about the API endpoints that this client allows you to access check out the [docs for the official JS Client](https://docs.medusajs.com/api/store).

## Known Issues
This client does currently not support retries.
npm package: @kodio.io/medusa-payment-quickpay
Description: A QuickPay payment provider for Medusa
Author: Ólavur Debes Joensen
Latest version: 0.61.1

# QuickPay
Receive payments on your Medusa application using QuickPay

> This project is still under development, and bugs and issues are to be expected. 
> Feel free to file a GitHub Issue if you encounter any such bugs or issues.

## Features
- Two-way integration with QuickPay payment gateway
- Admin UI Extension to display additional payment information from QuickPay
- Support for incoming Webhooks
- Support for refunds
- (In Progress) Admin UI Extension to view settlement information

## How to Install
1. Install the project with your preferred package manager e.g.
```
npm install medusa-payment-quickpay
```

2. Set the following environment variables in .env
```
QUICKPAY_API_KEY=<QUICKPAY_API_KEY_FOR_MERCHANT>
QUICKPAY_PRIVATE_KEY=<QUICKPAY_PRIVATE_KEY_FOR_MERCHANT>
STORE_BASEURL=<STOREFRONT_BASE_URL>
MEDUSA_BASE_URL=<MEDUSA_BACKEND_URL>
```

3. In `medusa-config.js` add the following plugin configuration
```
const plugins = [
  // ...
  {
    resolve: `medusa-payment-paypal`,
    options: {
        api_key: process.env.QUICKPAY_API_KEY,
        private_key: process.env.QUICKPAY_PRIVATE_KEY,
        callback_url: `${process.env.APP_URL}/quickpay/hooks`,
        continue_url_template: `${process.env.STORE_BASEURL}/checkout/confirm/{id}`,
        cancel_url_template: `${process.env.STORE_BASEURL}/checkout/info`,
        enableUI: true
    },
  },
]
```

## Configuration
The plugin supports the following configuration options

### `api_key`
The QuickPay API key for your merchant account. Found in the Integrations section on the QuickPay Manager.

### `private_key` 
(Optional): The QuickPay private-key for your merchant account. This is required for webhook verification, and is only required if you want to enable integrations from QuickPay to Medusa.

Default: `null`


### `auto_capture` 
(Optional): Whether to auto capture payments, i.e. capture on authorize. 

Default: `false`

### `callback_url`
The URL to forward webhooks to - this should point to the `/hooks/quickpay` where your Medusa backend is running, e.g. https://my-medusa-backend.com/quickpay/hooks

This value will override any value set in the QuickPay Manager - leave this undefined to configure it from the QuickPay Manager.

Defaults to the value set in the QuickPay Manager.

### `continue_url_template`

### `cancel_url_template`
npm package: @kodira/omlox-client-typescript-angular
Description: TypeScript Angular client for the OMLOX Hub API 2.0
Author: Kodira GmbH
Latest version: 0.1.1

# Omlox Angular Client

A TypeScript Angular client for the omlox Hub API with Bearer authentication support.

## Features

- Native Angular services using HttpClient
- Bearer token authentication
- Full TypeScript support with typed models
- Observable-based API

## Installation

```bash
npm install @kodira/omlox-client-typescript-angular
```

## Usage

### 1. Provide the services (recommended for modern Angular)

```typescript
import { bootstrapApplication } from '@angular/platform-browser'
import { provideOmloxClient } from '@kodira/omlox-client-typescript-angular'
import { AppComponent } from './app/app.component'

bootstrapApplication(AppComponent, {
    providers: [
        provideOmloxClient({
            baseUrl: 'https://your-omlox-hub.com/api',
        }),
    ],
})
```

### 1. Alternative: Import the module (legacy)

```typescript
import { OmloxClientModule } from '@kodira/omlox-client-typescript-angular'

@NgModule({
    imports: [
        OmloxClientModule.forRoot({
            baseUrl: 'https://your-omlox-hub.com/api',
        }),
    ],
})
export class AppModule {}
```

### 2. Use in your services

```typescript
import { Injectable, inject } from '@angular/core'
import { Observable } from 'rxjs'
import { OmloxTrackablesService, OmloxBaseService, Trackable } from '@kodira/omlox-client-typescript-angular'

@Injectable()
export class YourService {
    private trackablesService = inject(OmloxTrackablesService)
    private baseService = inject(OmloxBaseService)

    setupAuth(token: string): void {
        this.baseService.setBearerToken(token)
    }

    getTrackables(): Observable<Trackable[]> {
        return this.trackablesService.getAllTrackables()
    }
}
```

## Available Services

- `OmloxTrackablesService` - Trackable management
- `OmloxFencesService` - Fence and collision management
- `OmloxZonesService` - Zone management
- `OmloxProvidersService` - Location provider management
- `OmloxBaseService` - Base service with authentication

## Authentication

The client uses Bearer token authentication. Set the token using:

```typescript
baseService.setBearerToken('your-jwt-token')
```

The token will be automatically included in all subsequent API requests.

## Models

All omlox data models are fully typed:

```typescript
import { Trackable, Fence, Zone, Location, TrackableMotion } from '@kodira/omlox-client-typescript-angular'
```