open-index/open-npm huggingface dataset:
npm package: @septem/hooks
Description: A hooks library compatible with React, Vue 3, and SolidJS
Author: septem
Latest version: 0.1.0

# @septem/hooks

一个兼容 React、Vue 3 和 SolidJS 的 Hooks 库。

## 特性

- **框架无关**: 在 React、Vue 3 和 SolidJS 中使用相同的 hooks
- **TypeScript 支持**: 为每个框架提供完整的 TypeScript 类型支持
- **轻量级**: 最小化依赖，支持 tree-shaking
- **一致的 API**: 在所有框架中使用相似的 API 模式

## 安装

```bash
# npm
npm install @septem/hooks

# yarn
yarn add @septem/hooks

# pnpm
pnpm add @septem/hooks
```

## 使用方法

从特定框架路径导入 hooks:

### React

```jsx
import { useToggle, useLocalStorage, useClippy } from '@septem/hooks/react';

function MyComponent() {
  const [value, toggle] = useToggle(false);
  const [name, setName] = useLocalStorage('user-name', '');
  const [clipboard, setClipboard] = useClippy();
  
  // 使用这些 hooks...
}
```

### Vue 3

```vue
<script setup>
import { useToggle, useLocalStorage, useClippy } from '@septem/hooks/vue';

const [value, toggle] = useToggle(false);
const [name, setName] = useLocalStorage('user-name', '');
const [clipboard, setClipboard] = useClippy();
</script>
```

### SolidJS

```jsx
import { useToggle, useLocalStorage, useClippy } from '@septem/hooks/solid';

function MyComponent() {
  const [value, toggle] = useToggle(false);
  const [name, setName] = useLocalStorage('user-name', '');
  const [clipboard, setClipboard] = useClippy();
  
  // 使用这些 hooks...
}
```

## 可用的 Hooks

- **useToggle**: 用于管理布尔切换状态的 hook
- **useLocalStorage**: 用于在 localStorage 中持久化数据的 hook
- **useClippy**: 用于与剪贴板交互的 hook

## 文档

有关详细文档和示例，请访问我们的[文档网站](https://your-docs-site.com)。

## 贡献

欢迎贡献！请随时提交 Pull Request。

1. Fork 仓库
2. 创建你的特性分支 (`git checkout -b feature/amazing-feature`)
3. 提交你的更改 (`git commit -m 'Add some amazing feature'`)
4. 推送到分支 (`git push origin feature/amazing-feature`)
5. 开启一个 Pull Request

## 许可证

本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。

## English Documentation

[View English Documentation](./README.md)
npm package: @septem/pop-modal
Description: An iframe communication framework
Author: Septem
Latest version: 1.1.0

# PopModal

## 介绍
PopModal是一个基于iframe的通信框架，封装了加载iframe期间的生命周期。

## 组件生命周期
1. 容器加载完成 EMessage.CONTAINER_LOADED
2. 页面初始化 EMessage.INIT
3. 完成 EMessage.DONE
4. 取消 EMessage.CANCEL
5. 错误 EMessage.ERROR

## 流程
1. 外部应用new一个PopModal实例，挂载container相关的options，并通过open方法传入data及callback。
2. PopModal创建container并append到body（或页面指定节点)，container页面初始化MessageChannel之后发送 EMessage.CONTAINER_LOADED 至PopModal。
3. PopModal调用发送页面初始化的 EMessage.INIT 事件及初始化数据至container页面，container页面接收数据并进行初始化。
4. 初始化之后，PopModal接收 EMessage.DONE、EMessage.CANCEL、EMessage.ERROR 的事件。

## 用法
```typescript
// 外部组件
import { PopModal } from '@qunhe/pop-modal';

const modal = new PopModal({
    url: '/xx/xxx/xxx',
    messageChannel: 'FOO_BAR',
})

modal.open<{url: string}, string>({ url }, (err: any, src: string) => void);
modal.release();

```

```typescript
// 内部组件、页面
const channel = new MessageChannel({
    target: () => ({ window: window.parent || window }),
    prefix: 'FOO_BAR',
    onMessage: onMessage,
});
channel.init();
channel.sendMessage({
    type: EMessage.CONTAINER_LOADED,
});

function onMessage(data: Messages<{ url }, string, any>) {
    if (data.type === EMessage.INIT) {
        // do sth
    } else if (data.type === EMessage.CANCEL) {
        // do sth
    }
}
```

