open-index/open-npm huggingface dataset:
npm package: @fastweb/axios-request
Description: tangyi-axios request
Author: vvsage
Latest version: 1.0.11

axios-request
======

in general axios-request is just a http request instance above [axios](https://github.com/mzabriskie/axios) library

two things you need to notice

### factory
with factory function you can fully create http instance using all axios api 


### normalRequest
pre-configured http instance created by factory method


### one more thing
I add some useful functions such as cacheGet,strongCacheGet & etc.

read the code, find the bug, thanks.
npm package: @fastweb/capsule-ui
Description: A Component Library for Vue.js.
Latest version: 1.2.2

**Capsule(胶囊)，简称 Cap，是一款基于饿了么 [饿了么](https://element.eleme.io/#/zh-CN)版本 2.12.0 开发的 PC UI 组件库。**

## 安装 Install

```shell
npm install @fastweb/capsule-ui -S
```

## 使用 Quick Start

```javascript
import Vue from 'vue';
import Capsule from '@fastweb/capsule-ui';

Vue.use(Capsule);

// or
import {
  Select,
  Button
  // ...
} from '@fastweb/capsule-ui';

Vue.component(Select.name, Select);
Vue.component(Button.name, Button);
```
npm package: @fastweb/packconf
Description: generate conf file base on different env
Author: 老舍
Latest version: 1.0.4

packconf
====

> packconf aimed to generate different config file based on your need.

> two bin scripts are included, packinit and packrun, using them in any task runner or simply include them in your package.json’s script filed

* packinit

    you have to run packinit first. packinit generate a confMap.json in your root directory. which looks like below:

    ```javascript

    {
      "env1": {
          "param": 1
      },
      "env2": {
          "param": 2
      },
      "env3": {
          "param": 3
      }
    };
    ```

    you might modify confMap.json into anything you like, keep in mind that the root key of this json file is the "environment"

* packrun

    executing packrun will ask you which environment config file you'd like to generate. packConf will create the config file using the path you typed in the first place



* confMap.json

    ```json

      {
        "env1":{
            "logo": "XXX管理系统(普通json数据)",
            "script":"require('../common.js')(直接插入到生成的config文件内的js,生成的config文件内不包含script属性)",
            "desc": "这是XXX管理系统的配置(配置的简单描述,生成的config文件内不包含desc属性)",
            "title":"{{document.title}}(值为js代码,使用'{{}}'包裹)",
        }
      }

    ```

    生成配置 =>

    ```javascript
      require('../common.js');
      export default{
        "logo": "XXX管理系统",
        "title":document.title
      }
    ```
npm package: @fastwork/eslint-config-nuxt
Description: Linter rule for Fastwork vue/nuxt project
Author: BioMaRu
Latest version: 0.0.7

## Fastwork eslint-config-nuxt

### Installation
```shell
yarn add @fastwork/eslint-config-nuxt --dev

# install peer dependencies
yarn add eslint eslint-config-standard eslint-plugin-import eslint-plugin-jest eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint-plugin-vue --dev
```

### Using Fastwork eslint-config-nuxt
```js
// in .eslintrc.js add this following line
extends: [
	'@fastwork/eslint-config-nuxt'
]
```
npm package: @fastwork/xosmoz-css
Description: CSS utility classes and component styles for Xosmoz design system
Latest version: 1.0.0

# @fastwork/xosmoz-css

CSS utility classes for the Xosmoz design system.

## Installation

```bash
npm install @fastwork/xosmoz-css @fastwork/xosmoz-theme
```

## Usage

Import the utilities along with the theme:

```javascript
// Import theme tokens first
import '@fastwork/xosmoz-theme/base.css';
import '@fastwork/xosmoz-theme/themes.css';

// Import utility classes
import '@fastwork/xosmoz-css';
```

Or import specific utility categories:

```javascript
import '@fastwork/xosmoz-css/typography.css';
import '@fastwork/xosmoz-css/radius.css';
```

### Typography Classes

Use complete typography styles with a single class:

```html
<h1 class="font-h1">Main Heading</h1>
<h2 class="font-h2">Section Heading</h2>
<p class="font-body-1">Body text</p>
<span class="font-subtitle-1-bold">Subtitle</span>
```

**Available classes**:
- Headings: `.font-h1` to `.font-h6`
- Titles: `.font-title-1` to `.font-title-4`
- Subtitles: `.font-subtitle-1-bold`, `.font-subtitle-1-regular`, etc.
- Body: `.font-body-1` to `.font-body-4`

**Responsive**: All typography classes automatically adapt between desktop and mobile sizes.

### Border Radius Classes

```html
<div class="rounded-md">Medium rounded corners</div>
<button class="rounded-full">Pill button</button>
```

**Available classes**: `.rounded-none`, `.rounded-sm`, `.rounded-base`, `.rounded-md`, `.rounded-lg`, `.rounded-xl`, `.rounded-2xl`, `.rounded-3xl`, `.rounded-full`

## Development

```bash
# Build the package
yarn build

# Watch mode
yarn dev

# Lint
yarn lint
```

## License

MIT
npm package: @fastworkco/eslint-config-react-typescript
Description: Fastwork linter rule configuration for React
Author: G.Kawin
Latest version: 1.0.5

# eslint-config-fw-react
Fastwork linter rule configuration for React

## This linter rules is working for Typescript only.

Installation

First, Install peer dependencies
```
yarn add eslint eslint-plugin-jsx-a11y eslint-import-resolver-typescript eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react prettier typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser @types/react @types/react-dom eslint-config-airbnb eslint-config-prettier eslint-plugin-import -D
```

Second, Install the package by following below
```
yarn add @fastworkco/eslint-config-react-typescript -D
```

After that, Go to `.eslintrc.js` or `.eslintrc` file.
And then, Puts script on the `extends` key like this
```js
  "extends": "@fastworkco/eslint-config-react-typescript"
```

After that, Go to the VSCode setting (workspace/user) setting file and put the configuration into the setting file.
```json
{
  "eslint.autoFixOnSave": true,
  "editor.formatOnSave": false,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "typescript",
      "autoFix": true
    },
    {
      "language": "typescriptreact",
      "autoFix": true
    }
  ]
}
```
These configuration will tell the VSCode that you should enable and show validation to the codebase and also fix the code after saving file.

## Please contribute to make it great for all of us.
npm package: @fastx/bytemd-plugin-copy-code
Description: ByteMD plugin to support copy code
Author: ShenBao
Latest version: 1.0.0

# @fastx/bytemd-plugin-copy-code

[![npm](https://img.shields.io/npm/v/@fastx/bytemd-plugin-copy-code.svg)](https://www.npmjs.com/package/@fastx/bytemd-plugin-copy-code)

ByteMD plugin to support copy code

## Usage

```js
import { Editor } from "bytemd";
import copyCode from "@fastx/bytemd-plugin-copy-code";
import zhHansCopyCode from "@fastx/bytemd-plugin-copy-code/locales/zh_Hans.json";
import "@fastx/bytemd-plugin-copy-code/dist/index.css";

new Editor({
  target: document.body,
  props: {
    plugins: [
      copyCode({
        locale: zhHansCopyCode,
        copySuccess: (text) => {
          console.log(text);
          console.log("复制成功");
        },
        copyError: (err) => {
          console.error("复制失败", err);
        },
        copyRight: `
      
版权所有 © ${2025} ShenBao/fastx-md-playground. 保留所有权利。
    `,
      }),
    ],
  },
});
```

## License

MIT
npm package: @fastx/bytemd-plugin-highlight-theme
Description: ByteMD plugin to support custom code highlight theme
Author: ShenBao
Latest version: 1.0.0

# @fastx/bytemd-plugin-highlight-theme

[![npm](https://img.shields.io/npm/v/@fastx/bytemd-plugin-highlight-theme.svg)](https://www.npmjs.com/package/@fastx/bytemd-plugin-highlight-theme)

ByteMD plugin to support custom code highlight theme

## Usage

```js

import { Editor } from 'bytemd'
import highlightTheme from '@fastx/bytemd-plugin-highlight-theme'
import hls from '@fastx/bytemd-plugin-highlight-theme/dist/highlights.json'

new Editor({
  target: document.body,
  props: {
    plugins: [
      highlightThemePlugin({
        highlights: hls,
      }),
      // ... other plugins
    ],
  },
})
```

## License

MIT
npm package: @fastx/bytemd-plugin-image-zoom
Description: ByteMD plugin to support image zoom
Author: fastx
Latest version: 1.0.0

# @fastx/bytemd-plugin-image-zoom

[![npm](https://img.shields.io/npm/v/@fastx/bytemd-plugin-image-zoom.svg)](https://www.npmjs.com/package/@fastx/bytemd-plugin-image-zoom)

ByteMD plugin to support image zoom

## Usage

```js

import { Editor } from 'bytemd'
import imageZoom from '@fastx/bytemd-plugin-image-zoom'

new Editor({
  target: document.body,
  props: {
    plugins: [
      imageZoom(),
      // ... other plugins
    ],
  },
})
```

## License

MIT
npm package: @fastx/bytemd-plugin-markdown-theme
Description: ByteMD plugin to support custom markdown theme
Author: ShenBao
Latest version: 1.0.0

# @fastx/bytemd-plugin-markdown-theme

[![npm](https://img.shields.io/npm/v/@fastx/bytemd-plugin-markdown-theme.svg)](https://www.npmjs.com/package/@fastx/bytemd-plugin-markdown-theme)

ByteMD plugin to support custom code markdown theme

## Usage

```js

import { Editor } from 'bytemd'
import markdownThemePlugin from '@fastx/bytemd-plugin-markdown-theme'
import themes from '@fastx/bytemd-plugin-markdown-theme/dist/themes.json'

new Editor({
  target: document.body,
  props: {
    plugins: [
      markdownThemePlugin({
        themes: themes,
      }),
      // ... other plugins
    ],
  },
})
```

## License

MIT
npm package: @fastx/use-undo-redo
Description: `useUndoRedo` 一个 React Hook，为 `useState` 添加撤销/重做功能，提供简单易用的 API 。
Latest version: 1.0.0

# @fastx/use-undo-redo

`useUndoRedo` 一个 React Hook，为 `useState` 添加撤销/重做功能，提供简单易用的 API 。

## 安装

```bash
pnpm install @fastx/use-undo-redo
```

## 基本用法

```js
import useUndoRedo from "@fastx/use-undo-redo";

const MyComponent = () => {
  const initialState = 0;

  const [count, setCount, { undo, redo }] = useUndoRedo(initialState);

  return (
    <>
      <p>{count}</p>
      <button onClick={undo}>undo</button>
    </>
  );
};
```

## 特性

- 类似 `useState` 的 API
- 可选择状态变更后的处理方式，包括：`mergePastReversed`、`mergePast`、`destroyFuture` 或 `keepFuture`
- 可设置默认选项，避免每次 `setState` 都重复传入相同的行为配置
- 可设置历史记录上限，防止内存占用过大
- 无依赖
- 轻量级，无额外依赖

## 文档说明

useUndoRedo 没有复杂的抽象层，API 直接、易懂。

### API

初始化状态，与 `useState` 类似：

```js
const [yourState, setYourState, { undo, redo }] = useUndoRedo(initialState);
```

支持直接赋值和函数更新（functional updater）：

```js
setYourState(yourState + 1);
```

```js
setYourState((currentState) => currentState + 1);
```

`setState` 接受三个参数：

1. 要设置的新状态或更新函数
2. 当前一次调用的变更行为（可选）
3. `ignoreAction` 布尔值（可选）

`ignoreAction` 为 `true` 时，只更新当前状态 `present`，不修改 `past` 或 `future`，效果类似原生 `useState`。

### 撤销与重做

内部状态结构如下：

```js
{
    past: [0, 1, 2],
    present: 3,
    future: []
}
```

调用 `undo()` 会将 `present` 推入 `future` 并恢复 `past` 的最后一个值，`redo()` 则相反。

### 选项

`useUndoRedo` 接受两个参数：`initialState` 和可选的 `options`，格式如下：

```ts
interface Options {
  behavior?: "mergePastReversed" | "mergePast" | "destroyFuture" | "keepFuture";
  historyLimit?: number | "infinium" | "infinity";
  ignoreIdenticalMutations?: boolean;
  cloneState?: boolean;
}
```

#### 主要行为：

- `destroyFuture`：撤销后再更新状态会清空 `future`
- `mergePast` / `mergePastReversed`：将 `future` 合并进入 `past`
- `keepFuture`：保持 `future` 不变

### 其它导出值

除了主 API，第三个返回对象还包含：

```js
past, future, undo, canUndo, redo, canRedo, reset, static_setState;
```

`canUndo`/`canRedo` 用于判断当前是否可撤销或重做。  
`reset` 可重置状态到初始值或指定值。

### `resetInitialState`（处理异步数据）

当初始状态是空或 undefined（例如通过 API 获取数据）时，如果不处理，用户可能会撤销到空状态。  
`resetInitialState` 可替换 `past[0]` 为新值，避免这种情况。

### `static_setState`

只接受新值，不接受函数更新。不会因 `present` 改变而生成新引用，适合某些性能需求。