open-index/open-npm huggingface dataset:
npm package: @keeex/afterbc
Description: Provide and parse string that indicate a "not before" date.
Author: KeeeX SAS
Latest version: 2.3.0

# @keeex/afterbc

Library that provide strings that could not have existed before the time of the
call.

This version will gather infos either from Ethereum or Bitcoin blockchain from
Blockcypher, Mempool or Blockscout.
It returns the last block hash value, providing a string that effectively could
not be guessed beforehand.

This value, combined with proper timestamping that provide a "not after" date
can provide a limited timeframe for the creation of any associated data.

## Usage

The library exposes two functions as the default export.
A quick example follows:

```JavaScript
import {getAfterString, parseAfterString} from "@keeex/afterbc";

const main = async() => {
  /**
   * Return an unguessable string
   * @return {string}
   */
  const str = await getAfterString();
  // At this point the value of str can be embedded in any data to be
  // timestamped

  /**
   * Parse string response
   * @typedef {Object} ParseStringRes
   * @property {Date} date
   * @property {string} text - human friendly infos in english
   * @property {string} checkUrl - url to access the blockchain's block
   * @property {number} [height] - height of the blockchain's block
   * @property {string} [blockchainName] - name of the blockchain
   * @property {string} [hash] - hash of the blochain's block
   */

  /**
   * Parse an afterbc string
   * @param {string} afterbc - afterbc string
   * @returns {ParseStringRes}
   */
  const ouptut = await parseAfterString(str);
  // output contains a `date` property that is a JavaScript Date
  console.log("Returned string date: ", output.date);
  // it also contains a `checkUrl` property that provides third-party
  // verification
  console.log("Check URL: ", output.checkUrl);
}
```

## Restrictions

The library choose which blockchain and which source to use, you cannot force it. It will first try
the ethereum ones, then the bitcoin ones.
The output is limited to the resolution of the source.

The library manages a cache that should be acceptable for any given source.
Multiple calls that uses the same source will use that cache and avoid hitting
the underlying service.

Any string produced in the past should be handled appropriately to some extent.
npm package: @keeex/bip39
Description: Basic BIP39 functions
Author: KeeeX SAS
Latest version: 3.0.0

# @keeex/bip39



Expose basic BIP39 features (move between entropy and mnemonic, and generate seed).

This is heavily based on the `bitcoinjs/bip39` project but made compatible with more environment
than node/browser.

## BIP39 basics

Standard: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

BIP39 allows producing a "seed" using a list of mnemonics (words).
To generate a new random key, the workflow is: generate a random "entropy" value (between 16 and 32
bytes), convert it into a list of mnemonics, then use that list of mnemonics to derive a seed.
The seed can then be used in any deterministic ways to create cryptographic objects.
(common usecase is to use it as a BIP32 seed).

This library exposes functions to move back and forth between entropy and mnemonics, and forward
from mnemonics to seed.

It also provide a single-call function to produce a random seed/mnemonic pair.

## Usage

Since this library uses `@keeex/crypto` it is needed to import a crypto provider before using any
other functions.

Import `@keeex/bip39/bip39.js` to get all functions.
npm package: @keeex/bubble_babble
Description: Bubble Babble encoding
Author: Tylor Reynolds
Latest version: 3.0.1

`@keeex/bubble_babble`
======================



Bubble Babble encoding.

Initially forked from tylorr/bubble\_babble to avoid the dependency on `Buffer`, thus making this
library work in more JavaScript environments.

Installation
------------
Installation is done from npmjs:

```bash
npm install @keeex/bubble_babble
```

Usage
-----

```JavaScript
import {encode, decode} from "@keeex/bubble_babble/lib/bubble_babble.js";

const encoded = encode("Pineapple");
console.log(encoded); // "xigak-nyryk-humil-bosek-sonax"

const ab = decode("xesef-disof-gytuf-katof-movif-baxux");
const ascii = new TextDecoder().decode(ab);
console.log(ascii); // "1234567890"
```

`encode()` accepts input as UTF8 string, `ArrayBuffer` or `Uint8Array`.
`decode()` returns an `ArrayBuffer`.

There is a secondary export `@keeex/bubblebabble/web/bubble_babble.js` that can be used in
browser environment.
It should be possible to directly import `@keeex/bubble_babble` but this depend on your
environment/bundler.
npm package: @keeex/jpegfix
Description: Recovery tool to retrieve picture data from damaged jpeg files
Author: KeeeX SAS
Latest version: 1.0.2

# @keeex/jpegfix
Recovery tool to retrieve picture data from damaged jpeg files.
Basic operation is looking through the file for the essential blocks and create a hopefully viable
output with the image content.