## API
### PopModal
```typescript
export interface ConfigOptions<T = any> {
    url: string;
    messageChannel: string;
    debug?: boolean;
    debounce?: number;
    timeout?: number;
    element?: HTMLElement;
    alwaysNewContainer?: boolean;
    data?: T;
}
```
#### open
```typescript
popModal.open<T, P>(params: T, callback: OpenCallback<P>);
```
> 定义一个初始化入参类型及页面返回done的返回值类型

#### release
```typescript
popModal.release();
```
> 从外部销毁、而非隐藏

#### config
> 同new方法

### MessageChannel
```typescript
export interface ChannelOptions {
    prefix: string;
    target?: () => {
        window?: Window,
        origin?: string,
    };
    onMessage: (data: any) => void;
}
```

#### init
> 监听prefix频道的消息

#### release
> 停止监听prefix频道的消息

#### sendMessage
> 需要类型是Messages的消息

#### getMsgChannel
> 获取父组件的MessageChannel

### Messages
```typescript
export type Messages<T = any, K = any, P = any, M = any> = ContainterLoadedMessage | InitMessage<T> | NormalMessage<P> | DoneMessage<K> | CancelMessage | ErrorMessage<M>;

export interface BaseMessage {
    type: EMessage;
}

export interface ContainterLoadedMessage extends BaseMessage {
    type: EMessage.CONTAINER_LOADED;
}

export interface InitMessage<T> extends BaseMessage {
    type: EMessage.INIT;
    data: T;
}

export interface NormalMessage<T> extends BaseMessage {
    type: EMessage.NORMAL;
    data: T;
}

export interface DoneMessage<T> extends BaseMessage {
    type: EMessage.DONE;
    data: T;
}

export interface CancelMessage extends BaseMessage {
    type: EMessage.CANCEL;
}

export interface ErrorMessage<T> extends BaseMessage {
    type: EMessage.ERROR;
    data: T;
}
```
npm package: @septeo/react-design
Description: Septeo Design System React components
Author: Septeo
Latest version: 1.0.0

# @septeo/react-design

A comprehensive React design system based on the Septeo Design System (DSS) Figma files.

## Installation

```bash
npm install @septeo/react-design
```

## Usage

```jsx
import { Button, Input, Card } from '@septeo/react-design';
import '@septeo/react-design/dist/index.css';

function App() {
  return (
    <div>
      <Card title="Welcome">
        <p>This is a simple example using the Septeo Design System components.</p>
        <Input label="Email" placeholder="Enter your email" />
        <Button>Submit</Button>
      </Card>
    </div>
  );
}
```

## Components

The design system follows atomic design principles and includes:

### Atoms

- **Button**: Primary UI component for user interaction
- **Input**: Text input component
- **Checkbox**: Boolean input component
- **Radio**: Single selection component

### Molecules

- **FormField**: Wrapper for form elements with labels and helper text
- **Card**: Container for displaying content in a box

### Organisms

- **Form**: Component for grouping form fields
- **FormSection**: Component for grouping related form fields

## Design Tokens

The design system includes the following design tokens:

### Colors

- Blues: Primary brand colors
- Oranges/Reds: Accent colors
- Teals/Greens: Secondary colors
- Reds: Alert/Error colors
- Yellows/Oranges: Warning colors
- Purples: Accent colors
- Grays: Neutral colors

### Typography

- Font Families: Inter (UI) and Poppins (Headings)
- Font Sizes: From 10px to 56px
- Font Weights: Regular (400), Medium (500), Semibold (600), Bold (700)

### Spacing

- Grid Margins: 16px (S), 24px (M), 32px (L)
- Grid Gutters: 12px (S), 16px (M), 20px (L)

### Breakpoints

- Small (S): 0-679px
- Medium (M): 680-1099px
- Large (L): >1100px

## Development

To run the Storybook documentation locally:

```bash
npm run storybook
```

To build the package:

```bash
npm run build
```

## License

MIT
npm package: @septh/koffi-darwin-arm64
Description: The MacOS ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-darwin-arm64

This is the MacOS ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-darwin-x64
Description: The MacOS Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-darwin-x64

This is the MacOS x64 binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-freebsd-arm64
Description: The FreeBSD ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-freebsd-arm64

This is the FreeBSD ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-freebsd-x64
Description: The FreeBSD Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-freebsd-x64

This is the FreeBSD Intel/AMD 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-arm64
Description: The Linux ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.12.1

# @septh/koffi-linux-arm64

This is the GNU Linux ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-arm64-glibc
Description: The Linux ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-arm64-glibc

This is the GNU Linux ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-arm64-musl
Description: The Linux ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-arm64-musl

This is the musl Linux ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-loong64
Description: The Linux LoongArch 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-loong64

This is the GNU Linux LoongArch 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-riscv64
Description: The Linux RISC-V 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-riscv64

