open-index/open-npm huggingface dataset:
npm package: @mometa-mat/antd
Description: antd
Author: 余聪
Latest version: 0.0.4

# @mometa-mat/antd

[![NPM version](https://img.shields.io/npm/v/@mometa-mat/antd.svg?style=flat-square)](https://www.npmjs.com/package/@mometa-mat/antd)
[![NPM Downloads](https://img.shields.io/npm/dm/@mometa-mat/antd.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/@mometa-mat/antd)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> antd mometa 物料库

## Installation

```bash
npm install @mometa-mat/antd
# or use yarn
yarn add @mometa-mat/antd
```

## Contributing

- Fork it!
- Create your new branch:  
  `git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:  
  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by [余聪](mailto:yucong@yuanfudao.com).

## License

MIT - [余聪](mailto:yucong@yuanfudao.com)
npm package: @mometa/editor
Description: 编辑器
Author: imcuttle
Latest version: 0.0.33

# @mometa/editor

[![NPM version](https://img.shields.io/npm/v/@mometa/editor.svg?style=flat-square)](https://www.npmjs.com/package/@mometa/editor)
[![NPM Downloads](https://img.shields.io/npm/dm/@mometa/editor.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/@mometa/editor)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> 编辑器

## Installation

```bash
npm install @mometa/editor
# or use yarn
yarn add @mometa/editor
```

## Usage

```javascript
import editor from '@mometa/editor'
```

## Contributing

- Fork it!
- Create your new branch:  
  `git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:  
  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by [imcuttle](mailto:imcuttle@163.com).

## License

MIT - [imcuttle](mailto:imcuttle@163.com)
npm package: @mometa/fs-handler
Description: 代码操作转换核心逻辑，如删除、移动、替换、插入等
Author: imcuttle
Latest version: 0.0.33

# @mometa/fs-handler

[![NPM version](https://img.shields.io/npm/v/@mometa/fs-handler.svg?style=flat-square)](https://www.npmjs.com/package/@mometa/fs-handler)
[![NPM Downloads](https://img.shields.io/npm/dm/@mometa/fs-handler.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/@mometa/fs-handler)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> 代码操作转换核心逻辑，如删除、移动、替换、插入等

## Installation

```bash
npm install @mometa/fs-handler
# or use yarn
yarn add @mometa/fs-handler
```

## Usage

```javascript
const { createFsHandler, commonMiddlewares } = require('@mometa/fs-handler')
const handle = createFsHandler({
  middlewares: commonMiddlewares(),
  fs: require('fs')
})

handle(requestData).then(console.log)
```

### RequestData

```typescript
export interface CommonPreload extends Range {
  filename: string
  text: string
}

// 删除
export interface DelPreload extends CommonPreload {}
// 替换
export interface ReplacePreload extends CommonPreload {
  data: {
    // 替换为哪个文本
    newText: string
  }
}
// 移动
export interface MoveNodePreload extends CommonPreload {
  data: {
    // 移动到哪个位置
    to: Point
  }
}
// 插入
export interface InsertNodePreload {
  // 插入在哪个文件
  filename: string
  // 插入在哪个位置
  to: Point
  data: {
    // 插入文本
    newText?: string
    wrap?: {
      anotherTo: Point
      startStr: string
      endStr: string
    }
    // 插入物料
    material?: Asset['data']
  }
}

export type RequestData =
  | {
      type: OpType.DEL
      preload: DelPreload
    }
  | {
      type: OpType.REPLACE_NODE
      preload: ReplacePreload
    }
  | {
      type: OpType.MOVE_NODE
      preload: MoveNodePreload
    }
  | {
      type: OpType.INSERT_NODE
      preload: InsertNodePreload
    }
```

## Contributing

- Fork it!
- Create your new branch:  
  `git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:  
  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by [imcuttle](mailto:imcuttle@163.com).

## License

MIT - [imcuttle](mailto:imcuttle@163.com)
npm package: @mometa/materials-generator
Description: 物料生成 & 解析
Author: imcuttle
Latest version: 0.0.33

# @mometa/materials-generator

[![NPM version](https://img.shields.io/npm/v/@mometa/materials-generator.svg?style=flat-square)](https://www.npmjs.com/package/@mometa/materials-generator)
[![NPM Downloads](https://img.shields.io/npm/dm/@mometa/materials-generator.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/@mometa/materials-generator)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> 物料生成器

## Installation

```bash
npm install @mometa/materials-generator
# or use yarn
yarn add @mometa/materials-generator
```

## Usage

```javascript
import materialsGenerator from '@mometa/materials-generator'
```

## Contributing

- Fork it!
- Create your new branch:  
  `git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:  
  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by [imcuttle](mailto:imcuttle@163.com).

## License

MIT - [imcuttle](mailto:imcuttle@163.com)
npm package: @mometa/materials-resolver
Description: Resolve materials config
Author: 余聪
Latest version: 0.0.33

# @mometa/materials-resolver

[![NPM version](https://img.shields.io/npm/v/@mometa/materials-resolver.svg?style=flat-square)](https://www.npmjs.com/package/@mometa/materials-resolver)
[![NPM Downloads](https://img.shields.io/npm/dm/@mometa/materials-resolver.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/@mometa/materials-resolver)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> Resolve materials config

## Installation

```bash
npm install @mometa/materials-resolver
# or use yarn
yarn add @mometa/materials-resolver
```

## Usage

```javascript
import materialsResolver from '@mometa/materials-resolver'
```

## Contributing

- Fork it!
- Create your new branch:  
  `git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:  
  `git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by [余聪](mailto:yucong@yuanfudao.com).

## License

MIT - [余聪](mailto:yucong@yuanfudao.com)