open-index/open-npm huggingface dataset:
npm package: @rdx-js/build-rollup-plugin
Description: Rollup Plugin to process rdx and markdown files
Latest version: 1.2.0

# rdx-build-rollup-plugin

Rollup Plugin to process rdx and markdown files

## RDX Transpiler Plugin

Simple wrapper around `@rdx-js/rdx` converts `.md` and `.rdx` files to `.jsx`/`.tsx`

Use with sucrase or basbel to transpile the generated `.jsx`/`.tsx` to `.js`

### Usage in rollup configuration

```js
import { rdxTranspiler } from '@rdx-js/build-rollup-plugin'

// ...

plugins: [
  // :
  resolve(),
  rdxTranspiler(),
  renameExtensions({
    mappings: {
      '.md': '.js',
      '.rdx': '.js'
    }
  }),
  sucrase({
    jsxPragma: 'h',
    production: true,
    exclude: ['node_modules/**'],
    transforms: ['jsx', 'typescript']
  })
]
```

## RDX Packer Plugin

Simple aggregator that converts a dummy index.js in the source folder to a full index of all the transpiled markdown files, including meta data. Creates a single IOPA function that when called registers itself with the Reactive Dialogs manager.

### Required Source Repository structure

```
/
/assets
   image1.jpg
   video1.mp4
markdownfile1.md
markdownfile2.rdx
index.js
global.d.ts
```

```js
// global.d.ts
declare module "*.md" {
  const value: string;
  export default value;
  export const meta;
}

declare module "*.rdx" {
  const value: string;
  export default value;
  export const meta;
}
```

```js
// index.ts
// placeholder, replaced with index during rollup phase
```

### Rollup configuration

```js
import { rdxPacker } from '@rdx-js/build-rollup-plugin'

// import other plugins

const dist = 'dist'
const build = 'build'

const external = id =>
  !id.startsWith('.') && !id.startsWith('/') && !id.startsWith('\0')

export default [{
  preserveModules: true,
  input: './src/*.md',
  external,
  output: [
    {
      dir: `${dist}/cjs`,
      format: 'cjs',
      exports: 'named'
    }
  ],
  plugins: [
    rdxPacker(),
    resolve({
      extensions: ['.js', '.ts' ]
    }),
    rdxTranspiler(),
    renameExtensions({
      mappings: {
        '.md': '.js',
        '.rdx': '.js'
      }
    }),
    sucrase({
      jsxPragma: 'h',
      production: true,
      exclude: ['node_modules/**'],
      transforms: ['jsx', 'typescript']
    }),
    terser()
  ]
}

```

### License

MIT
npm package: @rdx-js/build-webpack-loader
Description: Webpack loader for Markdown, RDX, and RCX files
Latest version: 1.2.0

# `@rdx-js/build-webpack-loader`

Webpack loader for [RDX][].   Part of the Besync design system for digital conversations.

## Installation

[npm][]:

```sh
npm i -D @rdx-js/build-webpack-loader
```

## Usage

```js
// ...
module: {
  rules: [
    // ...
    {
      test: /\.[rdx|md]$/,
      use: [
        'babel-loader',
        '@rdx-js/build-webpack-loader'
      ]
    }
  ]
}
```

## License

[MIT][] © [Synchronous Health][] 

A Sync Health Labs innovation

<!-- Definitions -->

[mit]: license

[Synchronous Health]: https://sync.health

[rdx]: https://github.com/besync/rdx

[npm]: https://docs.npmjs.com/cli/install
npm package: @rdx-js/language-md-mdast
Description: Convert RDX Markdown to Unist Markdown AST (MDAST)
Latest version: 1.2.0

# @besync/md-to-mdast

Reactive Dialogs (RDX) customizations of Markdown Parser

When used as a set of Unified plugs directly after `remark-parse`, this package parses an `.rdx` markdown file into MDAST format (with the RDX / JSX extensions)

Forked from `mdx-js/mdx`, converted to typescript, and much faster as it doesnt use `@babel/core`, pure javacript only, and with a better greedy html processor forked without change from Tinia Labs `tdx` implementation

## Installation

```sh
npm i -S @rdx-js/language-md-mdast
```

## Usage