Metadata and other custom fields will be stripped.

## Usage
The CLI tool can be used to process individual images.
There is a built-in help, but the most useful command is:

You can either install it globally:

```bash
npm install -g @keeex/jpegfix
jpegfix -i <input file>
```

Run it from npx:

```bash
npx @keeex/jpegfix -i <input file>
```

Clone the repository and run it from there:

```bash
git clone git@github.com:KeeeX/jpegfix.git
cd jpegfix
npm ci
npm start -- -i <input file>
```

Run the CLI in TypeScript for debugging purpose (with cloned repository):

```bash
git clone git@github.com:KeeeX/jpegfix.git
cd jpegfix
npm ci
./devrun.sh -i <input file>
```

Or use it as a library (see below).

The CLI command will automatically use `<basename input file>.orig.jpg` as the output.

## Behavior
This tool tries to retrieve only the visual data and explicitely kills any "extra" sections besides
these.

To avoid malformed metadata actually containing a thumbnail in JPEG form, the algorithm first look
for a plausible JPEG file inside the JPEG file, and excludes this area when searching actual picture
data.
Best case scenario, the expected fields can be detected and the original visual can be retrieved.
The following outlines the "degraded" recovery modes that this program will recover:

- stripping any non-essential fields
- missing beginning of file
- missing end of file
- broken thumbnail messing with detection
- fallback to the thumbnail if the original data is irrecoverable and a thumbnail exists, with same
  process

In particular, no attempt is done to save the extra metadata (EXIF/JFIF).

## Library usage

The library exposes two main functions, one to analyze a file and one to rebuild a JPEG.

Here's a short example:

```JavaScript
import {analyzeJpeg, rebuildJpeg} from "@keeex/jpegfix";
import {readFileSync} from "fs";

const buffer = readFileSync("somefile.jpg");
const analyze = analyzeJpeg(buffer);
const rebuiltImage = rebuildJpeg(buffer);
```

Some more advanced functions can be called to customize the process, but that should not be
necessary.
npm package: @keeex/js-bip39
Description: Basic BIP39 functions
Author: KeeeX SAS
Latest version: 3.0.0
Deprecated: Use @keeex/bip39 instead

# @keeex/js-bip39



Expose basic BIP39 features (move between entropy and mnemonic, and generate seed).

This is heavily based on the `bitcoinjs/bip39` project but made compatible with more environment
than node/browser.

## BIP39 basics

Standard: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

BIP39 allows producing a "seed" using a list of mnemonics (words).
To generate a new random key, the workflow is: generate a random "entropy" value (between 16 and 32
bytes), convert it into a list of mnemonics, then use that list of mnemonics to derive a seed.
The seed can then be used in any deterministic ways to create cryptographic objects.
(common usecase is to use it as a BIP32 seed).

This library exposes functions to move back and forth between entropy and mnemonics, and forward
from mnemonics to seed.

It also provide a single-call function to produce a random seed/mnemonic pair.

## Usage

Since this library uses `@keeex/crypto` it is needed to import a crypto provider before using any
other functions.

Import `@keeex/js-bip39/lib/bip39.js` to get all functions.
npm package: @keeex/maintenance-sdk
Description: Manage creation and access to maintenance file
Author: KeeeX SAS
Latest version: 1.0.0

# KeeeX maintenance SDK

Allow manipulation and retrieval of the KeeeX infrastructure maintenance info.
This is used as an in-app communication channel to notify user of planned events such as maintenance
or ongoing incidents.

## App usage

Call `getAppStatus()` with your app name and the locale to use (if available).
You can repeat these calls as needed to update, the default settings will keep
data cached for five minutes anyway.

Example:

```javascript
import {getAppStatus} from "@keeex/maintenance-sdk";

const info = await getAppStatus({appName: "testapp", locale: "fr"});
```

Which will contain:

```javascript
{
  events: [
    {
      active: true,
      endAt: 2025-04-03T13:20:00.000Z,
      infrastructure: true,
      links: undefined,
      message: 'Message de test infra',
      startAt: 2025-03-27T13:20:23.404Z,
      type: 'incident',
      id: -872298049
    },
    {
      active: false,
      endAt: 2025-03-29T13:21:00.000Z,
      infrastructure: false,
      links: undefined,
      message: 'Message de test app',
      startAt: 2025-03-28T13:21:00.000Z,
      type: 'maintenance',
      id: -947147315
    }
  ],
  links: {},
  oldDismissed: Set(0) {},
  updatedAt: 2025-03-27T13:22:24.417Z
}
```

## Keeping track of hidden events

Each event is associated to a numeric ID.
These IDs are not sequential, but are relatively unique per event.
An application that wants to keep track of events that the user hid can store
these IDs, as they'll remain constant through multiple updates.

