open-index/open-npm huggingface dataset:
npm package: @locmod/cache
Description: quick server cache
Author: @locmod
Latest version: 1.1.0

# Cache

This library enhances [`memory-cache`](https://www.npmjs.com/package/memory-cache) module with Typescript support. 

## Installation

`npm install --save @locmod/cache`

## Usage

```ts
import cache from '@locmod/cache'
```

#### cache.set 
```ts
(key: string, data: any, cacheAge?: number) => void
```

Saves the cache for specific amount of time in ms. If there is undefined, cache will be stored indefinitely.

```ts
cache.set('key1', { foo: 'bar' })
cache.set('key2', [1, 2, 3])
cache.set('key3', 'foo', 1000) // 1 second
```

---


#### cache.get 
```ts
<T>(key: string) => T | null
```

Gets the saved cache if there is any. 
If no cache saved for this key, or it's expired, `null` will be returned. Supports generic types

```ts
cache.get('key1') // { foo: 'bar' }
cache.get<number[]>('key2') // [1, 2, 3]
cache.get<string>('key3') // 'foo'

setTimeout(() => {
  cache.get<string>('key3') // null
}, 2000)
```

---

#### cache.keys 
```ts
() => string[]
```

Returns all the saved keys

```ts
cache.keys() // ['key1', 'key2', 'key3']
```

---

#### cache.clear 
```ts
(key: string) => void
```

Removes the saved key

```ts
cache.set('foo', 'bar')
cache.get('foo') // bar

cache.clear('foo')
cache.get('foo') // null
```

---

#### cache.clearMatch 
```ts
(pattern: string) => void
```

Removes all the saved keys that matches the pattern

```ts
cache.set('match-1', 'bar')
cache.set('match-2', 'bar')
cache.set('match-3', 'bar')
cache.set('foo', 'bar')

cache.clearMatch('match-')

cache.get('match-1') // null
cache.get('match-2') // null
cache.get('match-3') // null
cache.get('foo')     // bar
```

---

#### cache.clearAll 
```ts
() => void
```

Removes the saved keys

```ts
cache.set('match-1', 'bar')
cache.set('match-2', 'bar')
cache.set('match-3', 'bar')
cache.set('foo', 'bar')

cache.clearAll('match-')

cache.get('match-1') // null
cache.get('match-2') // null
cache.get('match-3') // null
cache.get('foo')     // null
```
npm package: @locmod/event-aggregator
Description: This is very simple event aggregator
Author: @locmod
Latest version: 1.0.3

# event-aggregator

This is very simple event aggregator

## Installation

`npm install --save @locmod/event-aggregator`

## Usage

Can be used directly
```ts
import { events } from '@locmod/event-aggregator'
```

or can be used as a class

```ts
const events = new EventAggregator()
```

### Subscribe to event
```ts
useEffect(() => {
  const unsubscribe = events.subscribe('test event', console.log)

  return () => {
    unsubscribe()
  }
}, [])
```
or just
```ts
events.subscribe('test event', console.log)
```

### Dispatch an event
```ts
events.subscribe('test event', { value: 10 }) // console.log will be called with { value: 10 }
```


### Unsubscribe
```ts
events.unsubscribe('test event', console.log)
```

### Get event
Get Event by name
```ts
events.getEvent('test event')
events.getEvent('unexistant event') // if event not found, it will be created and returned
```

### Once
Subscribe to Event and unsubscribe after call
```ts
events.once('once in a lifetime', console.log)
```
npm package: @locmod/icon-name-type
Description: This is a script to generate TS file with IconName type
Author: Local-Modules
Latest version: 1.0.6

# icon-name-type

CLI to generate TS file with IconName type.


### Intro

Image a React (NextJS) project with following structure.

Icons stored by groups in folders named by icon size.

```
public/
  images/
    icons/
      16/
        chevron.svg
        clockwise.svg
      24/
        arrow-left.svg
        arrow-right.svg  
```

There is an `Icon` component which accepts icon `name` property.

```tsx
type IconName = '16/chevron' | '16/clockwise' | '24/arrow-left' | '24/arrow-right'

type IconProps = {
  name: IconName
}

const Icon: React.FC<IconProps> = ({ name }) => (
  <img src={`/images/svg/${name}`} />
)
```

To automate process and avoid handwriting `IconName` type this package exists.

`icon-name-type` call will generate `icons.d.ts` file with content

```
export type IconName = '16/chevron' | '16/clockwise' | '24/arrow-left' | '24/arrow-right'
```

The `Icon` component's code can be simplified

```tsx
import type { IconType } from './icons'

type IconProps = {
  name: IconName
}

const Icon: React.FC<IconProps> = ({ name }) => (
  <img src={`/images/svg/${name}`} />
)
```


### Generate types 

```
icon-name-type --i ./public/images/svg --o ./src/components/Icon
```


### Watch for input changes and generate types

```
icon-name-type --i .. --o .. --watch
```

### Helpful scripts

Add this to your package.json scripts

```
"build-icons": "icon-name-type --i ./public/images/svg --o ./src/components/ui/Icon",
"watch-icons": "npm run build-icons -- --watch",
```
npm package: @locmod/notifications
Author: @locmod
Latest version: 1.0.2

# @locmod/notifications


Unlike Modals Notification system based on templates. The root component is `containers/App/Notifications`. It includes 
all templates of notifications. The templates should be placed in `compositions/notifications` folder.


## Installation
```bash
npm install --save @locmod/notifications
```
or
```bash
yarn add @locmod/notifications
```

## Create a notification

Create a notification in `compositions/notifications` folder. 

```typescript jsx
import React from 'react'

import { Box } from 'components/layout'
import { Title, Text } from 'components/typography'

import Notification from 'components/Notification/Notification'
import type { NotificationProps } from 'components/Notification/Notification'


type PlainNotificationProps = NotificationProps & {
  title: string | Intl.Message
  text: string | Intl.Message
}

const PlainNotification: React.FunctionComponent<PlainNotificationProps> = ({ title, text, closeNotification }) => (
  <Notification closeNotification={closeNotification}>
    <Title size="16-16" message={title} color="gold-50" />
    <Box mt={8}>
      <Text size="14-20" message={text} />
    </Box>
  </Notification>
)


export default PlainNotification

```

**danger**
Be sure `closeNotification` prop is used and passed to `<Notification />` component! It used inside notifications 
manager to understand what notification should be closed when close method is called.

You can use the code below as Live Template to create new notifications faster.

```typescript jsx
import Notification from 'components/Notification/Notification'
import type { NotificationProps } from 'components/Notification/Notification'


type $COMPONENT$Props = NotificationProps & {
  // custom props here
}

const $COMPONENT$: React.FunctionComponent<$COMPONENT$Props> = ({ closeNotification }) => (
  <Notification closeNotification={closeNotification}>
    {/* content here */}
  </Notification>
)


export default $COMPONENT$
```

**note**
As you can see the **Notification** component (base for all notifications) is taken from **components** folder. This is 
because of architecture, our own styles should be stored in **src** folder, not in **local_modules**. Please don't create 
additional base components.


## Add a notification to the system

```typescript
import PlainNotification from 'compositions/notifications/PlainNotification/PlainNotification'

export const templates = {
  'plain': PlainNotification,
} as const
```

`templates` used in `App/Notifications/type.d.ts` to create global `Notifications` type which used in 
`notifications/manager` to provide types experience when `openNotification` is used.


## Use created notification

```js
import { openNotification } from 'notifications'

openNotification('plain', {
  title: 'Success',
  text: 'User address is updated!'
})
```
npm package: @locmod/trap-focus
Description: local, session and memory storage manager
Author: Local-Modules
Latest version: 1.0.2

# @locmod/trap-focus

## Installation

```
npm i @locmod/trap-focus --save
```

## Usage

```
import { useTrapFocus } from '@locmod/trap-focus'

const Component = () => {
  const ref = useTrapFocus()
  
  return (
    <div 
      ref={ref}
      tabIndex={0} // don't forget to add this
    >
      ...
    </div>
  )
}
```

Or manually

```
import TrapFocus from '@locmod/trap-focus'

const Component = () => {
  const ref = useRef()
  
  useEffect(() => {
    const trapFocus = new TrapFocus(ref.current)
  
    trapFocus.mount()
  
    return () => {
      trapFocus.unmount()
    }
  }, [ trapFocusId ])
  
  return (
    <div 
      ref={ref}
      tabIndex={0} // don't forget to add this
    >
      ...
    </div>
  )
}
```

### Options

There is only one option `withInitialFocus: Boolean`. Default is `True`. 

`True` means that when `trapFocus.mount()` called first element from the selectors list will be focused.

**selectors list:**

```
a[href]:not([disabled]), 
button:not([disabled]), 
input[type="text"]:not([disabled]),
input[type="radio"]:not([disabled]), 
input[type="checkbox"]:not([disabled]), 
textarea:not([disabled]), 
select:not([disabled]),
div[role="button"]:not([disabled])
```

`False` means that the lib won't be looking for elements to focus.


```
useTrapFocus({ withInitialFocus: false })

new TrapFocus(ref.current, { withInitialFocus: false })
```
npm package: @loco-sync/client
Description: Client for Loco Sync, a sync engine for local-first applications
Author: Kevin Kusch
Latest version: 0.0.1-beta.30

# @loco-sync/client

Client for Loco Sync, a sync engine for local-first applications.

Full documentation for `@loco-sync/client` can be found [here](https://loco-sync.com).
npm package: @loco-sync/idb
Description: IndexedDB storage adapter for Loco Sync, a sync engine for local-first applications
Author: Kevin Kusch
Latest version: 0.0.1-beta.30

# @loco-sync/idb

IndexedDB storage adapter for Loco Sync, a sync engine for local-first applications.

Full documentation for `@loco-sync/idb` can be found [here](https://loco-sync.com).
npm package: @loco-sync/react
Description: React hooks for Loco Sync, a sync engine for local-first applications
Author: Kevin Kusch
Latest version: 0.0.1-beta.30

# @loco-sync/react

React hooks for Loco Sync, a sync engine for local-first applications.

Full documentation for `@loco-sync/react` can be found [here](https://loco-sync.com).
npm package: @lococo-ai/n8n-nodes-prompt-kaizen
Description: Continuous improvement platform for AI agent prompts with version control, feedback collection, and AI-powered optimization
Author: elbtech GmbH
Latest version: 0.1.3

# n8n-nodes-prompt-kaizen

This is an n8n community node. It lets you use Prompt Kaizen in your n8n workflows.

Prompt Kaizen is a continuous improvement platform for AI agent prompts with version control, feedback collection, and AI-powered optimization.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.

[Installation](#installation)  
[Operations](#operations)  
[Credentials](#credentials)  
[Compatibility](#compatibility)  
[Usage](#usage)  
[Resources](#resources)

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

## Operations

**Prompt**

- **Get Prompt**: Retrieve and render a prompt with version control support
  - Fetch latest version, specific version, or version by tag
  - Render templates with context variables
  - Supports both static and template-based prompts
- **Submit Feedback**: Submit feedback for a prompt version
  - Rate prompts (1-5 scale)
  - Add comments and test scenarios
  - Track actual vs expected outputs

## Credentials

To use this node, you need a Prompt Kaizen account with API access.

1. Sign up at [prompt-kaizen.lococo.ai](https://prompt-kaizen.lococo.ai)
2. Generate an API key from your account settings
3. In n8n, create new Prompt Kaizen API credentials:
   - **API Key**: Your Prompt Kaizen API key
   - **Base URL**: `https://prompt-kaizen.lococo.ai/api` (default)

## Compatibility

Minimum n8n version: 1.0.0

Tested against n8n version: 1.0.0+

## Usage

### Get Prompt Example

1. Select **Get Prompt** operation
2. Choose a prompt from your workspace
3. Select version strategy:
   - **Latest Version**: Always use the most recent version
   - **Specific Version**: Pin to a specific version number
   - **By Tag**: Use tagged versions (e.g., "production", "staging")
4. For template prompts, provide **Context Variables** as JSON to render dynamic content

### Submit Feedback Example

1. Select **Submit Feedback** operation
2. Choose the prompt and version
3. Provide a rating (1-5)
4. Optionally add comments and test scenarios to help improve the prompt

This enables continuous improvement loops where AI agent outputs can be automatically evaluated and feedback collected to optimize prompts over time.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
- [Prompt Kaizen Documentation](https://prompt-kaizen.lococo.ai)
npm package: @locofy/cli
Description: Locofy CLI
Author: Locofy
Latest version: 0.0.149

# Locofy CLI

Locofy CLI is a command-line tool designed to generate code component bundles for your projects and integrate them seamlessly with AI assistance. This README provides comprehensive instructions for installing and using the Locofy CLI.

Details about Locofy Custom components: [Locofy Documentation](https://www.locofy.ai/docs/custom-components/overview/)

## Installation

```bash
npm install @locofy/cli -g
```

## Authentication

Before using the CLI, you need to authenticate with your Locofy account.

### Login

Log in to your Locofy account. This will open a browser window for authentication.

```bash
locofy login
```

### Logout

Log out of your Locofy account.

```bash
locofy logout
```

## Setup

### Init

Initialize the Locofy configuration in your project. This creates a `locofy.config.json` file.

```bash
locofy init
```

**Options:**

- `--url <url>`: Use a custom API URL (e.g., `locofy init --url https://custom-domain.dev`).

## Syncing Components

### Push

Push your local custom components to Locofy for use in the Builder.

```bash
locofy push
```

## Code Generation & Integration

Locofy CLI provides powerful tools to pull, download, and integrate generated code into your codebase.

### Pull (Recommended)

The `pull` command is the all-in-one workflow that retrieves generated code and intelligently integrates it into your project using AI. It combines downloading and integration into a single step.

```bash
locofy pull [codeId]
```

**Options:**

- `-p, --project <id>`: Locofy Project ID.
- `-t, --target <path>`: Target project directory (default: `.`).
- `--resume`: Resume an interrupted session.
- `--skip-asking`: Allow all permissions/confirmations without asking.
- `--verify-build`: Run the final compilation gate after merge. By default, the build step is skipped.

## Help

Get detailed help for any command.

```bash
locofy pull --help
```

## Maintenance

### Clear

Clear all cached information by deleting the `.locofy` folder. This fixes issues related to corrupted cache or session data.

```bash
locofy clear
```

## Contributing

If you would like to contribute to the development of Locofy CLI, please follow these steps:

1. Fork this repository.
2. Run commands:

```bash
npm run install
```

```bash
npm run link
```

3. Create a new branch for your feature or bug fix.
4. Make your changes and commit them with descriptive messages.
5. Push your changes to your fork.
6. Submit a pull request to the `main` branch of this repository.
npm package: @locokit/designsystem
Description: LocoKit Design System, components library
Author: Mathieu Dartigues
Latest version: 0.0.17

# LocoKit Design system - Components library

This design system use PrimeVue and Tailwind CSS.

To develop it, please run the storybook, create / update components,
and add stories to demonstrate how to use the component.

Start the storybook:

```sh
pnpm run storybook
```

Build the design system:

```sh
pnpm build
```

Publish it:

```sh
pnpm publish
```
npm package: @locokit/lck-glossary
Description: Glossary for Low-Code Kit platform
Author: Mathieu DARTIGUES
Latest version: 0.3.7

# Low-Code Kit Glossary

The glossary for the Low-Code Kit platform.

This repository is the inventory of all the types used in the LCK API.

This glossary is published in the
[`@locokit/lck-glossary` npm package](https://www.npmjs.com/package/@locokit/lck-glossary).

## How to publish this package

* upgrade the `package.json` version (and respect the [semver](https://semver.org/))
* write the [`CHANGELOG`](./CHANGELOG)
* if you're on your own PC
  * `npm run build`
  * `npm run publish`
* otherwise, 
  * create a new release tag
  * launch the `publish` job in the CI

## CHANGELOG

Please refer to [`CHANGELOG`](./CHANGELOG)
npm package: @locokit/sdk
Description: This repo contains the Software Development Kit of LocoKit.
Latest version: 1.0.0-alpha.0

This repo contains the Software Development Kit of LocoKit.

It is based on the FeathersJS client,
enhanced with the several services exposed by the
LocoKit API.

This SDK is static, and help users
to retrieve data through the static API of LocoKit.

It is not dynamically generated from a workspace configuration.

This folder is auto generated from the api folder.

The LocoKit SDK is the feathers client autogenerated.
npm package: @locol23/renovate-config
Description: Shareable config for Renovate
Author: locol23
Latest version: 2.1.0

# @locol23/renovate-config

[Shareable config](https://renovatebot.com/docs/config-presets/) for [Renovate](https://renovatebot.com)

[![CircleCI](https://circleci.com/gh/locol23/renovate-config.svg?style=shield)](https://circleci.com/gh/locol23/renovate-config)

## Setup

Add `@locol23` to `extends` property for your renovate config

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

Note: You don't need to npm install

## License

MIT
npm package: @locolens/core
Description: LocoLens Core
Author: Shrey Dhyani
Latest version: 0.0.1

# Ariakit Core

**Important:** This package is an internal dependency of LoCoLens and does not follow semantic versioning, meaning breaking changes may occur in patch and minor versions. You probably want to use [`@locolens/react`](https://npmjs.org/package/@locolens/react) instead.

## Installation

```
npm i @locolens/core
```

## Core Team

- [Rajiv Saleem](https://x.com/rjv_im)
- [Shrey Dhyani](https://x.com/ShreyDhyani)

## Contributing

Follow the instructions on the [contributing guide](https://github.com/locolens/locolens/blob/main/contributing.md).
npm package: @locolens/vue
Description: LoCoLens Vue
Author: Shrey Dhyani
Latest version: 0.0.1

# Ariakit Vue

## Installation

```
npm i @locolens/vue
```

## Core Team

- [Rajiv Saleem](https://x.com/rjv_im)
- [Shrey Dhyani](https://x.com/ShreyDhyani)

## Contributing

Follow the instructions on the [contributing guide](https://github.com/locolens/locolens/blob/main/contributing.md).