```js
import unified from 'unified'
import toMDAST from 'remark-parse'
import {
  default as toRDAST,
  mdJsxComments,
  mdJsxImportExport,
  mdJsxTemplateVariables
} from '@rdx-js/language-md-mdast'

const fn = unified()
  .use(toMDAST, options)
  .use(mdJsxTemplateVariables)
  .use(mdJsxComments)
  .use(mdJsxImportExport)
  // include frontmatter and squeeze plugins here
  .use(toRDAST)
```

## License

MIT
npm package: @rdx-js/language-mdast-hast
Description: Convert RDX AST to HAST
Latest version: 1.2.0

# @rdx-js/rdx

Reactive Dialogs (RDX) implementation for digital conversations using Remark. Forked from @tinialabs/tdx and @mdx-js/mdx with updated transpiler for whendo runtime

While the `rdx` specification is very similar to markdown and similar formats such as `mdx`, a different extension is used as the code in any code blocks may be executed. In addition the execution order of formats such as `mdx` are linear (a single document) where as a `rdx` module may be executed as an adaptive dialog over the series of many days. The specification also includes yaml front matter by default.

https://github.com/besync/rdx

## Installation

```sh
npm i -S @rdx-js/rdx
```

# @besync/md-to-mdast

Reactive Dialogs (RDX) implementation of Markdown Parser

This package parses an `.rdx` markdown file into MDAST format (modified for RDX / JSX extensions)

Forked from `mdx-js/mdx`, converted to typescript, and much faster as it doesnt use `@babel/core`, pure javacript only, and with a better greedy html processor forked without change from Tinia Labs `tdx` implementation

## Usage

```js
import unified from 'unified'
import {
  default as toMDAST,
  mdJsxComments,
  mdJsxImportExport,
  mdJsxTemplateVariables
} from '@rdx-js/language-md-mdast'
import { default as toHAST, wrap, all } from '@rdx-js/language-md-mdast'

function toRDHAST() {
  return (tree, _file) => {
    const handlers = {
      blockquote(h: H, node: MDAST.Blockquote & Parent) {
        return h(node, 'blockquote', wrap(all(h, node), true))
      }

      // include remaining handlers, see html folder for examples
    }

    const hast = toHAST(tree, {
      handlers,
      allowDangerousHTML: false,
      footer: undefined
    })

    return hast
  }
}

const fn = unified()
  .use(toMDAST, options)
  .use(mdJsxTemplateVariables)
  .use(mdJsxComments)
  .use(mdJsxImportExport)
  .use(toRDHAST) // PLACE THIS PACKAGE AFTER THE MDAST PARSERs

// add compiler and process
```

## License

MIT
npm package: @rdx-js/rdx
Description: Parse RDX Markdown and transpile to Reactive Dialogs JSX
Latest version: 1.2.0

# @rdx-js/rdx

Reactive Dialogs (RDX) implementation for digital conversations using Remark. Forked from @tinialabs/tdx and @mdx-js/mdx with updated transpiler for whendo runtime

While the `rdx` specification is very similar to markdown and similar formats such as `mdx`, a different extension is used as the code in any code blocks may be executed. In addition the execution order of formats such as `mdx` are linear (a single document) where as a `rdx` module may be executed as an adaptive dialog over the series of many days. The specification also includes yaml front matter by default.

https://github.com/besync/rdx

## Installation

```sh
npm i -S @rdx-js/rdx
```
npm package: @rdyl-design/react
Description: ```bash $ npm install @rdyl-design/react # or $ yarn add @rdyl-design/react ```
Latest version: 0.3.7

## 安装

```bash
$ npm install @rdyl-design/react
# or
$ yarn add @rdyl-design/react
```

## 开始使用

1. TypeScript支持
```json
// tsconfig.json
{
  "compilerOptions": {
    "types": [
      "@rdyl-design/types/type.d.ts" // 添加
    ],
  }
}
```

2. 导入样式文件
```tsx
// app.tsx
import '@rdyl-design/dist/index.less'
```