This is the GNU Linux RISC-V 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-x64-glibc
Description: The Linux Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-x64-glibc

This is the GNU Linux Intel/AMD 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-linux-x64-musl
Description: The Linux Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-linux-x64-musl

This is the musl Linux Intel/AMD 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-openbsd-x64
Description: The OpenBSD Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-openbsd-x64

This is the OpenBSD Intel/AMD 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-win32-arm64
Description: The Windows ARM 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-win32-arm64

This is the Windows ARM 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/koffi-win32-x64
Description: The Windows Intel/AMD 64-bit binary for Koffi, a fast and simple C FFI (foreign function interface) for Node.js
Author: Stephan 'Septh' Schreiber
Latest version: 2.15.6

# @septh/koffi-win32-x64

This is the Windows Intel/AMD 64-bit binary for [Koffi-Cream](https://github.com/Septh/koffi-cream), a repackaging of [Koffi](https://koffi.dev), the fast and simple C FFI (foreign function interface) for Node.js.

> [!NOTE]
> Do not install this package directly, use `npm install koffi-cream` instead.
npm package: @septh/rollup-plugins-collection
Description: A collection of tiny useful plugins for your everyday Rollup.
Author: Stephan 'Septh' Schreiber
Latest version: 1.0.1

# @septh/rollup-plugins-collection

> A collection of tiny useful plugins for your everyday Rollup.

## Usage

```sh
npm install --save-dev @septh/rollup-plugins-collection
```

Then use the whole collection at once:

```js
import { defineConfig } from 'rollup'
import collection from '@septh/rollup-plugins-collection'

export default defineConfig({
    plugins: [
        collection({
            noComment: { /* no-comment options */ },
            production: { /* production options */ }
        })
    ]
})
```

or each plugin individually:

```js
import { defineConfig } from 'rollup'
import { enums, noComment, production } from '@septh/rollup-plugins-collection'

export default defineConfig({
    plugins: [
        enums(),
        noComment(/* no-comment options */),
        production(/* production options */)
    ]
})
```

## Plugins therein

### enums
Turns TypeScript's `enum`s into a tree-shakeable form (see comment in source code for details). Extracted from [libwin32](https://github.com/Septh/libwin32).
* The plugin has no options.

### no-comment
Removes residual comments in the bundle. Extracted from [rollup-plugin-code-raker](https://github.com/Septh/rollup-plugin-code-raker).
* Options:
```ts
interface NoCommentOptions {
    /** Keep license (`/*!`) comments? */
    keepLicences?: boolean

    /** Keep JSDoc/TSDoc (`/**`) comments? */
    keepDocs?: boolean

    /** Keep annotations (`__PURE__`, `__NO_SIDE_EFFECTS__`) comments? */
    keepAnnotations?: boolean
}
```

### production
Strips `debugger` statements and `console.*` calls. Extracted from [rollup-plugin-code-raker](https://github.com/Septh/rollup-plugin-code-raker).
* Options:
```ts
interface ProductionOptions {
    /** Keep all `console.*` calls, none, or only passed method names. */
    keepConsole?: boolean | string[]

    /** Keep `debugger` statements. */
    keepDebugger?: boolean
}
```


## License
MIT.
npm package: @septh/ts-run
Description: The minimalist TypeScript script runner for Node
Author: Stephan 'Septh' Schreiber
Latest version: 2.0.2

<p>

![NPM Version](https://img.shields.io/npm/v/@septh/ts-run?label=latest)
![Node](https://img.shields.io/node/v-lts/%40septh%2Fts-run)
![NPM Downloads](https://img.shields.io/npm/dm/@septh/ts-run)
![NPM License](https://img.shields.io/npm/l/@septh/ts-run)

</p>

# ts-run
> The minimalist TypeScript script runner for NodeJS.

Run TypeScript scripts from the command line as if they were plain JavaScript.

```sh
ts-run path/to/script.ts
```

See [the repo on Github](https://github.com/Septh/ts-run#readme) for full documentation.


### Features
- Just-in-time TypeScript transpilation so fast you won't even notice.
- Generates source maps for accurate stack traces.
- Does not spawn another process to transpile TypeScript.
- Does not spawn another Node process to run your script.
- Strictly follows modern Node semantics for ESM and CommonJS modules.
- Zero config: no config file, no command line arguments, no environment variables, no nothing.
- Does not even need a `tsconfig.json`.
- Works with test runners.
- Extra-light: only 220 kilobytes installed!
- Zero dependency!

### Non-features
- Not for running full-blown TypeScript projects.
- No REPL support.


### Licence
MIT.