open-index/open-npm huggingface dataset:
npm package: @mufan/capacitor-plugin-alipay
Description: An Alipay plugin for Capacitor
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.1.3

# capacitor-plugin-alipay

An Alipay plugin for Capacitor

Thanks to [capacitor-plugin-pay](https://github.com/veluxa/capacitor-plugin-pay)

## Install

```bash
npm install @mufan/capacitor-plugin-alipay
npx cap sync
```

## API

<docgen-index>

* [`request(...)`](#request)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### request(...)

```typescript
request(options: AlipayPluginRequestOptions) => any
```

| Param         | Type                                                                              |
| ------------- | --------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#alipaypluginrequestoptions">AlipayPluginRequestOptions</a></code> |

**Returns:** <code>any</code>

--------------------


### Interfaces


#### AlipayPluginRequestOptions

| Prop             | Type                |
| ---------------- | ------------------- |
| **`orderInfo`**  | <code>string</code> |
| **`fromScheme`** | <code>string</code> |


#### AlipayPluginRequestResult

| Prop          | Type                |
| ------------- | ------------------- |
| **`code`**    | <code>string</code> |
| **`message`** | <code>string</code> |

</docgen-api>
npm package: @mufan/capacitor-plugin-back-to-home
Description: A capacitor plugin for backing to home screen on android
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.0.1

# @mufan/capacitor-plugin-back-to-home

A capacitor plugin for backing to home screen on android

## Install

```bash
npm install @mufan/capacitor-plugin-back-to-home
npx cap sync
```

## API

<docgen-index>

* [`backToHome()`](#backtohome)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### backToHome()

```typescript
backToHome() => Promise<void>
```

--------------------

</docgen-api>
npm package: @mufan/capacitor-plugin-gesture
Description: Send native gesture event to JS
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.0.1

# @mufan/capacitor-plugin-gesture

Send native gesture event to JS

## Install

```bash
npm install @mufan/capacitor-plugin-gesture
npx cap sync
```

## API

<docgen-index>

* [`echo(...)`](#echo)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### echo(...)

```typescript
echo(options: { value: string; }) => any
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ value: string; }</code> |

**Returns:** <code>any</code>

--------------------

</docgen-api>
npm package: @mufan/capacitor-plugin-safe-area
Description: A capacitor plugin for getting screen safe area
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.0.3

# @mufan/capacitor-plugin-safe-area

A capacitor plugin for getting screen safe area, android only currently.

## Install

```bash
npm install @mufan/capacitor-plugin-safe-area
npx cap sync
```

## API

<docgen-index>

* [`getSafeArea()`](#getsafearea)
* [`getStatusBarHeight()`](#getstatusbarheight)
* [`getNavigationBarHeight()`](#getnavigationbarheight)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### getSafeArea()

```typescript
getSafeArea() => Promise<SafeArea | undefined>
```

**Returns:** <code>Promise&lt;<a href="#safearea">SafeArea</a>&gt;</code>

--------------------


### getStatusBarHeight()

```typescript
getStatusBarHeight() => Promise<{ value: number; }>
```

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### getNavigationBarHeight()

```typescript
getNavigationBarHeight() => Promise<{ value: number; }>
```

**Returns:** <code>Promise&lt;{ value: number; }&gt;</code>

--------------------


### Interfaces


#### SafeArea

| Prop         | Type                |
| ------------ | ------------------- |
| **`top`**    | <code>number</code> |
| **`left`**   | <code>number</code> |
| **`bottom`** | <code>number</code> |
| **`right`**  | <code>number</code> |

</docgen-api>
npm package: @mufan/code-boilerplates
Description: Code boilerplates for Mufan
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.0.0-6d5b68fd2689a7c5b372fb51cbc20de778adbb08

# Mufan Code Boilerplates

Code boilerplates for our projects, powered by [Magicspace](https://github.com/makeflow/magicspace).

## Usage

```bash
npm install --global magicspace @mufan/code-boilerplates
```

### Create magicspace configuration

Create magicspace configuration file with `magicspace create` command.

```bash
magicspace create @mufan/code-boilerplates/typescript
```

Select an example and review/edit the configuration options.

> Options are defined by boilerplates.

### Initialize magicspace

Initialize the repository and **make initial commit** if you have not:

```bash
git init

touch README.md
git add README.md

git commit --message "Initial commit"
```

```bash
magicspace init
```

> You can use magicspace to initialize an existing project, just expect more conflicts to resolve.

Review changes, resolve conflicts (if any) and commit the merge.

### Update magicspace

Update installed boilerplates:

```bash
npm install --global makeflow/mufan-code-boilerplates
```

Update magicspace:

```bash
magicspace update
```

Review changes, resolve conflicts (if any) and commit the merge.

## License

MIT License.
npm package: @mufan/eslint-plugin
Description: [![NPM version](https://img.shields.io/npm/v/@mufan/eslint-plugin?color=%23cb3837&style=flat-square)](https://www.npmjs.com/package/@mufan/eslint-plugin) [![MIT License](https://img.shields.io/badge/license-MIT-999999?style=flat-square)](./LICENSE) [![Dis
Author: Chengdu Mufan Technology Co., Ltd.
Latest version: 0.3.0

[![NPM version](https://img.shields.io/npm/v/@mufan/eslint-plugin?color=%23cb3837&style=flat-square)](https://www.npmjs.com/package/@mufan/eslint-plugin)
[![MIT License](https://img.shields.io/badge/license-MIT-999999?style=flat-square)](./LICENSE)
[![Discord](https://img.shields.io/badge/chat-discord-5662f6?style=flat-square)](https://discord.gg/vanVrDwSkS)

# @mufan/eslint-plugin

Flat-config-first ESLint plugin and shared config set.

## Usage

```js
import {defineConfig} from 'eslint/config';

import mufan, {configs} from '@mufan/eslint-plugin';

export default defineConfig([
  {
    files: ['**/*.{js,mjs,cjs}'],
    plugins: {
      '@mufan': mufan,
    },
    extends: [configs.javascript],
  },
  {
    files: ['**/*.{ts,tsx,mts,cts}'],
    plugins: {
      '@mufan': mufan,
    },
    extends: [configs.typescript],
    languageOptions: {
      parserOptions: {
        projectService: true,
      },
    },
  },
]);
```

The plugin exports:

- default export: plugin object
- named export `configs`
- named export `rules`

## License

MIT License.
npm package: @muffin-dev/js-helpers
Description: Provides helpers and utilities for vanilla JavaScript. Usable in browsers.
Author: Hubert GROSSIN
Latest version: 1.8.1

# Muffin Dev for Node - JS Helpers

This module contains a set of utilities for JavaScript.

## Installation

### In browser

Just download the `js-helpers.min.js` file, and import it in your we pages:

```html
<script src="js-helpers.min.js"></script>
```

### With Node JS

Install it locally with NPM by using the following command:

```bash
npm i @muffin-dev/js-helpers
```

## Usage

### In browser

Import the library in your web page with the `<script>` tag, and use the `JSHelpers` global variable to use the library:

```html
<script src="js-helpers.min.js"></script>
<script>
    // Will log "00127" in your browser console
    console.log(JSHelpers.leading0(127, 5));
</script>
```

### With Node JS

```js
const JSHelpers = require('@muffin-dev/js-helpers');
// OR, if you need only a specific method
// const leading0 = require('@muffin-dev/js-helpers').leading0;

// Will log "00127" in your terminal
console.log(JSHelpers.leading0(127, 5));
```

## Documentation

### Tools

- [Native events manager](./src/doc/events-manager.md)

### Helpers

- [`any` extensions](./src/doc/any.md)
- [`array` extensions](./src/doc/array.md)
- [`function` extensions](./src/doc/function.md)
- [`object` extensions](./src/doc/object.md)
- [`string` extensions](./src/doc/string.md)
- [Other helpers](./src/doc/utilities.md)
npm package: @muffin-dev/node-helpers
Description: Provides helpers and utilities for Node.
Author: Hubert GROSSIN
Latest version: 1.4.3

# Muffin Dev for Node - Node Helpers

This module contains a set of utilities for Node JS framework.

## Installation

Install it locally with NPM by using the following command:

```bash
npm i @muffin-dev/node-helpers
```

## Usage

Import example with vanilla JS:

```js
const NodeHelpers = require('@muffin-dev/node-helpers');
// OR, if you need only a specific method
// const readdirAsync = require('@muffin-dev/node-helpers').readdirAsync;

NodeHelpers.readdirAsync('./')
.then(files => { console.log('Files in the current directory', files); })
.catch(error => { console.error(error); });
```

Import example with Typescript:

```ts
import * as NodeHelpers from '@muffin-dev/node-helpers';
// OR, if you need only a specific method
// import { readdirAsync } from '@muffin-dev/node-helpers';

NodeHelpers.readdirAsync('./')
.then(files => { console.log('Files in the current directory', files); })
.catch(error => { console.error(error); });
```

## Documentation

[=> See API Documentation](./doc/README.md)
npm package: @muffin-tin/box
Description: Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)
Latest version: 1.0.0-alpha.1

# @muffin-tin/box (1.0.0-alpha)

Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)

_This package is still in alpha, do not use in production_
npm package: @muffin-tin/components
Description: Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)
Latest version: 1.0.0-alpha.13

# @muffin-tin/components (1.0.0-alpha)

Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)

_This package is still in alpha, do not use in production_

---

## Installation

```js
npm install @muffin-tin/components
```

---

## Prerequisites

Latest `React (18.2)`. You are expected to pass a `Sprinkles`-function from `vanilla-extract` to the component to enable its style props, but technically the package does not depend on `vanilla-extract` – and you _could_ pass a function from a wholly different source if its signature is similar enough (check the types to learn more).

---

## Contents

Contains the following helpers to kick-start building component libraries.

- `createBaseComponent`: A generator function for a fundamental _Box_ Component, must be supplied with a [Sprinkles](https://vanilla-extract.style/documentation/packages/sprinkles/)-Function and optionally a class for default styling. Customize its types by passing which HTML attributes you don't not want consumers to use.

- `createComponent`: Similar generator function but you can pass a base-component to extend (must be forwarding its Ref). Consume e.g. your `Box` and compose higher-order components for your library.

- `composeClassName`: Resilient utility to compose `className` attributes. Used internally by the component creation functions.

- `extractAtomsFromProps`: Utility that separates component props into `Sprinkles` and non-`Sprinkles` based ones. Used internally by the component creation functions.

Check the TypeScript types for more information.
npm package: @muffin-tin/core
Description: Helpers for unopinionated [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/).
Latest version: 1.0.0-alpha.5

# @muffin-tin/core (1.0.0-alpha)

Helpers for unopinionated [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/).

_This package is still in alpha, do not use in production_.

## Installation

This core package is not intended for direct installation, but you can install it like any other `npm` module.

It requires the latest version of `React` to work `(18.2)`.

## Contents

`@muffin-tin/core` contains the following helpers:

- `fixedForwardRed`: A wrapper around forwardRef to make it work with generic components.

- `DistributiveOmit`: A TypeScript helper omitting a key from all members of a union type.

- `SprinklesFnBase`: Type determining the shape of the Sprinkles function. Any function satisfying this type should work as higher-order-component param in `@muffin-tin` and `@butter-cream`, though this is not tested as of yet (see [rainbow-sprinkles](https://github.com/wayfair/rainbow-sprinkles)).

- `WithHocOptions`: TypeScript utility for generic settings that can be provided to all `@muffin-tin` and `@butter-cream`.

## About `@muffin-tin`

`@muffin-tin` is a suite of unopinionated helpers to write your own components, providing advanced ergonomics and helping you with type-safety.

For components you write from scratch, you can use the `Tag` component (`@muffin-tin/tag`) which gives you a fully type-safe polymorphic component with an `"as"` prop.

The `withSprinkles` higher-order component takes a React component and a vanilla-extract Sprinkles function and merges them to make the component accept those Sprinkles as props while maintaining full type-safety (`@muffin-tin/with-sprinkles`).

If you'd like opinionated helpers with ~~design decisions made for you~~ predefined styling options, check out [@butter-cream](https://github.com/johnnyicarus/butter-cream).
npm package: @muffin-tin/tag
Description: Helpers for unopinionated [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/).
Latest version: 1.0.0-alpha.3

# @muffin-tin/tag (1.0.0-alpha)

Helpers for unopinionated [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/).

_This package is still in alpha, do not use in production_.

## Installation

```js
npm install @muffin-tin/tag
```

It requires the latest version of `React` to work `(18.2)`.

## Contents

`@muffin-tin/tag` contains the `Tag` component which gives you a fully type-safe polymorphic component with an `"as"` prop (popularised by `styled-components`), meaning you can reuse the same styles while switching out the rendered HTML tag (maintaining semantic markup) or component business logic underneath.

Unlike some other implementations, we use advanced TypeScript wizardry so that the `<Tag>` component will reflect the props of the component it renders _"as"_, meaning it will complain when you add a `"href"` attribute or a `HTMLAnchorElement` ref to `<Tag as="button">`.

## About `@muffin-tin`

`@muffin-tin` is a suite of unopinionated helpers to write your own components, providing advanced ergonomics and helping you with type-safety.

For components you write from scratch, you can use the `Tag` component in this package, which gives you a fully type-safe polymorphic component with an `"as"` prop.

The `withSprinkles` higher-order component takes a React component and a vanilla-extract Sprinkles function and merges them to make the component accept those Sprinkles as props while maintaining full type-safety (`@muffin-tin/with-sprinkles`).

If you'd like opinionated helpers with ~~design decisions made for you~~ predefined styling options, check out [@butter-cream](https://github.com/johnnyicarus/butter-cream).
npm package: @muffin-tin/with-sprinkles
Description: Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)
Latest version: 1.0.0-alpha.9

# @muffin-tin/components (1.0.0-alpha)

Utilities for building [React](https://react.dev) design component libraries with [vanilla-extract](https://vanilla-extract.style/)

_This package is still in alpha, do not use in production_

---

## Installation

```js
npm install @muffin-tin/components
```

---

## Prerequisites

Latest `React (18.2)`. You are expected to pass a `Sprinkles`-function from `vanilla-extract` to the component to enable its style props, but technically the package does not depend on `vanilla-extract` – and you _could_ pass a function from a wholly different source if its signature is similar enough (check the types to learn more).

---

## Contents

Contains the following helpers to kick-start building component libraries.

- `createBaseComponent`: A generator function for a fundamental _Box_ Component, must be supplied with a [Sprinkles](https://vanilla-extract.style/documentation/packages/sprinkles/)-Function and optionally a class for default styling. Customize its types by passing which HTML attributes you don't not want consumers to use.

- `createComponent`: Similar generator function but you can pass a base-component to extend (must be forwarding its Ref). Consume e.g. your `Box` and compose higher-order components for your library.

- `composeClassName`: Resilient utility to compose `className` attributes. Used internally by the component creation functions.

- `extractAtomsFromProps`: Utility that separates component props into `Sprinkles` and non-`Sprinkles` based ones. Used internally by the component creation functions.

Check the TypeScript types for more information.