3. Theme变量(可自定义)
```css
:root {
  /* primary 主题色 */
  --primary: #08979c;
  --primary-hover: #54afb2;

  /* 背景颜色 */
  --bg: #fff;
  --bg-mask: #ffffff40;
  --bg-hover: #f8f8f8;
  --bg-primary: #e6fffb;
  --bg-primary-mask: #13c2c220;
  --bg-success: #f6ffed;
  --bg-danger: #fff2f0;
  --bg-warn: #fffbe6;
  --bg-head: #fafafa;

  /* 边框颜色 */
  --border: #eee;
  --border-hover: #dcdcdc;
  --border-primary: #b5f5ec;
  --border-success: #d9f7be;
  --border-danger: #ffd8bf;
  --border-warn: #fff1b8;

  /* 字体颜色 */
  --title: #27313d;
  --text: #526680;
  --text-desc: #969696;
  --text-placeholder: rgb(167, 167, 167);
  --danger: #ff4d4f;
  --danger-hover: #ffa39e;
  --warn: #ffc53d;
  --warn-hover: #ffd591;
  --success: #bae637;
  --success-hover: #eaff8f;

  /* 水印 */
  --watermark-text-color: rgba(143, 149, 158, 0.22);
}
```

## 拖动排序功能
*使用@dnd-kit,已经内置安装所需要依赖*
```
``
npm package: @rdyl-design/react-h5
Description: ```bash $ npm install @rdyl-design/react # or $ yarn add @rdyl-design/react ```
Latest version: 0.0.3

## Installation

```bash
$ npm install @rdyl-design/react
# or
$ yarn add @rdyl-design/react
```

## Getting started

1. 导入样式文件
```tsx
// app.tsx
import '@rdyl-design/dist/index.less'
```

2. color 变量
```css
:root {
  /* primary 主题色 */
  --primary: #08979c;
  --primary-hover: #54afb2;
  --primary-ring: rgba(207, 255, 248, 0.6);

  /* 背景颜色 */
  --bg: #fff;
  --bg-s: #f8f8f8;
  --bg-hover: #f5f5f5;
  --bg-danger: #ff4d4f;
  --bg-danger-hover: #fff1f0;

  /* 边框颜色 */
  --border: #eee;

  /* 字体颜色 */
  --title: #27313d;
  --text: #526680;
  --text-desc: #969696;
  --text-placeholder: rgb(167, 167, 167);
  --text-danger: #a8071a;
  --text-danger-hover: #ff7875;
  --text-warn: #fa8c16;
  --text-warn-hover: #fcfaf2;
  --text-success: #73d13d;
}
```
npm package: @rdyl-design/react-mobile
Description: ```bash $ npm install @rdyl-design/react-mobile # or $ yarn add @rdyl-design/react-mobile ```
Latest version: 0.0.1

## Installation

```bash
$ npm install @rdyl-design/react-mobile
# or
$ yarn add @rdyl-design/react-mobile
```

## Getting started

1. 导入样式文件
```tsx
// app.tsx
import '@rdyl-design/dist/index.less'
```

2. color 变量
```css
:root {
  /* primary 主题色 */
  --primary: #08979c;
  --primary-hover: #54afb2;
  --primary-ring: rgba(207, 255, 248, 0.6);

  /* 背景颜色 */
  --bg: #fff;
  --bg-s: #f8f8f8;
  --bg-hover: #f5f5f5;
  --bg-danger: #ff4d4f;
  --bg-danger-hover: #fff1f0;

  /* 边框颜色 */
  --border: #eee;

  /* 字体颜色 */
  --title: #27313d;
  --text: #526680;
  --text-desc: #969696;
  --text-placeholder: rgb(167, 167, 167);
  --text-danger: #a8071a;
  --text-danger-hover: #ff7875;
  --text-warn: #fa8c16;
  --text-warn-hover: #fcfaf2;
  --text-success: #73d13d;
}
```
npm package: @rdyl-design/react-native
Description: 1. 预设的 color 变量 ```json {   /* primary 主题色 */   "--primary": "#08979c",   "--primary-hover": "#54afb2",   "--primary-ring": "rgba(207, 255, 248, 0.6)",   /* 背景颜色 */   "--bg": "#fff",   "--bg-s": "#f8f8f8",   "--bg-hover": "#f5f5f5",   "--bg-danger": "#ff4
Latest version: 0.0.1

## react 

1. 预设的 color 变量
```json
{
  /* primary 主题色 */
  "--primary": "#08979c",
  "--primary-hover": "#54afb2",
  "--primary-ring": "rgba(207, 255, 248, 0.6)",
  /* 背景颜色 */
  "--bg": "#fff",
  "--bg-s": "#f8f8f8",
  "--bg-hover": "#f5f5f5",
  "--bg-danger": "#ff4d4f",
  "--bg-danger-hover": "#fff1f0",
  /* 边框颜色 */
  "--border": "#eee",
  /* 字体颜色 */
  "--title": "#27313d",
  "--text": "#526680",
  "--text-desc": "#969696",
  "--text-placeholder": "rgb(167, 167, 167)",
  "--text-danger": "#a8071a",
  "--text-danger-hover": "#ff7875",
  "--text-warn": "#fa8c16",
  "--text-warn-hover": "#fcfaf2",
  "--text-success": "#73d13d",
}
```
npm package: @rdyl/react-i18n-connect
Description: ```bash $ npm install @rdyl/react-i18n-connect # or $ yarn add @rdyl/react-i18n-connect ```
Latest version: 0.2.4

