open-index/open-npm huggingface dataset:
npm package: @simple-motion/preact
Description: A lightweight transition library for Preact, designed to seamlessly animate component lifecycles.
Author: Ademir José Ferreira Júnior
Latest version: 0.0.1

# @simple-motion/preact

[![codecov](https://codecov.io/gh/Azganoth/simple-motion-preact/graph/badge.svg?token=RO59WBJ6VY)](https://codecov.io/gh/Azganoth/simple-motion-preact)

A lightweight transition library for Preact, designed to seamlessly animate component lifecycles.
npm package: @simple-node-config/eslint
Description: A simple eslint config based on AirBnb style guide and Prettier code format rules.
Author: Mehathab Shaik
Latest version: 1.0.3-beta.1

# @simple-node-config/eslint

A simple eslint configuration using AirBnb style guides and Prettier setup

## Install

`npm i -D @simple-node-config/eslint`
<br>or</br>
`yarn add -D @simple-node-config/eslint`

## Usage

### Eslint

1. Create .eslintrc file at your project root level.
2. Add the below code to .eslintrc<br/>
   `{"extends": "@simple-node-config/eslint/eslintrc"}`

### Prettier

1. Create .prettierrc.js at your project root level.
2. Add the below code to .prettierrc.js<br/>
   `module.exports = { ...require('./configs/prettierrc'), };`
npm package: @simple-node/structured-response
Description: This repository contains classes for handling API responses in JavaScript/TypeScript. These classes provide a structured and consistent way of handling both successful and error API responses.
Latest version: 1.0.2

This repository contains classes for handling API responses in JavaScript/TypeScript. These classes provide a structured and consistent way of handling both successful and error API responses.

## APIErrorTypes

The `APIErrorTypes` constant is an object that defines the different types of errors that can be encountered in API responses. It has two properties:

- `AUTH_ERROR`: Indicates an authentication-related error.
- `API_ERROR`: Represents a general API error.

## APIErrorResponse

The `APIErrorResponse` class extends the `APIResponse` class and is used to construct error responses from the API. It takes two parameters:

- `errorType`: The type of the error. It can be one of the values defined in `APIErrorTypes`.
- `errorMessage`: An optional parameter that contains a custom error message.

### Usage:

```javascript
const errorResponse = new APIErrorResponse(APIErrorTypes.AUTH_ERROR, 'Invalid token');
```

## APISuccessResponse

The `APISuccessResponse` class extends the `APIResponse` class and is used to construct successful responses from the API. It takes a single parameter:

- `body`: The data to be included in the response body.

### Usage:

```javascript
const successResponse = new APISuccessResponse({ name: 'John', age: 30 });
```

## APIResponse

The `APIResponse` class is the base class for both error and success responses. It contains methods for setting and retrieving response data, meta information, headers, and error details.

### Methods:

- `setData(data)`: Sets the response data.
- `getData()`: Retrieves the response data.
- `setMeta(meta)`: Sets the meta information for the response.
- `getMeta()`: Retrieves the meta information.
- `setAuth(auth)`: Sets the authentication details for the response.
- `getAuth()`: Retrieves the authentication details.
- `getHeaders()`: Retrieves the response headers.
- `setHeaders(headers)`: Sets the response headers.
- `setError(errorType, errorMessage = '')`: Sets the error details for the response. Pass the `errorType` from `APIErrorTypes` and an optional custom `errorMessage`.
- `getError()`: Retrieves the error details if an error is present; otherwise, returns null.
- `toJSON()`: Converts the APIResponse instance to a JSON object.
- `static fromJSON(json)`: Creates an APIResponse instance from a JSON object.

### Usage:

```javascript
const response = new APIResponse();
response.setData({ name: 'Jane', age: 25 });
response.setMeta({ requestId: '123456' });
response.setHeaders({ 'Content-Type': 'application/json' });
response.setError(APIErrorTypes.API_ERROR, 'Internal server error');

const jsonResponse = response.toJSON();
const responseFromJson = APIResponse.fromJSON(jsonResponse);
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
npm package: @simple-org/codelab-generator
Description: 📦 This project give the possibility to generate a Google codelab with asciidoc or markdown files.
Latest version: 1.0.9

# Codelab Generator 🎉

📦 This project give the possibility to generate a Google codelab with asciidoc or markdown files.

You can use this module directly from the command line or from your code !

## How to use ?

### Command line

```shell
npx @dxdeveloperexperience/codelab-generator ./index.adoc ./target

npx @dxdeveloperexperience/codelab-generator ./index.md ./target
```

### In your code

```js
const codelab = require("@dxdeveloperexperience/codelab-generator");

// ...
await codelab(labTmpFile, labsOutputDir);
```

## Configuration

### Values

| Name | Values | Description                                   |
| ---- | ------ | --------------------------------------------- |
| base | ""     | The base url of bower_components and elements |

### Examples

From shell
```shell
npx @dxdeveloperexperience/codelab-generator ./index.adoc ./target path/to/config.json

npx @dxdeveloperexperience/codelab-generator ./index.md ./target path/to/config.json
```

the config.json

```json
{
  "base": "baseurl/test/"
}
```

or

```js
const codelab = require("@dxdeveloperexperience/codelab-generator");

// ...
await codelab(labTmpFile, labsOutputDir, { base: "" });
```

Result, it will convert template
from:

```html
<script src="{{ &base }}bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="{{ &base }}elements/codelab.html" />
```

to:

```html
<script src="baseurl/test/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="baseurl/test/elements/codelab.html" />
```

## Contributors

- Emmanuel DEMEY
- Aurélien LOYER
npm package: @simple-presence/core
Description: Real-time user presence tracking for any JavaScript application
Latest version: 0.2.1

# @simple-presence/core

Framework-agnostic real-time user presence tracking.

## Install

```bash
npm install @simple-presence/core
```

## Usage

```js
import { SimplePresence } from "@simple-presence/core";

const presence = new SimplePresence({
  tag: "my-page",
  appKey: "your-app-key",
  onCountChange: (count) => {
    document.getElementById("counter").textContent = `${count} online`;
  },
});

// Clean up when done
await presence.destroy();
```

## API

### `new SimplePresence(config)`

| Option          | Type                      | Required | Description                                       |
| --------------- | ------------------------- | -------- | ------------------------------------------------- |
| `tag`           | `string`                  | Yes      | The tag (page/section) to track                   |
| `appKey`        | `string`                  | Yes      | Your app's public key                             |
| `apiUrl`        | `string`                  | No       | Override the API URL (defaults to hosted service) |
| `onCountChange` | `(count: number) => void` | No       | Called when the online count changes              |

### `initPresence(config)`

Async factory that creates a `SimplePresence` instance. Only works in browser environments.

### Instance Methods

- `getCount()` - Returns the current online count
- `getStatus()` - Returns `"online"` or `"away"`
- `getClientId()` - Returns the persistent client identifier
- `destroy()` - Cleans up the connection and event listeners

## Behavior

- Connects via WebSocket to the presence backend.
- Automatically tracks `online` / `away` status based on page visibility.
- Shares connections across multiple instances with the same `(appKey, tag)`.
- Persists a stable client ID in localStorage (falls back to cookie or in-memory).

## License

MIT
npm package: @simple-presence/react
Description: React hooks for real-time user presence tracking
Latest version: 0.2.1

# @simple-presence/react

React hooks for real-time user presence tracking.

## Install

```bash
npm install @simple-presence/react @simple-presence/core
```

## Usage

```tsx
import { usePresenceCount } from "@simple-presence/react";

function OnlineUsers() {
  const count = usePresenceCount("my-page", {
    appKey: "your-app-key",
  });

  return <span>{count} users online</span>;
}
```

## API

### `usePresenceCount(tag, options)`

Returns the current online count for the given tag.

| Param            | Type      | Description           |
| ---------------- | --------- | --------------------- |
| `tag`            | `string`  | The tag to track      |
| `options.appKey` | `string`  | Your app's public key |
| `options.apiUrl` | `string?` | Override the API URL  |

**Returns:** `number` — the current online count for the tag.

The hook manages the `SimplePresence` lifecycle automatically — it creates the instance on mount and destroys it on unmount.

## Override API URL

For local development or self-hosting:

```tsx
const count = usePresenceCount("my-page", {
  appKey: "your-app-key",
  apiUrl: "http://localhost:3000",
});
```

## Requirements

- React >= 18

## License

MIT
npm package: @simple-release/config
Description: A simple-release config loader.
Author: Dan Onoshko
Latest version: 2.1.2

# @simple-release/config

[![ESM-only package][package]][package-url]
[![NPM version][npm]][npm-url]
[![Node version][node]][node-url]
[![Dependencies status][deps]][deps-url]
[![Install size][size]][size-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]

[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
[package-url]: https://nodejs.org/api/esm.html

[npm]: https://img.shields.io/npm/v/@simple-release/config.svg
[npm-url]: https://www.npmjs.com/package/@simple-release/config

[node]: https://img.shields.io/node/v/@simple-release/config.svg
[node-url]: https://nodejs.org

[deps]: https://img.shields.io/librariesio/release/npm/@simple-release/config
[deps-url]: https://libraries.io/npm/@simple-release%2Fconfig/tree

[size]: https://packagephobia.com/badge?p=@simple-release/config
[size-url]: https://packagephobia.com/result?p=@simple-release/config

[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-release/tests.yml?branch=main
[build-url]: https://github.com/TrigenSoftware/simple-release/actions

[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-release/badge.svg?branch=main
[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-release?branch=main

A simple-release config loader.

## Install

```bash
# pnpm
pnpm add @simple-release/config
# yarn
yarn add @simple-release/config
# npm
npm i @simple-release/config
```

## Usage

This package provides a function to find and load js config file for simple-release. Possible config file names are:

- `.simple-release.js`
- `.simple-release.cjs`
- `.simple-release.mjs`

```js
import { load } from '@simple-release/config'

await load() // Returns config object or null
await load({ config: true }) // Returns config object or throws an error if config is not found
await load({ [propertyName]: true }) // Returns config object with desired property or null or throws an error if property is not set in config
```

Also loader has a feature to load and instantiate addon's classes. For example, if you have a config like this:

```js
export const project = [
  '@simple-release/pnpm#PnpmWorkspacesProject',
  {
    mode: 'independent'
  }
]
```

You can load it like this:

```js
import { load } from '@simple-release/config'

const config = await load()

config.project // Will be an instance of PnpmWorkspacesProject
```

You can pass your own loader and use queries with version:

```js
export const project = [
  '@simple-release/pnpm@1.0.0#PnpmWorkspacesProject',
  {
    mode: 'independent'
  }
]
```

```js
import { load } from '@simple-release/config'

const config = await load({}, async (name, version) => {
  await install(name, version) // For example you can implement lazy install here
  return import(name)
})
```
npm package: @simple-release/github
Description: A github addon for simple-release.
Author: Dan Onoshko
Latest version: 2.4.0

# @simple-release/github

[![ESM-only package][package]][package-url]
[![NPM version][npm]][npm-url]
[![Node version][node]][node-url]
[![Dependencies status][deps]][deps-url]
[![Install size][size]][size-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]

[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
[package-url]: https://nodejs.org/api/esm.html

[npm]: https://img.shields.io/npm/v/@simple-release/github.svg
[npm-url]: https://www.npmjs.com/package/@simple-release/github

[node]: https://img.shields.io/node/v/@simple-release/github.svg
[node-url]: https://nodejs.org

[deps]: https://img.shields.io/librariesio/release/npm/@simple-release/github
[deps-url]: https://libraries.io/npm/@simple-release%2Fgithub/tree

[size]: https://packagephobia.com/badge?p=@simple-release/github
[size-url]: https://packagephobia.com/result?p=@simple-release/github

[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-release/tests.yml?branch=main
[build-url]: https://github.com/TrigenSoftware/simple-release/actions

[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-release/badge.svg?branch=main
[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-release?branch=main

A github addon for simple-release.

## Install

```bash
# pnpm
pnpm add @simple-release/github
# yarn
yarn add @simple-release/github
# npm
npm i @simple-release/github
```

## Usage

```js
import { Releaser } from '@simple-release/core'
import { PnpmProject } from '@simple-release/pnpm'
import { GithubHosting } from '@simple-release/github'

await new Releaser({
  project: new PnpmProject(),
  hosting: new GithubHosting({
    token: process.env.GITHUB_TOKEN
  })
})
  .bump()
  .commit()
  .tag()
  .push()
  .publish()
  .release()
  .run()
```

## Options

| Option | Description |
|--------|-------------|
| token | GitHub personal access token to authenticate with the GitHub API. |
| octokit | Alternative to `token`, you can provide an instance of GitHub's Octokit client. |
| owner | The GitHub owner (username or organization) of the repository. If not provided, it will be inferred from the remote URL. |
| project | The GitHub project (repository name) to create releases in. If not provided, it will be inferred from the remote URL. |
npm package: @simple-release/github-action
Description: A simple-release api for github action.
Author: Dan Onoshko
Latest version: 2.2.0

# @simple-release/github-action

[![ESM-only package][package]][package-url]
[![NPM version][npm]][npm-url]
[![Node version][node]][node-url]
[![Dependencies status][deps]][deps-url]
[![Install size][size]][size-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]

[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
[package-url]: https://nodejs.org/api/esm.html

[npm]: https://img.shields.io/npm/v/@simple-release/github-action.svg
[npm-url]: https://www.npmjs.com/package/@simple-release/github-action

[node]: https://img.shields.io/node/v/@simple-release/github-action.svg
[node-url]: https://nodejs.org

[deps]: https://img.shields.io/librariesio/release/npm/@simple-release/github-action
[deps-url]: https://libraries.io/npm/@simple-release%2Fgithub-actions/tree

[size]: https://packagephobia.com/badge?p=@simple-release/github-action
[size-url]: https://packagephobia.com/result?p=@simple-release/github-action

[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-release/tests.yml?branch=main
[build-url]: https://github.com/TrigenSoftware/simple-release/actions

[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-release/badge.svg?branch=main
[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-release?branch=main

A simple-release api for github action.

## Install

```bash
# pnpm
pnpm add @simple-release/github-action
# yarn
yarn add @simple-release/github-action
# npm
npm i @simple-release/github-action
```

## Usage

```js
import { getOctokit } from '@actions/github'
import { load } from '@simple-release/config'
import { ReleaserGithubAction, ifReleaseCommit } from '@simple-release/github-action'

const {
  project,
  releaser,
  ...options
} = await load({
  config: true,
  project: true
})
const action = await new ReleaserGithubAction({
  project,
  octokit: getOctokit(token),
  ...releaser
})

// Create pull request with version bump
action
  .setOptions(options)
  .checkout()
  .fetchOptions()
  .bump()
  .commit()
  .push()
  .pullRequest()
  .run()

// Publish release and project
action
  .setOptions(options)
  .tag()
  .push()
  .release()
  .publish()
  .run(ifReleaseCommit)

// Run all steps to create a pull request with version bump
action
  .setOptions(options)
  .runPullRequestAction()

// Run all steps to release project
action
  .setOptions(options)
  .runReleaseAction()

// Detect action by commit type and run appropriate steps
action
  .setOptions(options)
  .runAction()
```

### fethchOptions

You can pass additional options to releaser via comment in your pull request. Your comment should start with `!simple-release/set-options` and contain JSON object with options. For example:

````md
!simple-release/set-options

```json
{
  "bump": {
    "prerelease": "alpha"
  }
}
```
````

To fetch and parse comments you should use `fetchOptions` step after `checkout` step.