mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
Compare commits
8 Commits
codex/fix-
...
feat/slide
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21d73b239c | ||
|
|
8a271cbf27 | ||
|
|
8b1e2d600e | ||
|
|
2717ad0aac | ||
|
|
4471ebf60c | ||
|
|
d4af1be8db | ||
|
|
f68be6cd5a | ||
|
|
58b5880cad |
@@ -16,17 +16,16 @@ metadata:
|
||||
|
||||
**权威经验是全局硬约束和高频易错点,必须牢记并严格遵守。**
|
||||
|
||||
- 你有充足的时间完成这个 PPT,质量永远比速度重要。
|
||||
- 你有充足的时间完成这个 PPT,质量永远比速度重要,交付前必须跑静态检查([`scripts/xml_text_overlap_lint.py`](scripts/xml_text_overlap_lint.py))并解决所有文本元素重叠问题。
|
||||
- PPT 的尺寸是 960x540,必须严格确保主体内容在页面边界内。
|
||||
- !!!禁止交付无图产物!!! 必须使用大量图片增强视觉效果!!! 禁止重复使用同一张图!!!
|
||||
- 封面页的主视觉必须是 `<img>`(来自生图工具或搜图工具),不要使用 `<shape>` 或 `<icon>` 拼出封面视觉。
|
||||
- 禁止重复使用同一张图片。
|
||||
- 必须在完成 PPT 素材收集之后,包括阅读附件(如果用户上传了附件则附件内的信息重要性最高)、联网搜索、图片搜索(真实实体对应的图片必须使用搜图工具)、图片生成(使用生图工具),再进入 PPT 生成流程。
|
||||
- 禁止用 `<shape>` 和 `<line>` 拟形具体物项,必须使用生图工具生成的 `<img>`。
|
||||
- 禁止在 `headline` 或 `title` 下方放置用于分隔或装饰的 `rect` 或 `<line>`。
|
||||
- 禁止在任何页面内部使用无意义的装饰线条或色块条带,页面任何一边都不要使用贴边窄条。
|
||||
- 生图工具的指令参数必须以“不要出现任何文字和颜色色号”结尾,避免生成的图片上出现干扰文字。
|
||||
- 必须在生图工具的指令参数中写明“不要出现任何文字和颜色色号”,生成图片后检查是否出现文字,如果出现文字必须重做、不可接受。
|
||||
- 禁止使用 emoji 图标,任何位置都不能出现。
|
||||
- 字号必须显式设置 `<content>` 的 `fontSize` 属性,不要依赖 `textType` 的默认字号兜底,这些兜底值明显偏大。
|
||||
- 大数字、字号大或字数多的 `<content>` 必须设置 `wrap="true" autoFit="normal-auto-fit"` 属性自动换行和缩排,避免文字溢出。
|
||||
- 关键指标、核心指标、高密度文字所在的文本框的 `<content>` 必须设置 `wrap="true" autoFit="normal-auto-fit"` 属性自动换行和缩排,避免文字溢出。
|
||||
- 文字颜色必须用 `<content>` 的 `color` 属性而不是 `fontColor` 属性。
|
||||
- 文字行间距必须设置 `<content>` 的 `lineSpacing="multiple:xx"` 或 `lineSpacing="fixed:xx"` 而不是 `lineSpacing="xx"`。
|
||||
- 图片必须用 `<img>` 而不是 `<image>`。
|
||||
@@ -34,55 +33,34 @@ metadata:
|
||||
- 绘制图表时原生图表(柱状、条形、折线、面积、饼(环)、雷达、组合图)用 `<chart>`,其他(漏斗图、金字塔图、象限图、矩阵图等)用 `<shape>` + `<line>` 模拟。
|
||||
- 隐藏 `<chart>` 的图例只能通过不写或删除 `<chartLegend>` 实现,`<chartLegend>` 不支持 `position="none"`。
|
||||
- 表格优先用 `rect` 和 `text` 模拟,其他用 `<table>`,没有 `<shape type="table">`。
|
||||
- 必须设置 `<table>` 的 `width` 和 `height` 固定表格大小,同时设置需要保留列宽或行高的 `<col>` 的 `width` 和 `<tr>` 的 `height`,其余自动分配。
|
||||
- `<table>` 必须设置 `width` 和 `height` 固定整体表格大小,行高列宽建议默认分配,只设置少数必要的 `<col>` 的 `width` 和 `<tr>` 的 `height`。
|
||||
- `<td>` 直接子元素只有 `<fill>`(背景)、`<content>`(文字)和边框配置(一般不用),不能嵌套 `<shape>`、`<img>`、`<icon>`。
|
||||
- `<shape type="rect">` 只是形状不是容器,`<icon>`、`<img>`、`<shape type="text">` 和其他 `<shape>` 必须与它平级靠坐标叠放。
|
||||
- 填充渐变颜色必须用 `<fill><fillColor color="linear-gradient(135deg, rgba(R,G,B,A) 0%, rgba(R,G,B,A) 100%)"/></fill>`。
|
||||
- 必须使用 NotifyHuman 工具交付 PPT 链接;编辑已有 PPT 也必须交付 PPT 链接,无论之前是否交付过相同链接。
|
||||
- 编辑页面前必须阅读 [`lark-slides-edit-workflows.md`](references/lark-slides-edit-workflows.md)。
|
||||
- 绘制图表前必须阅读 [`slides_chart_demo.xml`](references/slides_chart_demo.xml)。
|
||||
- 当用户要求无损复述历史上下文时,必须无损复述以上权威经验、必读的技能文档(需要重新阅读)和易错元素语法(尤其是 `<table>` 和 `<chart>`)。
|
||||
- 当用户要求无损复述历史上下文时,必须无损复述以上权威经验、选定的设计系统(场景文档或兜底 [doubao-design.md](references/doubao-design.md))、必读的技能文档(需要重新阅读)和易错元素语法(尤其是 `<table>` 和 `<chart>`)。
|
||||
|
||||
## 豆包设计原则
|
||||
## 设计系统
|
||||
|
||||
适用范围:
|
||||
**演示文稿的设计系统由场景决定,是规划的第一步。** 读 [references/slides_categories.md](references/slides_categories.md) 判定场景(只选一个主场景),再按它为该场景指向的文档作为本 deck 的设计系统。
|
||||
|
||||
- 普通内容页的设计必须以豆包设计原则为最高准则,除非用户要求使用模板或直接提供设计方案。
|
||||
- 不适用于 `title-cover`、`section-divider`、`conclusion`、`quote-highlight` 和 `big-number`。
|
||||
|
||||
核心要求:
|
||||
|
||||
- 必须采用信息密度极高的图文卡片布局,追求充实饱满、图文丰富、可逐行细读的版面,宁可密而满,不要空而疏。
|
||||
- **!!!信息密度极高!!! 图多!!! 卡多!!! 字多!!!**
|
||||
|
||||
排版布局:
|
||||
|
||||
- 卡片布局:卡片按多行网格铺满页面,版面对称、均衡、不留白。网格数、图文比例按内容变化,避免每页雷同。使用更多卡片做细分承载,避免在单张卡片里堆砌大量文字(例如 8 张 50 字卡片优于 2 张 200 字卡片),多个要点必须拆分为多张子卡片。
|
||||
- 卡片样式:方角卡片 + 半透明填充 + 无边框 + 卡片贴边窄条(可选);所有卡片必须使用相同的配色方案(少量需强调的卡片除外),禁止同页出现彩虹卡片(卡片颜色超过 3 种)。
|
||||
- 卡片结构:视觉锚点(关键词、编号或 IconPark 图标)+ 标题 + 内容(包括文字、图片、图表、子卡片)。
|
||||
- 文字卡片:多数页面必须满足 6-8 张文字卡片、200-400 文字数量,字数不足时必须扩写成长句或段落,文字卡片不要留白,必须充实饱满。文字卡片不是短标签,而是“标题 + 完整说明”,像浓缩的分析文稿。文字内容不得不用列表、分栏、关键词或短句时,必须保证层次清晰,更建议拆分为多张子卡片。
|
||||
- 图片卡片:多数页面必须满足 1-3 张图片卡片,缺少图片时必须用生图工具补充配图,图片卡片与文字卡片组成网格,确保图文丰富。
|
||||
- 图表卡片:数据信息不要在文字卡片中罗列,必须在图表卡片中可视化(包括表格、图表、时间线、流程图等),图表卡片与其他卡片组成网格,展现数据驱动。
|
||||
- 间距要求:所有边距都要左右对称,页面和内部内容的边距至少 40px(内容不要贴边),卡片和内部文字的边距至少 5px(文字不要贴边),卡片之间保持 20-40px 的间距。
|
||||
- 文字对齐:正文默认左对齐,只在封面、结尾或大号数字场景中使用居中;表格里的文字左对齐、数字右对齐、仅关键词或短句时居中对齐。
|
||||
|
||||
视觉风格:
|
||||
|
||||
- 美学:干净、明亮、清爽但信息饱满;靠卡片和对齐网格在高密度下维持秩序感;同排卡片文字数量应相近以保持观感整齐。
|
||||
- 字体:全篇以无衬线体(思源黑体)为主,封面或关键强调可少量使用衬线体。
|
||||
- 字号:标题 28-36pt、正文 12-14pt、注释 10-12pt,常规关键指标 16-32pt、核心指标用 36-52pt 数字,下面配 10-14pt 标签与简短解读,需要容纳更多文字时允许使用更小的字号。
|
||||
- 图标:内嵌 IconPark 图标(可用关键词或编号替代)作为视觉锚点,让高密度文字也有图形节奏,而不是成片纯文字块。
|
||||
- 配色:克制颜色数量,确保所有页面都只使用同样的 1 个背景色(偏好浅米白)、1 个主色、1 个强调色和 1 个辅助色;偏好莫兰迪配色,禁止彩虹配色(比如蓝配橙)。
|
||||
- **不匹配任何场景**时,回退到兜底设计系统 [references/doubao-design.md](references/doubao-design.md)(信息密度极高的图文卡片布局)。
|
||||
- 选定的设计系统(场景文档或兜底)与其它通用建议冲突时,**以选定的设计系统为准**(例如卡片用法、字体、图片密度)。
|
||||
- 用户直接提供模板、品牌规范、配色、字体或参考风格时,以用户为准。
|
||||
- `title-cover` 和 `section-divider` 不受兜底设计系统约束。
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| 用户需求 | 优先动作 | 关键文档 / 命令 |
|
||||
|----------|----------|-----------------|
|
||||
| 新建 PPT | 先规划 `slide_plan.json`,再按复杂度选择一步或两步创建 | `planning-layer.md`、`visual-planning.md`、`asset-planning.md`、`slides +create` |
|
||||
| 用户要求使用模板 | 将模板导入为 Slides 再编辑 | `lark-slides-pptx-template-workflows.md` |
|
||||
| 新建 PPT | 先判定场景选定设计系统,再规划 `slide_plan.json`,按复杂度选择一步或两步创建 | `slides_categories.md`(选场景设计系统)、`planning-layer.md`、`visual-planning.md`、`asset-planning.md`、`slides +create` |
|
||||
| 用户直接提供模板 | 将模板导入为 Slides 再编辑 | `lark-slides-pptx-template-workflows.md` |
|
||||
| 编辑单个标题、文本块、图片或局部元素 | 优先块级替换/插入,不改页序 | `slides +replace-slide`、`lark-slides-replace-slide.md` |
|
||||
| 读取或分析已有 PPT | 解析 slides/wiki token,用 shortcut 回读全文 XML 或读取单页 XML,保存 `xml_presentation_id`、`slide_id`、`revision_id` | `slides +xml-get`、`xml_presentation.slide.get`、`lark-slides-xml-presentations-get.md` |
|
||||
| 查看或回滚历史版本 | 先用 `+history-list` 找 `history_version_id`,再 `+history-revert`,必要时 `+history-revert-status` 轮询 | [`lark-slides-history.md`](references/lark-slides-history.md) |
|
||||
| 获取幻灯片页面截图 | 用 `slide_id` 或页号指定页面,一次不超过 10 页 | `slides +screenshot`、`lark-slides-screenshot.md` |
|
||||
| 获取幻灯片页面截图 | 用 `slide_id` 指定页面;页号仅用于人工定位 fallback,一次不超过 10 页 | `slides +screenshot`、`lark-slides-screenshot.md` |
|
||||
| 上传或使用图片 | 先上传为 `file_token`,禁止直接写 http(s) 外链 | `slides +media-upload`、`lark-slides-media-upload.md`,或 `+create --slides` 的 `@./path` 占位符 |
|
||||
| 绘制图表 | 原生图表(柱状、条形、折线、面积、饼(环)、雷达、组合图)用 `<chart>`,其他(漏斗图、金字塔图、象限图、矩阵图等)用 `<shape>` + `<line>` 模拟 | `xml-schema-quick-ref.md`、`slides_chart_demo.xml` |
|
||||
| 绘制表格 | 优先用 `rect` 和 `text` 模拟,其他用 `<table>` | `xml-schema-quick-ref.md` |
|
||||
@@ -97,19 +75,21 @@ metadata:
|
||||
|
||||
**CRITICAL — 新建演示文稿或大幅改写页面时,MUST 先生成 `.lark-slides/plan/<deck-or-task-id>/slide_plan.json`,再生成 XML。先创建对应目录,规划层规则和中间产物生命周期见 [planning-layer.md](references/planning-layer.md)。仅替换一个标题、插入一个块等小型已有页编辑可豁免。**
|
||||
|
||||
**CRITICAL — 选定设计系统是规划的第一步:生成 `slide_plan.json` 前 MUST 先读取 [references/slides_categories.md](references/slides_categories.md) 判定演示文稿所属场景(共 7 类:分析决策 / 商业提案 / 管理汇报 / 学术研究 / 教育培训 / 技术工程 / 品牌创意,只选一个主场景)。匹配到场景 → 按场景表列出的英文文档名读取对应的 `references/*.md`(如 `academic-research.md`)作为本 deck 的设计系统,按其表达重点与方法组织每页,并将选定场景写入 `slide_plan.json`;不匹配任何场景 → 回退到兜底设计系统 [references/doubao-design.md](references/doubao-design.md)。选定的设计系统与兜底/通用建议冲突时以选定的设计系统为准;用户已指定模板/品牌/配色/字体/参考风格时以用户为准。后续 `visual-planning`、`asset-planning` 都服务于选定的设计系统。**
|
||||
|
||||
**CRITICAL — 新建演示文稿或大幅改写页面时,生成 XML 前 MUST 读取 [visual-planning.md](references/visual-planning.md),确保 `layout_type`、`visual_focus`、`text_density` 实际改变页面几何、主视觉和文本量。**
|
||||
|
||||
**CRITICAL — 新建演示文稿或大幅改写页面时,规划 `asset_need` MUST 遵循 [asset-planning.md](references/asset-planning.md):只做元数据规划,必须有 `fallback_if_missing`,不得要求真实搜索、下载或上传素材。**
|
||||
**CRITICAL — 新建演示文稿或大幅改写页面时,规划 `asset_need` MUST 遵循 [asset-planning.md](references/asset-planning.md):元数据规划,必须有 `fallback_if_missing`。**
|
||||
|
||||
**CRITICAL — 将完整 `<slide>` XML 提交给 `slides +create --slides`、`xml_presentation.slide create` 或 `slides +replace-pages` 之前,MUST 先把待提交 XML 保存到本地文件并运行 [`scripts/xml_text_overlap_lint.py`](scripts/xml_text_overlap_lint.py);`summary.error_count` 必须为 0 才能调用接口。**
|
||||
|
||||
**CRITICAL — 创建或大幅改写后,MUST 按 [validation-checklist.md](references/validation-checklist.md) 做显式验证:回读全文 XML、核对页数和关键元素、检查空白/破损页、明显溢出、布局风险;XML 语法和文本重叠静态检查优先使用 [`scripts/xml_text_overlap_lint.py`](scripts/xml_text_overlap_lint.py)。**
|
||||
**CRITICAL — 创建或大幅改写后,MUST 按 [validation-checklist.md](references/validation-checklist.md) 完成回读、静态检查和逐页截图视觉验收:回读全文 XML、核对页数和关键元素、检查空白/破损页、明显溢出、布局风险;XML 语法和文本重叠静态检查使用 [`scripts/xml_text_overlap_lint.py`](scripts/xml_text_overlap_lint.py);再以当前 `slide_id` 清单逐页截图并记录 review 结果。**
|
||||
|
||||
**CRITICAL — 创建前自检或失败排障时,MUST 按 [troubleshooting.md](references/troubleshooting.md) 检查 XML 转义、结构、shell 截断、图片 token、3350001 和布局风险。**
|
||||
|
||||
**编辑已有幻灯片页面**:单个标题、文本块、图片或局部元素优先用 [`+replace-slide`](references/lark-slides-replace-slide.md)(块级替换/插入,不动页序);已有 Slides 的多页大改优先用 [`+replace-pages`](references/lark-slides-replace-pages.md) 在原 presentation 内批量重建页面,避免 `slides +create` 生成新链接。选择 action 和完整读-改-写流程见 [`lark-slides-edit-workflows.md`](references/lark-slides-edit-workflows.md)。
|
||||
|
||||
**用户要求使用模板**:按 [lark-slides-pptx-template-workflows.md](references/lark-slides-pptx-template-workflows.md) 处理。
|
||||
**用户直接提供模板**:按 [lark-slides-pptx-template-workflows.md](references/lark-slides-pptx-template-workflows.md) 处理。
|
||||
|
||||
## 身份选择
|
||||
|
||||
@@ -205,10 +185,13 @@ lark-cli auth login --domain slides
|
||||
|
||||
### 生成流程
|
||||
|
||||
必须在完成 PPT 素材收集之后,包括阅读附件(如果用户上传了附件则附件内的信息重要性最高)、联网搜索、图片搜索(真实实体对应的图片必须使用搜图工具)、图片生成(使用生图工具),再进入 PPT 生成流程。
|
||||
|
||||
```text
|
||||
Step 1: 需求分析 & 读取知识
|
||||
Step 1: 需求分析 & 选定设计系统 & 读取知识
|
||||
- 分析主题、受众、页数、风格;
|
||||
- 若用户要求使用模板,按 lark-slides-pptx-template-workflows.md 处理
|
||||
- 若用户直接提供模板,按 lark-slides-pptx-template-workflows.md 处理
|
||||
- **选定设计系统(规划第一步)**:读 references/slides_categories.md 判定所属场景,按其场景表列出的英文文件名读对应场景文档(如 references/academic-research.md);不匹配任何场景时回退到 references/doubao-design.md;用户已指定风格时以用户为准
|
||||
- 读取 xml-schema-quick-ref.md;新建 / 大幅改写时还要读取 planning-layer.md、visual-planning.md、asset-planning.md
|
||||
- 涉及图表读取 slides_chart_demo.xml
|
||||
|
||||
@@ -224,7 +207,9 @@ Step 3: 按 slide_plan.json 生成 XML → 创建
|
||||
|
||||
Step 4: 审查 & 交付
|
||||
- 创建完成后,必须用 `slides +xml-get` 读取全文 XML,并按 validation-checklist.md 做显式验证记录,包括 XML 文本重叠检查
|
||||
- 失败或部分成功按 troubleshooting.md 处理;局部问题优先用 `+replace-slide` 修正
|
||||
- 静态检查通过后,使用当前回读得到的 `slide_ids` 调用 `slides +screenshot`;首次新建且页集合未变时可复用创建响应。每批最多 10 页,保存到 `.lark-slides/review/<deck-or-task-id>/screenshots/`,然后实际查看生成的图片。**截图使用 `--presentation`、重复的 `--slide-id` 和可选 `--output-dir`;不要迁移 `--output`、`--params`、`--slides`、`--pages` 或 `--presentation-id`。**
|
||||
- 先为当前 `slide_ids` 建立逐页 review 记录,初始均为 `not_reviewed`;实际打开每张截图后,按「可读性、布局、视觉层级、内容完整性、图表精确可读性(有图表时)」更新为 pass / fix。**只截图或查看关键页属于抽查,不是视觉 review;只要存在 `not_reviewed` / `fix`,就不得写“已完成视觉 review”。**
|
||||
- 失败或部分成功按 troubleshooting.md 处理;局部问题优先用 `+replace-slide` 修正,修正后必须重新截图并复验该页
|
||||
- 没问题 → 交付:使用 NotifyHuman 工具交付 PPT 链接
|
||||
```
|
||||
|
||||
@@ -337,6 +322,6 @@ lark-cli slides <resource> <method> [flags] # 调用 API
|
||||
5. **保存关键 ID**:后续操作需要 `xml_presentation_id`、`slide_id`、`revision_id`
|
||||
6. **删除谨慎**:删除操作不可逆,且至少保留一页幻灯片
|
||||
7. **编辑已有页面优先原链接更新**:修改单个 shape/img 用 `+replace-slide`(`block_replace` / `block_insert`),不要整页重建;已有 Slides 的多页整页重建用 `+replace-pages`,不要用 `slides +create` 新建整份 PPT;只有没有 shortcut 覆盖的特殊单页整页操作才手动 `slide.create` + `slide.delete`
|
||||
8. **`<img src>` 只能用上传到飞书 drive 的 `file_token`,禁止使用 http(s) 外链 URL**:飞书 slides 渲染端不会代理外链图片,外链 src 在 PPT 里通常不显示或显示破图。流程必须是「先把图存到本地 → 用 `slides +media-upload` 上传或 `+create --slides` 的 `@./path` 占位符自动上传 → 拿 `file_token` 写进 `<img src>`」。如果用户给了网图链接,先 `curl`/下载到 CWD 内再走上传流程,不要直接把外链 URL 塞进 `src`。**图片最大 20 MB**(slides upload API 不支持分片上传)。
|
||||
8. **`<img src>` 只能用上传到飞书 drive 的 `file_token`,禁止使用 http(s) 外链 URL**:飞书 slides 渲染端不会代理外链图片,外链 src 在 PPT 里通常不显示或显示破图。流程必须是「先把图存到本地 → 用 `slides +media-upload` 上传或 `+create --slides` 的 `@./path` 占位符自动上传 → 拿 `file_token` 写进 `<img src>`」。如果用户给了网图链接,先 `wget`/下载到 CWD 内再走上传流程,不要直接把外链 URL 塞进 `src`。**图片最大 20 MB**(slides upload API 不支持分片上传)。
|
||||
|
||||
> **注意**:如果 md 内容与 `slides_xml_schema_definition.xml` 或 `lark-cli schema slides.<resource>.<method>` 输出不一致,以后两者为准。
|
||||
|
||||
135
skills/lark-slides/references/academic-research.md
Normal file
135
skills/lark-slides/references/academic-research.md
Normal file
@@ -0,0 +1,135 @@
|
||||
# Academic Research
|
||||
|
||||
**Benchmark references**: presentation templates from universities such as MIT, ETH Zürich, Tsinghua University, and Peking University; LaTeX Beamer themes such as Metropolis, Focus, Blei, and Auriga; research figure plates from journals such as Nature, Science, Cell, and NEJM; and presentations at top academic conferences.
|
||||
|
||||
## Goals
|
||||
|
||||
### Narrative: capture the value in the first minute; keep progress visible at all times
|
||||
Follow the narrative logic of research background, evidence gap, research question, experimental hypotheses, core evidence, conclusion, and contribution — letting the committee/advisor grasp the value within the first minute.
|
||||
|
||||
Through proper section planning, adding transition pages at key positions, building navigation bars into the body skeleton, and similar methods, keep the committee/advisor aware of the presentation's progress at all times.
|
||||
|
||||
### Visuals: simple but not cheap
|
||||
Presentations in academic scenarios are often plain, but simplicity does not mean simplistic, much less cheap. Use appropriate, refined colors that are expected in spirit yet unexpected in choice, paired with meticulous layouts to build a premium feel.
|
||||
1. **Keep a minimal style**: decorative elements and decorative images may only be used in areas such as the cover, section transition pages, closing pages, and page background images; strictly forbid using decorative images to fill body areas. Icons are not a cure-all for filling whitespace either — use them only when adding an icon brings a clear benefit.
|
||||
2. **A premium feel is achieved through meticulous detail design**: a unified page skeleton, footnote markers for data sources and references, captions for figures and tables, proper page numbering, exquisitely designed font-size hierarchy and typefaces...
|
||||
3. **Colors expected in spirit, unexpected in choice**:
|
||||
- When the user precisely mentions a school/institution/organization/conference name/journal name, you may download the official logo, use the logo's primary color as the primary color, and insert the logo at reasonable positions. If you cannot obtain the logo, do not use the logo's primary color, to avoid deviation.
|
||||
- Reject the most common palettes of this scenario:
|
||||
* Medical research does not use hospital blue/medical green; turn instead to the hematoxylin purple #684765 and eosin pink #C9828B of pathology slides.
|
||||
* Climate and earth sciences do not use environmental green and ocean blue; adopt rock-strata gray #334047, mineral ochre #B66A3C, and sulfur yellow #C2A33A instead.
|
||||
- Unless the user explicitly requests it, do not use crude, simplistic black, white, or light-blue backgrounds; align toward more refined backgrounds, such as titanium gray #E7E8E5, archival paper #F1E9DA, or ivory paper #F7F3E8.
|
||||
4. **High density at large font sizes**
|
||||
- Academic presentations should maintain high density at appropriate font sizes while retaining some breathing room. Unlike the small font sizes and single line spacing of industry research and finance, academic-research body text should use larger font sizes (above 10) and suitable line spacing (around 1.2), unless the deliverable is a reading-type artifact such as an academic poster. At the same time, it should have the "fullness" of industry research and finance: leave some breathing room between regions, but keep the inside of each region full.
|
||||
- Strictly forbid a region planned for 100px that ends up holding only 70px of content.
|
||||
|
||||
### Start from the research field; consider the visual focus
|
||||
Academic presentations in different research fields have different emphases: think about what truly matters in that field, and decide what each page should focus on.
|
||||
- Basic research and theoretical derivation: formulas, definitions, propositions, and proof steps are the focus; the rigorous, complete reasoning process occupies large areas.
|
||||
- Computer science and engineering: system diagrams, code, run traces, ablation experiments, and performance curves form the page skeleton.
|
||||
- Experimental research: research charts, images, and tables are the focus. Formulas, charts, tables, and images belonging to the same research conclusion should be as compact as possible.
|
||||
- Empirical analysis: essentially also experimental research, but social-science work should be more narrative-driven than science-and-engineering work.
|
||||
- Humanities/architecture/arts: archives, maps, manuscripts, image details, chronological threads, and textual evidence... Beyond academic rigor, there should also be brand-level refinement — go read `brand-creative.md` again.
|
||||
- Use shapes, lines, and arrows as annotations to emphasize or explain chart and image content.
|
||||
|
||||
## Prohibitions
|
||||
|
||||
1. **No cards by default**: unless the user explicitly requests it, strictly forbid using rounded rectangles or rectangular cards to build hierarchy or alignment: line segments, whitespace, and font/size differences are better solutions.
|
||||
2. **No evenly divided compositions**: unless no other layout is available, do not default to one-third splits, four-way splits, or 2×2 matrices — including three-part formulas such as "three columns + title + conclusion."
|
||||
3. **No mediocre, common, or AI-typical color schemes**: strictly forbid any blue-and-white pairing, blue-purple gradients, cyan-purple neon, rainbow flares, glassmorphism cards, or glowing borders — unless the user explicitly requests them.
|
||||
4. **No overly small font sizes**: unless the user requests it or the deliverable is a reading-type artifact (posters, etc.), body text must not use small font sizes.
|
||||
5. **No whitespace inside regions**: strictly forbid any case where the content cannot fill its planned region. It is not enough for the text box to be full — the actual text content, as seen in a screenshot, must fill the region. Failure to fill is the most serious kind of crudeness; it feels like no care went into the layout at all.
|
||||
|
||||
## Visual References
|
||||
|
||||
### ETH Swiss Lab Posters
|
||||
|
||||
**Reference objects**: ETH Zürich official PowerPoint and LaTeX templates, Metropolis.
|
||||
|
||||
**Core visual**: like a set of Swiss research posters pinned to a lab wall. A strict grid, giant conclusions, large solid-color swatches, and full-bleed research images form strong proportions; the pages are quiet but not conservative.
|
||||
|
||||
**Type and grid**:
|
||||
- Use a neutral sans-serif typeface; cover titles 64–88 pt, page titles 36–48 pt, body text 16–19 pt, sources 9–11 pt.
|
||||
- Use clearly asymmetric proportions, commonly 3:9, 4:8, or a full-page main image.
|
||||
|
||||
**Research figures**:
|
||||
- The main figure occupies 60%–75% of the page, with axes, error bars, legend, and source fully preserved.
|
||||
- Photography, micrographs, and remote-sensing images may be laid out full-bleed; titles sit inside opaque color blocks rather than directly over complex imagery.
|
||||
- Highlight only one result per page.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: a full-bleed image of the research setting or subject, paired with solid swatches of the primary color to build an asymmetric character.
|
||||
2. Content pages: the flow advances horizontally along a twelve-column grid; **cards are strictly forbidden**.
|
||||
3. Results pages: giant conclusion on the left, complete main figure on the right; on the next page, swap left and right.
|
||||
4. Limitations page: a thick colored line cuts apart "proven" and "not yet certain."
|
||||
5. Closing page: return to the cover's color-swatch proportions and answer the research questions one by one.
|
||||
|
||||
**Recurring motif**: asymmetric solid-color swatches, section numbers, page numbers, notes, reference footnote markers, and thin tick lines along the page edges.
|
||||
|
||||
**Prohibitions**: rounded cards, centered titles, soft shadows, blue-and-white business style, multi-colored charts, and enlarging the institution's emblem into a giant watermark.
|
||||
|
||||
### Tsinghua / MIT-Style Elite-University Defense
|
||||
|
||||
**Reference objects**: the official visual identity systems of Tsinghua University, MIT, and similar institutions; department defense templates; course handouts and research reports.
|
||||
|
||||
**Core visual**: the whole deck carries the orderliness of formal departmental defense materials. Identity is established through the school color, school name, or department emblem; everything else recedes behind the content. Pages are stable, precise, restrained; formulas, figures, and arguments always hold the visual center.
|
||||
|
||||
**Palette**:
|
||||
- When the user explicitly mentions a school or institution, extract one primary color from the official emblem — never hard-code a color value from memory. On ordinary body pages, keep the school color within 3%–8% of the area; section pages may use the school color across the entire page.
|
||||
- Keep scientific color schemes on figures when they carry clear semantics; when they do not, use the school color, light and dark grays, and one necessary contrast color — do not add colors just to enrich the picture.
|
||||
|
||||
**Type and grid**:
|
||||
- Chinese uses a neutral hei (sans-serif) typeface; English and formulas may pair with an academic serif or math typeface. Cover titles 48–64 pt, page titles 32–40 pt, body text 17–21 pt, captions and sources 9–11 pt.
|
||||
- Titles, body text, figure captions, and footnotes each keep their own fixed baselines.
|
||||
- Body pages may set an extremely thin header or footer rule, with a short title, section name, and page number fixed in place — or a section navigation.
|
||||
|
||||
**Research content**:
|
||||
- Formulas keep their numbering, conditions, and symbol explanations; key derivations may appear step by step, but each page must form a complete local argument.
|
||||
- Tables preferably adopt the three-line table structure from papers, highlighting only the rows and columns directly relevant to the conclusion.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: small school or department emblem, title, author, advisor, department, and date; establish identity with a thin line in the school color — no giant watermarks.
|
||||
2. Section pages: a full page of school color or a refined background color, holding only the section number, the title, and one research question. Pair with a decorative subtle-pattern background image to enrich the visual effect.
|
||||
3. Summary page: answer item by item by research question, marking the corresponding evidence or section number after each item.
|
||||
4. References page: use a font size slightly smaller than body text but larger than footnotes, and place the references in the official citation format, in columns or a single column.
|
||||
5. Closing page: keep the school color, department emblem, and contact information, presenting only "Questions" or one final conclusion.
|
||||
|
||||
**Recurring motif**: the short school-color line, fixed title baseline, section name, page numbers, figure captions, and reference footnote markers.
|
||||
|
||||
**Prohibitions**: faking the school color from memory, enlarging the emblem to fill whitespace, semi-transparent emblem watermarks, blue gradient headers, repeating large color bands on every page, rounded info cards, figures without captions, and squeezing body text and figures for the sake of tradition.
|
||||
|
||||
### Humanities & Social Sciences Archival Special Issue
|
||||
|
||||
**Reference objects**: humanities and social-science academic monographs from university presses, twentieth-century academic journals, archival catalogues, and the vintage-print paper, layout, and image treatments in `brand-creative.md`. Absorb only the parts that serve the presentation of evidence.
|
||||
|
||||
**Core visual**: the whole deck reads like an archival research special issue typeset with contemporary layout. Warm paper tones, serif type, marginal annotations, document numbers, and thin separator lines form a stable skeleton; archives, maps, manuscripts, interviews, and statistical materials appear as evidence, not as decoration filling the picture.
|
||||
|
||||
**Palette**:
|
||||
- Background: archival paper #F1E9DA; text: ink black #27231F; auxiliary information: old-paper gray #9B9489.
|
||||
- Choose one accent color by theme: annotation vermilion #8C3B36 or binding ink green #355C52. Pick only one for the whole presentation, and keep it within 3%–8% of the area on ordinary pages.
|
||||
- Original archives and artworks may keep their original colors; figures, annotations, and navigation still obey the unified palette.
|
||||
|
||||
**Type and grid**:
|
||||
- Chinese titles and body text preferably use a modern Song (serif) typeface or another clear serif; numbers, numbering, sources, and archival reference numbers may use sans-serif or monospaced fonts.
|
||||
- Cover titles 48–68 pt, page titles 34–44 pt, body text 17–20 pt, long quotations 21–28 pt, figure notes and footnotes 9–11 pt; body line spacing 1.3–1.45.
|
||||
- Commonly use unequal-width layouts of 4:8 or 5:7, reserving a narrow margin for dates, keywords, document numbers, or annotations. Rely on whitespace and thin lines to organize content — no vintage lace borders and no cards.
|
||||
|
||||
**Archives, quotations, and data**:
|
||||
- Archive scans should preserve paper edges, page numbers, seals, and collection or accession numbers; when emphasis is needed, point out the evidence with thin boxes, leader lines, and magnified details.
|
||||
- Label every archival image with author, title, date, holding institution, and reference number; label every interview excerpt with respondent number, time, and place.
|
||||
- Statistical charts stay modern and clearly drawn, with no aged textures overlaid. Use the accent color only to highlight data series directly relevant to the argument.
|
||||
- Long quotations excerpt only the passages that support the argument, with explanation and provenance beside them; avoid piling full-page stacks of original text.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: the title styled like the title page of an academic monograph, paired with an archive, map, or artwork detail occupying 35%–50% of the picture; also place author, institution, date, and volume/issue-style metadata.
|
||||
2. Research-question page: use a three-to-five-line abstract-style lead-in, with locations, dates, subjects, and material scope listed in the margin.
|
||||
3. Literature-review page: organize the literature along time or divergences of opinion, connecting scholars, arguments, and response or engagement relationships with thin lines — do not build walls of author cards.
|
||||
4. Archival-evidence page: a large original on the left; transcription, translation, interpretation, and provenance in order on the right; use the same numbers to connect original and analysis.
|
||||
5. Empirical-analysis page: the main figure or table occupies two-thirds; the other side holds conclusions, variable descriptions, and limitations; quantitative material also follows the special-issue skeleton.
|
||||
6. Map-and-time page: use one main map or one main timeline; the accent color marks only the places and events relevant to the argument.
|
||||
7. Argument page: a clear judgment sentence at the top, with textual evidence, visual evidence, and the researcher's interpretation laid out in order below.
|
||||
8. Conclusion page: answer the research questions with consecutively numbered short paragraphs, each attaching the corresponding archive number, figure number, or section number.
|
||||
|
||||
**Recurring motif**: book-page-style page numbers, thin footnote rules, running heads, archival reference numbers, section tabs, and a unified figure-caption format.
|
||||
|
||||
**Prohibitions**: casually tilted clip art, low-contrast body text, treating archival material as background texture, and historical photos without sources.
|
||||
36
skills/lark-slides/references/analysis-decision.md
Normal file
36
skills/lark-slides/references/analysis-decision.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Analysis & Decision
|
||||
|
||||
## Solid, compact content with extremely high-density layout
|
||||
|
||||
1. Unless the presentation is explicitly intended for on-stage presenting, treat it as a reading-type deck by default. Design the entire work around this goal, and demonstrate the standard of a top-tier research report or consulting firm.
|
||||
2. Every page has enough depth: the core conclusion can be grasped quickly, while reading the full page takes 5 minutes.
|
||||
3. Support cascades from conclusion to evidence: once the title states a judgment, the page should carry several self-standing supporting judgments that connect the conclusion to the evidence, each with one verifiable sentence of support.
|
||||
4. Body-page titles are preferably declarative sentences ("Europe's electric heavy-truck batteries reach 48 GWh by 2030 — 16x growth in six years under a strong policy push"), but decide whether to use a declarative sentence based on the actual content.
|
||||
|
||||
## Make data and structured information the body of the argument
|
||||
|
||||
1. Data is the core support of the argument: search thoroughly around the topic to obtain real data, and present it fully through all kinds of charts and tables; the source of every piece of data must be stated — never fabricate data.
|
||||
2. Charts come complete with axes, units, legends, sources, and measurement basis, so that a chart stands on its own apart from the body text.
|
||||
3. Mark data inflection points and key values on charts and explain their meaning; accompany each chart with text stating the judgment it proves, the findings visible on it, the implications for the decision, and the source and boundaries.
|
||||
4. Encourage using SmartArt shape combinations to present information; when structural relationships exist between pieces of content — sequence, comparison, cycle, causality, and so on — prefer making them visible with a structural diagram rather than describing them in text.
|
||||
5. Encourage drawing and combining shapes to build complex charts and SmartArt, supported by text explanations — plain text alone is too flat.
|
||||
|
||||
## Key Requirements
|
||||
1. Create a top-tier visual experience: every detail of typesetting, fonts, colors, and alignment must be treated with care; accept no defaults — details determine success or failure.
|
||||
2. Unless explicitly requested, strictly forbid using rounded rectangles or rectangular cards to build hierarchy or alignment: line segments, whitespace, and font/size differences are better solutions.
|
||||
3. A single basic chart must not occupy half or more of the width; encourage laying out multiple charts or other content on one page.
|
||||
4. Unless no other layout is available, forbid evenly divided compositions; do not default to one-third splits, four-way splits, or 2×2 matrices — including three-part formulas such as "three columns + title + conclusion."
|
||||
|
||||
## Visual References
|
||||
|
||||
1. White background + single primary-color skeleton: pure white pages, with only one primary color throughout the deck (e.g., navy, ink green, or another color common in financial-consulting style) carrying the structural skeleton — title emphasis, table headers, navigation highlights, main chart series, and numbered markers — supported by a 2–3-step light-tint ladder of the same hue and neutral grays.
|
||||
2. The title is the conclusion: each page's main title is a complete judgment sentence; the heading format (kicker → main title → subtitle, or title + conclusion-sentence subtitle) is fixed throughout; in typography, bold serif titles and sans-serif body text form two clearly divided roles, with a strictly consistent hierarchy.
|
||||
3. If headers and footers exist, they must stay stable: section navigation always visible (current section highlighted; sections distinguished by navigation position, not by switching colors), a fixed "Source:" line + page number in the footer; every element keeps the same coordinates from page to page, so nothing jumps when flipping.
|
||||
4. Density rhythm: body pages are packed at high density, with charts/tables/structural diagrams as the main body and text serving the evidence; covers, section pages, and conclusion pages use whitespace as breathing points.
|
||||
5. Position discipline: conclusion → top title; evidence → charts/tables in the middle; interpretation → notes beside the chart or a sidebar; sources and measurement basis → the source line at the bottom; action recommendations → the closing page only. Every type of information sits in its own place, consistent throughout.
|
||||
6. De-default charts: reassign all series colors to the primary-color ladder + grays; remove vertical gridlines (at most keep extremely light horizontal lines); data labels mark only key points and endpoints; actual vs. forecast is distinguished by solid vs. dashed/hatched; directly below each chart, place its source + measurement-basis note.
|
||||
7. Mark key values directly on the chart: key totals with big-number callouts, inflection points/gaps/growth rates with arrows or leader lines + one-sentence annotations, ratings with Harvey balls or badges — placed right on the chart area, not piled into text paragraphs.
|
||||
8. Table conventions: dark header with white text, extremely thin horizontal separators (no vertical lines or heavy borders), numbers right-aligned and text left-aligned, subject names in the first column bolded; large tables get an interpretation panel beside them.
|
||||
9. Line and alignment discipline: all elements align to a unified left edge and invisible column lines; separation uses only extremely thin lines, emphasis uses only primary-color short bars or thick vertical bars, never thick frames; panels are square-cornered with no shadows; rounded corners are allowed only on small labels.
|
||||
10. Clean surfaces: no shadows, no gradients, no textures, no glow effects, no default colors; the texture is achieved entirely through whitespace, alignment, a single-hue color scale, and line discipline.
|
||||
|
||||
202
skills/lark-slides/references/brand-creative.md
Normal file
202
skills/lark-slides/references/brand-creative.md
Normal file
@@ -0,0 +1,202 @@
|
||||
# Brand / Creative Showcase
|
||||
|
||||
**Benchmark references**: top magazines such as Monocle, Wallpaper, and Vogue; international design agencies such as Pentagram; and outstanding brand annual reports, brand books, and creative proposals.
|
||||
|
||||
## Goals
|
||||
|
||||
### Identify the subject; build a deck whose subject is recognizable at a glance
|
||||
If the presentation's subject is a specific brand, product, company, person, city, building, event, or IP, first extract the subject's identifying features:
|
||||
- Extract visual identifiers such as icons and the brand concept from the user's uploaded reference materials.
|
||||
- Search and visit official websites, officially published annual reports, creative manuals, and icons. Do not just read the text — rely more on referencing and studying the pages' visual effects to help understand the style.
|
||||
Even if all text content were removed, the association with the subject should still be found through other visual features.
|
||||
|
||||
### Take the essence, discard the dross
|
||||
Not every subject has an aesthetic aligned with top magazines like Monocle, Wallpaper, or Vogue. When extracting the subject's style, accurately identify which items may be referenced and which are prohibited. Designs that fail to meet the benchmark's standard must be explicitly forbidden. If the brand itself lacks design quality, you may keep only the brand's primary color as the theme or accent color, or keep icons as decoration.
|
||||
|
||||
### Build a top-tier visual experience
|
||||
Use strong font-size contrast and extreme asymmetric layouts to build an exaggerated style and a top-tier visual experience. Reject every safe, mediocre, conservative option: better ugly than mediocre.
|
||||
1. **Make extreme choices**: oversized type, giant images, intense whitespace, high-density multi-columns, a single vivid color, or heavy lines. Build an ultimate style: old-newspaper front page, Memphis, Constructivism, Swiss style...
|
||||
2. **Vary the pages**: cover, opinion, data, and image pages each have different compositions. There is no need to strictly follow one identical "page skeleton," but the deck's consistency should still be recognizable through palette, typeface, font sizes, same-style decorative elements, and the same grid alignment.
|
||||
3. **Have a visual rationale**: the visual language must come from the deck's subject, brand, industry, era, or material, and must help the audience understand the content.
|
||||
|
||||
## Prohibitions
|
||||
1. **No cards by default**: unless the user explicitly requests it, strictly forbid using rounded rectangles or rectangular cards to build hierarchy or alignment: line segments, whitespace, and font/size differences are better solutions.
|
||||
2. **No evenly divided compositions**: unless no other layout is available, do not default to one-third splits, four-way splits, or 2×2 matrices — including three-part formulas such as "three columns + title + conclusion."
|
||||
3. **No mediocre, common, or AI-typical color schemes**: strictly forbid any blue-and-white pairing, blue-purple gradients, cyan-purple neon, rainbow flares, glassmorphism cards, or glowing borders — unless the user explicitly requests them.
|
||||
4. **No elements that clash with the overall style**: no styles from outside the chosen style may appear, such as using rounded icons or rounded rectangles within a sharp style.
|
||||
|
||||
## Visual References
|
||||
|
||||
Visual references are only "references": they show you something good so you know what good looks like — they are not directly usable. You should design visuals according to the user's actual needs, not directly apply templates.
|
||||
|
||||
### Klein Blue Swiss Posters
|
||||
|
||||
**Core visual**: the whole deck reads like a set of modernist exhibition posters. Strict left alignment, a twelve-column grid, extreme font-size differences, giant numerals, and large areas of whitespace. The picture uses only paper white, near-black, and Klein blue.
|
||||
|
||||
**Palette**:
|
||||
- Background: warm paper white #F7F5EF, roughly 70%–85%.
|
||||
- Text: near-black #101010.
|
||||
- Accent: Klein blue #0038B8, occupying 5%–12% on ordinary pages; section pages may use a blue block occupying 30%–40% of the picture.
|
||||
- Auxiliary gray: #D8D7D2, only for gridlines and secondary information.
|
||||
- No gradients and no second accent color.
|
||||
|
||||
**Type**:
|
||||
- Cover title: ultra-heavy sans-serif, 112–136 pt, line height 0.85–0.95, and may be slightly cropped by the canvas edge.
|
||||
- Content-page titles: 48–64 pt.
|
||||
- Body text: 17–20 pt.
|
||||
- Page numbers, sources, and labels: 9–11 pt, with widened letter spacing.
|
||||
- Everything left-aligned, using a single sans-serif family only, building hierarchy through weight changes.
|
||||
|
||||
**Grid and geometry**:
|
||||
- Left and right margins equal 5% of the canvas width; use a twelve-column grid.
|
||||
- Main compositions use 2:8, 3:7, or full-page whitespace.
|
||||
- Use only right-angle rectangles, true circles, 0.5 pt thin lines, and 4 pt thick lines.
|
||||
- No rounded corners, shadows, outlined icons, or floating cards.
|
||||
|
||||
**Image treatment**:
|
||||
- Product screenshots all go into a fixed 16:10 slot.
|
||||
- Photography is uniformly high-contrast black and white; a blue color surface may only be overlaid locally.
|
||||
- At most one main image per page; no photo collages.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: the title occupies the left 65%; a blue color surface running the full height sits on the right; at the top, only one line of 10 pt meta-information.
|
||||
2. Section pages: the whole page holds only the section numeral and one title line; the numeral is 120 pt blue.
|
||||
3. Opinion page: one 64–88 pt conclusion, with a tiny annotation in the bottom-right corner.
|
||||
4. Data page: a 110 pt numeral occupies the left third; a simplified chart sits on the right.
|
||||
5. Architecture page: all nodes align to the twelve-column grid; connecting lines are uniformly 1 pt; only the core nodes are blue.
|
||||
6. Closing page: return to the cover's blue color surface and giant title, closing the loop.
|
||||
|
||||
**Recurring motif**: a blue vertical line and a two-digit section number fixed at the top-left corner of every page.
|
||||
|
||||
**Prohibitions**: rounded cards, three evenly divided columns, colorful small icons, multi-colored charts, gradients, soft shadows, centered titles.
|
||||
|
||||
### Stencil-Printed Indie Magazine
|
||||
|
||||
**Core visual**: the whole deck feels like a hand-trimmed, scanned, and bound indie magazine. Heavy poster type, two-color overprinting, halftone images, cut-and-paste blocks, and slight tilts. Preserve paper and printing imperfections rather than chasing the slickness of a digital interface.
|
||||
|
||||
**Palette**:
|
||||
- Paper: warm beige #F1E2C2.
|
||||
- Primary ink: cobalt blue #1646B8.
|
||||
- Second spot color: fluorescent pink #FF4F87.
|
||||
- Text and rules: ink black #171512.
|
||||
- Orange-yellow #F1A51B may appear on only one or two section pages, within 5% of the area.
|
||||
- No transparent gradients; colors appear only as flats, overprints, and halftones.
|
||||
|
||||
**Type**:
|
||||
- Cover title: ultra-heavy condensed poster type, 88–120 pt, allowed to rotate -3 degrees and cross the canvas edge.
|
||||
- Page titles: 42–58 pt, may be reversed white on a black ground.
|
||||
- Body text: 14–17 pt, in a clear sans-serif or serif face.
|
||||
- Annotations: 10–12 pt monospaced, mimicking typewriter labels.
|
||||
|
||||
**Grid and geometry**:
|
||||
- Use unequal-width two and three columns and cut-and-paste modules.
|
||||
- Images and text blocks may rotate from -4 to +4 degrees.
|
||||
- Main rules 2–3 pt; crop marks 0.75 pt.
|
||||
- Color blocks stay right-angled; local overruns and mutual overlaps are allowed.
|
||||
|
||||
**Image treatment**:
|
||||
- All photos are first converted to high-contrast black and white, then given either a blue or a pink halftone treatment.
|
||||
- Halftone dot size stays consistent; color misregistration of 2–4 pixels is allowed.
|
||||
- People and buildings may be cropped brutally, but never past the point of losing the recognizable subject.
|
||||
- Never drop full-color photos in directly.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: the title occupies more than half the picture; at the bottom, a blue-and-pink duotone photo of a printing press or bookshop; a tilted small label is pasted at the top-right corner.
|
||||
2. Contents page: five colored paper strips, each holding only a section number and a short title.
|
||||
3. History page: the timeline looks like tickets clipped onto paper; years use 40–56 pt bold type.
|
||||
4. Craft page: five steps spread horizontally, each containing a halftone image, a number, and one line of explanation.
|
||||
5. City-case page: one large image occupies 60%; text presses against the image's side like a newspaper sidebar.
|
||||
6. Map page: the map stays as black line art; key cities are marked with solid pink circles.
|
||||
7. Closing page: four large numbered circles present the action steps; a black manifesto line sits at the bottom.
|
||||
|
||||
**Recurring motif**: misregistered blue-and-pink overprinting, the crop line at the top-left corner, and a fixed volume/issue number.
|
||||
|
||||
**Prohibitions**: glassmorphism, soft shadows, slick gradients, refined rounded corners, full-color photography, business clip icons, and perfectly symmetrical grids.
|
||||
|
||||
### Brutalist Newspaper
|
||||
|
||||
**Core visual**: the whole deck reads like a special-edition newspaper about an industry turning point. Giant mastheads, narrow margins, unequal-width multi-columns, thick-and-thin rules, high-density body text, and black-and-white halftone photos. Red is used only for the most critical data and warnings.
|
||||
|
||||
**Palette**:
|
||||
- Newsprint white: #F5F1E8.
|
||||
- Ink black: #111111.
|
||||
- News red: #C8102E, kept within 3%–8% of a page's area.
|
||||
- Sidebar paper yellow: #E7DDCA.
|
||||
- Secondary text: #55514A.
|
||||
- No blue-purple gradients and no colored status blocks.
|
||||
|
||||
**Type**:
|
||||
- Masthead: ultra-heavy sans-serif, 72–100 pt, all caps where supported or otherwise set as ultra-bold short text.
|
||||
- Headlines: 44–72 pt, tight leading.
|
||||
- Body text: 11–14 pt serif, line spacing 1.25–1.4.
|
||||
- Data and labels: monospaced, 10–14 pt.
|
||||
- Pull quotes: 28–40 pt serif italic or bold.
|
||||
|
||||
**Grid and geometry**:
|
||||
- Margins are 3.5%–4% of the canvas width.
|
||||
- Content pages use three to five unequal-width columns.
|
||||
- Lines come in four grades: 0.5 pt, 1 pt, 3 pt, and 5 pt.
|
||||
- All modules are right-angled, organized by rules; no floating cards.
|
||||
|
||||
**Image treatment**:
|
||||
- Photography is uniformly converted to high-contrast black-and-white halftone, keeping visible grain.
|
||||
- Every image carries a 9–10 pt caption and source.
|
||||
- You may mark an image with a red circle, red underline, or red stamp — choose only one of these mark types per page.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: a 5 pt red line at the top, a masthead spanning the full page below it; the main headline uses 80–96 pt; three short news briefs at the bottom.
|
||||
2. Overview page: four large numbers in a row, each 64–88 pt, with three columns of observations below.
|
||||
3. Ranking page: a black-and-white halftone photo in the left third; horizontal bar charts in the right two-thirds.
|
||||
4. Cost page: a full-width server-room banner across the middle, with a line chart and a narrow annotation column below.
|
||||
5. Policy page: a black-and-white landscape image at the top; below, a dense three-column table compares different regions.
|
||||
6. Timeline page: one thick black main line with six red nodes; event descriptions distributed above and below.
|
||||
7. Closing page: only one 64 pt conclusion and a red full stop.
|
||||
|
||||
**Recurring motif**: the top red line, the fixed masthead, black column rules, and edition information at the bottom-right corner.
|
||||
|
||||
**Prohibitions**: rounded corners, shadows, illustrated icons, colored cards, loose business layouts, default table styles, and unsourced data.
|
||||
|
||||
### Memphis Pop Posters
|
||||
|
||||
**Core visual**: the whole deck uses thick black outlines, giant poster type, checkerboards, lightning bolts, waves, dots, and geometric shapes that break the frame. The picture is lively while text areas stay clean — like a blend of eighties pop posters and contemporary youth-event visuals.
|
||||
|
||||
**Palette**:
|
||||
- Background: cream white #FFF3D8.
|
||||
- Ink: deep black-purple #151427.
|
||||
- Fluorescent pink #FF3EA5.
|
||||
- Bright yellow #FFD63D.
|
||||
- Lake blue #05C7E8.
|
||||
- Mint green #23D6A2.
|
||||
- At most three high-saturation colors per page; deep black-purple must be used for outlines and body text to steady the picture.
|
||||
|
||||
**Type**:
|
||||
- Cover title: ultra-heavy rounded or comic-style display type, 92–128 pt, with a 3–5 pt dark outline and a hard-offset color block.
|
||||
- Section words: 80–110 pt, all caps where supported or a single giant character.
|
||||
- Page titles: 36–48 pt.
|
||||
- Body text: 15–18 pt neutral sans-serif; no script faces.
|
||||
- Numbers: 72–100 pt, in heavy black type.
|
||||
|
||||
**Grid and geometry**:
|
||||
- Compositions are clearly asymmetric; main objects may rotate from -6 to +6 degrees.
|
||||
- Geometric shapes use 3–5 pt dark outlines.
|
||||
- Each page carries one geometric shape breaking the frame, occupying 20%–40% of the picture.
|
||||
- Decoration concentrates in corners and edges, never covering body text.
|
||||
|
||||
**Image treatment**:
|
||||
- People are uniformly rendered as flat illustrations with thick black outlines or a high-saturation screen-print effect.
|
||||
- Multi-person pages use a four-panel series, with busts of consistent size and viewing angle.
|
||||
- Venue maps use hand-drawn icons, but route and schedule information stays clear.
|
||||
|
||||
**Page grammar**:
|
||||
1. Cover: the title fills the upper half; crowd silhouettes and the stage sit at the bottom; checkerboards, lightning bolts, and dots occupy the four corners, while the center stays clear.
|
||||
2. Section pages: one giant word or character, against a background of one frame-breaking circle and one wave.
|
||||
3. Numbers page: four numbers in a row, each on a different background color, all with the same thick outline.
|
||||
4. Lineup page: a four-person panel series in the upper half; names, styles, and set times in the lower half.
|
||||
5. Venue map: a radial map in the center, with colored labels around it marking stages and facilities.
|
||||
6. Schedule page: the timeline stays horizontal and regular, colors distinguish the stages, and decoration retreats to the edges.
|
||||
7. Ticket-pricing page: three tiers as hard-edged poster blocks, prices 64–80 pt, no floating shadows.
|
||||
8. Closing page: a full-bleed sunset illustration with an 88 pt handwritten-feel line on top, repeating the cover's checkerboard corners.
|
||||
|
||||
**Recurring motif**: checkerboard at the top-right corner, pink lightning bolts, and thick black outlines — the checkerboard must appear on at least five pages.
|
||||
|
||||
**Prohibitions**: soft shadows, low-contrast text, all colors appearing at once, script body text, decoration covering data, and ordinary business icons.
|
||||
49
skills/lark-slides/references/business-plan.md
Normal file
49
skills/lark-slides/references/business-plan.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Business Proposal
|
||||
|
||||
## A clear storyline with strong persuasion
|
||||
|
||||
- The storyline of the whole deck is clear and builds step by step.
|
||||
- If a page has a core claim, that most important sentence enjoys the visual privilege of being "marked."
|
||||
- **Emotion has a curve**: the deck's emotion is not flat — from unease (the pain point) to hope (the solution) to belief (the evidence) to urge (the action).
|
||||
- Make good use of data support: assist the proposal with data, tables, and charts at the right positions. Data must be truthful and reliable, with sources stated.
|
||||
|
||||
## Tell a more complete story through SmartArt structural diagrams
|
||||
|
||||
**SmartArt is the visualization of narrative: boldly use complex structural diagrams to present multi-layered relationships.**
|
||||
|
||||
- Decompose structures from information relationships — sequence, comparison, cycle, causality, and so on — and prefer making them visible with structural diagrams rather than describing them in text.
|
||||
|
||||
## Page turns have breathing room
|
||||
|
||||
- Encourage interspersing refined section pages and accent pages among the content pages to markedly elevate the reader's experience. Section pages may use images as backgrounds, covered by a gradient overlay.
|
||||
- When the topic suits it, search for images generously and place well-chosen images at the right spots — one picture is worth a thousand words.
|
||||
|
||||
## Key Requirements
|
||||
1. Create a top-tier visual experience: treat every detail of typesetting, fonts, and colors with care, crafting it like a work of art — details determine success or failure.
|
||||
2. Unless the user explicitly requests it, **strictly forbid using rounded rectangles or rectangular cards** to build hierarchy or alignment: line segments, whitespace, and font/size differences are better solutions.
|
||||
3. Unless no other layout is available, forbid evenly divided compositions; do not default to one-third splits, four-way splits, or 2×2 matrices — including three-part formulas such as "three columns + title + conclusion."
|
||||
|
||||
## Visual References
|
||||
|
||||
1. Type is attitude: display type (titles, manifesto lines, big numbers) and body type (body text, notes, sources) have a clear division of labor by family or weight; display type needs poster-level tension, daring extreme contrast in size, weight, and letter spacing — the title itself is a visual work.
|
||||
2. Fonts and the color scheme must be matched and harmonious; reference each other when designing.
|
||||
3. Rhythm and accent pages: rotate the page-type sequence, never two consecutive pages with the same skeleton; manifesto pages, section divider pages, and big-number hero pages handle emotional gear-shifts and visual emphasis.
|
||||
4. Carefully designed layouts: page layouts are ingeniously designed, with beauty and soul — not just simple arrangements of text.
|
||||
5. Corner and edge visuals: encourage building shapes into images that aid explanation, or crafting refined, purely decorative symbols out of shapes in empty areas.
|
||||
6. De-default charts and tables: all series colors come from the brand palette; data labels mark only key points and sit directly beside the graphic; tables are separated only by thin horizontal lines — no heavy frames, no zebra striping.
|
||||
7. Details are quality: pixel-level alignment and letter spacing that hold up under scrutiny at any magnification; the texture is achieved entirely through typesetting, alignment, color blocks, and line discipline — no defaults anywhere; detail is the dividing line between master and mediocrity.
|
||||
8. Motifs and text/image separation: establish 2–5 recurring visual motifs throughout the deck (decorations, icons, and illustrations share one language) to form recognizability and an artistic signature.
|
||||
|
||||
### Color Palette Reference
|
||||
|
||||
**Colors expected in spirit, unexpected in choice**:
|
||||
- When the user precisely mentions a company/product/brand name, prefer taking the brand's VI primary color as the structural primary color, and design a matching palette around it.
|
||||
- Reject the most common, most mediocre formulaic palettes of each scenario (tech blue-purple gradients, hospital blue-and-white, festive bright-red-and-gold, real-estate sales-office gold-brown, green-leaf environmental style, etc.); reference palettes for some scenarios:
|
||||
* Tech/AI/SaaS/entertainment roadshows: the launch-event color clash of ink black #141414 base + fluorescent yellow-green #C6F24E; or mist white #F2F4F7 base + indigo #2B3A8E + lime #A8E05F; or a dark-base clash of deep purple-black #1A1228 base + neon magenta #E91E8C + electric blue #2D9CDB.
|
||||
* Consumer goods/F&B/food franchise recruitment: creamy apricot #F3D9A4 base + baking brown #6B4226 + brick red #A63A2E; or off-white #F6EFE2 base + ink green #1E3B33 + terracotta #C15F3C; or soil brown #4E3428 base + wheat gold #C9A227 + moss green #5D6B4F.
|
||||
* Luxury/fashion/beauty: the editorial palette of ink black #0D0D0D base + ivory #F5F0E6 + burgundy #6D1F2C; or ivory #F5F0E6 base + ink black #0D0D0D + burgundy #6D1F2C; or the minimalist clash of cool white #F8F8F6 base + charcoal black #1A1A1A + cobalt blue #1F3A93.
|
||||
* Medical/health products: warm white #F5F0E1 base + deep pine green #1F4A3D + apricot yellow #E8B54A; or warm white #F7F5F0 base + deep indigo #1B2A52 + mint #7FC7B5; or charcoal gray #333A42 base + coral pink #E8A09A + light beige #EFE9E0.
|
||||
* Finance/legal/professional services: off-white #F7F3E8 base + ink green #123B2F + brass #B08D3E; or warm gray #C9C4BC base + ink black #1A1A2E + burgundy #7B2D43; or ink black #1C1C1C base + antique bronze #9C6B30 + parchment white #F4EDE1.
|
||||
* Industry/construction/energy/logistics (heavy B2B industries): charcoal black #232323 base + safety orange #E8590C + steel gray #868E96; or sandy white #F3EDE0 base + deep petroleum teal #0F4C5C + warm copper #B5651D; or light gray #D9DDE3 base + midnight blue #101D42 + signal yellow #F5B700.
|
||||
* Education/knowledge-payment products: warm white #FAF6EE base + ink purple #3D2C4F + cream yellow #F2C14E; or off-white #F5F1EA base + deep indigo #22315C + coral orange #F08A5D; or paper white #F7F3E8 base + pine green #2F5233 + apricot yellow #E8B54A.
|
||||
- Align background colors toward something more textured, e.g.: ink black #141414, deep ink green #0E2A22, warm paper white #F7F3E8, mist gray #E9E7E2, deep wine red #3B1219.
|
||||
37
skills/lark-slides/references/doubao-design.md
Normal file
37
skills/lark-slides/references/doubao-design.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# 豆包设计原则(兜底设计系统)
|
||||
|
||||
**本文件是兜底设计系统。** 仅当演示文稿**不匹配** [slides_categories.md](slides_categories.md) 里的任何场景时,以本文件为准。匹配到场景时以对应场景文档为准(与本文件冲突处以场景文档为准);用户直接提供模板、品牌规范、配色、字体或参考风格时以用户为准。
|
||||
|
||||
- 例外声明:不适用于 `title-cover` 和 `section-divider`。
|
||||
|
||||
## 核心要求
|
||||
|
||||
- 必须采用信息密度极高的图文卡片布局,追求充实饱满、图文丰富、数据驱动、可逐行细读的版面,宁可密而满,不要空而疏。
|
||||
- 信息密度不够时可以通过文字扩写增加文字数量,但扩写必须保证有事实依据、有引用来源,不能凭空捏造,不能与用户上传的附件(如有)中的信息冲突。
|
||||
- **!!!信息密度极高!!!图多!!!卡多!!!字多!!!**
|
||||
|
||||
## 图片与主视觉
|
||||
|
||||
- 任何体裁的 PPT 都必须保证图文并茂、图片丰富。
|
||||
- 封面页的主视觉必须是 `<img>`(来自生图工具或搜图工具),不要使用 `<shape>` 或 `<icon>` 拼出封面视觉。
|
||||
|
||||
## 排版布局
|
||||
|
||||
- 卡片布局:卡片按多行网格铺满页面,版面对称、均衡、不留白。网格数、图文比例按内容变化,避免每页雷同。使用更多卡片做细分承载,避免在单张卡片里堆砌大量文字(例如 8 张 50 字卡片优于 2 张 200 字卡片),多个要点必须拆分为多张子卡片。
|
||||
- 卡片样式:方角卡片,纯平无渐变背景填充(全局一致),默认无边框无装饰,仅在需要强调时可用细边框或色条(不用于纯装饰)。
|
||||
- 卡片结构:视觉锚点(关键词、编号、符号或 IconPark 图标)+ 标题(无背景填充) + 内容(包括文字、图片、图表、表格、子卡片)。
|
||||
- 文字卡片:多数页面必须满足 6-8 张文字卡片、200-400 文字数量,文字内容像浓缩的分析文稿,必须使用长句。多个要点或列表多项必须做成多张子卡片,关键词和短句必须做成方角标签卡片。高密度文字所在的文本框的 `<content>` 必须设置 `wrap="true" autoFit="normal-auto-fit"` 属性自动换行和缩排,避免文字溢出。
|
||||
- 图片卡片:多数页面必须满足 1-3 张图片卡片,素材收集阶段必须进行图片搜索和图片生成,数量不足时使用生图工具补充。
|
||||
- 图表卡片:数据信息不要用文字卡片,必须用图表卡片可视化,包括表格、原生图表、时间线、流程图等。原生图表有内置标题不需要卡片标题。
|
||||
- 间距要求:页面内容不要贴边、不要溢出,卡片内容不要贴边、不要溢出,卡片之间不要相连、不要重叠。
|
||||
- 对齐方式:正文默认左对齐;表格里的文字默认居中,长句、段落和列表设置左对齐;图表、图片、文本框设置在卡片内居中。
|
||||
- 密集填充:内容区用卡片网格密集铺满、避免大片空白;只有封面或刻意用整张图铺底的页面,才让画面满幅铺到页边(full-bleed),常规内容页保持四周留白。
|
||||
- 禁止在 `headline` 或 `title` 下方放置用于分隔或装饰的 `rect` 或 `<line>`。
|
||||
|
||||
## 视觉风格
|
||||
|
||||
- 美学:纯平无渐变,干净、明亮、清爽但信息饱满;靠卡片和对齐网格在高密度下维持秩序感;同排卡片文字数量应相近以保持观感整齐。高密度文字所在的文本框必须突出重点(关键信息加粗)和信息分组(分区段后换行,注意换行会占用高度空间,或拆分为多个文本框),让高密度文字也有主次和节奏,提高可读性,而不是成片纯文字块。
|
||||
- 字体:必须使用思源宋体(衬线字体),不要用默认的思源黑体。
|
||||
- 字号:标题 28-36pt、正文 12-14pt、注释 10-12pt,关键指标 16-32pt(核心指标数字可用 36-52pt),下面配 10-14pt 标签与简短解读,需要容纳更多文字时允许使用更小的字号。
|
||||
- 图标:内嵌 IconPark 图标(可用关键词、编号、符号替代)作为视觉锚点。
|
||||
- 配色:全局统一,克制颜色数量,限制仅用 1 个背景色(纯白或冷淡色)、1 个主色、1 个强调色和 1 个辅助色,使用莫兰迪/深莫兰迪配色,禁止高饱和配色,背景与主体色彩搭配协调自然。
|
||||
255
skills/lark-slides/references/education-training.md
Normal file
255
skills/lark-slides/references/education-training.md
Normal file
@@ -0,0 +1,255 @@
|
||||
# Education & Training
|
||||
|
||||
Scope: courseware, job-skill training, operation guides, teacher materials, study handbooks, public education, onboarding training, capability building, and knowledge popularization. The reader may be listening live or reading independently; their task is not merely to understand a page, but to form understanding they can retell, methods they can execute, and actions they can transfer.
|
||||
|
||||
> Core position: design the learning first, the pages second; complete the content skeleton first, the visual system second. Reference samples only provide design cues worth borrowing — they are not default templates, nor styles that must be replicated. Courseware should carry enough content to support learning; do not turn body content into posters or whitespace albums for the sake of a "premium feel."
|
||||
|
||||
## 1. Define the Learning Task First; Do Not Pick a Style First
|
||||
|
||||
Before production, write down the following information; if any of it is missing, fill it in with reasonable assumptions and mark it in the design document.
|
||||
|
||||
- **Learner:** age, level of expertise, prior knowledge, easily confused terms, accessibility needs.
|
||||
- **Usage:** live projection, printed handouts, self-study reading, or mixed use; roughly how long each page stays in view.
|
||||
- **Entry state:** what the learner does not know now, cannot do now, or is prone to getting wrong at which step.
|
||||
- **Exit capability:** after the material, what the learner can explain, differentiate, judge, operate, check, or retell. Goals must be observable.
|
||||
- **Material boundaries:** which parts are external facts, and which are team inferences, fictional exercises, illustrative data, or to-be-filled material.
|
||||
- **Real task:** in what work, classroom, or life scenario the learner will next apply this method.
|
||||
|
||||
Do not first decide "use blue, use rounded corners, use some Sample" and then cram content into the pages. Every visual choice must be explainable as: it helped the learner see which relationship, remember which step, or complete which judgment.
|
||||
|
||||
## 2. General Prohibitions
|
||||
|
||||
The following are red lines running through the entire deck; they take effect before all layout and visual rules, and unless the user explicitly requests otherwise, none may be violated.
|
||||
|
||||
- **No cards by default:** unless the user explicitly requests it, strictly forbid using rounded rectangles or rectangular cards to build hierarchy or alignment. Line segments, whitespace, and font-size/weight differences are better solutions.
|
||||
- **No evenly divided compositions:** unless no other layout is available, do not default to one-third splits, four-way splits, or 2×2 matrices — including formulaic patterns such as "title + three parallel blocks + conclusion."
|
||||
- **No mediocre, common, or AI-typical color schemes:** unless the user explicitly requests them, strictly forbid blue-and-white pairings, blue-purple gradients, cyan-purple neon, rainbow flares, glassmorphism cards, and glowing borders.
|
||||
- **No elements that clash with the overall style:** no styles from outside the chosen style may appear, such as using rounded icons or rounded rectangles within a sharp style.
|
||||
|
||||
## 3. The Teaching Loop: Every Chapter and Every Page Needs a Take-Away Action
|
||||
|
||||
The default learning path is: **orientation → comprehension → demonstration → practice → feedback → transfer**. Not every short material needs a separate page for each stage, but when a stage is missing, you must be able to say that the task itself does not call for it — not that the page ran out of space.
|
||||
|
||||
- **Orientation:** explain why this is worth learning, what the learner can do after completing it, and how it relates to the chapters before and after. Use a real problem or scenario instead of grand slogans.
|
||||
- **Comprehension:** first give one core definition the learner can retell, then the boundaries, composition, counterexamples, or relationships. New terms must not appear only in figure captions.
|
||||
- **Demonstration:** show the process and the intermediate judgments, not just the final answer; put the key forks, the basis for each choice, and the common misconceptions on the same reading path.
|
||||
- **Practice:** specify the input, the actions, and the completion criteria. Practice scenarios may be fictional, but must be labeled "practice scenario / illustrative material."
|
||||
- **Feedback:** explain why an answer is right or wrong, where the error lies, and how to check next time. Answer pages and question pages must be distinguishable at a glance.
|
||||
- **Transfer:** connect to real use with checklists, templates, job-aid cards, or next-step actions; do not substitute a slogan for transfer.
|
||||
|
||||
Each page carries only one primary learning action:
|
||||
|
||||
- Concept pages get the learner to state clearly "what it is and where its boundaries lie."
|
||||
- Method pages get the learner to know "when to use it and how to choose."
|
||||
- Process pages get the learner to know "what to do first, what next, and how to check."
|
||||
- Demonstration / case pages let the learner see the judgment process.
|
||||
- Practice pages get the learner to act or make a choice.
|
||||
- Feedback / review pages correct and distill principles.
|
||||
|
||||
Titles must foretell the page's takeaway. Prefer question sentences, conclusion sentences, or "action + object"; avoid mere section labels like "Background," "Overview," or "Related content." Put all key definitions, steps, and answer criteria into the material — do not rely on the presenter to fill them in live.
|
||||
|
||||
## 4. Default Density for Courseware: Full Content; Whitespace Has a Job
|
||||
|
||||
Courseware is not a poster, nor a full script shrunk down and plastered across pages. The default density is "medium, leaning full": the learner can spot the main object at a glance, and can also find, on the same page, the support needed to understand or act.
|
||||
|
||||
- Body pages usually have at least three layers: learning question / conclusion title → one main exhibit → one layer of explanation, task, check, or source.
|
||||
- As a starting point, about 60% or more of a body page's main content area should be occupied by meaningful text, figures, tables, flows, or exercises; this is a density guardrail, not a hard ratio. Projection pages may reduce text and self-study pages may add explanation, but neither may use emptiness to mask insufficient content.
|
||||
- Whitespace is for grouping, establishing reading order, and highlighting key points — it is not the page's main product. Except for covers, section openers, key manifestos, or closing pages, do not produce consecutive pages of "one sentence + a big blank."
|
||||
- A page may have quiet areas, but only with an explicit reason: a pause, a transition, a memory anchor, or an emotional close. The reason should be writable into the page outline, not explained after the fact.
|
||||
- High-density pages reduce decoration and add grouping and labels; low-density pages add retellable definitions, examples, check questions, or next steps — not random graphics.
|
||||
- One set of courseware may have many page types, but the grid, the title anchor, the type hierarchy, the navigation position, and the color semantics stay stable. A unified system does not mean copying the same template onto every page.
|
||||
|
||||
Let density vary with the learning action:
|
||||
|
||||
| Page type | What it carries | Default density | What must be visible |
|
||||
| --- | --- | --- | --- |
|
||||
| Route / opening | Learning questions, goals, chapter relationships | Low to medium | Where we come from and where we are going |
|
||||
| Core concept | Definitions, boundaries, main relationships | Medium | One definition and one intuitive anchor |
|
||||
| Demonstration / case | Material, process, judgments, conclusion | Medium to high | The difference between evidence and interpretation |
|
||||
| Practice / worksheet | Input, operations, completion criteria | Medium to high | What the learner must do right now |
|
||||
| Feedback / review | Answers, reasons, error correction, principles | Medium | Why this judgment is made |
|
||||
| Transfer / summary | Checklists, templates, resources, next steps | Medium | How to use this after leaving the material |
|
||||
|
||||
## 5. Division of Labor: Text, Graphics, Examples, and Exercises Do Not Impersonate Each Other
|
||||
|
||||
- Text explains meaning, boundaries, conditions, and the basis for judgments.
|
||||
- Graphics reveal real relationships: flows for sequence, trees or nesting for hierarchy, parallel regions for comparison, one-way chains for causality, and cycles only where a genuine loop exists.
|
||||
- Examples lower abstraction, but facts, results, and explanations must be layered; a case's teaching role is labeled first (demonstration, comparison, diagnosis, or transfer).
|
||||
- Exercises test mastery; do not fill pages with irrelevant games.
|
||||
|
||||
One structural diagram expresses one primary relationship. Every connector needs a direction or a meaning; delete decorative arrows, meaningless rings, and nodes that exist only to fill the page. A key model is explained in full at first appearance, then keeps the same name, shape, color, and reading direction.
|
||||
|
||||
External facts, data, quotations, and method sources stay close to their corresponding exhibits, stating at least the source entity and the necessary measurement basis. Illustrative data, team inferences, and fictional material must be explicitly labeled. Without reliable data, use schematic structures or qualitative comparisons — never generate realistic-looking precise values.
|
||||
|
||||
Images are used only when "seeing works better than describing." An image may serve as observational evidence or establish a situation; purely decorative images must not crowd out the main learning object. The content of screenshots, photos, illustrations, and charts must be chosen fresh for each new topic — do not copy an object just because a reference sample used it.
|
||||
|
||||
## 6. Order of Visual Decisions: Samples Are a Reference Library, Not an Answer Key
|
||||
|
||||
Make visual decisions in this order:
|
||||
|
||||
1. Complete the learning objectives, the chapter path, and the page-by-page outline.
|
||||
2. Select each page's main learning object and density tier — do not pick colors or motifs first.
|
||||
3. Based on the topic, audience, scenario, and evidence types, write a one-page visual brief: temperament, grid, type hierarchy, color roles, graphic grammar, image strategy, component boundaries, headers/footers, and density.
|
||||
4. When a reference sample is needed, extract only "explainable design decisions," then translate them into the current topic.
|
||||
5. Form one main system plus several page-type variants; do not stitch together the motifs, fonts, cards, and colors of multiple samples.
|
||||
|
||||
### The Correct Way to Use Reference Samples
|
||||
|
||||
When you receive a Sample, template, or screenshot, first look at the page's actual visual effect (do not just extract the copy), then write a "reference extraction card" recording only:
|
||||
|
||||
- **Borrowable functions:** e.g., a stable grid, role color codes, step navigation, evidence zoning.
|
||||
- **Borrowable tone:** e.g., restrained, friendly, rigorous, live-event feel, or public-communication feel.
|
||||
- **Borrowable graphic grammar:** e.g., parallel modules, time paths, nested hierarchy, or photo frames.
|
||||
- **Objects that cannot be inherited:** the sample's brands, photos, characters, specific copy, proprietary color values, and decorative motifs.
|
||||
- **Applicable page types:** only note whether it suits concepts, cases, exercises, or steps — do not expand it into a whole-deck template.
|
||||
|
||||
One material borrows at most two or three mutually compatible features from a single reference sample; after borrowing, re-name the semantics of colors and components. Without a sample, still build the system yourself from the learning task. Sample 1 enjoys no default priority; it is only one reference direction for editorial-style courseware.
|
||||
|
||||
## 7. Reference Directions (Inspiration Only; New Directions May Be Generated)
|
||||
|
||||
These directions help you understand design choices quickly; they are not fixed palettes, font tables, or page templates. Take only the parts that fit the task.
|
||||
|
||||
### Direction A: Editorial Study Handbook (May Reference Sample 1)
|
||||
|
||||
- **Borrowable:** a clear title–exhibit–explanation hierarchy; a stable reading grid; few and explicit accent colors; cases, methods, and sources placed in their own zones; images separated from text.
|
||||
- **Suits:** concept teaching, methodology, case reading, blended courses, and materials that require self-study.
|
||||
- **No need to copy:** the blue-and-white palette, geometrically cropped images, capsule labels, fixed hairlines, large chapter whitespace, or any specific photo subject.
|
||||
- **Density note:** body pages are mainly medium density; cases and exercises can be fuller; only opening and closing pages drop density noticeably.
|
||||
|
||||
### Direction B: Role / System Infographics
|
||||
|
||||
- **Borrowable:** stable color codes distinguishing roles or modules; nesting, sectors, matrices, or interlocking blocks expressing real relationships; action text kept tight against its owning module.
|
||||
- **Suits:** multi-role collaboration, public education, system composition, division of responsibilities, and action maps.
|
||||
- **No need to copy:** colorful collages, full-page color blocks, flat silhouettes, right-angled modules, or any specific color combinations.
|
||||
- **Density note:** the smaller the module, the shorter its text; relationship-diagram pages keep the necessary gaps; role-action pages may be denser, but meaning must never ride on color alone.
|
||||
|
||||
### Direction C: Steps / Work Records
|
||||
|
||||
- **Borrowable:** a persistently visible progress cue; numbered steps; clear containers for photos, screenshots, or worksheets; layered actions, risks, and check items.
|
||||
- **Suits:** operation guides, compliance, safety, job skills, and on-site training.
|
||||
- **No need to copy:** file folders, paper textures, monospaced labels, fixed bottom stacks, or any skeuomorphic decoration.
|
||||
- **Density note:** each step page answers at least "what to do, why, and how to check"; route and review pages are not emptied for decoration.
|
||||
|
||||
### Direction D: Evidence / Data Editorial (Build Your Own as Needed)
|
||||
|
||||
- **Borrowable:** making charts, tables, or screenshots the main exhibit; the title gives the learning question or conclusion first; side text explains the measurement basis, the observation points, and the next step.
|
||||
- **Suits:** professional popular-science content, results interpretation, before-after comparison, research training, and courses needing evidence support.
|
||||
- **No need to copy:** dashboard black backgrounds, rainbow charts, giant numbers, dense annotations, or industry-specific brand styles.
|
||||
- **Density note:** data pages may be full, but each chart serves only one question; without data, do not force charts just to "look like a report."
|
||||
|
||||
If the topic fits none of these directions, establish a new reference direction and write down "what it helps the learner accomplish" — rather than adding more decorative rules to it.
|
||||
|
||||
## 8. Page Skeletons: Choose the Learning Action First, Then the Layout
|
||||
|
||||
Every page is written as a minimal closed loop of "title + main exhibit + support layer + action / check + source." The following page types are composable — not all must be used.
|
||||
|
||||
- **Learning route:** learning questions, chapter order, and exit capabilities; use short sentences and a path, not a long table of contents.
|
||||
- **Concept page:** one definition + boundaries / composition + one intuitive example or structural diagram.
|
||||
- **Method map:** the overall framework + current step / current module + a cue for what unfolds next.
|
||||
- **Demonstration page:** input material + intermediate judgments + basis for choices + result; put the error-prone forks on the same path.
|
||||
- **Case-evidence page:** a case-role label + factual material + interpretation + transferable judgments + source.
|
||||
- **Comparison / error-prone page:** two approaches or states placed side by side on the same skeleton + judgment criteria + common mistakes.
|
||||
- **Practice page:** task instructions + input / scenario + work area + completion criteria; do not hide the answer on the same page.
|
||||
- **Feedback page:** the reference approach + reasons + error location + how to check next time; make clear that this is the answer or the feedback.
|
||||
- **Transfer page:** checklists, templates, job-aid cards, resources, and next-step actions; avoid merely writing "apply what you learned."
|
||||
|
||||
A presentation version may move extended explanation into speaker notes, but the page must still keep the learning question, the main exhibit, the task / judgment criteria, and the necessary sources. A self-study version writes the definitions and conditions needed for understanding on the page itself.
|
||||
|
||||
## 9. Minimum Constraints for the Visual System
|
||||
|
||||
### Grid and Hierarchy
|
||||
|
||||
- First fix the main content area, the title anchor, the content's left axis, and the page-number / source position; then decide the page variants.
|
||||
- Each page has only one first visual entry: the learning question or principle is seen first, the main exhibit second, the explanation / task / source third.
|
||||
- Titles, body text, figure notes, and sources use the same type family or a clear two-family relationship; the Chinese fallback must genuinely work. Do not force in a font that does not support Chinese just to imitate a sample.
|
||||
- Titles and body text establish hierarchy through size, weight, and position. Projection materials prioritize body-text readability; self-study materials may add explanation, but body text is never pressed down to footnote size.
|
||||
- Ordinary body text reaches at least 4.5:1 contrast against the background; when contrast is insufficient, change the text color or background directly — do not patch it with shadows and strokes.
|
||||
|
||||
### Color
|
||||
|
||||
- Without brand guidelines, first choose a neutral background, one structural color, and one necessary semantic accent: few and stable colors are easier to learn from than many and lively ones.
|
||||
- Every color carries a fixed meaning (chapter, role, state, focus, or link) and must not decorate randomly; always also encode with text, shape, position, or icons alongside color.
|
||||
- A page is usually governed by a neutral background + one main structural color; add a second color family only when a genuine role / category mapping exists.
|
||||
- Body text on dark grounds uses high-contrast light colors; body text on light grounds uses near-black. Small type never sits on high-saturation colors.
|
||||
|
||||
**Starting point when there is no sample (not a fixed style):** adopt a near-white or light-gray background, near-black body text, one structural accent color, and one low-frequency semantic color; build the title-and-body hierarchy with a neutral sans-serif; pair a fixed title left axis with a "main exhibit + explanation / task" layout; keep body pages medium-leaning-full, with only covers, section openers, and closing pages noticeably dropping density. Then adjust by topic, audience, and material evidence — do not treat this starting set as a new template.
|
||||
|
||||
### Cards, Components, and Graphics
|
||||
|
||||
- Cards are used only for grouping, carrying states, or forming operable regions; continuously stacking cards is not a default layout.
|
||||
- Rounding, right angles, strokes, shadows, and capsules are all component grammar — once decided, stay consistent throughout; do not take one from each different Sample.
|
||||
- Shadows, textures, gradients, and decorative icons are used only when they serve a hierarchical or situational function. Anything whose removal does not hurt understanding should be removed.
|
||||
- Default Office charts, SmartArt, rainbow palettes, thick black table frames, and untuned bullet lists must be redone.
|
||||
|
||||
### Images and Charts
|
||||
|
||||
- Every image must state "what to see and why it needs to be seen"; evidence images, operation screenshots, and situational images are each labeled with their purpose.
|
||||
- Charts carry "see the relationship," side text carries "how to interpret and what to do next"; do not repeat the chart's labels verbatim.
|
||||
- Charts keep the necessary units, time range, legend, key labels, measurement basis, and source; delete non-essential gridlines, frames, and decoration.
|
||||
- Tables use clear headers, horizontal separators, correct alignment, and the necessary focus rows; do not use full rows of high-saturation color or color alone to express states.
|
||||
|
||||
## 10. Model Execution Protocol
|
||||
|
||||
### 1. Content First
|
||||
|
||||
First write the learner, entry state, exit capability, usage, evidence boundaries, and practice tasks; then write the chapter path. Record at least, for every page:
|
||||
|
||||
> Chapter / page type / learning action / title / main exhibit / explanation or task / feedback or check / source / density tier
|
||||
|
||||
Check whether every chapter has comprehension, demonstration, application, feedback, and transfer; if not, first add the content or note why it does not apply.
|
||||
|
||||
### 2. Reference-Sample Extraction
|
||||
|
||||
If there is a Sample, template, or screenshot, finish the reference extraction card before writing the visual brief. The card must not directly copy the object layer (brands, photos, copy, proprietary color values, proprietary motifs); keep only the transferable structure, tone, and graphic relationships. Samples 1, 2, and 3 are all merely candidate references and must not become implicit defaults.
|
||||
|
||||
### 3. Visual Brief
|
||||
|
||||
The visual brief states at least:
|
||||
|
||||
- the audience and usage environment;
|
||||
- the topic's temperament and density targets;
|
||||
- one main grid and two to six page types;
|
||||
- the hierarchy of title / body / source;
|
||||
- the semantic division of colors and the contrast plan;
|
||||
- the graphic grammars for flows, hierarchy, comparison, and evidence respectively;
|
||||
- the usage boundaries for images, screenshots, and illustrations;
|
||||
- the fixed positions of header, footer, page number, source, and navigation;
|
||||
- which elements appear only on covers, section pages, or closing pages.
|
||||
|
||||
### 4. Page-by-Page Generation
|
||||
|
||||
- Write titles that foretell the learning takeaway.
|
||||
- Choose the single main learning object.
|
||||
- Complete the definitions, boundaries, labels, tasks, check criteria, and sources.
|
||||
- Apply the grid, hierarchy, and components per the visual brief — do not copy a Sample page by page.
|
||||
- Delete graphics, images, quotes, and repeated text that serve no teaching function.
|
||||
- Check content and overflow first, then make visual fine-tuning; do not mask excessive content by shrinking font size.
|
||||
|
||||
### 5. Pre-Delivery Validation
|
||||
|
||||
Use the existing PPTD / PPTX validation and screenshot workflow to check overflow, overlap, truncation, garbled text, low contrast, missing page numbers, and missing sources. Review key pages individually at minimum; do not declare completion from thumbnails alone.
|
||||
|
||||
## 11. Delivery Acceptance and Reverse Checks
|
||||
|
||||
### Content and Teaching
|
||||
|
||||
- Reading only the titles, can you state the complete learning path — not a string of section names?
|
||||
- With the title covered, can the main exhibit still say what it teaches and what to do?
|
||||
- Does each page carry only one main learning action, and does the explanation truly lead to action?
|
||||
- Do exercises specify input, actions, and completion criteria? Does feedback explain the reasons and the error-correction method?
|
||||
- Are facts, illustrative material, inferences, and fictional material clearly distinguished? Does external evidence have sources and measurement basis?
|
||||
- Do the same concepts, roles, steps, and states keep the same name, color, and shape throughout?
|
||||
|
||||
### Density and Visuals
|
||||
|
||||
- Do body pages have enough content to support learning, rather than big titles plus blanks? Do consecutive sparse pages have an explicit teaching reason?
|
||||
- Does each page have one visual entry and one quiet area; are the title, charts, cards, and big images all competing for first attention at the same time?
|
||||
- With color removed, are steps, roles, states, and categories still legible?
|
||||
- With the reference sample's photos, color values, and motifs removed, is the courseware still a self-consistent system?
|
||||
- Is there only one main visual grammar, while different learning actions may use different page types?
|
||||
- Are images sharp, relevant, unstretched, with no text pressed over complex areas?
|
||||
- Do charts, tables, and structural diagrams express real relationships, rather than filling the page?
|
||||
|
||||
### The Final Cut
|
||||
|
||||
Ask item by item: "If I delete this, what does the learner lose?" If the answer is only "the page will look emptier," delete it. What truly needs filling is not decoration, but definitions, examples, judgment criteria, exercises, feedback, or transfer actions.
|
||||
@@ -34,7 +34,6 @@ lark-cli drive +task_result --scenario import --ticket <TICKET>
|
||||
理解页面后,直接在导入后的 Slides 上编辑。允许的操作包括:
|
||||
|
||||
- 填写、替换、凝练或删除文字。
|
||||
- 替换或补充图片。
|
||||
- 更新图表、表格、数字标签或节点标签里的内容。
|
||||
- 按需复制、删除或重排模板页。
|
||||
- 在源页面没有合适承载位置时,做局部、小范围新增元素。
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
```bash
|
||||
lark-cli slides +screenshot --as user \
|
||||
--presentation '<xml_presentation_id 或 slides/wiki URL>' \
|
||||
--slide-number 1
|
||||
--slide-id 'SLIDE_ID'
|
||||
```
|
||||
|
||||
渲染本地 XML 内容:
|
||||
@@ -25,12 +25,12 @@ lark-cli slides +screenshot --as user \
|
||||
|
||||
| 参数 | 必需 | 说明 |
|
||||
|------|------|------|
|
||||
| `--presentation` | list 模式必需 | `xml_presentation_id`、`/slides/` URL,或解析后为 slides 的 `/wiki/` URL。传 `--content` 时不能使用 |
|
||||
| `--slide-id` | list 模式至少提供 `--slide-id` / `--slide-number` 之一 | 页面 short ID;多页截图时重复传入;一次最多 10 页(`--slide-id` + `--slide-number` 合计小于等于 10) |
|
||||
| `--slide-number` | list 模式至少提供 `--slide-id` / `--slide-number` 之一 | 页面页号;多页截图时重复传入;一次最多 10 页(`--slide-id` + `--slide-number` 合计小于等于 10) |
|
||||
| `--presentation` | list 模式必需 | `xml_presentation_id`、`/slides/` URL,或解析后为 slides 的 `/wiki/` URL;只标识演示文稿,不会默认截图全部页面。传 `--content` 时不能使用 |
|
||||
| `--slide-id` | list 模式标准入参 | 页面 short ID;截图、修复和 review 状态均以它关联;多页截图时重复传入;一次最多 10 页。先从创建响应或 `slides +xml-get` 取得当前 `slide_ids` |
|
||||
| `--slide-number` | 用户只提供“第 N 页”或旧 deck 暂未取得 `slide_id` 时使用;成功定位后必须取得对应 `slide_id`,后续不再用页号关联截图或 review 状态。不能省略 `--slide-id` 和 `--slide-number` 两者 |
|
||||
| `--content` | render 模式必需 | 要直接渲染的 `<slide>` XML 片段;支持直接传值、`@file`、`-` stdin。传入后不能同时传 `--slide-id` / `--slide-number` |
|
||||
| `--output-dir` | 否 | 输出目录,默认 `.lark-slides/screenshots`;必须是当前目录内的相对路径 |
|
||||
| `--output-name` | 否 | render 模式的输出文件名 stem;未指定时优先用返回的 `slide_id`,否则用 `rendered-slide`。若目标文件已存在,会自动追加递增后缀避免覆盖 |
|
||||
| `--output-dir` | 否 | 输出目录,默认 `.lark-slides/screenshots`;必须是当前目录内的相对路径。截图可能返回多张图片,使用目录而不是 `--output` 文件路径 |
|
||||
| `--output-name` | 否 | 仅 render 模式(`--content`)的输出文件名 stem;未指定时优先用返回的 `slide_id`,否则用 `rendered-slide`。若目标文件已存在,会自动追加递增后缀避免覆盖 |
|
||||
|
||||
## 示例
|
||||
|
||||
@@ -39,21 +39,25 @@ lark-cli slides +screenshot --as user \
|
||||
```bash
|
||||
lark-cli slides +screenshot --as user \
|
||||
--presentation slides_example_presentation_id \
|
||||
--slide-number 1
|
||||
--slide-id 'SLIDE_ID'
|
||||
```
|
||||
|
||||
### 多页截图
|
||||
### 按 `slide_id` 截图与创建后视觉 review(推荐)
|
||||
|
||||
一次不要超过 10 页;如需更多页面,分批调用。
|
||||
视觉 review 以当前回读得到的 `slide_ids` 为页清单。单页传一个 `--slide-id`;多页可重复传入,单次最多 10 页,超过时按批次串行执行。
|
||||
|
||||
首次新建且之后没有增删页、整页替换或重排时,可复用创建响应中的 `slide_ids`。发生上述页面集合变化后,必须先回读并刷新清单;不能用页码或旧响应中的页列表绑定 review 状态。
|
||||
|
||||
```bash
|
||||
lark-cli slides +screenshot --as user \
|
||||
--presentation slides_example_presentation_id \
|
||||
--slide-number 1 \
|
||||
--slide-number 2 \
|
||||
--output-dir .lark-slides/screenshots/demo
|
||||
--presentation 'YOUR_PRESENTATION_ID' \
|
||||
--slide-id 'SLIDE_ID_1' \
|
||||
--slide-id 'SLIDE_ID_2' \
|
||||
--output-dir .lark-slides/review/<deck-or-task-id>/screenshots
|
||||
```
|
||||
|
||||
随后必须用具备图像查看能力的工具打开每个返回的 `path`,逐页记录 `pass/fix`。截图落盘、批量请求成功或只查看关键页,都不等于已完成视觉 review。
|
||||
|
||||
### 渲染 XML 预览
|
||||
|
||||
```bash
|
||||
@@ -89,9 +93,10 @@ lark-cli slides +screenshot --as user \
|
||||
## 注意事项
|
||||
|
||||
1. 优先使用 `slides +screenshot` 保存本地图片,不要把图片 Base64 打到 stdout。
|
||||
2. 已存在 PPT 页面截图时,不传 `--content`,用 `--presentation` + `--slide-id` 或 `--slide-number`。
|
||||
2. 已存在 PPT 页面截图时,不传 `--content`,用 `--presentation` + `--slide-id`。
|
||||
3. 本地 XML 预览时,传 `--content @file` 或 `--content -`,内容应为单个 `<slide>` XML 片段;此时不要传 `--presentation` / `--slide-id` / `--slide-number`。
|
||||
4. `slide_id` 是页面 short ID,页码请用 `--slide-number`。
|
||||
5. list 模式一次最多传 10 页(`--slide-id` + `--slide-number` 合计小于等于 10);更多页面请分批截图。
|
||||
4. `slide_id` 是页面 short ID,也是截图、修复和 review 状态的唯一关联键;页码仅作为用户可读的瞬时展示信息。
|
||||
5. list 模式一次最多传 10 个 `--slide-id`;更多页面请分批截图,每页仍要独立记录 review 结论。
|
||||
6. list 模式默认文件名包含 presentation ID、页码和/或 slide ID;文件已存在时自动追加 `_2`、`_3` 等后缀,避免覆盖旧截图。
|
||||
7. 截图来自服务端渲染结果,适合创建/替换后验证页面是否为空白、破图或布局明显异常。
|
||||
7. 截图来自服务端渲染结果,适合创建/替换后验证页面是否为空白、破图或布局明显异常;与 `validation-checklist.md` 的逐页 rubric 一起使用。
|
||||
8. 如果因用户只给页号而使用 `--slide-number`,截图后立即回读或从响应取得 `slide_id`,后续改用 `--slide-id`;如果收到频率限制,停止扩大发送并在短暂退避后逐批重试。截图 API 白名单失败时记录原始错误,继续完成 XML 静态检查,并把视觉状态标为 `not_verified`。
|
||||
|
||||
37
skills/lark-slides/references/management-report.md
Normal file
37
skills/lark-slides/references/management-report.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Management Reporting
|
||||
|
||||
## Clear and direct content; no empty talk
|
||||
|
||||
- A manager who flips through the whole deck reading only the page titles should grasp how the period went, why, and what is being asked — the title itself states a status or conclusion, such as "Q2 revenue reached 92% of target; the shortfall comes from North-region renewals," rather than a section label like "Business Performance Report."
|
||||
- Open the first page and know how the period went overall: besides the title, the cover presents the single most critical status line of the whole deck — fulfillment rate of core metrics, a red/green/yellow traffic-light overview, or the biggest gap.
|
||||
- Information is truthful and never fabricated: user-provided numbers and facts are neither exaggerated nor selectively clipped; any baseline that exists in the material travels alongside the results, and anything not in the material is not invented on the user's behalf; use numbers, charts, and tables flexibly to present key information.
|
||||
- Professional wording that fits the user's identity: no layman's language, and no one-size-fits-all generic business-speak.
|
||||
|
||||
## Visualize information with structural diagrams
|
||||
|
||||
**Progress, data, responsibilities, risks, and dependencies are the core relationships of a management report — extract the various relationships from the content and express them with structural diagrams and frameworks.**
|
||||
|
||||
## Key Requirements
|
||||
1. Create a top-tier visual experience: treat every detail of typesetting, fonts, and colors with care, crafting it like a work of art.
|
||||
2. Unless the user explicitly requests it, **strictly forbid using rounded rectangles or rectangular cards** to build hierarchy or alignment: line segments, whitespace, and font/size differences are better solutions.
|
||||
3. Unless no other layout is available, forbid evenly divided compositions; do not default to one-third splits, four-way splits, or 2×2 matrices — including three-part formulas such as "three columns + title + conclusion."
|
||||
|
||||
## Visual References
|
||||
|
||||
1. Fonts split into families: display type and body type have a clear division of labor (different weights of the same sans-serif family, or sans-serif titles paired with another family for body text); hierarchy is built on font-size and weight ratios; functional text such as numbering, labels, and footnotes is uniformly set small in caps / with added letter spacing; font sizes flex with content volume while the hierarchy ratios stay unchanged.
|
||||
2. Fonts and the color scheme must be matched and harmonious; reference each other when designing.
|
||||
3. Information-position discipline: conclusion/title → fixed title position; evidence (charts, numbered cards, photos) → a fixed area in the right column or lower half; measurement basis, sources, footnotes → small type in a fixed corner.
|
||||
4. De-default charts: remove axes, grids, legend boxes, and default colors; reassign all series colors to same-family shades; bars are flat and rounded, with no stroke and no shadow; data labels keep only key points or move to the text column; key metrics are marked directly with big-number callouts; charts and interpretive text are strictly zoned — no overprinting, no interleaving.
|
||||
5. Encourage using rich SmartArt to improve information efficiency and convey professionalism.
|
||||
6. Unified corner radius and texture: all rectangular components (cards, panels, photos, bar tops) share one corner-radius scale with no mixing throughout the deck; flat, no drop shadows, no 3D, no gradient text; atmospheric layers such as grain or light flares, if used, stay low-intensity, fixed in position, and beneath the content.
|
||||
7. Motifs run through the whole deck: establish 1–2 visual motifs (numbered badges, connecting dashed lines, decorative shapes, etc.) and reuse their variants across page types; when a page lacks a visual anchor, reuse a motif first instead of introducing new elements.
|
||||
|
||||
### Color Palette Reference
|
||||
|
||||
**Colors expected in spirit, unexpected in choice**:
|
||||
- Reject the most common, most mediocre formulaic palettes of each scenario (Office default blue, tech blue-purple gradients, promotion-season red-and-gold, gray-blue template colors, etc.); suggested palettes for some scenarios:
|
||||
* Operations/finance/board reporting: off-white #F7F3E8 base + ink green #123B2F + brass #B08D3E; or light stone #E7E2D8 base + deep navy #16283C + copper orange #C0652B; or ink black #1A1A2E base + brass #B08D3E + off-white #F7F3E8.
|
||||
* Business operations review (retail/manufacturing/consumer/supply chain): warm white #F8F5EF base + wine red #5E1F2D + beige gold #D8C3A5; or off-white #F6EFE2 base + ink green #1E3B33 + terracotta #C15F3C; or light steel #C3CCD4 base + deep blue-gray #1F3240 + signal yellow #F0A202.
|
||||
* Internet/tech/growth monthly reports: cool white #F4F7F6 base + graphite gray #2B2D42 + pine green #4C7A5A; or mist white #EDF1F7 base + deep indigo #1C2B5A + sky azure #4E9FE6; or ink black #101418 base + celadon green #3FA68C + cool white #F4F7F6.
|
||||
* HR/administration/government-affairs reporting: warm white #FAF6EE base + ink purple #3D2C4F + cream yellow #F2C14E; or paper white #F7F3E8 base + pine green #2F5233 + apricot yellow #E8B54A; or off-white #F6F4EF base + deep navy #1B2A4A + silver gray #AEB4BC.
|
||||
- Align background colors toward something more stable and restrained, e.g.: warm white #F7F3E8, light stone #ECEAE4, mist gray #E9E7E2; section/accent pages may use deep ink blue #16283C or ink black #1A1A2E.
|
||||
@@ -162,6 +162,7 @@ Use one of these `layout_type` values unless the user explicitly needs a custom
|
||||
- `comparison`
|
||||
- `architecture-diagram`
|
||||
- `process-flow`
|
||||
- `relationship-network`
|
||||
- `quote-highlight`
|
||||
- `conclusion`
|
||||
|
||||
|
||||
36
skills/lark-slides/references/slides_categories.md
Normal file
36
skills/lark-slides/references/slides_categories.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# PPT category guide
|
||||
|
||||
1. **Follow the general rules**: the general rules apply to all scenarios and all pages, and take effect together with the style guidance documents
|
||||
2. **Determine the scenario**: choose the matching scenario based on the user's input
|
||||
3. **Read the scenario document**: read the document for that scenario and design according to its expressive focus and approach
|
||||
|
||||
## step1. General rules
|
||||
|
||||
### Requirements
|
||||
1. **Every page has a clear reader task**: what this page should make the reader understand, believe, decide, or do — think this through before designing.
|
||||
2. **Paging has rhythm**: decide for yourself whether a table of contents or section dividers are needed; the reader should feel a change of rhythm as they flip through — some pages are taken in at a glance, others are worth stopping to read carefully.
|
||||
3. **Use charts and shape combinations flexibly**: if a body of information can be expressed through a complex chart that goes beyond what the current chart syntax can express, you are encouraged to flexibly use shapes and other means to construct the expression.
|
||||
4. **Master-level output**: every PPT is a carefully crafted work of art that could be entered into a competition; pay close attention to every detail of layout, typography, and color — details determine success or failure.
|
||||
5. **Use image search/generation sensibly**: use image search/generation tools to obtain images and place them in suitable positions. But image abuse is strictly forbidden. If the user's uploaded files contain useful images, use them on suitable pages.
|
||||
6. **Defer to the user and the subject**: user-specified templates, brand guidelines, color schemes, fonts, and style references take priority over this guide.
|
||||
7. **Source attribution**: pages involving external facts and data must state the source, date or time period, and measurement basis. Source text should use an <a href="url"> hyperlink pointing to the original report or data page. When citing specific sources in footnotes, likewise use <a href="url"> hyperlinks to the original source to strengthen professional credibility.
|
||||
|
||||
### Strictly forbidden
|
||||
- **Evidence boundaries**: do not fabricate data, citations, customer cases, experimental results, or sources; when material is missing, clearly mark it as a placeholder, an assumption, or to-be-supplied information.
|
||||
- **Classic AI patterns**: it is strictly forbidden to use cards to build hierarchy or alignment (rounded rectangles, rectangular cards, cards with a colored side strip): lines, whitespace, and font-size contrast are better solutions; it is strictly forbidden to use the AI color scheme where red, purple, yellow, and green are all gathered on one page;
|
||||
|
||||
## step2. Scenario determination
|
||||
Based on the user's input, analyze the presentation's audience and reader tasks, determine the scenario it belongs to, and read the corresponding style document.
|
||||
> Choose one primary scenario. When truly necessary, you may add one auxiliary scenario, but the primary scenario must prevail.
|
||||
|
||||
| Scenario type | Typical queries | Reader task | Style document |
|
||||
|---|---|---|---|
|
||||
| Analysis & decision | Consulting, finance, industry research, strategy, market opportunities, business analysis, investment analysis | Compare options, form judgments, support decisions | `analysis-decision.md` |
|
||||
| Business proposal | Marketing plans, sales proposals, fundraising pitches, partnership/investment promotion, product proposals, business plans | Understand the value, believe in the plan, take action | `business-plan.md` |
|
||||
| Management reporting | Work reports, project retrospectives, quarterly summaries, OKR, management briefings | Grasp the current state, surface problems, confirm actions | `management-report.md` |
|
||||
| Academic research | Graduate research projects, thesis defenses, research projects, proposal reports, mid-term reports, final/concluding reports | Evaluate the problem, method, evidence, and contribution | `academic-research.md` |
|
||||
| Education & training / knowledge popularization | K-12 courseware, teaching demonstrations, vocational training, patient education, professional popular science | Understand, remember, apply, or act correctly | `education-training.md` |
|
||||
| Tech & engineering | Engineering plans, architecture reviews, R&D reports, AI / data / ops / security | See the structure, dependencies, metrics, and trade-offs clearly | `tech-engineering.md` |
|
||||
| Brand / creative showcase | Brand stories, design proposals, portfolios, cultural events | Build perception, leave a memory, form identification | `brand-creative.md` |
|
||||
|
||||
**Fallback**: if the presentation does not clearly fit any scenario above, do not force the nearest one — fall back to the default design system [`doubao-design.md`](doubao-design.md) (extremely high-density image-and-text card layout).
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<presentation xmlns="/sml/2.0" width="960" height="540">
|
||||
<presentation xmlns="http://www.larkoffice.com/sml/2.0" width="960" height="540">
|
||||
<title>原生图表 Chart Demo</title>
|
||||
<theme>
|
||||
<textStyles>
|
||||
@@ -20,27 +20,27 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>柱状图 · Column Chart</p>
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>极简图表 · Minimal</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<p>季度出货量对比 · GROUPED / STACKED / 100% STACKED</p>
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>可按需省略图例 / 标题 / 数据标签 · NO LEGEND / NO TITLE / NO LABELS</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 01 / COLUMN</p>
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 01 / MINIMAL</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="290" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
@@ -48,16 +48,209 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 柱状图 · 无图例无标题</p>
|
||||
</content>
|
||||
</shape>
|
||||
<chart width="270" height="350" topLeftX="42" topLeftY="132">
|
||||
<chartPlotArea>
|
||||
<chartPlot type="column">
|
||||
<chartExtra/>
|
||||
</chartPlot>
|
||||
<chartAxes>
|
||||
<chartAxis type="x">
|
||||
<chartLabel fontSize="9"/>
|
||||
</chartAxis>
|
||||
<chartAxis type="y" position="left">
|
||||
<chartGridLine color="rgb(226, 232, 240)"/>
|
||||
<chartLabel fontSize="9"/>
|
||||
</chartAxis>
|
||||
</chartAxes>
|
||||
</chartPlotArea>
|
||||
<chartData>
|
||||
<dim1>
|
||||
<chartField name="季度">Q1,Q2,Q3,Q4</chartField>
|
||||
</dim1>
|
||||
<dim2>
|
||||
<chartField name="营收">52,48,55,68</chartField>
|
||||
</dim2>
|
||||
</chartData>
|
||||
<chartStyle>
|
||||
<chartBackground color="rgba(0, 0, 0, 0)"/>
|
||||
<chartBorder color="rgb(222, 224, 227)" width="0"/>
|
||||
<chartColorTheme>
|
||||
<color value="rgb(28, 71, 120)"/>
|
||||
</chartColorTheme>
|
||||
</chartStyle>
|
||||
</chart>
|
||||
<shape width="290" height="400" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 折线图 · 无图例无标题</p>
|
||||
</content>
|
||||
</shape>
|
||||
<chart width="270" height="350" topLeftX="345" topLeftY="132">
|
||||
<chartPlotArea>
|
||||
<chartPlot type="line">
|
||||
<chartExtra/>
|
||||
</chartPlot>
|
||||
<chartAxes>
|
||||
<chartAxis type="x">
|
||||
<chartLabel fontSize="9"/>
|
||||
</chartAxis>
|
||||
<chartAxis type="y" position="left">
|
||||
<chartGridLine color="rgb(226, 232, 240)"/>
|
||||
<chartLabel fontSize="9"/>
|
||||
</chartAxis>
|
||||
</chartAxes>
|
||||
</chartPlotArea>
|
||||
<chartData>
|
||||
<dim1>
|
||||
<chartField name="月份">1月,2月,3月,4月,5月</chartField>
|
||||
</dim1>
|
||||
<dim2>
|
||||
<chartField name="活跃用户">30,42,39,55,60</chartField>
|
||||
</dim2>
|
||||
</chartData>
|
||||
<chartStyle>
|
||||
<chartBackground color="rgba(0, 0, 0, 0)"/>
|
||||
<chartBorder color="rgb(222, 224, 227)" width="0"/>
|
||||
<chartColorTheme>
|
||||
<color value="rgb(28, 71, 120)"/>
|
||||
</chartColorTheme>
|
||||
</chartStyle>
|
||||
</chart>
|
||||
<shape width="290" height="400" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 饼图 · 标签在饼上无图例</p>
|
||||
</content>
|
||||
</shape>
|
||||
<chart width="270" height="350" topLeftX="648" topLeftY="132">
|
||||
<chartPlotArea>
|
||||
<chartPlot type="pie" yAxisPosition="right">
|
||||
<chartExtra/>
|
||||
<chartLabels position="inside" category="true" value="false" percentage="true" fontSize="10"/>
|
||||
</chartPlot>
|
||||
</chartPlotArea>
|
||||
<chartData>
|
||||
<dim1>
|
||||
<chartField name="渠道">直营,分销,线上</chartField>
|
||||
</dim1>
|
||||
<dim2>
|
||||
<chartField name="占比">45,30,25</chartField>
|
||||
</dim2>
|
||||
</chartData>
|
||||
<chartStyle>
|
||||
<chartBackground color="rgba(0, 0, 0, 0)"/>
|
||||
<chartBorder color="rgb(222, 224, 227)" width="0"/>
|
||||
<chartColorTheme>
|
||||
<color value="rgb(28, 71, 120)"/>
|
||||
<color value="rgb(240, 129, 54)"/>
|
||||
<color value="rgb(56, 142, 60)"/>
|
||||
</chartColorTheme>
|
||||
</chartStyle>
|
||||
</chart>
|
||||
<line startX="32" startY="506" endX="928.0005580355405" endY="506">
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>01 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
<note>
|
||||
<content/>
|
||||
</note>
|
||||
</slide>
|
||||
<slide>
|
||||
<style>
|
||||
<fill>
|
||||
<fillColor color="rgba(248, 249, 251, 1)"/>
|
||||
</fill>
|
||||
</style>
|
||||
<data>
|
||||
<shape width="960" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>柱状图 · Column Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>季度出货量对比 · GROUPED / STACKED / 100% STACKED</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 02 / COLUMN</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="290" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 分组柱状图 · Grouped</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -101,16 +294,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 堆叠柱状图 · Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -156,16 +349,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 百分比堆叠 · 100% Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -219,13 +412,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>03 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>02 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -244,27 +437,27 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>折线图 · Line Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>用户规模趋势 · STRAIGHT / SMOOTH / STEP</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 02 / LINE</p>
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 03 / LINE</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="290" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
@@ -272,16 +465,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 直线折线图 · Straight</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -325,16 +518,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 平滑折线图 · Smooth</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -380,16 +573,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 阶梯折线图 · Step</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -434,13 +627,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>04 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>03 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -459,27 +652,27 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>饼图 · Pie Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>市场份额结构 · PIE / DONUT</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 03 / PIE</p>
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 04 / PIE</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="440" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
@@ -487,16 +680,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="440" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="420" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 饼图 · Pie</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -504,7 +697,7 @@
|
||||
<chartPlotArea>
|
||||
<chartPlot type="pie" yAxisPosition="right">
|
||||
<chartExtra/>
|
||||
<chartLabels position="outside" value="false" percentage="true" fontSize="10"/>
|
||||
<chartLabels position="inside" value="false" percentage="true" fontSize="10"/>
|
||||
</chartPlot>
|
||||
</chartPlotArea>
|
||||
<chartLegend position="right" fontSize="10"/>
|
||||
@@ -534,16 +727,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="440" height="32" topLeftX="488" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="420" height="22" topLeftX="500" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 环形图 · Donut</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -551,7 +744,7 @@
|
||||
<chartPlotArea>
|
||||
<chartPlot type="pie" yAxisPosition="right">
|
||||
<chartExtra/>
|
||||
<chartLabels position="outside" category="true" value="false" percentage="true" fontSize="10"/>
|
||||
<chartLabels position="inside" category="true" value="false" percentage="true" fontSize="10"/>
|
||||
<chartSeriesList>
|
||||
<chartSeries index="1">
|
||||
<chartSectors innerRadius="0.55" offsetRadius="0" startAngle="0"/>
|
||||
@@ -583,13 +776,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>05 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>04 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -608,27 +801,27 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>条形图 · Bar Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>横向排名对比 · GROUPED / STACKED / 100% STACKED</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 04 / BAR</p>
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 05 / BAR</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="290" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
@@ -636,16 +829,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 分组条形图 · Grouped</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -689,16 +882,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 堆叠条形图 · Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -744,16 +937,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 百分比堆叠 · 100% Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -807,13 +1000,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>06 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>05 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -832,27 +1025,27 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>面积图 · Area Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>体量与结构演进 · OVERLAY / STACKED / 100% STACKED</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 05 / AREA</p>
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 06 / AREA</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="290" height="400" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
@@ -860,16 +1053,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 重叠面积图 · Overlay</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -913,16 +1106,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 堆叠面积图 · Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -968,16 +1161,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 百分比堆叠 · 100% Stacked</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1023,13 +1216,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>07 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>06 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -1048,26 +1241,26 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>组合图 · Combo Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>营收规模 & 增长率双轴视图 · COLUMN + LINE</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 07 / COMBO</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1076,16 +1269,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="576" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="560" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>八季度营收与同比增速</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1137,26 +1330,26 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="304" height="4" topLeftX="624" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="264" height="26" topLeftX="644" topLeftY="118" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(240, 129, 54, 1)" bold="true">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(240, 129, 54, 1)" bold="true">
|
||||
<p>KEY TAKEAWAY</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="264" height="90" topLeftX="644" topLeftY="146" type="text">
|
||||
<content textType="headline" fontSize="18" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="18" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>营收连续 6 季度双位数增长</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="264" height="80" topLeftX="644" topLeftY="248" type="text">
|
||||
<content fontSize="13" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)">
|
||||
<content fontSize="13" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)">
|
||||
<p>24Q4 - 25Q4 期间同比增速稳定在 18-23%,营收规模从 245 亿扩张至 296 亿美元。</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1164,12 +1357,12 @@
|
||||
<border color="rgba(240, 129, 54, 1)"/>
|
||||
</line>
|
||||
<shape width="264" height="26" topLeftX="644" topLeftY="360" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(240, 129, 54, 1)" bold="true">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(240, 129, 54, 1)" bold="true">
|
||||
<p>WHAT TO WATCH</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="264" height="90" topLeftX="644" topLeftY="386" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)">
|
||||
<p>· 25Q4 增速首次微降 2pp</p>
|
||||
<p>· 高基数效应即将显现</p>
|
||||
<p>· 需关注亚太区库存周期</p>
|
||||
@@ -1179,13 +1372,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>09 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>07 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
@@ -1204,26 +1397,26 @@
|
||||
<fill>
|
||||
<fillColor color="rgba(15, 30, 58, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="8" height="72" topLeftX="0" topLeftY="0" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 129, 54, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="700" height="30" topLeftX="32" topLeftY="14" type="text">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源黑体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<content textType="headline" fontSize="22" fontFamily="思源宋体" color="rgba(255, 255, 255, 1)" bold="true">
|
||||
<p>雷达图 · Radar Chart</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="700" height="20" topLeftX="32" topLeftY="46" type="text">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源黑体" color="rgba(180, 192, 210, 1)">
|
||||
<content textType="caption" fontSize="12" fontFamily="思源宋体" color="rgba(180, 192, 210, 1)">
|
||||
<p>产品能力多维对比 · POLYGON / CIRCLE / OUTLINE</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="160" height="22" topLeftX="770" topLeftY="26" type="text">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源黑体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<content textType="caption" fontSize="11" fontFamily="思源宋体" color="rgba(220, 228, 240, 1)" textAlign="right">
|
||||
<p>SECTION 08 / RADAR</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1232,16 +1425,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="32" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="44" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>① 多边形雷达 · Polygon</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1288,16 +1481,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="335" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="347" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>② 圆形雷达 · Circle</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1345,16 +1538,16 @@
|
||||
<fillColor color="rgba(255, 255, 255, 1)"/>
|
||||
</fill>
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="290" height="32" topLeftX="638" topLeftY="92" presetHandlers="0" type="rect">
|
||||
<fill>
|
||||
<fillColor color="rgba(240, 244, 249, 1)"/>
|
||||
</fill>
|
||||
<content fontSize="16" fontFamily="思源黑体" color="rgba(31, 35, 41, 1)"/>
|
||||
<content fontSize="16" fontFamily="思源宋体" color="rgba(31, 35, 41, 1)"/>
|
||||
</shape>
|
||||
<shape width="270" height="22" topLeftX="650" topLeftY="98" type="text">
|
||||
<content fontSize="12" fontFamily="思源黑体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<content fontSize="12" fontFamily="思源宋体" color="rgba(15, 30, 58, 1)" bold="true">
|
||||
<p>③ 无填充雷达 · Outline</p>
|
||||
</content>
|
||||
</shape>
|
||||
@@ -1399,13 +1592,13 @@
|
||||
<border color="rgba(226, 232, 240, 1)" width="1"/>
|
||||
</line>
|
||||
<shape width="500" height="18" topLeftX="32" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)">
|
||||
<p>Source: Consulting Insights Research · 数据仅用于示意</p>
|
||||
</content>
|
||||
</shape>
|
||||
<shape width="128" height="18" topLeftX="800" topLeftY="512" type="text">
|
||||
<content textType="caption" fontSize="10" fontFamily="思源黑体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>10 / 12</p>
|
||||
<content textType="caption" fontSize="10" fontFamily="思源宋体" color="rgba(148, 163, 184, 1)" textAlign="right">
|
||||
<p>08 / 08</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
|
||||
204
skills/lark-slides/references/tech-engineering.md
Normal file
204
skills/lark-slides/references/tech-engineering.md
Normal file
@@ -0,0 +1,204 @@
|
||||
# Tech & Engineering
|
||||
|
||||
Scope: sharing and presenting technical solutions, system architecture reviews, AI / data platform proposals, security design reviews, production incident retrospectives, technology selection, testing and validation, API / SDK documentation, and product technical training, among others.
|
||||
|
||||
Readers may be fellow engineers, but they may also be product partners or customers. The goal is for readers to understand how the system works, judge whether the solution is good, and see the trade-offs, risks, and next steps clearly.
|
||||
|
||||
## 1. Core Character
|
||||
|
||||
**Medium-to-high information density, with emphasis on technical explanation and on processes and mechanisms.** Pages are built around architectures, flows, sequences, data, comparisons, and real evidence; text explains the why, while visuals reveal the relationships.
|
||||
|
||||
- **Professional**: no empty talk of "high availability" or "high performance." Write out the metrics, environment, boundaries, dependencies, trade-offs, failure conditions, and recovery paths.
|
||||
- **Concise**: a relationship one diagram can explain must not meander into an essay; nor may necessary assumptions, evidence, and limitations be omitted just to keep the layout clean.
|
||||
- **Concrete**: architecture diagrams must show call directions, data flow, control flow, and trust or failure boundaries; code, configuration, and logs appear only when they genuinely support the argument.
|
||||
- **Evidence first**: every page advances one judgment. The title gives the conclusion, the body gives the evidence, and it explains what the evidence means for the solution, the risks, or the next steps.
|
||||
- **Restrained**: the wow factor comes from making a complex problem clear — not from glow, particles, walls of cards, and hollow "tech vibes."
|
||||
|
||||
## 2. General Prohibitions
|
||||
|
||||
The following are red lines running through the entire deck; they take effect before all layout and visual rules, and unless the user explicitly requests otherwise, none may be violated.
|
||||
|
||||
- **No cards by default**: unless the user explicitly requests it, strictly forbid using rounded rectangles or rectangular cards to build hierarchy or alignment. Line segments, whitespace, and font-size/weight differences are better solutions.
|
||||
- **No evenly divided compositions**: unless no other layout is available, do not default to one-third splits, four-way splits, or 2×2 matrices — including formulaic patterns such as "title + three parallel blocks + conclusion."
|
||||
- **No mediocre, common, or AI-typical color schemes**: unless the user explicitly requests them, strictly forbid blue-and-white pairings, blue-purple gradients, cyan-purple neon, rainbow flares, glassmorphism cards, and glowing borders.
|
||||
- **No elements that clash with the overall style**: no styles from outside the chosen style may appear, such as using rounded icons or rounded rectangles within a sharp style.
|
||||
|
||||
## 3. How to Present Technical Content
|
||||
|
||||
### 3.1 Explain how the system works first
|
||||
|
||||
When first explaining a system or module, cover these first:
|
||||
|
||||
- inputs, outputs, and success criteria;
|
||||
- the scope of the system and its external dependencies;
|
||||
- the normal path, exception paths, and fallback paths;
|
||||
- where data comes from, what processing it goes through, and where it ends up;
|
||||
- which positions are the critical boundaries for performance, security, cost, or reliability.
|
||||
|
||||
### 3.2 Put design rationale and costs side by side
|
||||
|
||||
- Explain why A was chosen and B was not; the comparison dimensions must come from real goals.
|
||||
- Write out the costs corresponding to the benefits, including performance, cost, complexity, team capability, vendor lock-in, observability, and migration risk.
|
||||
- Give the conditions under which it works and the conditions under which it fails; do not present a local optimum as the universal optimum.
|
||||
- Distinguish current state, target state, candidate options, hypothetical inference, and verified results.
|
||||
- Launch plans specify validation gates, the gradual rollout method, rollback conditions, and recovery paths.
|
||||
|
||||
### 3.3 Evidence must be verifiable
|
||||
|
||||
- Metrics come with their source, time, version, test environment, load, sample, and measurement basis.
|
||||
- Show P50 / P95 / P99, variability, outliers, or confidence intervals as the question demands — not just averages.
|
||||
- Team inferences, illustrative data, and yet-to-be-verified assumptions must be explicitly labeled.
|
||||
- When evidence is missing, use "to be filled in," "assumption," or a placeholder; never fabricate benchmarks, logs, cases, or failure causes.
|
||||
- Explain terms and abbreviations at their first appearance, and keep naming consistent afterward.
|
||||
|
||||
## 4. Narrative Skeletons by Engineering Task
|
||||
|
||||
One primary scenario determines the whole deck's structure; other scenarios only supply necessary additions — never stack another visual language on top.
|
||||
|
||||
| Engineering task | What the reader must judge | Recommended narrative order |
|
||||
|---|---|---|
|
||||
| System architecture review | Whether boundaries, dependencies, bottlenecks, and the evolution path are sound | Goals and constraints → current state → problems → alternatives → target architecture → migration and validation |
|
||||
| AI / data platform proposal | Whether the data, models, and service chain are trustworthy; how quality, latency, and cost are traded off | User tasks → data and model pipeline → core mechanisms → evaluation evidence → risk guardrails → launch loop |
|
||||
| Security design review | Whether trust boundaries, attack paths, controls, and residual risk are clear | Assets and boundaries → threats → attack paths → controls → residual risk → monitoring and response |
|
||||
| Production incident retrospective | What the impact was, how the failure happened, and whether the fixes can prevent recurrence | Impact summary → timeline → direct cause → systemic factors → fixes → prevention validation |
|
||||
| Technology selection review | Which option better fits the goals, and which assumptions the conclusion is sensitive to | Goals and criteria → candidates → like-for-like comparison → trade-offs → recommendation → exit conditions |
|
||||
| Testing / validation strategy | Whether risks are covered, and whether test layers and release gates suffice | Risk model → layered validation → environment and data → gates → coverage gaps → release decision |
|
||||
| External tech talk | Why the core mechanism is valuable, whether the evidence is credible, and where the boundaries lie | Problem → mechanism → technical implementation → evidence → limitations → adoption path |
|
||||
|
||||
When no better structure fits, start from "decision summary → goals and constraints → current state / problems → mechanism / architecture → key evidence → alternatives and trade-offs → implementation / validation → risks and next steps," then trim and adapt to the scenario.
|
||||
|
||||
## 5. Page Rhythm and Information Density
|
||||
|
||||
- Default to medium-high density, but keep only one main judgment and one main evidence object per page.
|
||||
- Alternate text-explanation pages and visual-evidence pages; avoid consecutive stacks of structurally identical bullet lists.
|
||||
- For complex concepts, give the whole first, then expand layer by layer along stable coordinates; do not redraw the same architecture on every page.
|
||||
- Show the normal path, exception paths, and migration path in layers; keep the unchanged parts and highlight only what changes.
|
||||
- Accent pages prioritize key architectures, key comparisons, incident causality, or the final decision — do not manufacture climaxes with big-type slogans.
|
||||
- Section transitions appear only when a genuine change of rhythm is needed; short materials are not force-fitted with tables of contents and section covers.
|
||||
- End by returning to the decision, the validation results, or the next steps — never replace the conclusion with a lone "Thank you."
|
||||
|
||||
### Common page types
|
||||
|
||||
- **Concept / background page:** the necessary explanation paired with one main figure, whitespace spread around the main object.
|
||||
- **Architecture / flow page:** graphics dominate; text keeps only the conclusion, the legend, and necessary side notes.
|
||||
- **Comparison / selection page:** options compared on the same scale, dimensions, and coordinates.
|
||||
- **Metrics / benchmark page:** charts lead; test conditions, baselines, and conclusions stay close to the chart.
|
||||
- **Incident / timeline page:** chronological order is the main axis; impact, evidence, and handling stay close to their corresponding events.
|
||||
- **Implementation / migration page:** phases, dependencies, gates, and rollback points are laid out according to their real relationships.
|
||||
- **Appendix / sources page:** may be denser, but must stay scannable via columns, numbering, and stable line spacing.
|
||||
|
||||
## 6. Architecture Diagrams and Flowcharts
|
||||
|
||||
### 6.1 The relationship determines the graphic
|
||||
|
||||
| Relationship | Preferred graphic | Information that must be conveyed |
|
||||
|---|---|---|
|
||||
| System regions and boundaries | Nested or side-by-side right-angled regions | System scope, external dependencies, trust / failure boundaries |
|
||||
| Calls and data flow | Node chains or networks with directional arrows | The two parties of each call, protocol / data, sync or async |
|
||||
| Multi-role interaction | Sequence diagrams | Roles, message directions, waits, and exception branches |
|
||||
| Deployment and failure domains | Topology diagrams | Regions / clusters / instances, redundancy, and isolation scope |
|
||||
| State transitions | State machines | States, trigger conditions, transitions, and error states |
|
||||
| Option comparison | Side-by-side topologies or matrices at the same scale | Identical evaluation dimensions, structural differences, and costs |
|
||||
| Incident causality | Timeline + causal chain / fault tree | Events, evidence, direct causes, contributing factors, and control gaps |
|
||||
| Validation coverage | Layered matrices or mapping diagrams | Risks, test layers, pass criteria, and coverage gaps |
|
||||
|
||||
### 6.2 Diagramming discipline
|
||||
|
||||
- Arrows must have direction and meaning; label the protocol, data, frequency, capacity, or trigger conditions where necessary.
|
||||
- Distinguish data flow, control flow, and exception paths; redundant encoding with color, line style, and labels is allowed.
|
||||
- External boundaries, internal modules, and critical paths use different but stable grammars.
|
||||
- Connectors terminate at node edges and never cross through text; when there are too many crossings, rearrange, layer, or split the page.
|
||||
- Bold the critical paths or use the accent color; other paths recede to neutral; no glow and no 3D arrows.
|
||||
- For complex architectures, overview first, then zoom into details; keep naming, colors, and coordinate cues consistent.
|
||||
- Legends explain only the encodings that cannot be labeled in place; anything that can sit beside its node or path is labeled directly.
|
||||
|
||||
## 7. Data Charts, Tables, Code, and Screenshots
|
||||
|
||||
### Data charts
|
||||
|
||||
- Trends use lines, comparisons use bars or side-by-side dot plots, composition uses stacks, latency distributions use histograms / box plots / quantile plots, and capacity-cost relationships may use scatter plots or sensitivity matrices.
|
||||
- Remove default frames, 3D effects, gradients, heavy gridlines, and meaningless legends.
|
||||
- Main series use the structural color or critical-path color; baselines and secondary series use grayscale.
|
||||
- Key values, inflection points, and anomalies are labeled directly, with the "why" and the "what it means."
|
||||
- Test environment, version, load, sample, units, and baseline appear alongside the chart.
|
||||
|
||||
### Tables
|
||||
|
||||
- Headers, grouping, status, numbers, and notes form clear hierarchy; default themes are not kept.
|
||||
- Notes left-aligned, numbers aligned by decimal point or unit, and status columns fixed in position.
|
||||
- Use thin separators and light group backgrounds; no thick outer frames, rainbow headers, or large red/green fills.
|
||||
- Options are compared on the same dimensions; missing and non-comparable items are explicitly marked.
|
||||
|
||||
### Code, configuration, and screenshots
|
||||
|
||||
- Keep only the minimal excerpt that supports the argument, and first tell the reader what to look at.
|
||||
- Code, interfaces, paths, and fields use monospaced fonts; syntax highlighting only accentuates the key lines or changes.
|
||||
- For configuration comparison, prefer a minimal diff or a key-fields table; logs are timestamped, identify the source component, and have sensitive data redacted or anonymized.
|
||||
- Crop screenshots tightly to the evidence boundary, keeping them right-angled rectangles; do not uniformly add device frames, rounded corners, or shadows.
|
||||
- Side-by-side screenshots keep equal height and width, identical zoom, and the same baseline.
|
||||
|
||||
## 8. Visual System
|
||||
|
||||
### 8.1 Layout
|
||||
|
||||
- A title conveys the conclusion in one sentence, and its visual weight must not exceed the main evidence.
|
||||
- Use stable safe margins and a title axis; ordinary pages prefer a single column, a left-right split, or text above and figure below.
|
||||
- Architecture nodes land on a regular grid; pages of the same kind keep the same skeleton.
|
||||
- Body content is organized by whitespace, alignment, and thin rules by default; cards are used only when content needs delimiting.
|
||||
- Panels are used only for system scope, code, configuration, or key conclusions — mostly right-angled or minimally rounded, with thin strokes and light fills, and no generic shadows.
|
||||
- Reading-type materials may keep the document name, section, page number, version, and confidentiality level; live-presented materials keep only the necessary identity information.
|
||||
|
||||
### 8.2 Colors and fonts
|
||||
|
||||
- Reviews, printing, and long-form reading usually use light backgrounds; dark-room launches may use a restrained dark background.
|
||||
- When the brand has existing visual assets, inherit them first; without brand constraints, build the palette along the lines of "background color, structural color, critical-path color, status colors, neutrals."
|
||||
- Each color carries a stable meaning throughout the deck; critical states are additionally distinguished by text, line style, or shape.
|
||||
- Titles and body text prefer highly legible sans-serif faces; when a document feel is needed, titles may use a restrained serif.
|
||||
- Code uses monospaced fonts; one deck usually uses no more than two body-type families.
|
||||
- When content grows, first condense the text, split pages, or adjust the text-to-graphic ratio — only then shrink font size slightly.
|
||||
|
||||
### 8.3 Lines, icons, and effects
|
||||
|
||||
- Ordinary borders and auxiliary lines are thin and even; only critical paths get visibly bolder.
|
||||
- Within one diagram, arrows, corners, endpoints, dash rhythms, and corner radii stay consistent.
|
||||
- Technical structures prefer right angles or minimal rounding; circles and curves appear only when semantics require them.
|
||||
- Architecture, flows, data, screenshots, and real product visuals take precedence over decorative illustration.
|
||||
- Icons must come from one stroke system and serve identification; do not mix emoji, 3D, realistic, and system-default icons.
|
||||
- Body surfaces stay clean: no noise, particles, grid-light effects, glassmorphism, or meaningless gradients.
|
||||
|
||||
## 9. Sample References
|
||||
|
||||
Samples are only for extracting mechanisms; wholesale replication is forbidden. Organize the Style first according to the current readers, evidence, brand, and usage; precise color values, fonts, covers, section pages, and footers are not inherited by default.
|
||||
|
||||
### Sample A: Warm Orange & Cool Blue — White-Base Engineering Document Style
|
||||
|
||||
- **Traits:** white background with black body text; the warm color carries titles and critical paths, the cool color carries nodes and structure; fixed header and page numbers; suited to reading and printing.
|
||||
- **Borrowable:** the warm/cool semantic division, a stable document axis, reuse of architecture coordinates, and hierarchical distinction through boundaries / nodes / paths.
|
||||
- **Good for reference:** architecture reviews, technical white papers, platform proposals, and materials that need to unfold the same architecture step by step.
|
||||
- **Not inherited automatically:** the orange and blue color values, Inter, the gradient-arc cover, orange table headers, and the fixed header position.
|
||||
|
||||
### Sample B: Four-Color Flat — Engineering Walkthrough Style
|
||||
|
||||
- **Traits:** white background with dark-gray text, a few high-saturation semantic colors, flat structural diagrams, and solid-color section pages; suited to live walkthroughs and cross-role communication.
|
||||
- **Borrowable:** semantic color coding, solid-color section pauses, text/graphic zoning, direct labeling, and equal-width comparison columns.
|
||||
- **Good for reference:** product technical training, role collaboration, and talks balancing concepts and flows.
|
||||
- **Not inherited automatically:** the fixed four colors, solid-per-chapter backgrounds, the dual-ended footer, and specific brand fonts.
|
||||
|
||||
### Sample C: White Base & Deep Ink Blue — Two-Color Short-Line Engineering Walkthrough
|
||||
|
||||
- **Traits:** deep ink-blue titles, short colored lines, and a white base forming a stable walkthrough skeleton; explanation pages alternate with evidence pages; visuals float directly on the white ground.
|
||||
- **Borrowable:** the fixed title axis, weak navigation, alternation of explanation and evidence, and reduced container noise.
|
||||
- **Good for reference:** live tech talks, building concepts step by step, and materials centered on screenshots and mechanism diagrams.
|
||||
- **Not inherited automatically:** the orange/green section colors, diagonal section color blocks, the deep-purple ending, the fixed short-line sizes, and the font combination.
|
||||
|
||||
Do not write "choose Sample A / B / C" in the plan. If the result still clearly looks like a direct replica of some Sample once the text is hidden, keep adjusting — but do not break relationship expression and consistency just to be novel.
|
||||
|
||||
## 10. Pre-Delivery Checklist
|
||||
|
||||
- Are inputs, outputs, dependencies, boundaries, the normal path, exception paths, and fallback paths clear?
|
||||
- Do key connectors have direction and meaning, and are current state, target state, assumptions, and verified results distinguished?
|
||||
- Do metrics carry environment, version, sample, load, units, baseline, and time window?
|
||||
- Does each page carry only one main judgment, and does the evidence truly support the title?
|
||||
- Does the visual weight fall on the evidence, and are colors, shapes, line styles, and naming consistent?
|
||||
- Are there unsourced data, default Office charts, walls of cards, decorative "tech vibes," or Sample replicas?
|
||||
- Was technical evidence altered, weakened, or falsified for the sake of visual unity?
|
||||
@@ -19,7 +19,7 @@
|
||||
2. 用 `slides +xml-get` 回读,确认是否已有部分页面写入。
|
||||
3. 检查失败页是否含未转义字符:`Q&A -> Q&A`,文本 `<` / `>` 写成 `<` / `>`,属性 URL `a=1&b=2 -> a=1&b=2`。
|
||||
4. 检查标签闭合、属性引号、`<content>` 结构,以及 `<slide>` 直接子元素。
|
||||
5. 页面空白、溢出、重叠或越界时,按 [validation-checklist.md](validation-checklist.md) 运行 XML 文本重叠检查,并人工核对越界、截断、图文压盖等视觉风险;工具当前只会报告 `xml_not_well_formed` / `bbox_overlap`。
|
||||
5. 页面空白、溢出、重叠或越界时,按 [validation-checklist.md](validation-checklist.md) 运行 XML 文本重叠检查,或者截图做视觉检查。
|
||||
6. 如果使用 `--slides '[...]'`,怀疑 shell 截断时直接切到两步创建:先 `slides +create`,再用 `xml_presentation.slide.create` 逐页添加。
|
||||
7. 局部问题用 `+replace-slide` 块级修正;整页结构要改时再用 `slide.delete` 旧页 + `slide.create` 新页。
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
| 看到的问题 | 处理方式 |
|
||||
|-----------|----------|
|
||||
| 文字被截断 / 看不全 | 增大 shape 的 `width` 或 `height`,或减少文本量 |
|
||||
| 文字被截断 / 看不全 | 增大 shape 的 `width` 或 `height`,或减少文本量,或设置 `wrap="true" autoFit="normal-auto-fit"` 属性自动换行和缩排 |
|
||||
| 元素重叠 | 调整 `topLeftX` / `topLeftY`,拉开间距 |
|
||||
| 页面大面积空白 | 回读确认内容是否写入;若内容存在,再缩小间距或增加主体元素 |
|
||||
| 文字和背景色太接近 | 深色背景用浅色文字,浅色背景用深色文字 |
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
|
||||
## Required Flow
|
||||
|
||||
1. 记录创建或编辑返回的 `xml_presentation_id`,以及已知的 `slide_id` / `revision_id`。
|
||||
2. 用 `slides +xml-get` 回读全文 XML 到本地文件。
|
||||
3. 检查实际页数是否符合计划或用户要求。
|
||||
4. 检查每页 `<data>` 内是否有预期主要元素。
|
||||
5. 检查没有明显空白页、破损页、缺失标题或缺失主视觉。
|
||||
6. 检查页面不是全部退化为标题加 bullet list。
|
||||
7. 检查视觉层级:标题、主视觉、支撑信息三者可区分。
|
||||
8. 检查明显溢出和布局风险:重叠、越界、底部拥挤、长文本框。
|
||||
9. 在最终回复中给出简短验证记录。
|
||||
1. 记录创建或编辑返回的 `xml_presentation_id`,以及已知的 `slide_id` / `revision_id`。`slide_id` 是 review 状态唯一关联键;页码仅可作为展示信息。
|
||||
2. 用 `slides +xml-get` 回读全文 XML 到本地文件,并以当前结果建立本次 review 的 `slide_ids` 页清单。首次新建且页集合未变时,可复用创建响应;增删页、整页替换或重排后必须刷新清单。
|
||||
3. 运行 XML 静态检查,检查实际页数、主要元素、空白/破损页、主视觉和布局风险。
|
||||
4. 先在 `.lark-slides/review/<deck-or-task-id>/visual-review.md` 为全部 `slide_ids` 建立记录,初始状态均为 `not_reviewed`;静态检查通过后再用 `slides +screenshot` 截图。每批最多 10 页,输出到 `.lark-slides/review/<deck-or-task-id>/screenshots/`。
|
||||
5. 实际打开每张截图,按下方 rubric 逐页标记 `pass` 或 `fix`;截图文件存在但未被查看时,状态必须保留为 `not_reviewed`。**关键页抽查只可作为排障/预览,不能缩小本次 review 页清单,也不能支持“全部通过”的结论。**
|
||||
6. `fix` 页用 `+replace-slide` 或对应写入操作修复后,重新回读并重新截图该页;不要沿用修复前的截图结论。
|
||||
7. 截图白名单或服务端限制导致无法获取图片时,记录错误和受影响页,完成其余 XML 静态检查,并将视觉状态标记为 `not_verified`。
|
||||
8. 在最终回复中给出简短验证记录,明确区分静态检查和真实视觉 review。
|
||||
|
||||
回读命令:
|
||||
|
||||
@@ -27,30 +26,63 @@ lark-cli slides +xml-get --as user \
|
||||
|
||||
## Automated XML Text Overlap Lint
|
||||
|
||||
`slides +xml-get` 保存 XML 到本地文件后,优先运行 XML 语法和文本重叠静态检查:
|
||||
`slides +xml-get` 保存 XML 到本地文件后,必须运行 XML 语法和文本重叠静态检查;输入可以是单个 `<slide>` 或完整 `<presentation>`。
|
||||
|
||||
先取得当前已加载 `lark-slides/SKILL.md` 的父目录,记为 `<lark-slides-skill-dir>`;不要猜测全局安装路径。下面命令中的脚本路径相对于该目录。
|
||||
|
||||
```bash
|
||||
python3 skills/lark-slides/scripts/xml_text_overlap_lint.py --input <presentation.xml>
|
||||
python3 "<lark-slides-skill-dir>/scripts/xml_text_overlap_lint.py" --input <presentation.xml>
|
||||
```
|
||||
|
||||
通过标准:
|
||||
|
||||
- `summary.error_count == 0`。任何 error 都必须先修复再交付。
|
||||
- 当前工具只检查 XML well-formed 和文本元素之间的明显重叠;它不检查越界、文本高度不足、图文压盖、表格/图表压盖或底部拥挤。
|
||||
- 工具会检查 XML well-formed 与 schema 合法性、文本元素重叠、元素越界画布、文本框可能溢出、表格声明尺寸与实际不一致、以及 icon 填充配置。
|
||||
- 该工具不能替代页数核对、关键内容核对或真实视觉验收。
|
||||
|
||||
## Automated Layout Density Lint
|
||||
|
||||
在 XML 结构检查通过后、截图视觉验收前,可运行布局密度静态检查:
|
||||
|
||||
```bash
|
||||
python3 "<lark-slides-skill-dir>/scripts/xml_layout_density_lint.py" --input <presentation.xml>
|
||||
```
|
||||
|
||||
它的用途是找出大型 `rect` 容器内的可见内容面积偏小的候选区域,常见于大卡片只放少量文字、空图片占位卡、单字符伪主视觉或目录卡内容过空。
|
||||
|
||||
调用顺序:
|
||||
|
||||
```text
|
||||
slides +xml-get 回读 XML
|
||||
→ xml_text_overlap_lint.py 检查 XML / 重叠等结构风险
|
||||
→ xml_layout_density_lint.py 输出内容覆盖率事实
|
||||
→ 截图 QA 判断留白是否有意设计
|
||||
```
|
||||
|
||||
`xml_layout_density_lint.py` 的 warning 只陈述可复算的几何事实:
|
||||
|
||||
- `target`:页码、容器 ID、坐标和尺寸;
|
||||
- `rule`:阈值与比较条件;
|
||||
- `measurement`:容器面积、可见内容面积、覆盖率和参与元素数量;
|
||||
- `elements`:容器及参与计算的 XML 元素 ID。
|
||||
|
||||
当 `measurement.content_coverage_ratio < rule.threshold` 时输出 `code = sparse_container_content`。这只是静态几何命中,不自动说明页面难看、留白错误或必须修改;必须结合同页截图进行视觉判断。
|
||||
|
||||
常见 code 的处理方向:
|
||||
|
||||
| code | 含义 | 处理方式 |
|
||||
|------|------|----------|
|
||||
| `xml_not_well_formed` | XML 语法错误或文本未转义 | 修复标签闭合、属性引号、`&` / `<` / `>` 转义 |
|
||||
| `sml_prefixed_tag` | SML 元素使用了命名空间前缀,如 `<ns0:slide>` 或 `<sml:shape>` | 使用 `<slide xmlns="http://www.larkoffice.com/sml/2.0">` 的默认命名空间,或使用无前缀标签 |
|
||||
| `sxsd_unsupported_tag` | 使用了 SXSD 不支持的标签 | 按 lint `hint` 替换为受支持标签;常见如 `textbox -> <shape type="text">`、`image -> <img>` |
|
||||
| `sxsd_unsupported_attr` | 支持的标签上使用了不支持的属性 | 按 lint `hint` 改为支持的属性;常见如 `x -> topLeftX`、`fontColor -> color` |
|
||||
| `iconpark_unsupported_icon_type` | `<icon>` 使用了 `iconpark-index.json` 中不存在的 `iconType` | 按 lint `hint` 改为名单内的 `iconType`,或先用 `scripts/iconpark_tool.py` 搜索 |
|
||||
| `icon_missing_fill_color` | 视觉规范要求 `<icon>` 设置 `<fill><fillColor color="..."/></fill>`,避免图标不可见 | 给 `<icon>` 添加显式非透明填充色,例如 `rgba(37, 99, 235, 1)` |
|
||||
| `icon_transparent_fill_color` | `<icon>` 的 `fillColor` 是透明色,不满足视觉可见性要求 | 改成与背景有足够对比的非透明颜色 |
|
||||
| `bbox_overlap` | 文本元素的估算绘制区域明显重叠 | 拉开文本坐标、缩小文本框/字号,或改成明确的分栏/分组结构 |
|
||||
| `sml_prefixed_tag` | SML 标签用了命名空间前缀(如 `sml:`) | 去掉前缀,用规范标签名 |
|
||||
| `sxsd_unsupported_tag` | 使用了 schema 不支持的标签 | 对照 `slides_xml_schema_definition.xml` 换成受支持的标签 |
|
||||
| `sxsd_unsupported_attr` | 标签上有 schema 不支持的属性 | 删除该属性或改用受支持的属性 |
|
||||
| `<kind>_out_of_canvas`(如 `text_out_of_canvas`) | 元素超出 960×540 画布 | 移回画布内,或缩小其 width/height |
|
||||
| `text_may_overflow_shape` | 文本按字号/行距估算会超出自身文本框 | 增大 shape 高度、精简文字,或给 `<content>` 设 `wrap="true" autoFit="normal-auto-fit"` |
|
||||
| `table_resolved_size_mismatch` | `<table>` 声明的 width/height 与 `<col>`/`<tr>` 解析出的实际总尺寸不一致 | 调整 col/tr 或表格整体尺寸使两者匹配 |
|
||||
| `icon_missing_fill_color` | `<icon>` 未设置不透明 `fillColor` | 在 `<icon>` 内加 `<fill><fillColor color="rgba(R,G,B,1)"/></fill>` |
|
||||
| `icon_transparent_fill_color` | `<icon>` 的 `fillColor` 是透明色 | 改用不透明颜色 |
|
||||
| `iconpark_unsupported_icon_type` | 用了 IconPark 不支持的 `iconType` | 对照 `iconpark-index.json` 换成受支持的类型 |
|
||||
|
||||
## Screenshot QA
|
||||
|
||||
@@ -119,11 +151,42 @@ python3 skills/lark-slides/scripts/xml_text_overlap_lint.py --input <presentatio
|
||||
|
||||
- 正文或标签框高度不足,文本很可能被截断。
|
||||
- 多个主体元素在同一区域重叠,而不是有意叠加背景。
|
||||
- 标题、标签、关键数字或相邻文本虽未几何重叠,但视觉间距过近,显得粘连、像重叠或破坏层级。
|
||||
- 重要内容越过画布边界,或贴近底部超过 `y=500`。
|
||||
- 高密度页使用单个长 bullet list,没有分栏、表格或分组。
|
||||
- 标题、主视觉、正文的字号和颜色差异太弱,视觉层级不清。
|
||||
- 所有内容页都是同一套标题加 bullets 坐标。
|
||||
|
||||
## Screenshot Visual Review
|
||||
|
||||
截图 review 是静态 XML 检查之后的第二道门。它用服务端真实渲染结果发现 XML 无法可靠判断的问题,例如文字截断、图片裁切、图表压盖和弱对比。
|
||||
|
||||
每页按以下检查项记录结论;页面含图表时,额外检查图表精确可读性:
|
||||
|
||||
| 项目 | Pass 标准 | Fix 信号 |
|
||||
|---|---|---|
|
||||
| 可读性 | 标题、正文、标签和关键数字可读;对比度足够,文本层级之间有清楚的视觉间距 | 文字截断、字号过小、低对比、关键标签不可读,或相邻文字间距过近而视觉粘连 |
|
||||
| 布局 | 主体未被意外遮挡,页边距和底部留白合理 | 重叠、越界、图片裁切、元素贴边、底部拥挤,或文字虽未相交但视觉上像碰撞 |
|
||||
| 视觉层级 | 主结论、主视觉、支撑信息一眼可区分 | 所有元素同权重、主视觉过小、页面退化为文字堆叠 |
|
||||
| 内容完整性 | 无空白、破图、占位符或错误页序;图示表达与页面角色匹配 | 空白/破损页、缺失图片、遗留模板文案或与计划不符 |
|
||||
| 图表精确可读性(有图表时) | 若页面结论依赖精确比较、排序或阈值判断,读者可直接获得每个关键数据点的值:柱/线/饼图有直接数据标签,或有与图表一一对应的等价数据表/注释 | 只能靠坐标轴估读关键数值、缺少决定结论的数据标签、图例与系列无法对应;仅用于展示趋势且不承载精确结论的图表可不强制逐点标签 |
|
||||
|
||||
图表检查先问“页面是否要求读者作精确判断”:
|
||||
|
||||
- **需要**:比较群体得分、排名、是否达到阈值、预算/目标差异、需要从图中选方案。没有直接数值或等价数据表即为 `fix`。
|
||||
- **不需要**:只表达上升/下降趋势、定性分布或结构关系,且标题/正文已经明确结论;可不逐点展示数值,但仍须检查轴、图例、系列和关键标注是否可读。
|
||||
|
||||
推荐把记录保存在 `.lark-slides/review/<deck-or-task-id>/visual-review.md`:
|
||||
|
||||
```text
|
||||
| slide_id | screenshot | status | findings | action |
|
||||
|---|---|---|---|---|
|
||||
| p001 | screenshots/p001.png | pass | hierarchy and contrast clear | - |
|
||||
| p002 | screenshots/p002.png | fix | bottom labels are clipped | enlarge text box, then rescreenshot |
|
||||
```
|
||||
|
||||
只有记录中的每个目标 `slide_id` 都是 `pass`,且记录数等于当前页清单数,才可写“已完成视觉 review”。截图不可用时沿用上文的 `not_verified` 状态,并说明原因。
|
||||
|
||||
## Verification Record
|
||||
|
||||
最终回复必须包含简短验证记录,建议格式:
|
||||
@@ -133,7 +196,8 @@ python3 skills/lark-slides/scripts/xml_text_overlap_lint.py --input <presentatio
|
||||
- 回读:已执行 slides +xml-get,实际页数 N / 预期 N。
|
||||
- 关键页:架构解释 / Self-Attention / 对比或演进 / 总结页均存在。
|
||||
- 结构:检查了主要 shape/img/table/chart 元素,无明显空白页或破损页。
|
||||
- 布局:检查了标题层级、主视觉、重叠/越界/文本溢出风险。
|
||||
- 静态检查:xml_text_overlap_lint error_count=0;已检查标题层级、主视觉、重叠/越界/文本溢出风险。
|
||||
- 视觉 review:已查看 N/N 张服务端截图,全部 pass;或 `not_verified`(截图不可用,原因:...)。
|
||||
```
|
||||
|
||||
不要声称完成了人工视觉验收,除非确实打开或获取了可视化结果。仅从 XML 静态检查得出的结论,应表述为“静态检查未发现明显问题”。
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
- `medium`: title plus 2-4 concise bullets or labeled regions.
|
||||
- `high`: use a table, columns, grouped labels, or annotations. Do not use one long bullet box.
|
||||
- Do not create a deck where every content page is title plus bullets. For 4 or more pages, use at least 4 different layout structures when the content allows.
|
||||
- Keep safe outer margins around `40` px on standard content pages, and fill the content area densely with a card grid rather than leaving large empty space. Only go full-bleed for an intentional image or cover treatment.
|
||||
- Keep safe outer margins around `40` px on standard content pages. Only go full-bleed for an intentional image or cover treatment. How densely to fill the content area, and whether to use a card grid, is set by the selected design system.
|
||||
- Reserve vertical space for titles. A typical content title area is `y=36..90`; main content should usually start at `y>=110`.
|
||||
- Avoid crowding the bottom edge. Keep non-background content above `y=500` unless it is a footer.
|
||||
- Keep backgrounds consistent with the deck's `visual_system.background_strategy`. Normal content pages should use the same base background unless there is a clear page-role reason to change.
|
||||
@@ -148,7 +148,7 @@ Purpose: show sequence, roadmap, history, or phases.
|
||||
|
||||
Geometry:
|
||||
- Create a horizontal or vertical spine with 3-6 milestones.
|
||||
- Each milestone should have a dot/card/date label connected by a line or arrow.
|
||||
- Each milestone should have a dot/card/date label connected by a line or arrow. Cards should be of equal size.
|
||||
- Title is separate from the sequence. The sequence is the visual focus.
|
||||
|
||||
Text:
|
||||
@@ -172,7 +172,7 @@ Text:
|
||||
|
||||
Purpose: explain components, dependencies, or system flow.
|
||||
|
||||
Implementation: use `<shape>` + `<line>`.
|
||||
Implementation: use `<shape>` + `<line>`. Control position and size precisely and carefully.
|
||||
|
||||
Geometry:
|
||||
- Main visual area should be a diagram, not prose.
|
||||
@@ -188,17 +188,34 @@ Text:
|
||||
|
||||
Purpose: show operational steps, workflow, or cause-effect path.
|
||||
|
||||
Implementation: use `<shape>` + `<line>`.
|
||||
Implementation: use `<shape>` + `<line>`. Control position and size precisely and carefully.
|
||||
|
||||
Geometry:
|
||||
- Use numbered steps connected by arrows or lines.
|
||||
- 3-5 steps is ideal for one slide. If there are more, group them into phases.
|
||||
- 3-5 steps is ideal for one slide. If there are more, group them into phases. Steps should be of equal size.
|
||||
- The flow direction must be visually obvious.
|
||||
|
||||
Text:
|
||||
- Each step gets a verb-led label and one short descriptor at most.
|
||||
- Step labels should be parallel in length and grammar. If one step needs a long explanation, move the explanation to a side note or speaker notes.
|
||||
|
||||
### `relationship-network`
|
||||
|
||||
Purpose: show entities and the ties, relationships, or influence that connect them.
|
||||
|
||||
Implementation: use `<shape>` + `<line>`. Use small `ellipse` dots as nodes, not large ones, and never put text inside them. Control position and size precisely and carefully.
|
||||
|
||||
Geometry:
|
||||
- Main visual area should be a web of nodes and connectors, not prose.
|
||||
- Keep each node a small dot (a marker, not a container); do not size it to fit text inside. Small dots leave room for many nodes, so a dense, complex network still stays readable.
|
||||
- Spread nodes to fill the canvas evenly; minimize line crossings and avoid clusters.
|
||||
- Encode relationship types with line style (e.g. solid vs dashed) and emphasize key nodes with a distinct color or slightly larger dot. Add a legend to decode styles.
|
||||
|
||||
Text:
|
||||
- Keep labels decoupled from nodes: put each name in its own text element beside the dot, never inside it and never on top of a connector.
|
||||
- Give each node a short name label (1-3 words). Relationship labels ride along their line and stay to 2-4 words; use them sparingly.
|
||||
- Keep labels from overlapping connectors or one another. Use one legend plus at most one short caption for explanation.
|
||||
|
||||
### `quote-highlight`
|
||||
|
||||
Purpose: emphasize a customer voice, principle, thesis, or decision statement.
|
||||
@@ -218,11 +235,10 @@ Purpose: close with decision, recommendation, or next action.
|
||||
Geometry:
|
||||
- Use one dominant closing statement or call to action.
|
||||
- Visual focus should be the recommendation or action, not decorative filler.
|
||||
- When using a full-bleed background image, add a semi-transparent scrim between the image and the text so the text stays legible; verify contrast.
|
||||
- Mirror the cover background but omit the image.
|
||||
|
||||
Text:
|
||||
- Keep the final page easy to remember. Avoid recap overload.
|
||||
- Conclusion pages may mirror the cover background.
|
||||
|
||||
## Screenshot And Paper Figure Pages
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ XSD 中的 `title`、`headline`、`sub-headline`、`body`、`caption` 主要出
|
||||
表格宽高设置:
|
||||
|
||||
- 已设置的列宽和行高优先保留,未设置的列宽、行高会使用表格的目标总宽度、总高度分配剩余空间
|
||||
- **必须设置 `<table>` 的 `width` 和 `height` 固定表格大小,同时设置需要保留列宽或行高的 `<col>` 的 `width` 和 `<tr>` 的 `height`,其余自动分配。**
|
||||
- **`<table>` 必须设置 `width` 和 `height` 固定整体表格大小,行高列宽建议默认分配,只设置少数必要的 `<col>` 的 `width` 和 `<tr>` 的 `height`。**
|
||||
|
||||
不同字号的行高参考:
|
||||
|
||||
@@ -365,8 +365,8 @@ XSD 中的 `title`、`headline`、`sub-headline`、`body`、`caption` 主要出
|
||||
<title>季度报告</title>
|
||||
<theme>
|
||||
<textStyles>
|
||||
<title fontFamily="思源黑体" fontSize="54" fontColor="rgba(0, 0, 0, 1)"/>
|
||||
<body fontFamily="思源黑体" fontSize="18" fontColor="rgba(43, 47, 54, 1)"/>
|
||||
<title fontFamily="思源宋体" fontSize="54" fontColor="rgba(0, 0, 0, 1)"/>
|
||||
<body fontFamily="思源宋体" fontSize="18" fontColor="rgba(43, 47, 54, 1)"/>
|
||||
</textStyles>
|
||||
</theme>
|
||||
<slide>
|
||||
|
||||
419
skills/lark-slides/scripts/xml_layout_density_lint.py
Normal file
419
skills/lark-slides/scripts/xml_layout_density_lint.py
Normal file
@@ -0,0 +1,419 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""Warn when a large layout container has too little visible content inside it."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from xml.etree import ElementTree as ET
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import xml_text_overlap_lint as xml_lint
|
||||
|
||||
|
||||
MIN_CONTAINER_WIDTH = 140
|
||||
MIN_CONTAINER_HEIGHT = 160
|
||||
MIN_SHORT_CARD_HEIGHT = 80
|
||||
MIN_CONTAINER_AREA = 20_000
|
||||
MIN_CONTENT_COVERAGE_RATIO = 0.15
|
||||
MIN_SLIDE_CONTENT_COVERAGE_RATIO = 0.035
|
||||
MIN_SLIDE_CONTENT_ELEMENT_COUNT = 4
|
||||
SHORT_CARD_SIZE_TOLERANCE_RATIO = 0.10
|
||||
MIN_SIMILAR_SHORT_CARD_COUNT = 2
|
||||
LARGE_VISUAL_CHILD_RATIO = 0.35
|
||||
LAYOUT_PANEL_SPAN_RATIO = 0.90
|
||||
IMAGE_OVERLAY_MATCH_RATIO = 0.90
|
||||
DENSITY_CONTAINMENT_TOLERANCE = 8
|
||||
|
||||
|
||||
def clipped_bbox(element: dict[str, Any], container: dict[str, Any]) -> dict[str, int | float] | None:
|
||||
left = max(element["x"], container["x"])
|
||||
top = max(element["y"], container["y"])
|
||||
right = min(element["x"] + element["width"], container["x"] + container["width"])
|
||||
bottom = min(element["y"] + element["height"], container["y"] + container["height"])
|
||||
if right <= left or bottom <= top:
|
||||
return None
|
||||
return {"x": left, "y": top, "width": right - left, "height": bottom - top}
|
||||
|
||||
|
||||
def rectangle_union_area(rectangles: list[dict[str, int | float]]) -> int | float:
|
||||
x_coordinates = sorted({coordinate for rect in rectangles for coordinate in (rect["x"], rect["x"] + rect["width"])})
|
||||
area = 0
|
||||
for left, right in zip(x_coordinates, x_coordinates[1:]):
|
||||
intervals = sorted(
|
||||
(rect["y"], rect["y"] + rect["height"])
|
||||
for rect in rectangles
|
||||
if rect["x"] < right and rect["x"] + rect["width"] > left
|
||||
)
|
||||
covered_height = 0
|
||||
interval_end: int | float | None = None
|
||||
for top, bottom in intervals:
|
||||
if interval_end is None:
|
||||
covered_height += bottom - top
|
||||
interval_end = bottom
|
||||
elif bottom > interval_end:
|
||||
covered_height += bottom - max(top, interval_end)
|
||||
interval_end = bottom
|
||||
area += (right - left) * covered_height
|
||||
return area
|
||||
|
||||
|
||||
def has_similar_short_card_peer(element: dict[str, Any], elements: list[dict[str, Any]]) -> bool:
|
||||
return sum(
|
||||
other["kind"] == "shape"
|
||||
and other["type"] == "rect"
|
||||
and other["width"] >= MIN_CONTAINER_WIDTH
|
||||
and other["height"] >= MIN_SHORT_CARD_HEIGHT
|
||||
and xml_lint.element_area(other) >= MIN_CONTAINER_AREA
|
||||
and abs(other["width"] - element["width"]) / max(other["width"], element["width"])
|
||||
<= SHORT_CARD_SIZE_TOLERANCE_RATIO
|
||||
and abs(other["height"] - element["height"]) / max(other["height"], element["height"])
|
||||
<= SHORT_CARD_SIZE_TOLERANCE_RATIO
|
||||
for other in elements
|
||||
) >= MIN_SIMILAR_SHORT_CARD_COUNT
|
||||
|
||||
|
||||
def is_layout_container(
|
||||
element: dict[str, Any],
|
||||
slide_width: int | float,
|
||||
slide_height: int | float,
|
||||
elements: list[dict[str, Any]] | None = None,
|
||||
) -> bool:
|
||||
has_supported_height = element["height"] >= MIN_CONTAINER_HEIGHT or (
|
||||
elements is not None
|
||||
and element["height"] >= MIN_SHORT_CARD_HEIGHT
|
||||
and has_similar_short_card_peer(element, elements)
|
||||
)
|
||||
return (
|
||||
element["kind"] == "shape"
|
||||
and element["type"] == "rect"
|
||||
and element["width"] >= MIN_CONTAINER_WIDTH
|
||||
and has_supported_height
|
||||
and xml_lint.element_area(element) >= MIN_CONTAINER_AREA
|
||||
and not (
|
||||
element["x"] <= 2
|
||||
and element["y"] <= 2
|
||||
and element["width"] >= slide_width - 4
|
||||
and element["height"] >= slide_height - 4
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def is_edge_spanning_layout_panel(
|
||||
element: dict[str, Any], slide_width: int | float, slide_height: int | float
|
||||
) -> bool:
|
||||
touches_horizontal_edge = element["x"] <= 2 or element["x"] + element["width"] >= slide_width - 2
|
||||
touches_vertical_edge = element["y"] <= 2 or element["y"] + element["height"] >= slide_height - 2
|
||||
return (touches_horizontal_edge and element["height"] >= slide_height * LAYOUT_PANEL_SPAN_RATIO) or (
|
||||
touches_vertical_edge and element["width"] >= slide_width * LAYOUT_PANEL_SPAN_RATIO
|
||||
)
|
||||
|
||||
|
||||
def has_matching_image_overlay(container: dict[str, Any], elements: list[dict[str, Any]]) -> bool:
|
||||
container_area = xml_lint.element_area(container)
|
||||
return any(
|
||||
element["kind"] == "img"
|
||||
and xml_lint.intersection_area(container, element)
|
||||
/ max(1, min(container_area, xml_lint.element_area(element)))
|
||||
>= IMAGE_OVERLAY_MATCH_RATIO
|
||||
for element in elements
|
||||
)
|
||||
|
||||
|
||||
def is_nested_in_layout_panel(
|
||||
container: dict[str, Any], elements: list[dict[str, Any]], slide_width: int | float, slide_height: int | float
|
||||
) -> bool:
|
||||
return any(
|
||||
element is not container
|
||||
and element["kind"] == "shape"
|
||||
and element["type"] == "rect"
|
||||
and is_edge_spanning_layout_panel(element, slide_width, slide_height)
|
||||
and xml_lint.contains(element, container, tolerance=DENSITY_CONTAINMENT_TOLERANCE)
|
||||
for element in elements
|
||||
)
|
||||
|
||||
|
||||
def extract_density_elements(slide_xml: str) -> list[dict[str, Any]]:
|
||||
elements = xml_lint.extract_elements(slide_xml)
|
||||
elements_by_id = {element["id"]: element for element in elements}
|
||||
root = ET.fromstring(slide_xml)
|
||||
for node in root.iter():
|
||||
if xml_lint.xml_local_name(node.tag) != "shape":
|
||||
continue
|
||||
element = elements_by_id.get(node.attrib.get("id", ""))
|
||||
if element is None:
|
||||
continue
|
||||
content_node = next(
|
||||
(child for child in node if xml_lint.xml_local_name(child.tag) == "content"),
|
||||
None,
|
||||
)
|
||||
paragraphs = (
|
||||
[
|
||||
" ".join("".join(paragraph.itertext()).split())
|
||||
for paragraph in content_node.iter()
|
||||
if xml_lint.xml_local_name(paragraph.tag) == "p"
|
||||
]
|
||||
if content_node is not None
|
||||
else []
|
||||
)
|
||||
raw_font_size = (
|
||||
content_node.attrib.get("fontSize") if content_node is not None else None
|
||||
) or node.attrib.get("fontSize")
|
||||
try:
|
||||
base_font_size = float(raw_font_size or 16)
|
||||
except ValueError:
|
||||
base_font_size = 16.0
|
||||
element.update(
|
||||
{
|
||||
"textType": content_node.attrib.get("textType") if content_node is not None else None,
|
||||
"textAlign": content_node.attrib.get("textAlign") if content_node is not None else None,
|
||||
"autoFit": content_node.attrib.get("autoFit") if content_node is not None else None,
|
||||
"fontSize": base_font_size,
|
||||
"text": "\n".join(paragraph for paragraph in paragraphs if paragraph),
|
||||
}
|
||||
)
|
||||
if not xml_lint.has_text_content(element):
|
||||
continue
|
||||
declared_font_sizes = [
|
||||
float(descendant.attrib["fontSize"])
|
||||
for descendant in node.iter()
|
||||
if descendant.attrib.get("fontSize") is not None
|
||||
]
|
||||
if declared_font_sizes:
|
||||
element["fontSize"] = max(declared_font_sizes)
|
||||
for match in re.finditer(r"<icon\b([^>]*)>", slide_xml):
|
||||
attrs = match.group(1)
|
||||
x = xml_lint.extract_numeric_attribute(attrs, "topLeftX")
|
||||
y = xml_lint.extract_numeric_attribute(attrs, "topLeftY")
|
||||
width = xml_lint.extract_numeric_attribute(attrs, "width")
|
||||
height = xml_lint.extract_numeric_attribute(attrs, "height")
|
||||
if any(value is None for value in (x, y, width, height)):
|
||||
continue
|
||||
elements.append(
|
||||
{
|
||||
"id": xml_lint.extract_attribute(attrs, "id") or f"icon-{len(elements) + 1}",
|
||||
"kind": "icon",
|
||||
"type": "icon",
|
||||
"x": x,
|
||||
"y": y,
|
||||
"width": width,
|
||||
"height": height,
|
||||
"rotation": xml_lint.extract_numeric_attribute(attrs, "rotation") or 0,
|
||||
"order": len(elements),
|
||||
}
|
||||
)
|
||||
return elements
|
||||
|
||||
|
||||
def visual_bbox(element: dict[str, Any], container: dict[str, Any]) -> dict[str, int | float] | None:
|
||||
if xml_lint.is_text_element(element):
|
||||
estimated = xml_lint.estimate_text_visual_bbox(element)
|
||||
return clipped_bbox(estimated, container) if estimated else None
|
||||
return clipped_bbox(element, container)
|
||||
|
||||
|
||||
def own_text_visual_bbox(container: dict[str, Any]) -> dict[str, int | float] | None:
|
||||
if container["kind"] != "shape" or not xml_lint.has_text_content(container):
|
||||
return None
|
||||
text_proxy = {**container, "type": "text"}
|
||||
estimated = xml_lint.estimate_text_visual_bbox(text_proxy)
|
||||
return clipped_bbox(estimated, container) if estimated else None
|
||||
|
||||
|
||||
def slide_content_visual_bbox(
|
||||
element: dict[str, Any], slide_bbox: dict[str, int | float]
|
||||
) -> dict[str, int | float] | None:
|
||||
if xml_lint.is_text_element(element):
|
||||
estimated = xml_lint.estimate_text_visual_bbox(element)
|
||||
return clipped_bbox(estimated, slide_bbox) if estimated else None
|
||||
if element["kind"] == "shape" and xml_lint.has_text_content(element):
|
||||
estimated = own_text_visual_bbox(element)
|
||||
return clipped_bbox(estimated, slide_bbox) if estimated else None
|
||||
if element["kind"] in {"img", "chart", "table", "whiteboard", "icon"}:
|
||||
return clipped_bbox(element, slide_bbox)
|
||||
return None
|
||||
|
||||
|
||||
def is_large_visual_child(element: dict[str, Any], container: dict[str, Any]) -> bool:
|
||||
if element["kind"] not in {"img", "chart", "table", "whiteboard"}:
|
||||
return False
|
||||
return xml_lint.element_area(element) / xml_lint.element_area(container) >= LARGE_VISUAL_CHILD_RATIO
|
||||
|
||||
|
||||
def detect_sparse_container_content(
|
||||
elements: list[dict[str, Any]], slide_number: int, slide_width: int | float, slide_height: int | float
|
||||
) -> list[dict[str, Any]]:
|
||||
issues: list[dict[str, Any]] = []
|
||||
for container in (
|
||||
element for element in elements if is_layout_container(element, slide_width, slide_height, elements)
|
||||
):
|
||||
if (
|
||||
is_edge_spanning_layout_panel(container, slide_width, slide_height)
|
||||
or is_nested_in_layout_panel(container, elements, slide_width, slide_height)
|
||||
or has_matching_image_overlay(container, elements)
|
||||
):
|
||||
continue
|
||||
children = [
|
||||
element
|
||||
for element in elements
|
||||
if element is not container
|
||||
and xml_lint.contains(container, element, tolerance=DENSITY_CONTAINMENT_TOLERANCE)
|
||||
]
|
||||
if any(is_large_visual_child(child, container) for child in children):
|
||||
continue
|
||||
own_text_bbox = own_text_visual_bbox(container)
|
||||
rectangles = ([own_text_bbox] if own_text_bbox else []) + [
|
||||
bbox for child in children if (bbox := visual_bbox(child, container)) is not None
|
||||
]
|
||||
content_area = rectangle_union_area(rectangles) if rectangles else 0
|
||||
coverage_ratio = content_area / xml_lint.element_area(container)
|
||||
if coverage_ratio >= MIN_CONTENT_COVERAGE_RATIO:
|
||||
continue
|
||||
issues.append(
|
||||
{
|
||||
"level": "warning",
|
||||
"code": "sparse_container_content",
|
||||
"schema_version": "1.0",
|
||||
"target": {
|
||||
"slide_number": slide_number,
|
||||
"container_id": container["id"],
|
||||
"container_type": container["type"],
|
||||
"bbox": {key: container[key] for key in ("x", "y", "width", "height")},
|
||||
},
|
||||
"rule": {
|
||||
"name": "large_container_visible_content_coverage",
|
||||
"threshold": MIN_CONTENT_COVERAGE_RATIO,
|
||||
"comparison": "content_coverage_ratio < threshold",
|
||||
},
|
||||
"measurement": {
|
||||
"container_area": xml_lint.element_area(container),
|
||||
"visible_content_area": round(content_area, 3),
|
||||
"content_coverage_ratio": round(coverage_ratio, 3),
|
||||
"content_element_count": len(children) + (1 if own_text_bbox else 0),
|
||||
},
|
||||
"elements": [container["id"], *[child["id"] for child in children]],
|
||||
}
|
||||
)
|
||||
return issues
|
||||
|
||||
|
||||
def detect_sparse_slide_content(
|
||||
elements: list[dict[str, Any]], slide_number: int, slide_width: int | float, slide_height: int | float
|
||||
) -> list[dict[str, Any]]:
|
||||
slide_bbox = {"x": 0, "y": 0, "width": slide_width, "height": slide_height}
|
||||
content = [
|
||||
(element, bbox)
|
||||
for element in elements
|
||||
if (bbox := slide_content_visual_bbox(element, slide_bbox)) is not None
|
||||
]
|
||||
if len(content) < MIN_SLIDE_CONTENT_ELEMENT_COUNT:
|
||||
return []
|
||||
content_area = rectangle_union_area([bbox for _, bbox in content])
|
||||
slide_area = slide_width * slide_height
|
||||
coverage_ratio = content_area / slide_area
|
||||
if coverage_ratio >= MIN_SLIDE_CONTENT_COVERAGE_RATIO:
|
||||
return []
|
||||
return [
|
||||
{
|
||||
"level": "warning",
|
||||
"code": "sparse_slide_content",
|
||||
"schema_version": "1.0",
|
||||
"target": {
|
||||
"slide_number": slide_number,
|
||||
"bbox": slide_bbox,
|
||||
},
|
||||
"rule": {
|
||||
"name": "slide_visible_content_coverage",
|
||||
"threshold": MIN_SLIDE_CONTENT_COVERAGE_RATIO,
|
||||
"comparison": "content_coverage_ratio < threshold",
|
||||
},
|
||||
"measurement": {
|
||||
"slide_area": slide_area,
|
||||
"visible_content_area": round(content_area, 3),
|
||||
"content_coverage_ratio": round(coverage_ratio, 3),
|
||||
"content_element_count": len(content),
|
||||
},
|
||||
"elements": [element["id"] for element, _ in content],
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def detect_blank_slide(elements: list[dict[str, Any]], slide_number: int) -> list[dict[str, Any]]:
|
||||
if elements:
|
||||
return []
|
||||
return [
|
||||
{
|
||||
"level": "warning",
|
||||
"code": "blank_slide",
|
||||
"schema_version": "1.0",
|
||||
"target": {"slide_number": slide_number},
|
||||
"rule": {
|
||||
"name": "slide_has_visible_content",
|
||||
"comparison": "visible_element_count == 0",
|
||||
},
|
||||
"measurement": {"visible_element_count": 0},
|
||||
"elements": [],
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def lint_xml(xml: str, source_path: str | None = None) -> dict[str, Any]:
|
||||
root, xml_error = xml_lint.parse_xml_root(xml)
|
||||
if xml_error:
|
||||
return {
|
||||
"file": source_path,
|
||||
"summary": {"slide_count": 0, "warning_count": 0, "error_count": 1},
|
||||
"issues": [xml_error],
|
||||
"slides": [],
|
||||
}
|
||||
if root is None:
|
||||
raise AssertionError("parse_xml_root must return a root or error")
|
||||
presentation = xml_lint.parse_presentation(xml)
|
||||
slides = []
|
||||
for index, slide_xml in enumerate(presentation["slides"]):
|
||||
elements = extract_density_elements(slide_xml)
|
||||
slide_number = index + 1
|
||||
slides.append(
|
||||
{
|
||||
"slide_number": slide_number,
|
||||
"element_count": len(elements),
|
||||
"issues": detect_blank_slide(elements, slide_number)
|
||||
+ detect_sparse_container_content(elements, slide_number, presentation["width"], presentation["height"])
|
||||
+ detect_sparse_slide_content(elements, slide_number, presentation["width"], presentation["height"]),
|
||||
}
|
||||
)
|
||||
warning_count = sum(len(slide["issues"]) for slide in slides)
|
||||
return {
|
||||
"file": source_path,
|
||||
"slide_size": {"width": presentation["width"], "height": presentation["height"]},
|
||||
"summary": {"slide_count": len(slides), "warning_count": warning_count, "error_count": 0},
|
||||
"slides": slides,
|
||||
}
|
||||
|
||||
|
||||
def print_usage() -> None:
|
||||
print("Usage:\n python3 xml_layout_density_lint.py --input <presentation.xml>", file=sys.stderr)
|
||||
|
||||
|
||||
def run_cli(argv: list[str] | None = None) -> None:
|
||||
options = xml_lint.parse_args(argv or sys.argv[1:])
|
||||
if options.get("help") or options.get("--help"):
|
||||
print_usage()
|
||||
raise SystemExit(0)
|
||||
if not options.get("input"):
|
||||
print_usage()
|
||||
raise xml_lint.XmlTextOverlapLintError("--input is required")
|
||||
input_path = Path(options["input"]).resolve()
|
||||
print(json.dumps(lint_xml(xml_lint.read_file(input_path), str(input_path)), ensure_ascii=False, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
run_cli()
|
||||
except xml_lint.XmlTextOverlapLintError as error:
|
||||
print(f"xml-layout-density-lint error: {error}", file=sys.stderr)
|
||||
raise SystemExit(1) from error
|
||||
458
skills/lark-slides/scripts/xml_layout_density_lint_test.py
Normal file
458
skills/lark-slides/scripts/xml_layout_density_lint_test.py
Normal file
@@ -0,0 +1,458 @@
|
||||
# Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
||||
# SPDX-License-Identifier: MIT
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
import xml_layout_density_lint
|
||||
|
||||
|
||||
class XmlLayoutDensityLintTest(unittest.TestCase):
|
||||
def test_lint_xml_warns_for_blank_slide(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<presentation xmlns="http://www.larkoffice.com/sml/2.0" width="960" height="540">
|
||||
<slide id="content-slide">
|
||||
<data>
|
||||
<shape id="title" type="text" topLeftX="60" topLeftY="60" width="400" height="50">
|
||||
<content fontSize="28"><p>Investment report</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
<slide id="blank-slide">
|
||||
<style><fill><fillColor color="rgba(255, 255, 255, 1)"/></fill></style>
|
||||
<data/>
|
||||
<note><content/></note>
|
||||
</slide>
|
||||
</presentation>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["summary"], {"slide_count": 2, "warning_count": 1, "error_count": 0})
|
||||
self.assertEqual(result["slides"][0]["issues"], [])
|
||||
self.assertEqual(result["slides"][1]["element_count"], 0)
|
||||
self.assertEqual(
|
||||
result["slides"][1]["issues"],
|
||||
[
|
||||
{
|
||||
"level": "warning",
|
||||
"code": "blank_slide",
|
||||
"schema_version": "1.0",
|
||||
"target": {"slide_number": 2},
|
||||
"rule": {
|
||||
"name": "slide_has_visible_content",
|
||||
"comparison": "visible_element_count == 0",
|
||||
},
|
||||
"measurement": {"visible_element_count": 0},
|
||||
"elements": [],
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
def test_lint_xml_warns_when_large_container_is_mostly_empty(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="trend-card" type="rect" topLeftX="500" topLeftY="135" width="410" height="370"/>
|
||||
<shape id="trend-title" type="text" topLeftX="515" topLeftY="147" width="380" height="28">
|
||||
<content fontSize="15"><p>Core trends</p></content>
|
||||
</shape>
|
||||
<shape id="trend-copy" type="text" topLeftX="515" topLeftY="177" width="380" height="315">
|
||||
<content fontSize="12"><p>First point</p><p>Second point</p><p>Third point</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issue = result["slides"][0]["issues"][0]
|
||||
self.assertEqual(issue["code"], "sparse_container_content")
|
||||
self.assertEqual(issue["target"]["container_id"], "trend-card")
|
||||
self.assertEqual(issue["target"], {
|
||||
"slide_number": 1,
|
||||
"container_id": "trend-card",
|
||||
"container_type": "rect",
|
||||
"bbox": {"x": 500, "y": 135, "width": 410, "height": 370},
|
||||
})
|
||||
self.assertLess(issue["measurement"]["content_coverage_ratio"], 0.15)
|
||||
self.assertEqual(issue["rule"], {
|
||||
"name": "large_container_visible_content_coverage",
|
||||
"threshold": 0.15,
|
||||
"comparison": "content_coverage_ratio < threshold",
|
||||
})
|
||||
self.assertEqual(issue["measurement"]["container_area"], 151700)
|
||||
self.assertEqual(issue["measurement"]["content_coverage_ratio"], 0.032)
|
||||
self.assertEqual(issue["elements"], ["trend-card", "trend-title", "trend-copy"])
|
||||
self.assertEqual(set(issue), {"level", "code", "schema_version", "target", "rule", "measurement", "elements"})
|
||||
|
||||
def test_lint_xml_warns_for_sparse_short_cards(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card-1" type="rect" topLeftX="60" topLeftY="180" width="400" height="105"/>
|
||||
<shape id="text-1" type="text" topLeftX="80" topLeftY="220" width="360" height="30">
|
||||
<content fontSize="14"><p>期待认识大家</p></content>
|
||||
</shape>
|
||||
<shape id="card-2" type="rect" topLeftX="490" topLeftY="180" width="400" height="105"/>
|
||||
<shape id="text-2" type="text" topLeftX="510" topLeftY="220" width="360" height="30">
|
||||
<content fontSize="14"><p>化学一起讨论</p></content>
|
||||
</shape>
|
||||
<shape id="card-3" type="rect" topLeftX="60" topLeftY="310" width="400" height="105"/>
|
||||
<shape id="text-3" type="text" topLeftX="80" topLeftY="350" width="360" height="30">
|
||||
<content fontSize="14"><p>吉他随时交流</p></content>
|
||||
</shape>
|
||||
<shape id="card-4" type="rect" topLeftX="490" topLeftY="310" width="400" height="105"/>
|
||||
<shape id="text-4" type="text" topLeftX="510" topLeftY="350" width="360" height="30">
|
||||
<content fontSize="14"><p>共度美好四年</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
container_issues = [
|
||||
issue for issue in result["slides"][0]["issues"] if issue["code"] == "sparse_container_content"
|
||||
]
|
||||
self.assertEqual(
|
||||
[issue["target"]["container_id"] for issue in container_issues],
|
||||
["card-1", "card-2", "card-3", "card-4"],
|
||||
)
|
||||
self.assertTrue(all(issue["target"]["bbox"]["height"] == 105 for issue in container_issues))
|
||||
self.assertTrue(all(issue["measurement"]["content_coverage_ratio"] < 0.15 for issue in container_issues))
|
||||
self.assertEqual(
|
||||
[issue["code"] for issue in result["slides"][0]["issues"]],
|
||||
[
|
||||
"sparse_container_content",
|
||||
"sparse_container_content",
|
||||
"sparse_container_content",
|
||||
"sparse_container_content",
|
||||
"sparse_slide_content",
|
||||
],
|
||||
)
|
||||
|
||||
def test_lint_xml_warns_when_whole_slide_has_too_little_effective_content(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="background" type="rect" topLeftX="0" topLeftY="0" width="960" height="540"/>
|
||||
<shape id="text-1" type="text" topLeftX="60" topLeftY="80" width="200" height="30">
|
||||
<content fontSize="14"><p>One short line</p></content>
|
||||
</shape>
|
||||
<shape id="text-2" type="text" topLeftX="500" topLeftY="180" width="200" height="30">
|
||||
<content fontSize="14"><p>Another line</p></content>
|
||||
</shape>
|
||||
<shape id="text-3" type="text" topLeftX="60" topLeftY="310" width="200" height="30">
|
||||
<content fontSize="14"><p>Third line</p></content>
|
||||
</shape>
|
||||
<shape id="text-4" type="text" topLeftX="500" topLeftY="410" width="200" height="30">
|
||||
<content fontSize="14"><p>Fourth line</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issues = [issue for issue in result["slides"][0]["issues"] if issue["code"] == "sparse_slide_content"]
|
||||
self.assertEqual(len(issues), 1)
|
||||
issue = issues[0]
|
||||
self.assertEqual(issue["target"]["bbox"], {"x": 0, "y": 0, "width": 960, "height": 540})
|
||||
self.assertEqual(issue["rule"]["threshold"], 0.035)
|
||||
self.assertLess(issue["measurement"]["content_coverage_ratio"], 0.035)
|
||||
self.assertEqual(issue["measurement"]["content_element_count"], 4)
|
||||
self.assertNotIn("background", issue["elements"])
|
||||
|
||||
def test_lint_xml_ignores_isolated_short_layout_bar(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="summary-bar" type="rect" topLeftX="52" topLeftY="82" width="856" height="105"/>
|
||||
<shape id="summary" type="text" topLeftX="72" topLeftY="115" width="816" height="30">
|
||||
<content fontSize="14"><p>One concise summary</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["slides"][0]["issues"], [])
|
||||
|
||||
def test_lint_xml_counts_rect_own_content_as_visible_content(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="load-card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="18">
|
||||
<p>被吊物</p>
|
||||
<p><span fontSize="36">32.0 t</span></p>
|
||||
<p>钢结构模块</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["slides"][0]["issues"], [])
|
||||
|
||||
def test_lint_xml_reports_nonzero_coverage_for_rect_own_content_reproduction(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="load-card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="18">
|
||||
<p>被吊物</p>
|
||||
<p>32.0 t</p>
|
||||
<p>钢结构模块</p>
|
||||
</content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issue = result["slides"][0]["issues"][0]
|
||||
self.assertGreater(issue["measurement"]["visible_content_area"], 0)
|
||||
self.assertEqual(issue["measurement"]["content_element_count"], 1)
|
||||
self.assertGreater(issue["measurement"]["content_coverage_ratio"], 0)
|
||||
|
||||
def test_lint_xml_still_warns_for_sparse_rect_own_content(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="sparse-card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="12"><p>A</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issue = result["slides"][0]["issues"][0]
|
||||
self.assertEqual(issue["target"]["container_id"], "sparse-card")
|
||||
self.assertGreater(issue["measurement"]["visible_content_area"], 0)
|
||||
self.assertEqual(issue["measurement"]["content_element_count"], 1)
|
||||
self.assertEqual(issue["elements"], ["sparse-card"])
|
||||
|
||||
def test_lint_xml_unions_rect_own_content_with_child_content(self) -> None:
|
||||
self_only = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="12"><p>A</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
with_overlapping_child = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="12"><p>A</p></content>
|
||||
</shape>
|
||||
<shape id="child" type="text" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="12"><p>A</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self_issue = self_only["slides"][0]["issues"][0]
|
||||
mixed_issue = with_overlapping_child["slides"][0]["issues"][0]
|
||||
self.assertEqual(
|
||||
mixed_issue["measurement"]["visible_content_area"],
|
||||
self_issue["measurement"]["visible_content_area"],
|
||||
)
|
||||
self.assertEqual(mixed_issue["measurement"]["content_element_count"], 2)
|
||||
|
||||
def test_extract_density_elements_reads_nested_font_size_from_rect_content(self) -> None:
|
||||
elements = xml_layout_density_lint.extract_density_elements(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184">
|
||||
<content fontSize="12"><p><span fontSize="36">32.0 t</span></p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(elements[0]["fontSize"], 36)
|
||||
|
||||
def test_extract_density_elements_does_not_attach_following_text_to_self_closing_rect(self) -> None:
|
||||
elements = xml_layout_density_lint.extract_density_elements(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="60" topLeftY="140" width="220" height="184"/>
|
||||
<shape id="title" type="text" topLeftX="80" topLeftY="160" width="180" height="30">
|
||||
<content fontSize="18"><p>Following title</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(elements[0]["text"], "")
|
||||
self.assertEqual(elements[1]["text"], "Following title")
|
||||
|
||||
def test_lint_xml_allows_container_with_large_visual_child(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="chart-card" type="rect" topLeftX="500" topLeftY="135" width="410" height="300"/>
|
||||
<chart id="chart" topLeftX="525" topLeftY="170" width="350" height="220"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["summary"]["warning_count"], 0)
|
||||
|
||||
def test_lint_xml_warns_for_small_empty_visual_placeholder_cards(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="letter-placeholder" type="rect" topLeftX="520" topLeftY="180" width="200" height="200"/>
|
||||
<shape id="letter" type="text" topLeftX="540" topLeftY="250" width="160" height="70">
|
||||
<content fontSize="46"><p>Z</p></content>
|
||||
</shape>
|
||||
<shape id="empty-placeholder" type="rect" topLeftX="744" topLeftY="180" width="144" height="200"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issues = result["slides"][0]["issues"]
|
||||
self.assertEqual(
|
||||
[issue["target"]["container_id"] for issue in issues],
|
||||
["letter-placeholder", "empty-placeholder"],
|
||||
)
|
||||
self.assertEqual(issues[1]["measurement"]["content_element_count"], 0)
|
||||
|
||||
def test_lint_xml_applies_global_threshold_to_normal_text_card(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="70" topLeftY="184" width="260" height="288"/>
|
||||
<shape id="title" type="text" topLeftX="90" topLeftY="215" width="220" height="30">
|
||||
<content fontSize="18"><p>梦境与现实</p></content>
|
||||
</shape>
|
||||
<shape id="copy" type="text" topLeftX="90" topLeftY="330" width="220" height="70">
|
||||
<content fontSize="13"><p>边界溶解,逻辑失效。观众被拽入潜意识的迷宫。</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issue = result["slides"][0]["issues"][0]
|
||||
self.assertEqual(issue["target"]["container_id"], "card")
|
||||
self.assertEqual(issue["rule"]["threshold"], 0.15)
|
||||
|
||||
def test_lint_xml_allows_image_overlay_rect(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<img id="hero" topLeftX="560" topLeftY="0" width="400" height="540"/>
|
||||
<shape id="tint" type="rect" topLeftX="560" topLeftY="0" width="400" height="540"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["summary"]["warning_count"], 0)
|
||||
|
||||
def test_lint_xml_allows_edge_spanning_layout_panel_and_nested_decoration(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="panel" type="rect" topLeftX="600" topLeftY="0" width="360" height="540"/>
|
||||
<shape id="decoration" type="rect" topLeftX="660" topLeftY="150" width="240" height="240"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["summary"]["warning_count"], 0)
|
||||
|
||||
def test_lint_xml_counts_icons_as_visible_content(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="80" topLeftY="140" width="320" height="240"/>
|
||||
<icon id="visual" iconType="shield" topLeftX="100" topLeftY="160" width="180" height="180"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["summary"]["warning_count"], 0)
|
||||
|
||||
def test_lint_xml_warns_when_coverage_is_below_global_threshold(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="80" topLeftY="140" width="200" height="200"/>
|
||||
<icon id="visual" iconType="shield" topLeftX="100" topLeftY="160" width="70" height="70"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
issue = result["slides"][0]["issues"][0]
|
||||
self.assertEqual(issue["target"]["container_id"], "card")
|
||||
self.assertEqual(issue["measurement"]["content_coverage_ratio"], 0.122)
|
||||
self.assertEqual(issue["rule"]["threshold"], 0.15)
|
||||
|
||||
def test_lint_xml_allows_quarter_coverage_under_lower_threshold(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="card" type="rect" topLeftX="80" topLeftY="140" width="200" height="200"/>
|
||||
<icon id="visual" iconType="shield" topLeftX="100" topLeftY="160" width="100" height="100"/>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["slides"][0]["issues"], [])
|
||||
|
||||
def test_lint_xml_allows_large_metric_card_above_lower_threshold(self) -> None:
|
||||
result = xml_layout_density_lint.lint_xml(
|
||||
"""
|
||||
<slide xmlns="http://www.larkoffice.com/sml/2.0">
|
||||
<data>
|
||||
<shape id="metric-card" type="rect" topLeftX="80" topLeftY="140" width="360" height="300"/>
|
||||
<shape id="metric" type="text" topLeftX="104" topLeftY="190" width="340" height="90">
|
||||
<content fontSize="12.4"><p><strong><span fontSize="62">400</span></strong>+ 项</p></content>
|
||||
</shape>
|
||||
</data>
|
||||
</slide>
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertEqual(result["slides"][0]["issues"], [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -1418,4 +1418,4 @@ if __name__ == "__main__":
|
||||
run_cli()
|
||||
except XmlTextOverlapLintError as error:
|
||||
print(f"xml-text-overlap-lint error: {error}", file=sys.stderr)
|
||||
raise SystemExit(1) from error
|
||||
raise SystemExit(1) from error
|
||||
Reference in New Issue
Block a user