If an application is using an IDs for an event that was deleted, it is notified
in the reply of `getAppStatus()` so that the application can discard the
information efficiently.

## Updating the maintenance data

Maintenance data are mainly updated by using `@keeex/maintenance-tool`.
See the appropriate directory in the repository `config_sysadmin` for more
details.
npm package: @keeex/pm2-status
Description: Check some PM2 attributes from environment variables
Author: KeeeX SAS
Latest version: 1.0.0

@keeex/pm2-status
=================
Detect if the current process is running under PM2 and provide some settings from it.

This library provides three functions:

- `isPM2()`: return true if running under PM2
- `getInstanceId()`: return the identifier of the current instance, or `undefined` if
  not applicable.
- `isLogTimestamped()`: return true if running under PM2 and log timestamp is enabled

Installation
------------
Install from `npmjs`:

```shell
npm install @keeex/pm2-status
```

Usage
-----
Import named functions from default export

```JavaScript
import {isPM2} from "@keeex/pm2-status";

if (isPM2()) {
  console.log("Yep, under PM2");
}
```
npm package: @keeex/pwdcheck
Description: Check a password against Have I Been Pwned (or a proxy)
Author: KeeeX SAS
Latest version: 1.0.2

# `@keeex/pwdcheck`

Small SDK to interrogate the HIBP password database or a proxy.

## Getting started

The following three functions provides quick access to the password checker:

```javascript
import {apiFactory, memoryCacheFactory, nodeFsCacheFactory} from "@keeex/pwdcheck";

// Usable anywhere axios is supported
const checker = apiFactory();

// Usable anywhere if you want to cache queries
const checker = await memoryCacheFactory();

// Usable only in node, use FS to cache queries
const checker = await nodeFsCacheFactory();

// Use the check function
const pwdLeaked = await checker.isPasswordLeaked("bonjour123");
```

## Detailed usage

Instantiate `PasswordChecker` with the function used to query the API. To create a function that
query the API directly, use `makeApiGetter()`. To add a level of cache, use either `memoryCache()`
or `nodeFsCache()`.

## Proxy server using Express

To implement a service that provides an appropriate reply to this SDK, you can leverage the provided
cache and getter mechanism.

A basic service would look like this:

```javascript
import express from "express";
import {makeApiGetter} from "@keeex/pwdcheck/lib/apigetter.js";
import {nodeFsCache} from "@keeex/pwdcheck/lib/cache/nodefs.js";

const app = express();

// Usable only in node, use FS to cache queries
const apiGetter = makeApiGetter({remoteServer: hibpEndpoint});
const cacheGetter = nodeFsCache(apiGetter, {cachePath: "hibpcache"});

// Use the check function
app.get("/password/:prefix([0-9a-fA-F]{5})", (req, res, next) => {
  (async () => {
    res.send(await cacheGetter(req.params.prefix.toUpperString()));
  })().catch(next);
});
```

The above example would handle requests sent to `https://server/password/ABCDE` as a proxy to the
HIBP service, and cache the result in the `hibpcache` directory for a day (the default setting).
(note that the HIBP API is on `/range/ABCDE`)

The same SDK can be pointed to this endpoint and work as expected.
npm package: @keeex/qrcodejs-kx
Description: QRCodeJS is a javascript library for making QRCode. It has no dependencies, is cross-browser and using HTML5 Canvas. This porject is a fork by KeeeX Company from davidshimjs, with Code Length Overflow fixed.
Author: KeeeX
Latest version: 1.0.2

# QRCode.js
QRCode.js is javascript library for making QRCode. QRCode.js supports Cross-browser with HTML5 Canvas and table tag in DOM.
QRCode.js has no dependencies.

Project forked by KeeeX Company from davidshimjs/qrcodejs, we fixed Code Length Overflow error, and cleaned up the repository.

## Basic Usages
```html
<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "https://github.com/KeeeX/qrcodejs");
</script>
```

or with some options

```html
<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
	text: "https://github.com/KeeeX/qrcodejs",
	width: 128,
	height: 128,
	colorDark : "#000000",
	colorLight : "#ffffff",
	correctLevel : QRCode.CorrectLevel.H
});
</script>
```

and you can use some methods

```javascript
qrcode.clear(); // clear the code.
qrcode.makeCode("https://github.com/KeeeX"); // make another code.
```

### Using with webpack

```javascript
const QRCode = require("@keeex/qrcodejs-kx");
// Use QRCode as usual
```

## Browser Compatibility
IE6~10, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile, ETC.

## License
MIT License
npm package: @keeey/scribely-prompts
Description: Creative writing prompt generator CLI for Scribely
Latest version: 1.0.0