## Installation

```bash
$ npm install @rdyl/react-i18n-connect
# or
$ yarn add @rdyl/react-i18n-connect
```

## Getting started

1. App 入口文件添加
```tsx
<I18nConnect initial={"zh-CN"} locales={{...}}>
  ...
</I18nConnect>
```

2. 使用
```tsx
 const {t} =  useI18n()

 t('key')
```
npm package: @rdyl/react-native-navigator-connect
Description: ``` $ npm install @rdyl/react-native-navigator-connect //or $ yarn add @rdyl/react-native-navigator-connect ```
Latest version: 0.2.3

## Installation

```
$ npm install @rdyl/react-native-navigator-connect
//or
$ yarn add @rdyl/react-native-navigator-connect
```

## Getting started
npm package: @rdyl/react-router-connect
Description: ```bash $ npm install @rdyl/react-router-connect # or $ yarn add @rdyl/react-router-connect ```
Latest version: 0.2.7

## Installation

```bash
$ npm install @rdyl/react-router-connect
# or
$ yarn add @rdyl/react-router-connect
```

## Getting started

1. 配置tsconfig.json
```json
{
  "compilerOptions": {
    "types": [
      "@rdyl/react-router-connect/types/type.d.ts"
    ],
  },
}
```
npm package: @rdyl/react-socket-connect
Description: ```bash $ npm install @rdyl/react-socket-connect # or $ yarn add @rdyl/react-socket-connect ```
Latest version: 0.0.1

## Installation

```bash
$ npm install @rdyl/react-socket-connect
# or
$ yarn add @rdyl/react-socket-connect
```

## Getting started

1. 配置tsconfig.json
```json
{
  "compilerOptions": {
    "types": [
      "@rdyl/react-socket-connect/types/type.d.ts"
    ],
  },
}
```
npm package: @re-ai/subtitle_translation
Description: AI字幕翻译工具包，支持SRT解析、OpenAI批量翻译、断点续传、双语输出等。
Latest version: 0.2.1

# @re-ai/subtitle_translation

AI字幕翻译工具包，支持SRT字幕解析、AI大模型批量翻译、断点续传、双语/单语输出、任务管理等。

## 功能特性
- 支持SRT字幕文件解析，自动识别格式
- 基于OpenAI等大模型API进行高质量字幕翻译
- 支持批量翻译、断点续传、任务进度查询
- 支持双语/单语字幕输出，边翻译边写入文件
- 日志分级、彩色输出，便于调试
- 任务可清理，输出文件自动删除

## 安装
```bash
npm install @re-ai/subtitle_translation
```

## 环境变量
- `OPENAI_API_KEY` 或 `REAI_SUBTITLE_TRANS_OPENAI_API_KEY`：OpenAI API Key
- `OPENAI_BASE_URL` 或 `REAI_SUBTITLE_TRANS_OPENAI_BASE_URL`：OpenAI API Base URL（如用代理）
- `REAI_SUBTITLE_TRANS_LOG_LEVEL`：日志等级（debug/info/warn/error）
- 其他可选：`REAI_SUBTITLE_TRANS_OPENAI_MODEL`、`REAI_SUBTITLE_TRANS_OPENAI_TEMPERATURE`、`REAI_SUBTITLE_TRANS_OPENAI_TOP_P`、`REAI_SUBTITLE_TRANS_OPENAI_SYSTEM_PROMPT`

## 快速使用
```ts
import { ReAISubtitleTranslator } from '@re-ai/subtitle_translation';

const translator = new ReAISubtitleTranslator({
  defaultBatchSize: 50,
  defaultBilingual: true,
  aiLLMConfig: {
    apiKey: process.env.OPENAI_API_KEY,
    model: 'gpt-3.5-turbo',
    systemPrompt: '',
    // ...其他参数
  }
});

// 创建翻译任务
const { taskId } = translator.createTranslateTask({
  filePath: './example.srt',
  to: 'zh',
  outputFile: './example.zh.srt',
  bilingual: true, // 输出双语
  batchSize: 30,   // 每批30条
  introduction: '' // 影片介绍
});

// 执行翻译
await translator.executeTranslateTask(taskId);

// 查询进度
const progress = translator.getTranslateTaskProgress(taskId);
console.log(progress);

// 清理任务（会自动删除输出文件）
translator.clearTask(taskId);
```

## API 说明
### Translator
- `constructor(options)`：初始化，支持默认批量大小、双语、AI参数
- `createTranslateTask({ filePath, to, outputFile?, bilingual?, batchSize? })`：创建翻译任务
- `executeTranslateTask(taskId)`：执行翻译任务，自动分批、断点续传、边翻译边写入
- `getTranslateTaskProgress(taskId)`：查询任务进度
- `clearTask(taskId)`：清理任务及输出文件

### AITranslator
- 支持自定义大模型API参数，结构化输出

## 测试
```bash
npm run test
```

## License
MIT
npm package: @re-ai/volc-knowledge
Description: 火山引擎知识库接口接入SDK
Author: REAI
Latest version: 0.1.1

# @re-ai/volc-knowledge

火山引擎知识库接口接入SDK

## 安装

```bash
npm install @re-ai/volc-knowledge
```

## 环境变量

- REAI_VOLC_ACCESS_KEY_ID=xxxxxx // 火山引擎AK
- REAI_VOLC_SECRET_KEY=xxxx // 火山引擎SK
- REAI_VOLC_REGION=cn-beijing // 火山引擎地域

## 功能特性

- 知识库管理（创建/更新/删除/查询/检索/聊天）
- 文档管理（添加/更新/删除/查询/元数据更新）
- 切片管理（添加/更新/删除/查询/重排）
- 重排功能（基于模型的搜索结果优化）

## 快速开始

```typescript
import { ReAIVolcKnowledge } from '@re-ai/volc-knowledge';

// 知识库API示例
const knowledgeInfo = await ReAIVolcKnowledge.doRequest<InfoKnowledgeResponse>({
  endpoint: '/api/knowledge/collection/info',
  method: 'POST',
  body: {
    name: 'reai_test'
  }
});

// 文档API示例
const docList = await ReAIVolcKnowledge.doRequest<ListDocumentResponse>({
  endpoint: '/api/knowledge/doc/list',
  method: 'POST',
  body: {
    collection_name:'reai_test',
    project: '',
    offset: 0,
    limit: 100,
    return_token_usage: true
  }
});

// 切片API示例
const updatedSlice = await ReAIVolcKnowledge.doRequest<any>({
  endpoint: '/api/knowledge/point/update',
  method: 'POST',
  body: {
    collection_name: 'reai_test',
    project: '',
    point_id: 'reai_123456-0',
    content: 'test content'
  }
});

// 搜索API示例
const searchResults = await ReAIVolcKnowledge.doRequest<SearchKnowledgeResponse>({
  endpoint: '/api/knowledge/collection/search_knowledge',
  method: 'POST',
  body: {
    name: 'reai_test',
    project: '',
    query: '问题'
  }
});
```

## 参考文档

- [API列表](https://www.volcengine.com/docs/82379/1511946)
- [知识库功能说明](https://www.volcengine.com/docs/82379/1261883)
- [最佳实践](https://www.volcengine.com/docs/82379/1319742)

## 开发

```bash
# 安装依赖
npm install

# 构建
npm run build

# 运行测试
npm test
```

## 贡献

欢迎提交Pull Request。请确保遵循以下规范：
- 代码风格符合项目规范
- 提交信息遵循Conventional Commits
- 新增功能需包含单元测试

## 许可证

MIT