Skip to content

Commit 58d1b59

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent dc743ee commit 58d1b59

File tree

7 files changed

+483
-336
lines changed

7 files changed

+483
-336
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
支持流式渲染、代码高亮、LaTeX 数学公式、Mermaid 图表等特性
88

9-
[![NPM version](https://img.shields.io/npm/v/x-markdown.svg)](https://www.npmjs.com/package/x-markdown)
10-
[![NPM downloads](https://img.shields.io/npm/dm/x-markdown.svg)](https://www.npmjs.com/package/x-markdown)
9+
[![NPM version](https://img.shields.io/npm/v/x-markdown-vue.svg)](https://www.npmjs.com/package/x-markdown-vue)
10+
[![NPM downloads](https://img.shields.io/npm/dm/x-markdown-vue.svg)](https://www.npmjs.com/package/x-markdown-vue)
1111
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
1212
[![Vue](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://vuejs.org/)
1313
[在线演示](https://x-markdown.netlify.app/) · [报告问题](https://github.com/element-plus-x/x-markdown/issues) · [功能请求](https://github.com/element-plus-x/x-markdown/issues/new)
@@ -52,13 +52,13 @@
5252

5353
```bash
5454
# pnpm (推荐)
55-
pnpm add x-markdown
55+
pnpm add x-markdown-vue
5656

5757
# npm
58-
npm install x-markdown
58+
npm install x-markdown-vue
5959

6060
# yarn
61-
yarn add x-markdown
61+
yarn add x-markdown-vue
6262
```
6363

6464
### 依赖项
@@ -86,8 +86,8 @@ import 'katex/dist/katex.min.css'
8686
8787
<script setup lang="ts">
8888
import { ref } from 'vue'
89-
import { MarkdownRenderer } from 'x-markdown'
90-
import 'x-markdown/style'
89+
import { MarkdownRenderer } from 'x-markdown-vue'
90+
import 'x-markdown-vue/style'
9191
9292
const content = ref(`
9393
# Hello World
@@ -113,8 +113,8 @@ This is a **markdown** renderer.
113113
114114
<script setup lang="ts">
115115
import { ref } from 'vue'
116-
import { MarkdownRendererAsync } from 'x-markdown'
117-
import 'x-markdown/style'
116+
import { MarkdownRendererAsync } from 'x-markdown-vue'
117+
import 'x-markdown-vue/style'
118118
119119
const content = ref('# Large Document\n...')
120120
</script>

packages/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"github-markdown-css": "^5.8.1",
1414
"katex": "^0.16.25",
1515
"vue": "^3.3.0",
16-
"x-markdown": "workspace:*"
16+
"x-markdown-vue": "workspace:*"
1717
},
1818
"devDependencies": {
1919
"@vitejs/plugin-vue": "^5.0.0",

packages/playground/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
import 'katex/dist/katex.min.css'
139139
import 'github-markdown-css/github-markdown.css'
140140
import { ref, computed, onUnmounted, watch, h } from 'vue'
141-
import { MarkdownRenderer } from 'x-markdown'
141+
import { MarkdownRenderer } from 'x-markdown-vue'
142142
143143
// ==================== 状态管理 ====================
144144

packages/playground/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createApp } from 'vue'
22
import App from './App.vue'
3-
import 'x-markdown/style'
3+
import 'x-markdown-vue/style'
44

55
const app = createApp(App)
66
app.mount('#app')

packages/x-markdown/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
支持流式渲染、代码高亮、LaTeX 数学公式、Mermaid 图表等特性
88

9-
[![NPM version](https://img.shields.io/npm/v/x-markdown.svg)](https://www.npmjs.com/package/x-markdown)
10-
[![NPM downloads](https://img.shields.io/npm/dm/x-markdown.svg)](https://www.npmjs.com/package/x-markdown)
9+
[![NPM version](https://img.shields.io/npm/v/x-markdown-vue.svg)](https://www.npmjs.com/package/x-markdown-vue)
10+
[![NPM downloads](https://img.shields.io/npm/dm/x-markdown-vue.svg)](https://www.npmjs.com/package/x-markdown-vue)
1111
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
1212
[![Vue](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://vuejs.org/)
1313
[在线演示](https://x-markdown.netlify.app/) · [报告问题](https://github.com/element-plus-x/x-markdown/issues) · [功能请求](https://github.com/element-plus-x/x-markdown/issues/new)
@@ -52,13 +52,13 @@
5252

5353
```bash
5454
# pnpm (推荐)
55-
pnpm add x-markdown
55+
pnpm add x-markdown-vue
5656

5757
# npm
58-
npm install x-markdown
58+
npm install x-markdown-vue
5959

6060
# yarn
61-
yarn add x-markdown
61+
yarn add x-markdown-vue
6262
```
6363

6464
### 依赖项
@@ -86,8 +86,8 @@ import 'katex/dist/katex.min.css'
8686
8787
<script setup lang="ts">
8888
import { ref } from 'vue'
89-
import { MarkdownRenderer } from 'x-markdown'
90-
import 'x-markdown/style'
89+
import { MarkdownRenderer } from 'x-markdown-vue'
90+
import 'x-markdown-vue/style'
9191
9292
const content = ref(`
9393
# Hello World
@@ -113,8 +113,8 @@ This is a **markdown** renderer.
113113
114114
<script setup lang="ts">
115115
import { ref } from 'vue'
116-
import { MarkdownRendererAsync } from 'x-markdown'
117-
import 'x-markdown/style'
116+
import { MarkdownRendererAsync } from 'x-markdown-vue'
117+
import 'x-markdown-vue/style'
118118
119119
const content = ref('# Large Document\n...')
120120
</script>

packages/x-markdown/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "x-markdown",
2+
"name": "x-markdown-vue",
33
"version": "0.0.1-beta.1",
44
"description": "A markdown component library for Vue",
55
"type": "module",
@@ -42,7 +42,7 @@
4242
"lodash-es": "^4.17.21",
4343
"mdast": "^3.0.0",
4444
"mdast-util-to-hast": "^13.2.1",
45-
"mermaid": "^10.0.0",
45+
"mermaid": "^11.12.2",
4646
"property-information": "^7.1.0",
4747
"rehype": "^13.0.0",
4848
"rehype-katex": "^7.0.0",

0 commit comments

Comments
 (0)