export const streamContent = ` - markstream-vue playground - A Vue 3 component that renders Markdown string content as HTML, supporting custom components and advanced markdown features. >>>I'll create a simple Electron + Vue chat application demo. Here's the structure: [Star on GitHub](https://github.com/Simon-He95/markstream-vue) 我是 a 元素标签 https://github.com/Simon-He95/markstream-vue [【Author: Simon】](https://simonhe.me/) - **[Link (Test 1)](https://simonhe.me/)** **[Link (Test 2)](https://simonhe.me/)** **Markdown链接**: 1. [GitHub官网](https://github.com) 2. [知乎 - 有问题就会有答案](https://www.zhihu.com) 3. **加粗链接**:[Google](https://www.google.com) 4. 嵌套格式的链接:[*斜体链接*](https://example.com) **普通链接**: 1. https://www.wikipedia.org 2. http://example.com/path?query=test 3. 纯文本URL:https://markdown-guide.readthedocs.io ![Vue Markdown Icon](/vue-markdown-icon.svg "Vue Markdown Icon") *Figure: Vue Markdown Icon (served from /vue-markdown-icon.svg)* 这是 ~~已删除的文本~~,这是一个表情 :smile:。 - [ ] Star this repo - [x] Fork this repo - [ ] Create issues - [x] Submit PRs ## 表格 | 姓名 | 年龄 | 职业 | |------|------|------| | 张三 | 25 | 工程师 | | 李四 | 30 | 设计师 | | 王五 | 28 | 产品经理 | ### 对齐表格 | 左对齐 | 居中对齐 | 右对齐 | |:-------|:--------:|-------:| | 内容1 | 内容2 | 内容3 | | 内容4 | 内容5 | 内容6 | 我将为您输出泰勒公式的一般形式及其常见展开式。 --- ## 0. 薛定谔方程(量子力学) $$i\\hbar \\frac{\\partial}{\\partial t} \\Psi(\\mathbf{r},t) = \\left[ -\\frac{\\hbar^2}{2m} \\nabla^2 + V(\\mathbf{r},t) \\right] \\Psi(\\mathbf{r},t)$$ ## 1. 泰勒公式(Taylor's Formula) ### 一般形式(在点 \\(x = a\\) 处展开): \[ f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n + R_n(x) \\] 其中: - \\(f^{(k)}(a)\\) 是 \\(f(x)\\) 在 \\(x=a\\\) 处的 \\(k\\) 阶导数 - \\(R_n(x)\\) 是余项,常见形式有拉格朗日余项: \[ R_n(x) = \frac{f^{(n+1)}(xi)}{(n+1)!}(x-a)^{n+1}, \quad xi \text{ 在 } a \text{ 和 } x \text{ 之间} \\] --- ## 2. 麦克劳林公式(Maclaurin's Formula,即 \\(a=0\\) 时的泰勒公式): \[ f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \cdots + \frac{f^{(n)}(0)}{n!}x^n + R_n(x) \\] --- ## 3. 常见函数的麦克劳林展开(前几项) - **指数函数**: \\[ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots + \frac{x^n}{n!} + \cdots, \quad x \in \mathbb{R} \\] - **正弦函数**: \\[ \sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots + (-1)^n \frac{x^{2n+1}}{(2n+1)!} + \cdots \\] - **余弦函数**: \\[ \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots + (-1)^n \frac{x^{2n}}{(2n)!} + \cdots \\] - **自然对数**(在 \\(x=0\\) 附近): \\[ \ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots + (-1)^{n-1} \frac{x^n}{n} + \cdots, \quad -1 < x \le 1 \\] - **二项式展开**(\\( (1+x)^m \\),\\(m\\) 为实数): \[ (1+x)^m = 1 + mx + \frac{m(m-1)}{2!}x^2 + \frac{m(m-1)(m-2)}{3!}x^3 + \cdots, \quad |x| < 1 \\] - **矩阵**: \\[ \begin{bmatrix} 2x_2 - 8x_3 = 8 \\ 5x_1 - 5x_3 = 10 \end{bmatrix} \\] - **公式** - **代入数据** \\[ \frac{363}{15,\!135} \times 100\% = 2.398\% \\] - **计算工具验证** 通过数学计算工具确认结果: \`363 ÷ 15,135 × 100 = 2.39841427...\` - **差异说明** $$E=mc^2$$ --- 如果您需要某个特定函数在特定点的泰勒展开,请告诉我,我可以为您详细写出。 ::: warning 这是一个警告块。 ::: ::: tip 提示标题 这是带标题的提示。 ::: ::: error 错误块 这是一个错误块。 ::: مرحبا بكم في عالم اللغة العربية! 1. First, let's set up the project: \`\`\`shellscript # Create Vue project npm create vue@latest electron-vue-chat # Navigate to project cd electron-vue-chat # Install dependencies npm install npm install electron electron-builder vue-router # Install dev dependencies npm install -D electron-dev-server concurrently wait-on \`\`\` 2. Create the main Electron file: \`\`\`javascript:electron/main.js const { app, BrowserWindow } = require('electron'); const path = require('path'); const isDev = process.env.NODE_ENV === 'development'; let mainWindow; function createWindow() { mainWindow = new BrowserWindow({ width: 900, height: 680, webPreferences: { nodeIntegration: true, contextIsolation: false } }); const url = isDev ? 'http://localhost:5173' : \`file://\${path.join(__dirname, '../dist/index.html')}\`; mainWindow.loadURL(url); if (isDev) { mainWindow.webContents.openDevTools(); } mainWindow.on('closed', () => { mainWindow = null; }); } app.on('ready', createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (mainWindow === null) { createWindow(); } }); \`\`\` 3. Update package.json: \`\`\`diff json:package.json { "name": "markstream-vue", "type": "module", - "version": "0.0.49", + "version": "0.0.54-beta.1", "packageManager": "pnpm@10.16.1", "description": "A Vue 3 component that renders Markdown string content as HTML, supporting custom components and advanced markdown features.", "author": "Simon He", "license": "MIT", "repository": { "type": "git", "url": "git + git@github.com:Simon-He95/markstream-vue.git" }, "bugs": { "url": "https://github.com/Simon-He95/markstream-vue/issues" }, "keywords": [ "vue", "vue3", "markdown", "markdown-to-html", "markdown-renderer", "vue-markdown", "vue-component", "html", "renderer", "custom-component" ], "exports": { ".": { "types": "./dist/types/exports.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" }, "./index.css": "./dist/index.css", "./index.tailwind.css": "./dist/index.tailwind.css", "./tailwind": "./dist/tailwind.ts" }, "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/types/exports.d.ts", "files": [ "dist" ], } \`\`\` 4. Create chat components \\(diversified languages\\): \`\`\`python:src/server/app.py from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Message(BaseModel): sender: str text: str @app.get("/health") def health(): return {"status": "ok"} @app.post("/echo") def echo(msg: Message): return {"reply": f"Echo: {msg.text}"} \`\`\` 5. Create a native module example \(C++\): \`\`\`cpp:src/native/compute.cpp #include using namespace std; int fibonacci(int n){ if(n<=1) return n; int a=0,b=1; for(int i=2;i<=n;++i){ int c=a+b; a=b; b=c; } return b; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout << "fib(10)=" << fibonacci(10) << "\n"; return 0; } \`\`\` 6. Update the main App.vue: \`\`\`vue:src/App.vue