@liustack/pptwise 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -41
- package/README.zh-CN.md +72 -41
- package/dist/{chunk-M35M4QUC.js → chunk-2CA3JRFR.js} +460 -499
- package/dist/chunk-2CA3JRFR.js.map +1 -0
- package/dist/{chunk-WL5KWYKS.js → chunk-G7WQ7KSP.js} +34800 -30625
- package/dist/chunk-G7WQ7KSP.js.map +1 -0
- package/dist/{chunk-VUOLBHD7.js → chunk-RQUKZYSH.js} +1 -1
- package/dist/{chunk-VUOLBHD7.js.map → chunk-RQUKZYSH.js.map} +1 -1
- package/dist/{chunk-3ZUKISTY.js → chunk-VEZGVYJS.js} +2 -2
- package/dist/cli.js +911 -462
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5320 -1534
- package/dist/index.js +15 -13
- package/dist/node.d.ts +1 -1
- package/dist/node.js +2 -2
- package/dist/{pixel-audit-H5K6JK3X.js → pixel-audit-M5Q5WCST.js} +4 -4
- package/dist/pixel-audit-M5Q5WCST.js.map +1 -0
- package/dist/{registry-C0GJH7ZT.d.ts → registry-D8bkC8ff.d.ts} +1 -1
- package/dsh/preview-tool.js +20 -17
- package/package.json +2 -1
- package/skills/pptwise/SKILL.md +133 -70
- package/skills/pptwise/SKILL.zh-CN.md +136 -73
- package/skills/pptwise/references/branding.md +34 -8
- package/skills/pptwise/references/branding.zh-CN.md +36 -8
- package/skills/pptwise/references/components.md +63 -33
- package/skills/pptwise/references/components.zh-CN.md +63 -33
- package/skills/pptwise/references/density.md +23 -9
- package/skills/pptwise/references/density.zh-CN.md +23 -9
- package/skills/pptwise/references/images.md +26 -13
- package/skills/pptwise/references/images.zh-CN.md +26 -13
- package/skills/pptwise/references/layouts.md +30 -26
- package/skills/pptwise/references/layouts.zh-CN.md +30 -26
- package/skills/pptwise/references/spec.md +143 -69
- package/skills/pptwise/references/spec.zh-CN.md +143 -69
- package/skills/pptwise/references/validate.md +33 -45
- package/skills/pptwise/references/validate.zh-CN.md +33 -45
- package/skills/pptwise/scripts/run.ps1 +1 -1
- package/skills/pptwise/scripts/run.sh +1 -1
- package/dist/chunk-M35M4QUC.js.map +0 -1
- package/dist/chunk-WL5KWYKS.js.map +0 -1
- package/dist/pixel-audit-H5K6JK3X.js.map +0 -1
- /package/dist/{chunk-3ZUKISTY.js.map → chunk-VEZGVYJS.js.map} +0 -0
|
@@ -3,100 +3,163 @@ summary: 'skills/pptwise/SKILL.md 的中文阅读镜像,仅供人工审阅该
|
|
|
3
3
|
mirror_of: skills/pptwise/SKILL.md
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# pptwise
|
|
6
|
+
# pptwise deck 生成操作手册
|
|
7
7
|
|
|
8
|
-
> 本文件是 [`skills/pptwise/SKILL.md`](./SKILL.md)
|
|
8
|
+
> 本文件是 [`skills/pptwise/SKILL.md`](./SKILL.md) 的中文阅读镜像。agent 只注册并执行英文版。两份文件如有出入,以英文版为准。
|
|
9
9
|
|
|
10
|
-
pptwise
|
|
10
|
+
pptwise 把语义 JSON 转成原生 DrawingML `.pptx`。文字与图形在 PowerPoint 中保持可编辑。作者只描述每页在怎么讲,以及页面包含哪些有类型的组件。页面的脸、几何、配色、字体和装饰归主题与引擎。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
严格按这条单向链工作,不跨步,不同时决定两层。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
```text
|
|
15
|
+
意图 -> 叙事 -> 主题绑定 -> 带 kind 的 spec -> 填充 -> 渲染
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 运行 CLI
|
|
19
|
+
|
|
20
|
+
所有命令都通过本文件旁边的启动器运行。把 `<skill-dir>` 换成本 skill 的目录。
|
|
15
21
|
|
|
16
22
|
```bash
|
|
17
23
|
bash <skill-dir>/scripts/run.sh <args> # macOS / Linux
|
|
18
24
|
powershell -ExecutionPolicy Bypass -File <skill-dir>\scripts\run.ps1 <args> # Windows
|
|
19
25
|
```
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
启动器依次尝试 `PATH` 上兼容的 `pptwise`、`npx`、`bunx`,参数和退出码原样透传。退出码 78 表示没有 JavaScript 运行时。转告 stderr 中的 `nextSteps`,不要重试。
|
|
28
|
+
|
|
29
|
+
无法执行脚本时,使用第一条可行路径:
|
|
30
|
+
|
|
31
|
+
1. 已安装版本的主版本与本 skill 一致,且不低于钉定版本时,运行 `pptwise <args>`。
|
|
32
|
+
2. `npx --yes --package @liustack/pptwise@0.24.0 pptwise <args>`。
|
|
33
|
+
3. `bunx --bun @liustack/pptwise@0.24.0 <args>`。
|
|
34
|
+
4. 都不可用时,请用户安装 Node 22.19+ 或 Bun。
|
|
35
|
+
|
|
36
|
+
安装后运行 `pptwise doctor`。某个失败无法由错误信息本身解释时也先运行它。转告结果,不要猜。
|
|
37
|
+
|
|
38
|
+
## 先读取现场真相
|
|
39
|
+
|
|
40
|
+
永远不要凭记忆写 IR 或 spec。每个 deck 任务开始时运行:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pptwise schema
|
|
44
|
+
pptwise schema --spec
|
|
45
|
+
pptwise narratives --json
|
|
46
|
+
pptwise themes --json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
提问前先扫描工作区。已有 `deck.spec.json` 会记录叙事、绑定主题、页面顺序、标题与每张内容页的 `kind`。deck 内 `theme.json`、工作区 `themes/` 文件、用户点名的主题,或递来的 `.thmx`、`.potx`、带品牌 `.pptx` 都是主题信号。
|
|
50
|
+
|
|
51
|
+
## 工作流
|
|
52
|
+
|
|
53
|
+
### 1. 意图
|
|
54
|
+
|
|
55
|
+
选择讲法前先记录四个事实:受众、想要的结果、现场讲述还是传阅、可用时长。请求或工作区已经给出的事实直接推导。用户在场且仍缺关键事实时,把所有未决问题合并成一轮询问。
|
|
56
|
+
|
|
57
|
+
### 2. 叙事
|
|
58
|
+
|
|
59
|
+
先定叙事,再定主题。叙事决定论证方式、节奏与语气。完全匹配时使用具名预设,否则显式写 `strategy`、`pacing`、`audience`。`pacing` 控制编辑预算与正文字号基线。叙事从不选择页面的脸。
|
|
22
60
|
|
|
23
|
-
|
|
61
|
+
继续前先确认叙事包。简洁访谈与 spec 示例见 `references/spec.md`。
|
|
24
62
|
|
|
25
|
-
|
|
63
|
+
### 3. 绑定主题
|
|
26
64
|
|
|
27
|
-
|
|
65
|
+
主题是一个完整、自包含的文件,包含样式、页面菜单、可选品牌规则与场合元数据。内容菜单只服务全局 11 个 `kind` 中的一个子集。缺少某个词是设计选择。
|
|
28
66
|
|
|
29
|
-
|
|
30
|
-
2. 否则,有 `npx` 就用:`npx --yes --package @liustack/pptwise@0.22.0 pptwise <args>`。
|
|
31
|
-
3. 否则,有 `bunx` 就用:`bunx --bun @liustack/pptwise@0.22.0 <args>`。
|
|
32
|
-
4. 都没有就告诉用户机器上找不到 JavaScript 运行时,下一步是装 Node 22.19+(https://nodejs.org)或 Bun(https://bun.sh)。不要说成是 pptwise 本身坏了。
|
|
67
|
+
主题名按三级查找:
|
|
33
68
|
|
|
34
|
-
|
|
69
|
+
1. deck 目录。
|
|
70
|
+
2. 从当前目录向上查找工作区 `themes/`。
|
|
71
|
+
3. 24 个出厂预设。
|
|
35
72
|
|
|
36
|
-
|
|
73
|
+
按请求与工作区信号,用 `occasions` 和 `identity` 筛出候选。用固定样张比较 2 到 4 个候选:
|
|
37
74
|
|
|
38
75
|
```bash
|
|
39
|
-
pptwise
|
|
40
|
-
pptwise schema --spec # deck spec schema
|
|
41
|
-
pptwise narratives --json # named narrative presets (strategy/pacing/audience axes + theme recommendations)
|
|
42
|
-
pptwise themes --json # built-in themes (id + label)
|
|
76
|
+
pptwise theme try consulting,swiss,memo
|
|
43
77
|
```
|
|
44
78
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
**边界页规则:** `chapter` 和 `ending` 永远不渲染 `components` 或 `footnote`。`cover` 永远不渲染 `footnote`。封面只有在锁定版式声明了对应槽位时才能带 `components`。今天这只发生在 `verdict-index`(consulting):它读第一个 `bullets` 块,画成最多三条编号论据。其余封面版式仍会丢掉 components。正文放到 `content` 页,除非你在填 consulting 封面那三列论据。对错 JSON 和 spec 写法:`references/spec.md`。
|
|
48
|
-
|
|
49
|
-
1. **访谈**(最多一轮):用户在场,且受众、怎么讲、pacing 任一轴仍未知时,把未决的问放进**一条**消息,然后停。不要自己填。Q1–Q4、★ 默认、查表、`NARRATIVE_INTERVIEW` 闸:`references/spec.md`。
|
|
50
|
-
2. **定 spec 并确认**,再写任何页面。写 `deck.spec.json`(以 `cover` 开篇,以 `ending` 收尾,中间是 `content` 或 `chapter`)。跑 `pptwise spec validate` 直到 `OK`,然后固化 `seed`。已确认的 spec 不要重定。写法:`references/spec.md`。品牌框姿态:`references/branding.md`。
|
|
51
|
-
3. **填页面**,每批至多 4 页。写 `pages/<id>.json`(`components`,可选 `layout`/`notes`)。绝不写 `type`/`heading`。Pin-only 与稀排高潮页:`references/layouts.md`。组件形态:`references/components.md`。密度、beat、容量:`references/density.md`。配图:`references/images.md`。
|
|
52
|
-
4. **Validate** 每批之后:`pptwise assemble deck-dir/`,再 `pptwise validate deck-dir/`,直到两者都打印 `OK`。重组被标出的内容,不要删。assemble / validate / audit / preview / serve 回路:`references/validate.md`。
|
|
53
|
-
5. **Audit** 所有页面填完后:`pptwise audit deck-dir/` 直到 exit 0。不要用截图代替。然后把 deck 交给用户(有 `pptwise_preview` 就调它,否则 `preview --html`,再否则 `serve --no-open`):`references/validate.md`。
|
|
54
|
-
6. **渲染:** `pptwise render deck-dir/`。把打印的绝对路径报给用户。`--draft` 和 `--allow-dropped-content` 只有用户明确要求时才用。
|
|
55
|
-
|
|
56
|
-
后续请求:改一页 → 只对那一页走步骤 3–6。一份新 deck → 步骤 1。和 deck 生成无关 → 不要调用 pptwise。
|
|
57
|
-
|
|
58
|
-
## 组件选型
|
|
59
|
-
|
|
60
|
-
| 内容形态 | 用 | 不用 |
|
|
61
|
-
|---|---|---|
|
|
62
|
-
| 2–5 项头条指标 | `kpi_cards` | `chart` |
|
|
63
|
-
| 系列数据(趋势、对比、占比) | `chart`(`bar`/`line`/`pie`/`funnel`/`dumbbell`/`scatter`/`area`/`donut`/`gauge`) | 埋在 `bullets` 里的数字 |
|
|
64
|
-
| 受众要逐行读的精确数字(价目表、规格表、按周期分列的指标网格) | `data_table` | `chart` |
|
|
65
|
-
| 线性流程,无分支 | `steps` | `flowchart` |
|
|
66
|
-
| 有分支、且最终走到终点的流程 | `flowchart` | `steps` |
|
|
67
|
-
| 循环往复、没有终点的流程(首尾相连回到起点,如 PDCA、产品生命周期、飞轮、季节性循环) | `cycle` | `flowchart` |
|
|
68
|
-
| 双方对比 | `comparison` | 两份 bullet 列表 |
|
|
69
|
-
| 系统/组织分层(一叠层带,例如技术栈分层或成熟度阶梯) | `architecture` | `bullets` |
|
|
70
|
-
| 有日期的里程碑 | `timeline` | 带日期的 `bullets` |
|
|
71
|
-
| 分阶段计划,带多条工作线 | `roadmap` | `timeline` |
|
|
72
|
-
| 分阶段计划,在共享坐标轴上画出带日期的条形 | `gantt` | `roadmap` |
|
|
73
|
-
| 一句结论或要点 | `verdict_banner` 或 `callout` | `paragraph` |
|
|
74
|
-
| 2×2 战略评估(优势/劣势/机会/威胁) | `swot` | `matrix` |
|
|
75
|
-
| 9 宫格商业模式画布 | `bmc` | 拆开的 `bullets`/`row_cards` |
|
|
76
|
-
| 累计合计的桥接/差异拆解 | `waterfall` | `chart` |
|
|
77
|
-
| 2×2 宏观环境扫描(政治/经济/社会/技术) | `pest` | `swot` |
|
|
78
|
-
| 竞争结构分析(竞争强度 + 周边 4 种力量) | `five_forces` | `matrix` |
|
|
79
|
-
| 双轴数值网格,按颜色编码单元格(例如地区 × 季度) | `heatmap` | `matrix` |
|
|
80
|
-
| 跨阶段的比例流量/数量分布(例如预算分配、能源结构) | `sankey` | `chart`(funnel)或 `flowchart` |
|
|
81
|
-
| 产品/软件截图,这张 slide 要让人一眼认出「这是真实、正在运行的软件」(App 仪表盘、真实产品界面) | `device_mockup` | `image` |
|
|
82
|
-
| 一份人员名单(团队、讲者阵容、评委阵容、作者名单),需要一个无照片可用的身份锚点 | `people_cards` | `row_cards`/`icon_cards` |
|
|
83
|
-
| 一组短平行标签(技术栈、能力清单、关键词、资质认证)——是标签,不是带描述的条目 | `tag_row` | `bullets`/`row_cards` |
|
|
84
|
-
|
|
85
|
-
形态对照、字段说明、满幅组件:`references/components.md`。
|
|
79
|
+
创建就是拷贝。没有现成资产时,把最接近的预设拷进工作区。有 Office 品牌文件时,抽取配色与字体,同时拷入合适的菜单。要改色时,fork 当前主题,让整套配色重新派生,原主题保持不动。
|
|
86
80
|
|
|
87
|
-
|
|
81
|
+
```bash
|
|
82
|
+
pptwise theme new --from consulting --id acme-report
|
|
83
|
+
pptwise brand extract corp.pptx -o themes/acme.theme.json --from consulting
|
|
84
|
+
pptwise theme fork acme --primary '#0B5FFF' --id acme-blue
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
写页面内容之前,把选中的主题名写进 `deck.spec.json`。绑定后的 deck 命令只读这个名字,没有渲染时临时换主题。
|
|
88
|
+
|
|
89
|
+
工作流中可以换绑到菜单相同的配色 fork。菜单不同就是另一套主题。回到本步骤,保留意图、叙事、事实、数据、图片与可复用文案,再按新菜单重写 spec 与填充。
|
|
88
90
|
|
|
89
|
-
|
|
90
|
-
- 从不通过删除 `validate` 报错所指的内容来绕过它——去重组它(拆分 slide、收紧标题、换一个更紧凑的 component 类型)
|
|
91
|
-
- 面向用户的 deck 文本跟随用户使用的语言,IR 的结构性字段永远用 schema 里的英文枚举值
|
|
92
|
-
- 从不告诉用户 `chart`、`data_table` 里的数字可以在 PowerPoint 里直接编辑。这两类组件渲染出来是成组的图形加文字,样式和文字都能自由改,但背后没有原生的图表部件,也没有 `<a:tbl>`。要改数字,去改 IR 再重新渲染
|
|
91
|
+
### 4. 用 `kind` 写 spec
|
|
93
92
|
|
|
94
|
-
|
|
93
|
+
spec 锁定主题、叙事、品牌姿态、页面顺序、页型、标题,以及每张内容页的 `kind`。它不保存任何渲染选择状态。
|
|
94
|
+
|
|
95
|
+
- `cover`、`chapter`、`ending` 是页型,不写 `kind`。
|
|
96
|
+
- 每张 `content` 页必须显式写且只写一个 `kind`。
|
|
97
|
+
- 作者只写语义 `kind`,从不选择页面的脸或几何。
|
|
98
|
+
- `focus` 与 `summary` 是可选写作提示。
|
|
99
|
+
|
|
100
|
+
运行 `pptwise spec validate deck.spec.json`,直到打印 `OK`。内容页 `kind` 不在绑定主题菜单中时会硬报错,并列出菜单提供的词。不要为了消错给页面贴一个失真的词。只有页面意图确实匹配时才换词,否则回到主题层。
|
|
101
|
+
|
|
102
|
+
11 个词及边界见 `references/layouts.md`。完整 spec 与主题创建流程见 `references/spec.md`。
|
|
103
|
+
|
|
104
|
+
### 5. 填页面
|
|
105
|
+
|
|
106
|
+
每批至多写四个 `pages/<id>.json`。页面文件可以含 `components`、`background`、`image_side`、`footnote`、`notes`。不要重复 `type`、`kind`、`heading`,它们归 spec。
|
|
107
|
+
|
|
108
|
+
选择服务本页 `kind` 的组件。`quote` 是页面讲法,引用组件名是 `blockquote`。组件归属与相似项对照见 `references/components.md`。节奏与容量见 `references/density.md`。图片流程见 `references/images.md`。
|
|
109
|
+
|
|
110
|
+
每批完成后运行:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pptwise assemble deck-dir/
|
|
114
|
+
pptwise validate deck-dir/
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
修完每个错误后重跑两条命令。重组内容,不要删除校验抓到的信息。
|
|
118
|
+
|
|
119
|
+
### 6. 审查、预览与渲染
|
|
120
|
+
|
|
121
|
+
所有页面填完后运行:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pptwise audit deck-dir/
|
|
125
|
+
pptwise preview deck-dir/ --html
|
|
126
|
+
pptwise render deck-dir/
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
交付前 `audit` 必须以 0 退出。文字压在照片背景上时加 `--pixels`。有 `pptwise_preview` 工具时优先使用。否则交付命令打印的 `preview.html` 路径,或运行 `pptwise serve deck-dir/ --no-open` 做实时浏览器审阅。把 `render` 打印的 `.pptx` 绝对路径报给用户。
|
|
130
|
+
|
|
131
|
+
只有用户明确接受妥协时才使用 `--draft` 或 `--allow-dropped-content`。
|
|
132
|
+
|
|
133
|
+
## 快速组件分派
|
|
134
|
+
|
|
135
|
+
| 页面意图 | `kind` | 常用组件 |
|
|
136
|
+
| --- | --- | --- |
|
|
137
|
+
| 有顺序的论证 | `points` | `bullets`、`numbered_cards`、`paragraph` |
|
|
138
|
+
| 可换序的并列项 | `list` | `row_cards`、`icon_cards`、`tag_row`、`people_cards` |
|
|
139
|
+
| 并排看差异 | `comparison` | `comparison`、`image_compare`、`matrix`、`swot` |
|
|
140
|
+
| 有方向的步骤或时间 | `process` | `steps`、`flowchart`、`timeline`、`roadmap`、`gantt`、`cycle` |
|
|
141
|
+
| 一组数字的结构 | `data` | `chart`、`data_table`、`kpi_cards`、`heatmap`、`sankey` |
|
|
142
|
+
| 画面本身就是信息 | `photo` | `image`、`image_grid`、`device_mockup` |
|
|
143
|
+
| 作者自己的立论 | `statement` | `verdict_banner`、`callout`,也可以没有组件 |
|
|
144
|
+
| 借别人之口 | `quote` | `blockquote` |
|
|
145
|
+
| 一个数字就是全部 | `fact` | 单项 `kpi_cards`,也可以没有组件 |
|
|
146
|
+
| 断言配一件展品 | `evidence` | `image`、`chart`、`data_table`、`code`、`device_mockup` |
|
|
147
|
+
| 包含或层级 | `hierarchy` | `architecture`、`bmc`、`five_forces`、`rings` |
|
|
148
|
+
|
|
149
|
+
## 规则
|
|
95
150
|
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
- `
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
151
|
+
- 从不编辑或后处理生成的 `.pptx`。
|
|
152
|
+
- 从不在作者内容中加入坐标、SVG、页面脸名或几何控制。
|
|
153
|
+
- 面向用户的 deck 文案跟随用户语言。schema 键与枚举值使用英文。
|
|
154
|
+
- 不声称 `chart` 或 `data_table` 的数字是原生 PowerPoint 数据对象。它们导出为可编辑的成组图形与文字。改数字要改源文件并重新渲染。
|
|
155
|
+
- preview 全程只读。修订回到 `deck.spec.json`、`pages/*.json`、资产或绑定主题文件。
|
|
156
|
+
|
|
157
|
+
## 何时阅读
|
|
158
|
+
|
|
159
|
+
- `references/spec.md`:意图、叙事、主题创建、绑定、换绑、spec 与菜单错误。
|
|
160
|
+
- `references/layouts.md`:在 11 个 `kind` 中选择。
|
|
161
|
+
- `references/components.md`:组件归属、字段与相似项选择。
|
|
162
|
+
- `references/density.md`:节奏、容量、独占页面组件与局部装饰。
|
|
163
|
+
- `references/branding.md`:deck 品牌姿态、无框页面、logo 与品牌抽取。
|
|
164
|
+
- `references/images.md`:图片资产、图库、生图,以及 `photo` 和 `evidence` 的边界。
|
|
165
|
+
- `references/validate.md`:assemble、validate、audit、preview、serve、render 与修订循环。
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
# Branding posture
|
|
2
2
|
|
|
3
|
-
Read this when extracting
|
|
3
|
+
Read this when deciding deck-level brand visibility, extracting an Office brand, or understanding why a page has no brand frame.
|
|
4
4
|
|
|
5
|
-
A brand signal
|
|
5
|
+
A brand signal controls appearance. It does not choose the narrative or the page kind.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Deck-level posture
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`branding` has three values:
|
|
10
|
+
|
|
11
|
+
| value | visible result |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `full` | Keeps the logo throughout, draws the content-page footer and metadata, and allows confidentiality and date on cover and ending metadata rows. |
|
|
14
|
+
| `cover-only` | Keeps the logo on cover and chapter pages. Content and ending pages drop the shared footer, metadata, and logo. |
|
|
15
|
+
| `minimal` | Keeps the logo but drops the content-page footer rule and metadata. |
|
|
16
|
+
|
|
17
|
+
Omitting `branding` is exactly the same as `cover-only`. Choose `full` only when every content page needs the organization footer, such as a confidential or controlled document.
|
|
18
|
+
|
|
19
|
+
## Page-level silence
|
|
20
|
+
|
|
21
|
+
The deck posture is only the broad permission. A face may carry the structural fact `branding: "none"`. A theme menu entry may also declare `brand: "none"`. Either one removes the whole shared brand fragment from that page, even when the deck says `full`.
|
|
22
|
+
|
|
23
|
+
This is intentional for faces whose composition has no safe brand frame. It is not a missing logo bug and it must not be repaired with page content. Theme motifs are separate from branding and remain governed by the face and menu decoration rules.
|
|
24
|
+
|
|
25
|
+
## Extract a complete v2 theme
|
|
26
|
+
|
|
27
|
+
When the user supplies a `.thmx`, `.potx`, or branded `.pptx`, extract colors and fonts locally. Choose a donor whose menu fits the intended story because extraction copies that complete menu.
|
|
10
28
|
|
|
11
29
|
```bash
|
|
12
|
-
pptwise brand extract corp-template.pptx
|
|
13
|
-
|
|
30
|
+
pptwise brand extract corp-template.pptx \
|
|
31
|
+
-o deck-dir/theme.json \
|
|
32
|
+
--id acme \
|
|
33
|
+
--from consulting
|
|
14
34
|
```
|
|
15
35
|
|
|
16
|
-
|
|
36
|
+
The output is a self-contained version 2 theme with style tokens, brand tokens, occasions, identity, and a complete menu. It has no base reference and inherits nothing at load time. Bind `acme` in `deck.spec.json`, then project commands resolve `deck-dir/theme.json` automatically.
|
|
37
|
+
|
|
38
|
+
To compare the result against other named themes, run the fixed fitting-room sample from a directory where all names resolve:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pptwise theme try acme,consulting,swiss
|
|
42
|
+
```
|
|
17
43
|
|
|
18
|
-
|
|
44
|
+
The loader checks contrast. If extraction produces unsafe text and background pairs, adjust the extracted theme or create a palette fork. Do not add ad hoc per-page color overrides.
|
|
@@ -3,19 +3,47 @@ summary: 'skills/pptwise/references/branding.md 的中文阅读镜像'
|
|
|
3
3
|
mirror_of: skills/pptwise/references/branding.md
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# 品牌姿态
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
何时读:决定整份 deck 的品牌可见度,抽取 Office 品牌,或理解某页为什么没有品牌框时。
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
品牌信号只控制外观,不负责选择叙事或页面讲法。
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Deck 级姿态
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`branding` 有三个值:
|
|
15
|
+
|
|
16
|
+
| value | 可见结果 |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `full` | 全程保留 logo,绘制内容页页脚与元数据,并允许封面和结尾的元数据行显示保密级别与日期。 |
|
|
19
|
+
| `cover-only` | 只在封面与章节页保留 logo。内容页与结尾页不画共享页脚、元数据和 logo。 |
|
|
20
|
+
| `minimal` | 保留 logo,但不画内容页页脚线与元数据。 |
|
|
21
|
+
|
|
22
|
+
省略 `branding` 与显式写 `cover-only` 完全相同。只有每张内容页都需要机构页脚时才选 `full`,例如保密或受控文档。
|
|
23
|
+
|
|
24
|
+
## 页面级静默
|
|
25
|
+
|
|
26
|
+
Deck 姿态只是广义许可。一张脸可以把 `branding: "none"` 作为不可更改的结构事实。主题菜单条目也可以声明 `brand: "none"`。两者任意一个成立时,该页都不会出现共享品牌片段,即使 deck 选择了 `full`。
|
|
27
|
+
|
|
28
|
+
这适用于构图本身没有安全品牌框的脸。它不是 logo 丢失,也不应通过页面内容补救。主题装饰与品牌相互独立,仍由脸与菜单的装饰规则决定。
|
|
29
|
+
|
|
30
|
+
## 抽取完整 v2 主题
|
|
31
|
+
|
|
32
|
+
用户提供 `.thmx`、`.potx` 或带品牌的 `.pptx` 时,在本机抽取颜色和字体。先选择一个菜单适合目标故事的供体,因为抽取结果会完整复制该菜单。
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pptwise brand extract corp-template.pptx \
|
|
36
|
+
-o deck-dir/theme.json \
|
|
37
|
+
--id acme \
|
|
38
|
+
--from consulting
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
输出是自包含的版本 2 主题,包含样式 token、品牌 token、场合、个性强度和完整菜单。它没有基础引用,加载时也不继承任何东西。在 `deck.spec.json` 中绑定 `acme` 后,项目命令会自动解析 `deck-dir/theme.json`。
|
|
42
|
+
|
|
43
|
+
要与其他命名主题比较,在所有名称都能解析的目录运行固定试衣样稿:
|
|
15
44
|
|
|
16
45
|
```bash
|
|
17
|
-
pptwise
|
|
18
|
-
pptwise render deck-dir/ # theme.json 自动装载。在 deck.spec.json 里写 "theme": "acme"
|
|
46
|
+
pptwise theme try acme,consulting,swiss
|
|
19
47
|
```
|
|
20
48
|
|
|
21
|
-
|
|
49
|
+
装载器会检查对比度。抽取结果若产生不安全的文字与背景组合,应调整主题或创建配色分叉,不要增加临时的单页颜色覆盖。
|
|
@@ -1,35 +1,65 @@
|
|
|
1
1
|
# Component guide
|
|
2
2
|
|
|
3
|
-
Read this when choosing
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
Read this when choosing the typed content units that fill a page after its theme and `kind` are fixed.
|
|
4
|
+
|
|
5
|
+
## Naming
|
|
6
|
+
|
|
7
|
+
The component type is `blockquote`. The page kind is `quote`. Use a `blockquote` for attributed prose inside a `quote` page or as supporting evidence elsewhere. Never write a component type named `quote`.
|
|
8
|
+
|
|
9
|
+
## Semantic homes
|
|
10
|
+
|
|
11
|
+
The table gives each component's normal kind home. A component may serve more than one kind when the page's semantic move remains honest. The kind names what the page is doing. The component names the content unit that does the work.
|
|
12
|
+
|
|
13
|
+
| component | normal kind ownership |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `bullets` | `points`, `list` |
|
|
16
|
+
| `paragraph` | `points`, `statement` |
|
|
17
|
+
| `blockquote` | `quote` |
|
|
18
|
+
| `callout` | `points`, `statement`, `evidence` |
|
|
19
|
+
| `code` | `points`, `evidence` |
|
|
20
|
+
| `kpi_cards` | `data`, `fact` |
|
|
21
|
+
| `chart` | `data`, `evidence` |
|
|
22
|
+
| `flowchart` | `process` |
|
|
23
|
+
| `architecture` | `hierarchy` |
|
|
24
|
+
| `timeline` | `process` |
|
|
25
|
+
| `comparison` | `comparison` |
|
|
26
|
+
| `icon_cards` | `list`, `points` |
|
|
27
|
+
| `row_cards` | `list`, `points` |
|
|
28
|
+
| `steps` | `process` |
|
|
29
|
+
| `rings` | `data`, `hierarchy` |
|
|
30
|
+
| `numbered_cards` | `points`, `process` |
|
|
31
|
+
| `roadmap` | `process` |
|
|
32
|
+
| `matrix` | `comparison`, `hierarchy` |
|
|
33
|
+
| `insight_panel` | `points`, `evidence` |
|
|
34
|
+
| `verdict_banner` | `statement`, `points` |
|
|
35
|
+
| `citation` | `quote`, `evidence` |
|
|
36
|
+
| `image` | `photo`, `evidence` |
|
|
37
|
+
| `image_grid` | `photo`, `list` |
|
|
38
|
+
| `image_compare` | `comparison`, `evidence` |
|
|
39
|
+
| `swot` | `comparison` |
|
|
40
|
+
| `bmc` | `hierarchy` |
|
|
41
|
+
| `waterfall` | `data`, `process` |
|
|
42
|
+
| `gantt` | `process` |
|
|
43
|
+
| `pest` | `comparison` |
|
|
44
|
+
| `five_forces` | `hierarchy` |
|
|
45
|
+
| `heatmap` | `data`, `comparison` |
|
|
46
|
+
| `sankey` | `data`, `process` |
|
|
47
|
+
| `data_table` | `data`, `evidence` |
|
|
48
|
+
| `device_mockup` | `photo`, `evidence` |
|
|
49
|
+
| `cycle` | `process` |
|
|
50
|
+
| `people_cards` | `list` |
|
|
51
|
+
| `tag_row` | `list` |
|
|
52
|
+
|
|
53
|
+
## Lookalikes
|
|
54
|
+
|
|
55
|
+
- Use `steps` for a linear sequence, `flowchart` for branching decisions, and `cycle` when the final stage returns to the first.
|
|
56
|
+
- Use `roadmap` for workstreams without a shared numeric axis. Use `gantt` for dated bars on one shared axis.
|
|
57
|
+
- Use `pest` for the four external macro factors. Use `swot` for internal and external strategic assessment.
|
|
58
|
+
- Use `sankey` when band width carries a conserved quantity through branches and merges. Use `flowchart` when branches carry decisions rather than quantities.
|
|
59
|
+
- Use `data_table` when exact values must be read row by row. Use `chart` when the audience should grasp a numeric shape at a glance. Use `comparison` for qualitative attributes.
|
|
60
|
+
- Use `gauge` inside `chart` for one value against one target. Use `kpi_cards` for several independent headline values.
|
|
61
|
+
- Use `tag_row` only for short labels. Use `bullets` for prose items and cards for items with their own description.
|
|
62
|
+
|
|
63
|
+
`architecture.layers` paints top to bottom by default. Set `direction: "bottom_up"` when the authored order should begin at the foundation. Keep the array in narrative order.
|
|
64
|
+
|
|
65
|
+
`swot`, `bmc`, `waterfall`, `gantt`, `pest`, `five_forces`, `heatmap`, and `sankey` are full-body components. Each must be the page's only component.
|
|
@@ -5,36 +5,66 @@ mirror_of: skills/pptwise/references/components.md
|
|
|
5
5
|
|
|
6
6
|
# 组件指南
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
8
|
+
何时读:主题与 `kind` 已经确定,需要选择填充页面的类型化内容单元时。
|
|
9
|
+
|
|
10
|
+
## 命名
|
|
11
|
+
|
|
12
|
+
组件类型叫 `blockquote`。页面讲法叫 `quote`。有归属的引文放进 `blockquote`,它既可以出现在 `quote` 页面,也可以作为其他页面的证据。不要写名为 `quote` 的组件类型。
|
|
13
|
+
|
|
14
|
+
## 语义归属
|
|
15
|
+
|
|
16
|
+
下表给出每种组件通常归属的 kind。只要页面的语义动作仍然准确,一个组件可以服务多个 kind。kind 命名页面在做什么,组件命名完成这件事的内容单元。
|
|
17
|
+
|
|
18
|
+
| component | 通常归属的 kind |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `bullets` | `points`, `list` |
|
|
21
|
+
| `paragraph` | `points`, `statement` |
|
|
22
|
+
| `blockquote` | `quote` |
|
|
23
|
+
| `callout` | `points`, `statement`, `evidence` |
|
|
24
|
+
| `code` | `points`, `evidence` |
|
|
25
|
+
| `kpi_cards` | `data`, `fact` |
|
|
26
|
+
| `chart` | `data`, `evidence` |
|
|
27
|
+
| `flowchart` | `process` |
|
|
28
|
+
| `architecture` | `hierarchy` |
|
|
29
|
+
| `timeline` | `process` |
|
|
30
|
+
| `comparison` | `comparison` |
|
|
31
|
+
| `icon_cards` | `list`, `points` |
|
|
32
|
+
| `row_cards` | `list`, `points` |
|
|
33
|
+
| `steps` | `process` |
|
|
34
|
+
| `rings` | `data`, `hierarchy` |
|
|
35
|
+
| `numbered_cards` | `points`, `process` |
|
|
36
|
+
| `roadmap` | `process` |
|
|
37
|
+
| `matrix` | `comparison`, `hierarchy` |
|
|
38
|
+
| `insight_panel` | `points`, `evidence` |
|
|
39
|
+
| `verdict_banner` | `statement`, `points` |
|
|
40
|
+
| `citation` | `quote`, `evidence` |
|
|
41
|
+
| `image` | `photo`, `evidence` |
|
|
42
|
+
| `image_grid` | `photo`, `list` |
|
|
43
|
+
| `image_compare` | `comparison`, `evidence` |
|
|
44
|
+
| `swot` | `comparison` |
|
|
45
|
+
| `bmc` | `hierarchy` |
|
|
46
|
+
| `waterfall` | `data`, `process` |
|
|
47
|
+
| `gantt` | `process` |
|
|
48
|
+
| `pest` | `comparison` |
|
|
49
|
+
| `five_forces` | `hierarchy` |
|
|
50
|
+
| `heatmap` | `data`, `comparison` |
|
|
51
|
+
| `sankey` | `data`, `process` |
|
|
52
|
+
| `data_table` | `data`, `evidence` |
|
|
53
|
+
| `device_mockup` | `photo`, `evidence` |
|
|
54
|
+
| `cycle` | `process` |
|
|
55
|
+
| `people_cards` | `list` |
|
|
56
|
+
| `tag_row` | `list` |
|
|
57
|
+
|
|
58
|
+
## 相近组件
|
|
59
|
+
|
|
60
|
+
- 直线步骤用 `steps`,有决策分支用 `flowchart`,末段回到首段用 `cycle`。
|
|
61
|
+
- 没有共享数值轴的工作线用 `roadmap`,在同一日期轴上比较条形用 `gantt`。
|
|
62
|
+
- 四类外部宏观因素用 `pest`,同时评估内外部战略条件用 `swot`。
|
|
63
|
+
- 带宽承载守恒数量并发生分支与汇合时用 `sankey`,分支表达决策而非数量时用 `flowchart`。
|
|
64
|
+
- 需要逐行读取精确值时用 `data_table`,需要一眼看懂数值形态时用 `chart`,定性属性对照用 `comparison`。
|
|
65
|
+
- 一个值对一个目标用 `chart` 内的 `gauge`,多个独立头条数字用 `kpi_cards`。
|
|
66
|
+
- `tag_row` 只放短标签。句子式条目用 `bullets`,每项都有说明文字时用卡片组件。
|
|
67
|
+
|
|
68
|
+
`architecture.layers` 默认从上向下绘制。作者按基座优先的顺序写作时,设置 `direction: "bottom_up"`,不要手工倒置数组。
|
|
69
|
+
|
|
70
|
+
`swot`、`bmc`、`waterfall`、`gantt`、`pest`、`five_forces`、`heatmap` 与 `sankey` 是全页组件。它们必须独占页面。
|