# Scribely Writing Prompts

Generate a beautiful, colorized creative writing prompt from your terminal. Sci‑Fi, Mystery, and Fantasy prompts designed to spark ideas fast.

## Install

```bash
npm install -g @keeey/scribely-prompts
```

## Usage

```bash
scribely
```

This prints a single curated prompt with ANSI colors (no external dependencies).

## Why Scribely

- Instant inspiration for drafting scenes, chapters, and outlines
- Clean CLI output that works anywhere `node` runs
- Promotes focused writing sessions without setup or accounts

## Powered By

**Scribely – AI Novel Generator**  
https://scribelydesigns.top/

Create complete stories with AI, manage chapters, and export polished manuscripts.
npm package: @keegan-stoneware/simple-app-message
Description: A library to simplify interacting with Pebble's AppMessage API.
Author: Keegan Lillo
Latest version: 1.1.1

# simple-app-message

A library to simplify interacting with Pebble's AppMessage API.

## Installation

### CloudPebble

If installing the package from CloudPebble, enter "@keegan-stoneware/simple-app-message" in
the "Search NPM..." prompt in the *Dependencies* section of your project.,

### Pebble Tool

To install this package from the Pebble Tool, run the following command from
your project's root directory:

```
> pebble package install @keegan-stoneware/simple-app-message
```


## Testing the Package

This folder contains a test application (simple-app-message-test) that can and
should be used to test the libraries functionality. To build the test app, run
the following command from within the `simple-app-message-test` folder:

```
> npm run build
```

# License

This package is licensed under the [MIT License](./LICENSE).
npm package: @keegan-stoneware/simple-dict
Description: A Pebble package for storing key-value pairs with string keys.
Author: Keegan Lillo
Latest version: 1.1.0

# simple-dict

A Pebble package for storing key-value pairs with string keys.

## Installation

### CloudPebble

If installing the package from CloudPebble, enter "@keegan-stoneware/simple-dict" in
the "Search NPM..." prompt in the *Dependencies* section of your project.,

### Pebble Tool

To install this package from the Pebble Tool, run the following command from
your project's root directory:

```
> pebble package install @keegan-stoneware/simple-dict
```

# License

This package is licensed under the [MIT License](./LICENSE).
npm package: @keegancodes/foundations
Description: These are my shared utils and styles I use in most of my projects.
Author: Keegan Donley
Latest version: 1.1.2

# @keegancodes/foundations

These are my shared utils and styles I use in most of my projects.

## Styles

```ts
import "@keegancodes/foundations/dist/main.css";
```

## Utils

```ts
import { merge, fallback, injectVariables } from "@keegancodes/foundations";
```

More docs coming soon
npm package: @keegancodes/foundations-next
Description: These are my shared Next.js helpers I use in most apps
Author: Keegan Donley
Latest version: 4.0.2

# @keegancodes/foundations-next

These are my shared Next.js helpers I use in most apps

## Utils

```ts
import { getFullyQualifiedDeploymentUrl } from "@keegancodes/foundations-next";
```

Used to get URLs for sites with deployment protection:

````ts
 const { url, headers } = await getFullyQualifiedDeploymentUrl(
      `/api/cheers?slug=${slug}`,
    );
    const data = await fetch(url, {
      cache: 'no-store',
      headers,
    });
    ```
````
npm package: @keegancodes/foundations-react
Description: These are my shared React components I use in most apps
Author: Keegan Donley
Latest version: 3.0.3

# @keegancodes/foundations-react

These are my shared React components I use in most apps

## Components

```ts
import { TailwindDebugger } from "@keegancodes/foundations-react/client";
```

Generally rendered conditionally for development only:

```tsx
{
  process.env.NODE_ENV === "development" ? <TailwindDebugger /> : null;
}
```

> Borrowed from [@ImSh4yy](https://twitter.com/ImSh4yy/status/1778221562606268669)

More docs coming soon
npm package: @keegancsmith/emacs-mcp-server
Description: MCP server for Emacs integration
Author: Keegan Carruthers-Smith
Latest version: 0.0.1

# Emacs MCP Server

This is a simple MCP (Model Context Protocol) server that allows language models to interact with Emacs through `emacsclient --eval` commands and view the current state of Emacs.

## Features

The server provides three tools:

- `emacs_eval`: Evaluates an Emacs Lisp expression and returns the result
- `emacs_get_visible_text`: Gets the text currently visible in the Emacs window
- `emacs_get_context`: Gets contextual information about the current Emacs state (buffer, mode, point position, etc.)

## Requirements

- Node.js
- Emacs with the server running (`M-x server-start` in Emacs)

## Installation

No installation is needed if you use npx. Just make sure you have Node.js and npm installed.

## Usage with Claude for Desktop

To use this MCP server with Claude for Desktop:

1. Make sure Emacs is running with the server started (`M-x server-start`)
2. Add the server to your Claude for Desktop configuration at:

   - MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
   - Linux: `~/.config/Claude/claude_desktop_config.json`
   - Windows: `%AppData%\Claude\claude_desktop_config.json`

Example configuration:

```json
{
  "mcpServers": {
    "emacs-mcp": {
      "command": "npx",
      "args": [
        "-y", "@keegancsmith/emacs-mcp-server"
      ]
    }
  }
}
```

3. Restart Claude for Desktop

## How It Works

The server uses `emacsclient --eval` to send Lisp expressions to a running Emacs instance. All operations are performed in the context of the currently visible buffer in the selected window. This allows language models to:

- Query information from Emacs (buffers, modes, variables, etc.)
- Execute commands in Emacs
- Manipulate text and buffers
- Access Emacs functionality
- See what's currently visible in Emacs
- Get cursor position and other buffer context

## Example Usage

Once the server is set up, you can use it in Claude to interact with Emacs:

```
Can you show me the list of buffers in my Emacs?
```

Claude will use the `emacs_eval` tool with an expression like `(buffer-list)` to retrieve and display your buffers.

```
What's currently visible in my Emacs window?
```

Claude can use `emacs_get_visible_text` to see the text content that's currently displayed.

```
What file am I currently editing in Emacs?
```

Claude will use `emacs_get_context` to provide information about the current buffer.

## Security Considerations

This server allows executing arbitrary Emacs Lisp code, which has full access to your Emacs environment and potentially your system. Use with trusted LLM providers and be cautious about the expressions that might be executed.

## License

MIT
npm package: @keegancsmith/linear-issues-mcp-server
Description: MCP server for Linear issues read-only access
Author: Keegan Carruthers-Smith
Latest version: 0.0.1

# Linear Issues MCP Server

This is a simple MCP (Model Context Protocol) server that provides read-only access to Linear issues. It allows language models to fetch Linear issues and their associated data using a Linear API token.

## Features

The server provides two tools:

- `linear_get_issue`: Fetches basic details about a Linear issue by URL or identifier
- `linear_get_issue_with_comments`: Fetches complete information about a Linear issue including all comments

## Requirements

- Node.js
- A Linear API token or OAuth access token

## Installation

No installation is needed if you use npx. Just make sure you have Node.js and npm installed.

## Getting a Linear API Token

You can obtain a Linear API token in two ways:

1. **API Key (simplest):** Generate an API key in your [Linear API settings](https://linear.app/settings/api)

2. **OAuth Token:** For more advanced use cases or user-specific access
   - [Create an OAuth2 application in Linear](https://linear.app/settings/api/applications/new)
   - Follow the OAuth flow to get a user access token

## Usage with Claude for Desktop

To use this MCP server with Claude for Desktop:

1. Make sure you have your Linear API token ready
2. Add the server to your Claude for Desktop configuration at:

   - MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
   - Linux: `~/.config/Claude/claude_desktop_config.json`
   - Windows: `%AppData%\Claude\claude_desktop_config.json`

Example configuration:

```json
{
  "mcpServers": {
    "linear-issues-mcp": {
      "command": "npx",
      "args": ["-y", "@keegancsmith/linear-issues-mcp-server"],
      "env": {
        "LINEAR_API_TOKEN": "your_linear_api_token_here"
      }
    }
  }
}
```

3. Restart Claude for Desktop

## Example Usage

Once the server is set up, you can use it in Claude to interact with Linear issues:

```
Can you get me the details for issue ENG-123?
```

Claude will use the `linear_get_issue` tool with your issue ID, accessing the token from environment variables.

```
What are all the comments on the issue at https://linear.app/company/issue/ENG-123/issue-title?
```

Claude can use `linear_get_issue_with_comments` to fetch the full issue details including comments.

## License

MIT
npm package: @keegpt/i18zen
Description: Extreme simple and lightweight i18n for react projects
Author: José Gomes
Latest version: 1.1.0

# I18zen

Extreme simple and lightweight i18n for react projects

## Install
```sh
npm install @keegpt/i18zen --save
```

## Load
```js
import React from 'react';
import ReactDOM from 'react-dom';

import { useI18Zen, I18ZenProvider } from 'react-i18zen';

// we can use local files
import en from './locales/en.json';
import pt from './locales/pt.json';

// or we can use remote files
const remoteLocales = [
  { locale: 'en', url: 'http://localhost:3000/locales/en.json' },
  { locale: 'pt', url: 'http://localhost:3000/locales/pt.json' }
];
```

## Usage Example

```jsx
function App() {
  const { __, changeLocale } = useI18Zen();
  return (
    <div>
        <span>{__('hello', { name: 'José' })}</span>
        <button onClick={(_e) => changeLocale('en') }>Change Locale</button>
    </div>
  );
}

ReactDOM.render(
    <I18ZenProvider 
        locales={{ pt, en }}
        remoteLocales={remoteLocales}
        errorCallback={console.error}
        initialLocale="pt"
        fallbackLocale="pt"
    >
        <App />
    </I18ZenProvider>
    , document.getElementById('root'));
```

## Locale Example

```js
{
    "hello": "Hello, {{name}}."
}
```
npm package: @keegpt/refook
Description: Use hooks outside react components!
Author: keegpt
Latest version: 1.1.0

# Refook

Use hooks outside react components!

## Installation

```bash
npm install @keegpt/refook
```

## Usage

```jsx
// your index file

import React from 'react';
import ReactDOM from 'react-dom';

import { SnackbarProvider, useSnackbar } from 'notistack';
import { I18ZenProvider, useI18Zen } from 'react-i18zen';

import en from './locales/en.json';
import pt from './locales/pt.json';

import Refook from '@keegpt/refook';

function Init() {
    return (
        <>
            <I18ZenProvider locales={{ pt, en }} defaultLocale="pt">
                <SnackbarProvider maxSnack={4} anchorOrigin={{ vertical: 'top', horizontal: 'right', }}>
                    <Refook hooks={{ toast: useSnackbar, translation: useI18Zen }} />
                    <div>Hello, world!</div>
                </SnackbarProvider>
            </I18ZenProvider>
        </>
    );
}

ReactDOM.render(<Init />, document.getElementById('root'));
```
```jsx
// anywhere in the project

import { use } from '@keegpt/refook';

export default () => {
    const translatedMessage = use('translation').__('common.success');
    use('toast').enqueueSnackbar(translatedMessage, { variant: "success" });
}

```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @keegpt/stook
Description: A react store with hooks
Author: keegpt
Latest version: 1.0.1

# Stook

A react store with hooks!

## Install
```sh
npm install @keegpt/stook --save
```

## Usage
```js
import React from 'react';
import { Provider, useCombinedReducers, createStore } from 'react-stook';

// App.js

import Content from './components/Content';

function App() {

    const elementReducer = (state, action) => {
        switch (action.type) {
            case 'ADD_ONE':
                // action.payload is available here
                return {
                    count: state.count + 1,
                    list: [...state.list, { name: `Element: ${state.count + 1}`}]
                };
            default:
                return state;
            }
    };

    const reducers = useCombinedReducers({
        elements: React.useReducer(elementReducer, { count: 0, list: [] })
        // another: React.useReducer(anotherReducer, initialState)
    });

    return (
        <>
            <Provider store={createStore(reducers)}>
                <Content />
            </Provider>
        </>
    );
}

// Content.js

import React from 'react';
import { connect } from 'react-stook';

function Content({ elements, addElement }) {

    React.useEffect(() => {
        addElement({ random: 1 });
    }, []);

    return (
        <>
            <span>Counter of elements: {elements.count}</span>
        </>
    );
}

function mapStateToProps(state) {
    return {
        elements: state.elements
    }
}

function mapDispatchToProps(dispatch) {
    return {
        addElement: (payload) => dispatch({ type: 'ADD_ONE', payload })
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Content);
```
npm package: @keegpt/zedit
Description: A visual content editor for react.js
Author: José Gomes
Latest version: 1.0.2

# Zedit
Transform your react.js websites in live editors!

## What is zedit
Zedit is designed to people that build websites with react.js. Usually we create our span, headings, and other elements to build a website. The goal is to allow to create super elements that are able to transform themselfs in editable fields, allowing to edit content directly in the website.

## Roadmap
- Build components for all HTML tags (for now you have to build your own)

## How to use
```javascript
import { Scope, Zedit } from '@keegpt/zedit';
import { useRef } from 'react';
import Span from './Span';

function App() {
  const formRef = useRef();
  return (
    <Zedit
      ref={formRef}
      initialData={
        {
          section1: {
            text1: 'Hello, world!'
          }
        }}
      onSubmit={(data) => console.log(data)}
    >
      <Scope path="section1">
        <Span name="text1">Default text</Span>
      </Scope>
      <button onClick={() => { console.log(formRef.current.getData()) }}>SAVE</button>
    </Zedit>
  );
}

export default App;

```

## Component Example
```javascript
import React, { useEffect, useRef, useState } from 'react';
import { useComponent } from '@keegpt/zedit';
import Modal from './Modal';

export default function Span({ name, children }) {
    const { componentName, defaultValue = "", registerComponent } = useComponent(name);

    const valueRef = useRef(defaultValue);
    const [value, setValue] = useState(defaultValue);
    const [isModalOpen, setIsModalOpen] = useState(false);

    useEffect(() => {
        valueRef.current = value;
    }, [value]);

    useEffect(() => {
        registerComponent({
            name: componentName,
            getValue: () => {
                return valueRef.current;
            },
            setValue: (value) => {
                setValue(value);
            },
            clearValue: (value = "") => {
                setValue(value);
            },
        })
    }, [componentName, registerComponent]);

    return (
        <>
            <span onClick={() => setIsModalOpen(true)}>{value || children}</span><br />
            <Modal isOpen={isModalOpen}>
                <input value={value} onChange={(e) => setValue(e.target.value)} />
                <button onClick={() => setIsModalOpen(false)}>Close</button>
            </Modal>
        </>
    );
}
```
npm package: @keekuun/keymaster-react
Description: React 版 keymaster 键盘快捷键库（基于 Vite 与 TypeScript 的库模式构建）。
Latest version: 0.5.0

# @keekuun/keymaster-react

### 🌐 语言

- [English](README.md)
- [中文](README.zh.md) (当前)

React 版 keymaster 键盘快捷键库，通过 Hook 帮助你在组件中优雅地绑定键盘快捷键。

## 特性

- 使用 `useKeyBinding` 一行代码绑定快捷键
- 支持组合快捷键（如 `ctrl+s`、`ctrl+shift+z`）
- 默认监听 `window` 的 `keydown` 事件，使用简单
- **作用域快捷键**：支持在特定元素范围内绑定快捷键（`scopedElement`）
- **编辑器模式**：自动处理编辑器场景的快捷键冲突
- **Electron 模式**：适配 Electron 应用的特殊需求
- TypeScript 完整类型提示

## 安装

```bash
npm install @keekuun/keymaster-react
# 或者
pnpm add @keekuun/keymaster-react
```

## 快速开始

```tsx
import React from 'react';
import { useKeyBinding } from '@keekuun/keymaster-react';

function Editor() {
  useKeyBinding(
    'ctrl+s',
    () => {
      // 在这里执行保存逻辑，例如：调接口 / 更新本地状态
      console.log('保存成功');
    },
    { preventDefault: true }, // 阻止浏览器默认的保存页面行为
  );

  return <textarea placeholder="在这里输入内容，然后按 Ctrl+S 触发保存"></textarea>;
}

export default Editor;
```

## 高级功能

### 作用域快捷键

在特定元素范围内绑定快捷键，适用于编辑器、对话框等场景：

```tsx
import { useScopedKeyBinding } from '@keekuun/keymaster-react';

const editorRef = useRef<HTMLTextAreaElement>(null);
useScopedKeyBinding(
  'ctrl+s',
  () => {
    saveContent();
  },
  editorRef,
);
```

### 编辑器模式

自动处理编辑器场景的快捷键冲突：

```tsx
import { useEditorKeyBinding } from '@keekuun/keymaster-react';

const editorRef = useRef<HTMLTextAreaElement>(null);
useEditorKeyBinding(
  'ctrl+s',
  () => {
    saveCode();
  },
  editorRef.current,
);
```

### Electron 模式

适配 Electron 应用：

```tsx
import { useElectronKeyBinding } from '@keekuun/keymaster-react';

useElectronKeyBinding('ctrl+alt+r', () => {
  window.location.reload();
});
```

## API 概览

### `useKeyBinding(shortcut, handler, options?)`

- **`shortcut`**: `string`  
  快捷键字符串，例如 `"ctrl+s"`、`"ctrl+shift+z"`。
- **`handler`**: `(event: KeyboardEvent) => void`  
  当捕获到匹配的快捷键时触发的回调。
- **`options`**: `KeymasterBindingOptions`（可选）
  - `preventDefault?: boolean` 是否在触发后调用 `event.preventDefault()`
  - `stopPropagation?: boolean` 是否在触发后调用 `event.stopPropagation()`
  - `scopedElement?: HTMLElement | null` 作用域元素，快捷键仅在元素内生效
  - `editorMode?: boolean` 编辑器模式，自动处理快捷键冲突
  - `electronMode?: boolean` Electron 模式，适配 Electron 应用

### `registerKeyBinding(shortcut, handler, options?)`

底层的通用注册函数（非 Hook），返回一个取消绑定的函数：

```ts
import { registerKeyBinding } from '@keekuun/keymaster-react';

const dispose = registerKeyBinding(
  'ctrl+s',
  (event) => {
    console.log('保存成功');
  },
  { preventDefault: true },
);

// 需要时手动解绑
dispose();
```

## 文档与示例

更多交互 Demo、使用场景与设计建议请访问文档站点：

- React 文档与 Demo：[https://keymaster-docs.vercel.app/zh/react/](https://keymaster-docs.vercel.app/zh/react/)
npm package: @keekuun/keymaster-vue
Description: Vue 版 keymaster 键盘快捷键库（基于 Vite 与 TypeScript 的库模式构建）。
Latest version: 0.5.0

# @keekuun/keymaster-vue

### 🌐 语言

- [English](README.md)
- [中文](README.zh.md) (当前)

Vue 3 版 keymaster 键盘快捷键库，为常见快捷键场景（保存、撤销、列表操作等）提供组合式 API 封装。

## 特性

- 基于 Vue 3 组合式 API 的 `useKeyBindingVue`
- 支持组合快捷键（如 `ctrl+s`、`ctrl+shift+z`）
- 默认监听 `window` 的 `keydown` 事件
- **作用域快捷键**：支持在特定元素范围内绑定快捷键（`scopedElement`）
- **编辑器模式**：自动处理编辑器场景的快捷键冲突
- **Electron 模式**：适配 Electron 应用的特殊需求
- TypeScript 完整类型提示

## 安装

```bash
npm install @keekuun/keymaster-vue
# 或者
pnpm add @keekuun/keymaster-vue
```

## 快速开始

```vue
<template>
  <textarea placeholder="在这里输入内容，然后按 Ctrl+S 触发保存" />
</template>

<script setup lang="ts">
import { useKeyBindingVue } from '@keekuun/keymaster-vue';

function onSave() {
  // 在这里执行保存逻辑，例如：调接口 / 更新本地状态
  console.log('保存成功');
}

useKeyBindingVue(
  'ctrl+s',
  () => {
    onSave();
  },
  { preventDefault: true }, // 阻止浏览器默认的保存页面行为
);
</script>
```

## 高级功能

### 作用域快捷键

在特定元素范围内绑定快捷键，适用于编辑器、对话框等场景：

```vue
<script setup lang="ts">
import { ref } from 'vue';
import { useScopedKeyBindingVue } from '@keekuun/keymaster-vue';

const editorRef = ref<HTMLTextAreaElement | null>(null);
useScopedKeyBindingVue(
  'ctrl+s',
  () => {
    saveContent();
  },
  editorRef,
);
</script>
```

### 编辑器模式

自动处理编辑器场景的快捷键冲突：

```vue
<script setup lang="ts">
import { ref } from 'vue';
import { useEditorKeyBindingVue } from '@keekuun/keymaster-vue';

const editorRef = ref<HTMLTextAreaElement | null>(null);
useEditorKeyBindingVue(
  'ctrl+s',
  () => {
    saveCode();
  },
  editorRef.value,
);
</script>
```

### Electron 模式

适配 Electron 应用：

```vue
<script setup lang="ts">
import { useElectronKeyBindingVue } from '@keekuun/keymaster-vue';

useElectronKeyBindingVue('ctrl+alt+r', () => {
  window.location.reload();
});
</script>
```

## API 概览

### `useKeyBindingVue(shortcut, handler, options?)`

- **`shortcut`**: `string`  
  快捷键字符串，例如 `"ctrl+s"`、`"ctrl+shift+z"`。
- **`handler`**: `(event: KeyboardEvent) => void`  
  当捕获到匹配的快捷键时触发的回调。
- **`options`**: `KeymasterVueBindingOptions`（可选）
  - `preventDefault?: boolean` 是否在触发后调用 `event.preventDefault()`
  - `stopPropagation?: boolean` 是否在触发后调用 `event.stopPropagation()`
  - `scopedElement?: HTMLElement | null` 作用域元素，快捷键仅在元素内生效
  - `editorMode?: boolean` 编辑器模式，自动处理快捷键冲突
  - `electronMode?: boolean` Electron 模式，适配 Electron 应用

### `registerVueKeyBinding(shortcut, handler, options?)`

底层的通用注册函数（非组合式 API），返回一个取消绑定的函数：

```ts
import { registerVueKeyBinding } from '@keekuun/keymaster-vue';

const dispose = registerVueKeyBinding(
  'ctrl+s',
  (event) => {
    console.log('保存成功');
  },
  { preventDefault: true },
);

// 需要时手动解绑
dispose();
```

## 文档与示例

更多交互 Demo、使用场景与设计建议请访问文档站点：

- Vue 文档与 Demo：[https://keymaster-docs.vercel.app/zh/vue/](https://keymaster-docs.vercel.app/zh/vue/)