Skip to content

Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-pptx

wecomcli-pptx

Verified

何时用:仅当用户明确指向企业微信 PPT/演示文稿(生成在线 PPT、编辑在线 PPT、导入本地 .ppt/.pptx)时使用;泛指做文档/表格默认走本地工具。「做个PPT」「写份汇报PPT」「把文档转成PPT」「改第3页标题」或需要能讲的分页材料(周会/汇报/路演/课件)时触发;一律作用于企微在线 slide 文档,交付在线链接;不支持编辑本地文件、无导出能力;仅读取本地 PPT 改用 wecomcli-media。

references/component-text.md

View on GitHub
---
name: component-text
description: Text 文本组件规范 — 富文本内联、换行、渐变文字、map 映射
---

# Text 组件规范

Text 是本 DSL 中承载所有**文字内容**的组件。支持基础样式、富文本内联(加粗/变色/下划线)、渐变文字、阴影等高级样式。

## 基础用法

```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'` + `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`(Step4 产出的设计契约)

## 扩展能力

- 超链接(整段 `<Text href="...">`,段内 span 不支持)→ [component-hyperlink.md](component-hyperlink.md)
- 入场 / 退出 / 强调动画(`<Animation>` 包裹)→ [component-animation.md](component-animation.md)
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall