open-index/open-npm huggingface dataset:
npm package: @keyforge/client
Description: Keyforge SDK for client applications
Author: Keyforge
Latest version: 1.0.0

# Keyforge Client SDK

The client-side library for interacting with the Keyforge public API.

Documentation is available [here](https://docs.keyforge.dev).

## Install

```bash
npm install @keyforge/client
# or
pnpm add @keyforge/client
# or
yarn add @keyforge/client
```

## Usage

### Validate license

To validate a license through the Keyforge API, use `validateLicense`.

```js
import { validateLicense } from '@keyforge/client';

const { isValid } = await validateLicense({
  licenseKey: '...',
  productId: '...',
  deviceIdentifier: '...',
});
```

### Activate license

To activate a license through the Keyforge API, use `activateLicense`.

```js
import { activateLicense } from '@keyforge/client';

const { isValid } = await activateLicense({
  licenseKey: '...',
  productId: '...',
  deviceIdentifier: '...',
  deviceName: '...',
});
```

### Manage license tokens

License tokens allow licenses to be validated without an internet connection.

#### Validate and refresh token

To validate and automatically refresh the token when needed, use `validateAndRefreshToken`. It should be used when the app starts.

```js
import { validateAndRefreshToken } from '@keyforge/client/token';

const { isValid, token } = await validateAndRefreshToken({
  token: getStoredToken(), // current token
  publicKeyJwk: '...' // in JSON string or object format
  deviceIdentifier: '...',
  productId: '...',
});

if(isValid){
  storeToken(token); // store token if it was refreshed
}
```

#### Verify token

To verify a token without refreshing it, use `verifyToken`. It should be used for periodic token checks.

```js
import { verifyToken } from '@keyforge/client/token';

const { isValid } = await verifyToken({
  token: getStoredToken(),
  publicKeyJwk: '...',
  deviceIdentifier: '...',
  productId: '...',
});
```

#### Retrieve new token

To retrieve a new token from the API, use `fetchToken`.

```js
import { fetchToken } from '@keyforge/client/token';

const { isValid, token } = await fetchToken({
  licenseKey: '...',
  deviceIdentifier: '...',
  productId: '...',
});

if (isValid) {
  storeToken(token); // store the new token
}
```

> [!NOTE]
> The `fetchToken` function does not verify if the new token is valid. You should always verify the new token.

## License

MIT License
npm package: @keyforgecloud/lib
Description: The Typescript SDK for the Keyforge API
Author: Keyforge Cloud
Latest version: 1.4.0

# keyforge

[![npm package][npm-img]][npm-url]
[![Build Status][build-img]][build-url]
[![Downloads][downloads-img]][downloads-url]
[![Issues][issues-img]][issues-url]
[![Code Coverage][codecov-img]][codecov-url]
[![Commitizen Friendly][commitizen-img]][commitizen-url]
[![Semantic Release][semantic-release-img]][semantic-release-url]

> The official Keyforge API client library for Javascript and Typescript.

## Install

```bash
npm install @keyforgecloud/lib
```

## Usage

```typescript
import KeyforgeAPI from '@keyforgecloud/lib';

const createAndVerify = async () => {
  KeyforgeAPI.setAccountToken("your-account-token")
  KeyforgeAPI.setDefaultAPI("your-api-id")

  const key = await KeyforgeAPI.createKey({
    name: 'My Key',
    ownerId: 'user_abc123',
    permissions: ['read', 'write'],
    metadata: {
      "key": "value"
    }
  }, 'your-api-id'); // API ID is optional if set a default (KeyforgeAPI.setDefaultAPI)

  const verification = await KeyforgeAPI.verifyKey(key.token)
    .then(() => true)
    .catch(() => false);

  if (verification) {
    console.log('Key verified successfully');
  } else {
    console.log('Key verification failed');
  }
};

createAndVerify();
```


[build-img]:https://github.com/keyforgecloud/typescript/actions/workflows/release.yml/badge.svg
[build-url]:https://github.com/keyforgecloud/typescript/actions/workflows/release.yml
[downloads-img]:https://img.shields.io/npm/dt/keyforge
[downloads-url]:https://www.npmtrends.com/keyforgecloud/lib
[npm-img]:https://img.shields.io/npm/v/@keyforgecloud/lib
[npm-url]:https://www.npmjs.com/package/@keyforgecloud/lib
[issues-img]:https://img.shields.io/github/issues/keyforgecloud/typescript
[issues-url]:https://github.com/keyforgecloud/typescript/issues
[codecov-img]:https://codecov.io/gh/keyforgecloud/typescript/branch/main/graph/badge.svg
[codecov-url]:https://codecov.io/gh/keyforgecloud/typescript
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]:https://github.com/semantic-release/semantic-release
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]:http://commitizen.github.io/cz-cli/
npm package: @keyfox/pochi
Description: The MS-IME Japanese Input emulation library for JavaScript
Author: Keyfox
Latest version: 0.5.6

# pochi

The MS-IME Japanese Input emulation library for JavaScript.

- [Documentation](https://keyfox.github.io/pochi/)

## Examples

### Keystrokes → text conversion

```ecma script level 4
import { getFirstKeyCombos } from "@keyfox/pochi";

// Which keys should I type to make the text "にっか"?
console.log(getFirstKeyCombos("にっか"));
// [
//   [ { chars: "に", strokes: "ni", attrs: 8 } ]
// ]
// // the return value above indicates there is one solution
// // which is to type "ni" to resolve "に".

// After hitting the key "n" and "i", which key should I type next?
console.log(getNextKeysequencesList("っか"));
// [
//   [ { chars: "っ", strokes: "ltu", attrs: 8 } ],
//   [ { chars: "っ", strokes: "xtu", attrs: 8 } ],
//   [ { chars: "っ", strokes: "ltsu", attrs: 8 } ],
//   [
//     { chars: "っ", strokes: "c", attrs: 2 },
//     { chars: "か", strokes: "ca", attrs: 2 },
//   ],
//   [
//     { chars: "っ", strokes: "k", attrs: 2 },
//     { chars: "か", strokes: "ka", attrs: 2 },
//   ],
// ]
// TL;DR: You have 5 options. Type "ltu", "xtu" or "ltsu" to resolve "っ",
//        or type "kka" or "cca" to resolve "っか".
```


### Typing state machine
```ecma script level 4
import { TypingStateMachine } from "@keyfox/pochi";
const stateMachine = new TypingStateMachine();

// Supply one keystroke
stateMachine.supplyKeystrokes("a");
console.log(stateMachine.text); // "あ"

// MS-IME input keystrokes are available
stateMachine.supplyKeystrokes("yi"); // "yi" resolves into "い"
console.log(stateMachine.text);     // "あい"

// Supply several keystrokes
stateMachine.supplyKeystrokes("shite");
console.log(stateMachine.text); // "あいして"

// Supply an indeterministic keystroke
stateMachine.supplyKeystrokes("r");
console.log(stateMachine.text);               // "あいしてr"
console.log(stateMachine.resolvedText);       // "あいして"
console.log(stateMachine.resolvedKeystrokes); // "ayishite"
console.log(stateMachine.pendingKeystroke);   // "r"

// Keystrokes can be tracked anytime
stateMachine.supplyKeystroke("u");
console.log(stateMachine.text); // "あいしてる"
console.log(stateMachine.keyCombos);
// [
//   [ { chars: "あ", strokes: "a" } ],
//   [ { chars: "い", strokes: "yi" } ],
//   [ { chars: "し", strokes: "shi" } ],
//   [ { chars: "て", strokes: "te" } ],
//   [ { chars: "る", strokes: "ru" } ],
// ]
```
npm package: @keyframes/pathfinder
Description: A plugin for Keyframes that generates complex movement paths.
Author: krazyjakee
Latest version: 1.0.4

Keyframes.Pathfinder
====================

This plugin for Keyframes generates complex movement paths.

Installation
-----

```javascript
import Pathfinder from '@keyframes/pathfinder';
Keyframes.plugin(Pathfinder);
```

Usage
-----

## Simple Bezier Curve
![](https://raw.githubusercontent.com/Keyframes/Keyframes.Pathfinder/6c225cfb/screenshots/a.png)

```Keyframes.bezierPath( rules, [startX,startY], [endX,endY], [pullX,pullY] );```

Super simple example:
```javascript
var rules = Keyframes.bezierPath( { name: 'curvy' } , [1,1], [400,1], [200,300] );
Keyframes.define([rules]);
window.onload = () => {
  const block = document.querySelectorAll('.block1')[0];
  block.play('curvey 5s ease 0 1 normal forwards');
};
```

## Advanced Bezier Curve

![](https://raw.githubusercontent.com/Keyframes/Keyframes.Pathfinder/6c225cfb/screenshots/b.png)

```Keyframes.bezierPath( rules, [startX,startY], [endX,endY], [pull1X,pull1Y], [pull2X,pull2Y] );```

Simple example:
```javascript
var rules = Keyframes.bezierPath( { name: 'curvyplus' }, [1,100], [800,100], [400,-100], [50, 600]);
Keyframes.define([rules]);
window.onload = () => {
  const block = document.querySelectorAll('.block1')[0];
  block.play('curveyplus 5s ease 0 1');
};
```

## Circular Paths

```Keyframes.circlePath( rules, [centerX, centerY], radius);```

Simple Example:
```javascript
var rules = Keyframes.circlePath( { name: 'circular' }, [100, 100], 40);
Keyframes.define([rules]);
window.onload = () => {
  const block = document.querySelectorAll('.block1')[0];
  block.play('circular 5s linear 0 infinite');
};
```

## Options

By default the paths are set to 100 steps, but you can change them to suit your needs...
```javascript
Keyframes.pathfinderOpts.bezierSteps = 100;
Keyframes.pathfinderOpts.circleSteps = 100;
```

## Toys

http://jsfiddle.net/krazyjakee/N652c/ - Bubbles in space game.

http://jsfiddle.net/krazyjakee/fwnuys9j/ - CSS3 Loader
npm package: @keyframes/spritesheet
Description: Keyframes.Spritesheet is a plugin for Keyframes that easily generates css3 keyframes for elements using animated spritesheets.
Author: krazyjakee
Latest version: 1.0.2

Keyframes.Spritesheet
=====================
Keyframes.Spritesheet is a plugin for Keyframes that easily generates css3 keyframes for elements using animated spritesheets.

Installation
-----

```javascript
import Spritesheet from '@keyframes/spritesheet';
Keyframes.plugin(Spritesheet);
```

Usage
-----

#### Defining spritesheet keyframes.
```javascript
var keyframes = Keyframes.spriteSheet({
  name: 'gem', // Name of the spritesheet
  rows: 6, // Number of rows
  cols: 7, // Number of columns
  width: 210, // Width of the spritesheet in pixels
  height: 180, // Height of the spritesheet in pixels
  offsetX: 0, // [Optional] When you have multiple spritesheets in one -
  offsetY: 0, // - image use these to define their offset. 
  count: 39 // [Optional] Define the number of sprites in total
});
```

#### Applying them to an element
```javascript
const item = new Keyframes(document.getElementById('item'));
item.playSpriteSheet(name, time, loop, keyframes);
```
* ```name``` - name of the spritesheet.
* ```time``` - time for the animation to complete.
* ```loop``` - [optional] number of times to repeat the animation (-1 for infinite)
* ```keyframes``` - [optional] pass keyframes to get them defined

#### For example
```javascript
const item = new Keyframes(document.getElementById('item'));
item.playSpriteSheet('gem', '3s', -1, keyframes);
```

Example
-------
http://jsfiddle.net/22Hyq/

Credits
-------
"Gems" Image created by Lokiare. Image is subject to the creative commons license: http://creativecommons.org/licenses/by/3.0/