Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/skill-marketplace/tencent-docs-skill
tencent-docs
Unverified腾讯文档(docs.qq.com)-在线云文档平台,是创建、编辑、管理**在线**文档的首选 skill。仅当用户明确指向腾讯文档/在线文档/docs.qq.com,或任务需要在线协作文档时使用;泛指"做个文档/保存成文件/PPT"且未点名在线平台时,默认走本地工具(本地 pptx 技能等),不要误用本 skill。支持能力:(1) 创建各类在线文档(文档/Word/Excel/幻灯片/思维导图/流程图/智能表格/收集表)(2) 管理知识库空间(创建空间、查询空间列表)(3) 管理空间节点、文件夹结构 (4) 读取/搜索文档内容 (5) 编辑操作智能表 (6) 编辑操作在线文档 (7) 文件管理(重命名、移动、删除、复制、导入导出)(8) 网页剪藏、本地文件/html/文档上云。
sidebar-pptx-generator/references/component-text.md
View on GitHub---
name: component-text
description: Text 文本组件规范 — 富文本内联、换行、渐变文字、map 映射
---
# Text 组件规范
Text 是 slidep 中承载所有**文字内容**的组件。支持基础样式、富文本内联(加粗/变色/下划线)、渐变文字、阴影等高级样式。
## 基础用法
```jsx
<Text style={{ fontSize: 20, color: '#0F172A', lineHeight: 1.6 }}>
这是一段标准文本
</Text>
```
## 富文本内联
Text 内部允许使用 `<span>` 对部分字符做局部样式覆盖(加粗、变色、下划线等)。
```jsx
<Text style={{ fontSize: 20, color: '#0F172A', lineHeight: 1.6 }}>
这是 <span style={{ fontWeight: 'bold' }}>加粗</span> 和
<span style={{ color: '#2563EB' }}>蓝色强调</span>
<br />
第二行内容
</Text>
```
**关键规则**:
- **换行**必须用 `<br />`(小写、自闭合)。不要用 `\n`
- **局部样式**用 `<span style={{...}}>...</span>` 包裹
- **不支持** `<strong>` / `<em>` / `<u>` 等 HTML 语义标签,一律用 `<span>` + inline style
## 渐变文字
> **⚠️ `backgroundClip: 'text'` 编译后不保证生效。** 巨型数字等核心视觉元素请直接使用纯色(如 `color: '#3b82f6'`),不要依赖渐变文字效果。需要渐变时改用 `<SVG>` 组件绘制。
通过 `backgroundClip: 'text'` + `backgroundImage` 实现。
```jsx
<Text style={{
fontSize: 48,
fontWeight: 'bold',
backgroundImage: 'linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)',
backgroundClip: 'text',
color: 'transparent',
}}>
渐变标题
</Text>
```
## 文字阴影
```jsx
<Text style={{
fontSize: 32,
color: '#ffffff',
textShadow: '2px 2px 8px rgba(0, 0, 0, 0.3)',
}}>
带阴影的白字
</Text>
```
## 在 map 映射中使用富文本
当通过数组 `.map()` 渲染多条 Text 时,若条目内含富文本,必须用 Fragment `<>...</>` 包裹(因为 `<span>` 与外层 Text 的结构需要显式分组):
```jsx
<Box style={{ flexDirection: 'column', gap: 12 }}>
{items.map((item, idx) => (
<Text key={idx} style={{ fontSize: 16 }}>
<>
<span style={{ fontWeight: 'bold' }}>{item.label}</span>:
{item.desc}
</>
</Text>
))}
</Box>
```
## 常用样式
| 类别 | 属性 |
| :--- | :--- |
| 字号字重 | `fontSize` / `fontWeight`(`'normal' / 'bold' / 100-900`) |
| 颜色 | `color` / `opacity` |
| 间距 | `lineHeight`(推荐 1.5-1.6)/ `letterSpacing` |
| 对齐 | `textAlign`(`'left' / 'center' / 'right'`) |
| 装饰 | `textDecoration`(`'underline' / 'line-through'`) / `textShadow` |
| 溢出 | `whiteSpace` / `overflow` / `textOverflow` |
## 最佳实践
- **仅在需要视觉层次时**切换字号 / 字重,同一层级保持统一
- 文字颜色优先使用项目 `DESIGN.md` 定义的文本色、主色与辅助色,避免自创新色
- 字号、行长、段落长度与文字密度规则见 [DESIGN.md](DESIGN.md),具体项目以根目录 `DESIGN.md` 为准
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |