dsh-ppt 0.22.1 → 0.23.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/lib/config.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { PptConfig } from './types.js';
2
2
  export declare const PPT_OUTPUT_DIR_ENV = "DSH_PPT_OUTPUT_DIR";
3
3
  export declare const DEFAULT_MAX_SLIDES = 60;
4
- export declare const ALLOWED_THEME_IDS: readonly ["swiss", "velvet", "data", "soft", "bold", "consulting", "cobalt-cream", "exec-jilan", "exec-palace", "academic", "editorial-forest", "cartesian", "course-sage", "linear-dark", "keynote-light", "financial-ft", "medical-clean", "luxury-noir"];
4
+ export declare const ALLOWED_THEME_IDS: readonly ["swiss", "velvet", "data", "soft", "bold", "consulting", "cobalt-cream", "exec-jilan", "exec-palace", "academic", "editorial-forest", "cartesian", "course-sage", "linear-dark", "keynote-light", "financial-ft", "medical-clean", "luxury-noir", "bcg-emerald", "economist-brief", "venture-daylight", "stripe-craft", "aurora-stage", "obsidian-amber"];
5
5
  export declare const ALLOWED_CHROME_STYLES: readonly ["consulting-classic", "keynote-spatial", "editorial-folio", "saas-bento", "academic-minimal", "gov-ceremonial"];
6
6
  export interface ResolvedPptConfig {
7
7
  outputDir: string;
package/lib/config.js CHANGED
@@ -19,6 +19,12 @@ export const ALLOWED_THEME_IDS = [
19
19
  'financial-ft',
20
20
  'medical-clean',
21
21
  'luxury-noir',
22
+ 'bcg-emerald',
23
+ 'economist-brief',
24
+ 'venture-daylight',
25
+ 'stripe-craft',
26
+ 'aurora-stage',
27
+ 'obsidian-amber',
22
28
  ];
23
29
  export const ALLOWED_CHROME_STYLES = [
24
30
  'consulting-classic',
package/lib/tools.js CHANGED
@@ -111,12 +111,16 @@ function renderThemes(value) {
111
111
  }
112
112
  function renderAbsorb(value) {
113
113
  const brand = value.sanitizedBrand ?? {};
114
+ const profile = value.narrativeProfile;
114
115
  const parts = [
115
116
  'dsh-ppt 已解析参考演示文稿' + (value.pptxPath ? ':' + value.pptxPath : '') + '(共 ' + value.slideCount + ' 页)',
116
- '推荐内置主题:' + value.recommendedTheme + (value.recommendedChrome ? ' | 推荐母版骨架:' + value.recommendedChrome : ''),
117
- '净化后品牌色板:主色 ' + (brand.primaryColor || '—') + ' | 背景 ' + (brand.backgroundColor || '—') + ' | 文字 ' + (brand.textColor || '—') +
118
- (brand.fontFamily ? ' | 字体 ' + brand.fontFamily : '') + (brand.chromeStyle ? ' | 骨架 ' + brand.chromeStyle : '') + (brand.logo ? ' | 已提取母版 Logo' : ''),
119
- ...(value.slideSkeleton?.length ? ['提取页面骨架:' + value.slideSkeleton.slice(0, 8).map(s => `P${s.slideNumber}:${s.inferredLayout}`).join(' → ') + (value.slideSkeleton.length > 8 ? ' …' : '')] : []),
117
+ '推荐内置主题:' + value.recommendedTheme + (value.recommendedChrome ? ' | 推荐母版骨架:' + value.recommendedChrome : '') + (value.recommendedTableStyle ? ' | 推荐表格规范:' + value.recommendedTableStyle : ''),
118
+ '净化后品牌色板:主色 ' + (brand.primaryColor || '—') + (brand.secondaryColor ? ' | 辅色 ' + brand.secondaryColor : '') + ' | 背景 ' + (brand.backgroundColor || '—') + ' | 文字 ' + (brand.textColor || '—') +
119
+ (brand.fontFamily ? ' | 正文字体 ' + brand.fontFamily : '') + (brand.headingFont ? ' | 标题字体 ' + brand.headingFont : '') +
120
+ (brand.coverMode === 'inverted-accent' ? ' | 深色反白封面 (' + (brand.coverBg || brand.primaryColor || '') + ')' : '') +
121
+ (brand.chromeStyle ? ' | 骨架 ' + brand.chromeStyle : '') + (brand.logo ? ' | 已提取母版 Logo' : ''),
122
+ ...(value.slideSkeleton?.length ? ['提取页面骨架:' + value.slideSkeleton.slice(0, 8).map(s => `P${s.slideNumber}:${s.inferredLayout}${s.variant ? `[${s.variant}]` : ''}`).join(' → ') + (value.slideSkeleton.length > 8 ? ' …' : '')] : []),
123
+ ...(typeof profile?.diagramRatio === 'number' ? ['专业图示页占比:' + Math.round(Number(profile.diagramRatio) * 100) + '%'] : []),
120
124
  '可直接调用 ppt_create { title: "...", content: "...", referencePptx: ' + JSON.stringify(value.pptxPath || '<参考文件.pptx>') + ', cloneStructure: true } 自动套用净化后的色板、母版骨架与版式序列。',
121
125
  ];
122
126
  return oneText(parts.join('\n'));
@@ -182,8 +186,11 @@ const chartSchema = { type: ['object', 'null'], properties: {
182
186
  totalIndices: { type: 'array', items: { type: 'integer' }, description: '0-based category indices treated as totals in waterfall charts.' },
183
187
  }, additionalProperties: false };
184
188
  const brandProperties = {
185
- name: { type: 'string' }, primaryColor: { type: 'string' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' },
189
+ name: { type: 'string' }, primaryColor: { type: 'string' }, secondaryColor: { type: 'string' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' },
186
190
  fontFamily: { type: 'string', description: 'One installed font family; choose a font available on the recipient computer.' },
191
+ headingFont: { type: 'string', description: 'Optional distinct heading font family (e.g. Georgia or serif paired with sans body).' },
192
+ coverMode: { type: 'string', enum: ['standard', 'inverted-accent'], description: 'Optional cover polarity override.' },
193
+ coverBg: { type: 'string', description: 'Optional #RRGGBB cover background color when coverMode is inverted-accent.' },
187
194
  logo: { type: ['string', 'null'], description: 'Local PNG/JPEG logo path or data URI; null clears logo during edit.' }, footer: { type: 'string' },
188
195
  chromeStyle: {
189
196
  description: 'Master chrome skeleton override: ' + ALLOWED_CHROME_STYLES.join(' | ') + ' (or null to clear during edit).',
@@ -219,7 +226,7 @@ const slideLayouts = [
219
226
  'gantt', 'architecture', 'harvey', 'tam', 'org',
220
227
  'table', 'closing', 'image', 'image-left', 'image-right',
221
228
  'chart', 'chart-split', 'gallery', 'waterfall', 'flywheel',
222
- 'bento', 'pillars', 'exec-summary', 'timeline', 'steps', 'layers', 'funnel',
229
+ 'bento', 'pillars', 'exec-summary', 'timeline', 'steps', 'layers', 'funnel', 'chevron', 'value-chain',
223
230
  'issue-action', 'before-after', 'matrix-2x2', 'kpi-grid', 'scorecard',
224
231
  'formula-callout', 'takeaways', 'gallery-grid', 'ablation-compare', 'roadmap', 'swimlane', 'team',
225
232
  ];
@@ -228,6 +235,7 @@ const templateIds = [
228
235
  'consulting', 'keynote', 'gov-report', 'workshop',
229
236
  'architecture-review', 'financial-earnings', 'medical-case', 'postmortem',
230
237
  'marketing-campaign', 'promotion-review', 'legal-compliance', 'creative-lookbook',
238
+ 'quarterly-okr', 'product-prd', 'vc-daylight', 'industry-research',
231
239
  ];
232
240
  const tableStyles = ['consulting', 'booktabs', 'minimal', 'banded', 'harvey'];
233
241
  const slideProperties = {
@@ -288,7 +296,7 @@ export function buildPptTools(config) {
288
296
  return [
289
297
  {
290
298
  name: 'ppt_themes',
291
- description: 'List the 18 built-in visual themes of dsh-ppt (paired with 6 distinct master chrome skeletons: id, name, mood, best-for, chromeStyle, palette) before building a deck. Pass preview: true with outputDir to also write a self-contained theme gallery HTML plus one SVG palette card per theme. Use a theme id (or "auto") as the theme argument of ppt_create. 中文:列出 dsh-ppt 内置 18 套视觉主题与 6 套差异化母版骨架;传 preview: true + outputDir 会额外生成主题对比页和每套主题的 SVG 色板卡。',
299
+ description: 'List the 24 built-in visual themes of dsh-ppt (paired with 6 distinct master chrome skeletons: id, name, mood, best-for, chromeStyle, palette) before building a deck. Pass preview: true with outputDir to also write a self-contained theme gallery HTML plus one SVG palette card per theme. Use a theme id (or "auto") as the theme argument of ppt_create. 中文:列出 dsh-ppt 内置 24 套大师主题与 6 套差异化母版骨架;传 preview: true + outputDir 会额外生成主题对比页和每套主题的 SVG 色板卡。',
292
300
  parameters: compileParameters({
293
301
  lang: { type: 'string', description: 'Theme description language: zh (default), en, or bilingual.' },
294
302
  preview: { type: 'boolean', description: 'Write a theme gallery HTML and one SVG palette card per theme into outputDir. Default false (list only).' },
@@ -316,7 +324,7 @@ export function buildPptTools(config) {
316
324
  },
317
325
  {
318
326
  name: 'ppt_create',
319
- description: 'Generate a standalone HTML slideshow, editable 16:9 PPTX and JSON project from prepared Markdown or structured slides. Supports 18 themes, 6 distinct master chrome skeletons, Scenario Auto-Director (theme: "auto"), 24 native editable layouts & pro diagrams (KPI, Bento/pillar cards, comparison, 2x2 matrix, process/timeline/flywheel, gantt roadmaps, layered architecture, Harvey-ball matrices, concentric TAM/SAM/SOM, org/team charts, academic booktabs 3-line tables, chart-split, waterfall bridges), deep reference .pptx skeleton absorption (cloneStructure), and shared branding. 中文:先组织事实与内容,再生成可直接放映和继续编辑的三件套;内置 18 套主题、6 套差异化母版骨架、24 种原生可编辑版式与专业图示、16 套行业蓝图、13 类出版级图表与外部 PPTX 深度骨架吸收。',
327
+ description: 'Generate a standalone HTML slideshow, editable 16:9 PPTX and JSON project from prepared Markdown or structured slides. Supports 24 themes, 6 distinct master chrome skeletons, Scenario Auto-Director (theme: "auto"), 24+ native editable layouts & pro diagrams (KPI, Bento/pillar cards, comparison, 2x2 matrix, process/timeline/flywheel/chevron, gantt roadmaps, layered architecture, Harvey-ball matrices, concentric TAM/SAM/SOM, org/team charts, academic booktabs 3-line tables, chart-split, waterfall bridges), 20 industry blueprints, deep reference .pptx skeleton absorption (cloneStructure), and shared branding. 中文:先组织事实与内容,再生成可直接放映和继续编辑的三件套;内置 24 套大师主题、6 套差异化母版骨架、24+ 种原生可编辑版式与专业图示、20 套行业蓝图、13 类出版级图表与外部 PPTX 深度骨架吸收。',
320
328
  parameters: compileParameters({
321
329
  title: { type: 'string', required: true, description: 'Deck title (used for the cover and file names).' },
322
330
  content: { type: 'string', description: 'Markdown content: # cover title, ## slides, -/* bullets (supports **bold** lead-ins), | ... | tables, > quotes, > [!TAKEAWAY] bottom summary bar, ::: kpi|cards|comparison|process|matrix|callout|gantt|architecture|harvey|tam|org blocks, and <!-- 备注: ... --> speaker notes. Required unless slides or template is provided.' },
@@ -343,7 +351,7 @@ export function buildPptTools(config) {
343
351
  },
344
352
  {
345
353
  name: 'ppt_templates',
346
- description: 'List all 16 industry scenario blueprints (weekly, defense, project, pitch, consulting, keynote, gov-report, workshop, architecture-review, financial-earnings, medical-case, postmortem, marketing-campaign, promotion-review, legal-compliance, creative-lookbook) with recommended themes, chrome skeletons, and multi-archetype slide outlines. 中文:查看全部 16 套行业场景蓝图(含推荐主题、母版骨架与专业图示大纲),组织真实内容后再调用 ppt_create 交付成品。',
354
+ description: 'List all 20 industry scenario blueprints (weekly, defense, project, pitch, consulting, keynote, gov-report, workshop, architecture-review, financial-earnings, medical-case, postmortem, marketing-campaign, promotion-review, legal-compliance, creative-lookbook, quarterly-okr, product-prd, vc-daylight, industry-research) with recommended themes, chrome skeletons, and multi-archetype slide outlines. 中文:查看全部 20 套行业场景蓝图(含推荐主题、母版骨架与专业图示大纲),组织真实内容后再调用 ppt_create 交付成品。',
347
355
  parameters: compileParameters({ lang: { type: 'string', description: 'zh / en / bilingual, default zh.' } }),
348
356
  output: { schema: { type: 'object', additionalProperties: true }, render: (_args, value) => oneText(JSON.stringify(value, null, 2)) },
349
357
  execute: executors.templates,
package/lib/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /** dsh-ppt 的公共类型。 */
2
- export type PptThemeId = 'swiss' | 'velvet' | 'data' | 'soft' | 'bold' | 'consulting' | 'cobalt-cream' | 'exec-jilan' | 'exec-palace' | 'academic' | 'editorial-forest' | 'cartesian' | 'course-sage' | 'linear-dark' | 'keynote-light' | 'financial-ft' | 'medical-clean' | 'luxury-noir';
2
+ export type PptThemeId = 'swiss' | 'velvet' | 'data' | 'soft' | 'bold' | 'consulting' | 'cobalt-cream' | 'exec-jilan' | 'exec-palace' | 'academic' | 'editorial-forest' | 'cartesian' | 'course-sage' | 'linear-dark' | 'keynote-light' | 'financial-ft' | 'medical-clean' | 'luxury-noir' | 'bcg-emerald' | 'economist-brief' | 'venture-daylight' | 'stripe-craft' | 'aurora-stage' | 'obsidian-amber';
3
3
  export type PptChromeStyle = 'consulting-classic' | 'keynote-spatial' | 'editorial-folio' | 'saas-bento' | 'academic-minimal' | 'gov-ceremonial';
4
4
  export type PptPersonaId = 'auto' | 'consulting' | 'tech-pitch' | 'academic' | 'gov-exec' | 'education' | 'editorial';
5
5
  export type PptLanguage = 'zh' | 'en' | 'bilingual';
6
- export type PptSlideLayout = 'cover' | 'agenda' | 'section' | 'bullets' | 'statement' | 'quote' | 'kpi' | 'cards' | 'comparison' | 'matrix' | 'process' | 'callout' | 'gantt' | 'architecture' | 'harvey' | 'tam' | 'org' | 'table' | 'closing' | 'image' | 'image-left' | 'image-right' | 'chart' | 'chart-split' | 'gallery' | 'waterfall' | 'flywheel' | 'bento' | 'pillars' | 'exec-summary' | 'timeline' | 'steps' | 'layers' | 'funnel' | 'issue-action' | 'before-after' | 'matrix-2x2' | 'kpi-grid' | 'scorecard' | 'formula-callout' | 'takeaways' | 'gallery-grid' | 'ablation-compare' | 'roadmap' | 'swimlane' | 'team';
7
- export type PptTemplateId = 'weekly' | 'defense' | 'project' | 'pitch' | 'consulting' | 'keynote' | 'gov-report' | 'workshop' | 'architecture-review' | 'financial-earnings' | 'medical-case' | 'postmortem' | 'marketing-campaign' | 'promotion-review' | 'legal-compliance' | 'creative-lookbook';
6
+ export type PptSlideLayout = 'cover' | 'agenda' | 'section' | 'bullets' | 'statement' | 'quote' | 'kpi' | 'cards' | 'comparison' | 'matrix' | 'process' | 'callout' | 'gantt' | 'architecture' | 'harvey' | 'tam' | 'org' | 'table' | 'closing' | 'image' | 'image-left' | 'image-right' | 'chart' | 'chart-split' | 'gallery' | 'waterfall' | 'flywheel' | 'bento' | 'pillars' | 'exec-summary' | 'timeline' | 'steps' | 'layers' | 'funnel' | 'chevron' | 'value-chain' | 'issue-action' | 'before-after' | 'matrix-2x2' | 'kpi-grid' | 'scorecard' | 'formula-callout' | 'takeaways' | 'gallery-grid' | 'ablation-compare' | 'roadmap' | 'swimlane' | 'team';
7
+ export type PptTemplateId = 'weekly' | 'defense' | 'project' | 'pitch' | 'consulting' | 'keynote' | 'gov-report' | 'workshop' | 'architecture-review' | 'financial-earnings' | 'medical-case' | 'postmortem' | 'marketing-campaign' | 'promotion-review' | 'legal-compliance' | 'creative-lookbook' | 'quarterly-okr' | 'product-prd' | 'vc-daylight' | 'industry-research';
8
8
  export type PptTableStyle = 'consulting' | 'booktabs' | 'minimal' | 'banded' | 'harvey';
9
9
  export interface PptImageSpec {
10
10
  src?: string;
@@ -51,9 +51,13 @@ export interface PptChartSpec {
51
51
  export interface PptBrand {
52
52
  name?: string;
53
53
  primaryColor?: string;
54
+ secondaryColor?: string;
54
55
  backgroundColor?: string;
55
56
  textColor?: string;
56
57
  fontFamily?: string;
58
+ headingFont?: string;
59
+ coverMode?: 'standard' | 'inverted-accent';
60
+ coverBg?: string;
57
61
  logo?: string | null;
58
62
  footer?: string;
59
63
  chromeStyle?: PptChromeStyle | string | null;
@@ -303,6 +307,8 @@ export interface PptAbsorbResult {
303
307
  sanitizedTokens: Record<string, unknown>;
304
308
  recommendedTheme: string;
305
309
  recommendedChrome?: PptChromeStyle | string;
310
+ recommendedTableStyle?: PptTableStyle | string;
311
+ narrativeProfile?: Record<string, unknown>;
306
312
  slideSkeleton?: PptAbsorbSlideSkeleton[];
307
313
  layoutSummary?: Record<string, unknown>;
308
314
  }
@@ -347,6 +353,7 @@ export interface DeckEngine {
347
353
  buildDeck(options: Record<string, unknown>): PptCreateResult;
348
354
  buildThemePreview(options: Record<string, unknown>): PptThemePreviewResult;
349
355
  listThemes(lang?: string): PptThemeInfo[];
356
+ listMasterPresets?(lang?: string): unknown[];
350
357
  resolveTheme(input: unknown): Record<string, unknown>;
351
358
  resolveLanguage(input: unknown): Record<string, unknown>;
352
359
  }
@@ -24,6 +24,9 @@ const messages = {
24
24
  '主题名称无效': 'The theme identifier is invalid.',
25
25
  '品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo': 'Invalid brand settings. Check #RRGGBB colours, font family, footer length, or upload a PNG/JPEG logo from this panel.',
26
26
  '请选择有效的参考 PPTX 文件(10 MiB 以内)': 'Choose a valid reference PPTX file up to 10 MiB.',
27
+ '请选择有效的参考 PPTX 文件(24 MiB 以内)': 'Choose a valid reference PPTX file up to 24 MiB.',
28
+ '请输入演示文稿标题(1–200 字符)': 'Enter a presentation title (1–200 characters).',
29
+ '大纲正文超过 200,000 字符上限,请精简后重试': 'The outline exceeds 200,000 characters. Shorten it and try again.',
27
30
  '当前引擎版本暂不支持参考 PPTX 吸收': 'Reference PPTX style extraction is unavailable in the current engine.',
28
31
  '页数已达 120 页上限,无法继续新增页面': 'The presentation already has 120 slides and cannot add more.',
29
32
  '请选择 PNG 或 JPEG 图片': 'Choose a PNG or JPEG image.',
@@ -44,6 +47,7 @@ const messages = {
44
47
  '请从演示文稿面板操作': 'Perform this operation from the presentation panel.',
45
48
  '缺少请求内容': 'The request body is missing.',
46
49
  '图片或请求超过 12 MiB,请压缩后重试': 'The image or request exceeds 12 MiB. Reduce its size and try again.',
50
+ '图片或请求超过 36 MiB,请压缩后重试': 'The image or request exceeds 36 MiB. Reduce its size and try again.',
47
51
  '请求必须是对象': 'The request must be an object.',
48
52
  };
49
53
  export function englishWorkbenchMessage(message) {
package/lib/workbench.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /** Operator-only workbench. Paths come from successful tools, never browser input. */
2
- import { createHash } from 'node:crypto';
3
- import { appendFileSync, existsSync, lstatSync, mkdirSync, readFileSync, realpathSync } from 'node:fs';
2
+ import { createHash, randomUUID } from 'node:crypto';
3
+ import { appendFileSync, existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
4
4
  import { homedir } from 'node:os';
5
5
  import { basename, dirname, join, resolve } from 'node:path';
6
6
  import { getEngine } from './execution.js';
@@ -10,8 +10,8 @@ import { PptCoaching } from './coaching.js';
10
10
  import { PptVisual } from './visual.js';
11
11
  export const PPT_WORKBENCH_ROUTE = '/api/dsh-ppt/workbench';
12
12
  export const PPT_DOWNLOAD_ROUTE = '/api/dsh-ppt/download';
13
- const REQUEST_LIMIT = 15 * 1024 * 1024;
14
- const ABSORB_PPTX_LIMIT = 10 * 1024 * 1024;
13
+ const REQUEST_LIMIT = 36 * 1024 * 1024;
14
+ const ABSORB_PPTX_LIMIT = 24 * 1024 * 1024;
15
15
  const FILE_LIMIT = 64 * 1024 * 1024;
16
16
  const BUNDLE_LIMIT = 128 * 1024 * 1024;
17
17
  const ALLOWED_LAYOUTS = new Set([
@@ -19,14 +19,14 @@ const ALLOWED_LAYOUTS = new Set([
19
19
  'kpi', 'cards', 'comparison', 'matrix', 'process', 'callout',
20
20
  'gantt', 'architecture', 'harvey', 'tam', 'org',
21
21
  'table', 'closing', 'image', 'image-left', 'image-right', 'chart', 'chart-split',
22
- 'waterfall', 'gallery', 'flywheel',
22
+ 'waterfall', 'gallery', 'flywheel', 'chevron', 'value-chain',
23
23
  ]);
24
24
  const ALLOWED_TABLE_STYLES = new Set(['consulting', 'booktabs', 'minimal', 'banded', 'harvey']);
25
25
  const ALLOWED_DENSITIES = new Set(['compact', 'balanced', 'airy']);
26
26
  const ALLOWED_ITEM_STATUS = new Set(['neutral', 'accent', 'positive', 'negative', 'warning']);
27
27
  const ALLOWED_CHROME_STYLES = new Set(['consulting-classic', 'keynote-spatial', 'editorial-folio', 'saas-bento', 'academic-minimal', 'gov-ceremonial']);
28
28
  const ITEM_KEYS = new Set(['tag', 'badge', 'title', 'text', 'body', 'value', 'unit', 'delta', 'start', 'span', 'milestone', 'role', 'conversion', 'status', 'tone', 'bullets']);
29
- const BRAND_KEYS = new Set(['name', 'primaryColor', 'backgroundColor', 'textColor', 'fontFamily', 'logo', 'footer', 'chromeStyle']);
29
+ const BRAND_KEYS = new Set(['name', 'primaryColor', 'secondaryColor', 'backgroundColor', 'textColor', 'fontFamily', 'headingFont', 'coverMode', 'coverBg', 'logo', 'footer', 'chromeStyle']);
30
30
  const VISUAL_KEYS = new Set(['titleSize', 'bodySize', 'chartLabelSize', 'density', 'tableStyle', 'chrome']);
31
31
  /** Sharing keeps the offline deck, but omits the control for a project not in the ZIP. */
32
32
  function shareHtml(bytes) {
@@ -108,6 +108,19 @@ function starterSlide(archetype, language) {
108
108
  ],
109
109
  };
110
110
  }
111
+ if (kind === 'chevron' || kind === 'value-chain') {
112
+ return {
113
+ layout: 'process',
114
+ variant: 'chevron',
115
+ title: en ? 'End-to-end value chain and stage conversion' : '端到端业务价值链与阶段转化效能',
116
+ items: [
117
+ { tag: '01', title: en ? 'Discovery' : '需求洞察', text: en ? 'Capture high-intent demand and scope.' : '聚焦高频刚需痛点与准入标准。', conversion: '100%' },
118
+ { tag: '02', title: en ? 'Build & Pilot' : '敏捷验证', text: en ? 'Ship MVP benchmark with fast feedback.' : '快速交付标杆样板并完成实测。', conversion: '68%' },
119
+ { tag: '03', title: en ? 'Scale Rollout' : '规模推广', text: en ? 'Standardize playbooks across teams.' : '沉淀标准手册,多业务线铺开。', conversion: '45%' },
120
+ { tag: '04', title: en ? 'Compounding' : '复购续费', text: en ? 'Drive net retention and expansion.' : '持续复盘成效,驱动高净留存。', conversion: '118% NRR' },
121
+ ],
122
+ };
123
+ }
111
124
  if (kind === 'process') {
112
125
  return {
113
126
  layout: 'process',
@@ -340,9 +353,11 @@ export class PptWorkbench {
340
353
  catch { /* A check can register an older JSON-only project. */ }
341
354
  const render = this.renders.get(entry.id);
342
355
  const currentRender = render && render.revision === manifest.revision && digest(ordinaryFile(files.pptx)) === render.sourceSha256 ? render : undefined;
343
- const themes = typeof engine.listThemes === 'function' ? engine.listThemes(manifest.language === 'en' ? 'en' : 'zh') : [];
356
+ const langCode = manifest.language === 'en' ? 'en' : 'zh';
357
+ const themes = typeof engine.listThemes === 'function' ? engine.listThemes(langCode) : [];
358
+ const presets = typeof engine.listMasterPresets === 'function' ? engine.listMasterPresets(langCode) : [];
344
359
  return { ok: true, project: { ...entry, deckId: manifest.deckId, revision: manifest.revision, theme: manifest.theme ?? 'data',
345
- brand: manifest.brand ?? null, themes, slides: manifest.slides,
360
+ brand: manifest.brand ?? null, themes, presets, slides: manifest.slides,
346
361
  undoAvailable: manifest.history.length, quality: check, html, dataModel: manifest.dataModel ?? null,
347
362
  assets: Object.fromEntries(Object.entries(manifest.assets ?? {}).map(([key, value]) => [key, { data: value.data, mime: value.mime }])),
348
363
  render: currentRender ? { pageCount: currentRender.pngPaths.length, missingFonts: currentRender.missingFonts ?? [] } : null } };
@@ -367,20 +382,27 @@ export class PptWorkbench {
367
382
  throw new Error('品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo');
368
383
  if (item === undefined)
369
384
  continue;
370
- if (['primaryColor', 'backgroundColor', 'textColor'].includes(key)) {
371
- if (item === '')
385
+ if (['primaryColor', 'secondaryColor', 'backgroundColor', 'textColor', 'coverBg'].includes(key)) {
386
+ if (item === '' || item === null)
372
387
  continue;
373
388
  if (typeof item !== 'string' || !/^#[0-9A-Fa-f]{6}$/.test(item.trim()))
374
389
  throw new Error('品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo');
375
390
  out[key] = item.trim().toUpperCase();
376
391
  }
377
- else if (key === 'fontFamily') {
378
- if (item === '')
392
+ else if (key === 'fontFamily' || key === 'headingFont') {
393
+ if (item === '' || item === null)
379
394
  continue;
380
395
  if (typeof item !== 'string' || !/^[A-Za-z0-9\u4e00-\u9fff ,.'_-]{1,80}$/.test(item.trim()))
381
396
  throw new Error('品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo');
382
397
  out[key] = item.trim();
383
398
  }
399
+ else if (key === 'coverMode') {
400
+ if (item === '' || item === null)
401
+ continue;
402
+ if (item !== 'standard' && item !== 'inverted-accent')
403
+ throw new Error('品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo');
404
+ out.coverMode = item;
405
+ }
384
406
  else if (key === 'name' || key === 'footer') {
385
407
  if (typeof item !== 'string' || item.length > 200 || /[\x00-\x08\x0b\x0c\x0e-\x1f]/.test(item))
386
408
  throw new Error('品牌设置无效:请检查 #RRGGBB 颜色、安全字体名称、页脚长度或面板上传的 PNG/JPEG Logo');
@@ -601,14 +623,14 @@ export class PptWorkbench {
601
623
  }
602
624
  pptxBytes(raw) {
603
625
  if (typeof raw !== 'string' || raw.length < 120)
604
- throw new Error('请选择有效的参考 PPTX 文件(10 MiB 以内)');
626
+ throw new Error('请选择有效的参考 PPTX 文件(24 MiB 以内)');
605
627
  const clean = raw.replace(/^data:[^;,]+;base64,/, '').replace(/\s+/g, '');
606
- if (!clean || clean.length > 14_000_000 || clean.length % 4 === 1 || !/^[A-Za-z0-9+/]+={0,2}$/.test(clean)) {
607
- throw new Error('请选择有效的参考 PPTX 文件(10 MiB 以内)');
628
+ if (!clean || clean.length > 34_000_000 || clean.length % 4 === 1 || !/^[A-Za-z0-9+/]+={0,2}$/.test(clean)) {
629
+ throw new Error('请选择有效的参考 PPTX 文件(24 MiB 以内)');
608
630
  }
609
631
  const bytes = Buffer.from(clean, 'base64');
610
632
  if (bytes.byteLength < 100 || bytes.byteLength > ABSORB_PPTX_LIMIT || bytes[0] !== 0x50 || bytes[1] !== 0x4b) {
611
- throw new Error('请选择有效的参考 PPTX 文件(10 MiB 以内)');
633
+ throw new Error('请选择有效的参考 PPTX 文件(24 MiB 以内)');
612
634
  }
613
635
  return new Uint8Array(bytes);
614
636
  }
@@ -616,6 +638,96 @@ export class PptWorkbench {
616
638
  signal?.throwIfAborted();
617
639
  if (body.operation === 'list')
618
640
  return { ok: true, projects: this.catalog() };
641
+ if (body.operation === 'catalog-meta') {
642
+ const engine = await this.loadEngine();
643
+ signal?.throwIfAborted();
644
+ const langCode = body.lang === 'en' ? 'en' : 'zh';
645
+ return {
646
+ ok: true,
647
+ themes: typeof engine.listThemes === 'function' ? engine.listThemes(langCode) : [],
648
+ presets: typeof engine.listMasterPresets === 'function' ? engine.listMasterPresets(langCode) : [],
649
+ templates: typeof engine.listTemplates === 'function' ? engine.listTemplates(langCode) : [],
650
+ };
651
+ }
652
+ if (body.operation === 'create') {
653
+ if (['referencePptx', 'pptxPath', 'path', 'outputDir'].some(k => Object.hasOwn(body, k))) {
654
+ throw new Error('图片必须从面板上传,不能读取其他本地文件');
655
+ }
656
+ const title = typeof body.title === 'string' ? body.title.trim() : '';
657
+ if (!title || title.length > 200 || /[\x00-\x08\x0b\x0c\x0e-\x1f]/.test(title)) {
658
+ throw new Error('请输入演示文稿标题(1–200 字符)');
659
+ }
660
+ const content = typeof body.content === 'string' ? body.content : '';
661
+ if (content.length > 200_000)
662
+ throw new Error('大纲正文超过 200,000 字符上限,请精简后重试');
663
+ const lang = body.lang === 'en' || body.lang === 'bilingual' ? body.lang : 'zh';
664
+ const theme = typeof body.theme === 'string' && body.theme.trim() ? (body.theme.trim() === 'auto' ? 'auto' : this.themeId(body.theme)) : 'auto';
665
+ const template = typeof body.template === 'string' && body.template.trim() ? body.template.trim() : undefined;
666
+ const brand = body.brand !== undefined ? this.brandPatch(body.brand) : undefined;
667
+ const cloneStructure = body.cloneStructure === true;
668
+ const engine = await this.loadEngine();
669
+ signal?.throwIfAborted();
670
+ const decksDir = join(dirname(this.catalogPath), 'workbench-decks');
671
+ mkdirSync(decksDir, { recursive: true });
672
+ let tmpRefPath;
673
+ let skeletonSlides;
674
+ try {
675
+ if (body.referencePptxData !== undefined && body.referencePptxData !== null && body.referencePptxData !== '') {
676
+ if (typeof engine.absorbPptx !== 'function')
677
+ throw new Error('当前引擎版本暂不支持参考 PPTX 吸收');
678
+ const refBytes = this.pptxBytes(body.referencePptxData);
679
+ tmpRefPath = join(decksDir, '.absorb-' + randomUUID() + '.pptx');
680
+ writeFileSync(tmpRefPath, refBytes);
681
+ if (cloneStructure && !content.trim() && !template) {
682
+ const absorbed = await engine.absorbPptx({ bytes: refBytes, extractLogo: true, signal });
683
+ const rawSeq = Array.isArray(absorbed?.slideSkeleton) ? absorbed.slideSkeleton.slice(0, 20) : [];
684
+ if (rawSeq.length > 0) {
685
+ skeletonSlides = rawSeq.map((entry, idx) => {
686
+ const want = entry?.inferredLayout || 'bullets';
687
+ if (idx === 0 || want === 'cover') {
688
+ return { layout: 'cover', title, subtitle: lang === 'en' ? 'Cloned from reference deck structure' : '已吸收参考演示文稿视觉与骨架节奏' };
689
+ }
690
+ if (want === 'closing')
691
+ return starterSlide('closing', lang);
692
+ if (['chart', 'chart-split', 'waterfall'].includes(want))
693
+ return starterSlide('kpi', lang);
694
+ if (['image', 'image-left', 'image-right', 'gallery'].includes(want))
695
+ return starterSlide('cards', lang);
696
+ const baseSlide = starterSlide(ALLOWED_LAYOUTS.has(want) ? want : 'cards', lang);
697
+ if (entry?.variant && typeof entry.variant === 'string' && /^[a-z0-9-]{1,40}$/.test(entry.variant)) {
698
+ baseSlide.variant = entry.variant;
699
+ }
700
+ return baseSlide;
701
+ });
702
+ }
703
+ }
704
+ }
705
+ const fallbackContent = !content.trim() && !template && !skeletonSlides
706
+ ? (lang === 'en'
707
+ ? `# ${title}\n\n## Key Headline Metrics\n- **Target attainment**: 98.5% (+4.2% QoQ)\n- **Delivery velocity**: 2.4x faster cycle\n- **Customer adoption**: 118% net retention\n\n## Core Execution Pillars\n- **Focused scope**: Prioritize highest-value workflows\n- **Standardized quality**: Automated checks before handoff\n- **Closed-loop review**: Weekly metric tracking\n\n## Next Steps & Milestones\n- Phase 1: Finalize pilot sign-off this week\n- Phase 2: Roll out across priority teams\n- Phase 3: Lock next-quarter targets`
708
+ : `# ${title}\n\n## 核心结果与关键指标\n- **关键目标达成率**:98.5%(环比提升 +4.2%)\n- **协同交付提效**:端到端周期缩短至原来的 2.4 倍速\n- **核心场景采纳率**:标杆团队留存率达 118%\n\n## 三大核心推进支柱\n- **聚焦高频刚需**:围绕最具价值的业务主链路集中投入\n- **标准化质量门禁**:统一输入规范与交付前核验清单\n- **量化闭环复盘**:按周追踪先行指标并快速纠偏\n\n## 推进排期与下一步行动\n- 第一阶段:本周完成试点方案确认与责任分工\n- 第二阶段:下月完成重点业务团队推广落地\n- 第三阶段:季度末完成量化成效复盘与沉淀`)
709
+ : content;
710
+ const created = await (engine.buildDeckAsync ?? engine.buildDeck)({
711
+ title,
712
+ ...(skeletonSlides ? { slides: skeletonSlides } : {}),
713
+ ...(fallbackContent ? { content: fallbackContent } : {}),
714
+ ...(template ? { template } : {}),
715
+ theme,
716
+ lang,
717
+ ...(tmpRefPath ? { referencePptx: tmpRefPath, cloneStructure } : {}),
718
+ ...(brand ? { brand } : {}),
719
+ outputDir: decksDir,
720
+ cwd: decksDir,
721
+ signal,
722
+ });
723
+ await this.remember(created, {});
724
+ return { ...await this.view(digest(created.jsonPath)), created: true };
725
+ }
726
+ finally {
727
+ if (tmpRefPath)
728
+ rmSync(tmpRefPath, { force: true });
729
+ }
730
+ }
619
731
  if (body.operation === 'open')
620
732
  return this.view(body.id);
621
733
  const { entry, engine, manifest, files } = await this.project(body.id);
@@ -667,6 +779,9 @@ export class PptWorkbench {
667
779
  sanitizedTokens: absorbed?.sanitizedTokens ?? null,
668
780
  recommendedTheme: absorbed?.recommendedTheme ?? null,
669
781
  recommendedChrome: absorbed?.recommendedChrome ?? null,
782
+ recommendedTableStyle: absorbed?.recommendedTableStyle ?? null,
783
+ narrativeProfile: absorbed?.narrativeProfile ?? null,
784
+ warnings: absorbed?.warnings ?? [],
670
785
  slideSkeleton: absorbed?.slideSkeleton ?? null,
671
786
  layoutSummary: absorbed?.layoutSummary ?? null,
672
787
  },
@@ -885,7 +1000,7 @@ export class PptWorkbench {
885
1000
  size += value.byteLength;
886
1001
  if (size > REQUEST_LIMIT) {
887
1002
  await reader.cancel();
888
- return fail(413, '图片或请求超过 12 MiB,请压缩后重试');
1003
+ return fail(413, '图片或请求超过 36 MiB,请压缩后重试');
889
1004
  }
890
1005
  chunks.push(value);
891
1006
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ppt",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "description": "DeepSeek Harness 演示文稿生成与编辑工作台:输入材料即可导出离线 HTML 放映、可编辑 PPTX 与工程包,支持按页编辑、数据推演与预审演练,以及原生清透 / 米白纸感 / Claude 暖书卷 / 8-Bit 像素 / 晴空薄荷五套明亮工作台主题。欢迎提交 issues 和 PR。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dsh-ppt
3
- description: "Turn one sentence, a Markdown document, structured slides, or a reference .pptx into a world-class presentation deck: standalone HTML web slideshow + 100% native-editable PPTX + project manifest. Features Zero-Question Scenario Auto-Direction (theme: auto), 18 curated themes (12 daylight projector-safe + 6 dark elevation), 6 distinct Master Chrome Skeletons, 24 native-editable layouts & pro diagrams (Gantt, Architecture, Harvey Matrix, TAM Concentric, Org Tree, Bento, KPI, 2x2 Matrix, Timeline/Process/Flywheel, Booktabs 3-line tables, Chart-Split), 16 industry blueprints, 13 Economist/FT-grade charts (including vector Waterfall), deep external .pptx skeleton absorption (ppt_absorb / referencePptx / cloneStructure), data provenance, and bilingual ZH/EN support. 中文:把一句话、文档、数据或参考 PPTX 变成大师级演示文稿(独立 HTML 放映 + 100% 原生可编辑 PPTX),内置零追问智能审美导演、18 套明暗主题、6 套母版骨架、24 种原生版式与专业图示、16 套行业蓝图、13 类出版级图表与外部 PPTX 骨架吸收。"
3
+ description: "Turn one sentence, a Markdown document, structured slides, or a reference .pptx into a world-class presentation deck: standalone HTML web slideshow + 100% native-editable PPTX + project manifest. Features Zero-Question Scenario Auto-Direction (theme: auto), 24 curated themes (16 daylight projector-safe + 8 dark elevation), 8 world-class reference presets, 6 distinct Master Chrome Skeletons, 24+ native-editable layouts & pro diagrams (Value-Chain Chevrons, Gantt, Architecture, Harvey Matrix, TAM Concentric, Org Tree, Bento, KPI, 2x2 Matrix, Timeline/Process/Flywheel, Booktabs 3-line tables, Chart-Split), 20 industry blueprints, 13 Economist/FT-grade charts (including vector Waterfall), deep external .pptx skeleton & group-shape absorption (ppt_absorb / referencePptx / cloneStructure), data provenance, and bilingual ZH/EN support. 中文:把一句话、文档、数据或参考 PPTX 变成大师级演示文稿(独立 HTML 放映 + 100% 原生可编辑 PPTX),内置零追问智能审美导演、24 套明暗主题、8 套名家范本预设、6 套母版骨架、价值链五边形箭头等 24+ 种原生版式与专业图示、20 套行业蓝图、13 类出版级图表与外部 PPTX 深度吸收。"
4
4
  compatibility: "Node ^22.19.0 or >=24.0.0. Images/charts/PPTX absorption use @office-kit/pptx@0.21.0; optional data models use jsep@1.4.0 and csv-parse@6.1.0. Optional PNG/PDF renderer: @deepseek-ai/libreoffice-kit@0.2.3 (bundled by DSH 0.2.2+; 0.1.5 also supported). Cross-harness: copy the full directory and run npm install --ignore-scripts there."
5
5
  allowed-tools: "Bash, Read, Write, Edit"
6
6
  ---
@@ -17,11 +17,11 @@ allowed-tools: "Bash, Read, Write, Edit"
17
17
 
18
18
  普通用户无法分辨底层版式栅格、对比度或图表噪音——**你就是首席艺术总监,默认输出必须直接达到麦肯锡咨询 / Apple 发布会 / Nature 学术答辩 / 现代故宫霁蓝政务水准**:
19
19
 
20
- 1. **零追问场景定调(Zero-Question Auto-Director)**:用户说“帮我做个汇报 PPT”时,**不要反问一堆设计参数**。直接根据内容语义识别六大画像(商业咨询、政务述职、学术答辩、科技路演、教育讲义、人文品牌),传 `theme: 'auto'` 或显式匹配 18 套大师主题(含 `keynote-light`、`financial-ft`、`medical-clean`、`luxury-noir`)。**明亮投影优先**:会议室汇报、政企述职、学术答辩、教学课件一律优先选用 12 套浅底主题(通用默认 `consulting` 蔚蓝战略),绝不在常规办公场景盲目套用纯黑赛博风 `data`!并按场景自动匹配 **6 套差异化母版骨架(`chromeStyle`:`consulting-classic` / `keynote-spatial` / `editorial-folio` / `saas-bento` / `academic-minimal` / `gov-ceremonial`)**,彻底告别「一套模板换 14 种颜色」。
20
+ 1. **零追问场景定调(Zero-Question Auto-Director)**:用户说“帮我做个汇报 PPT”时,**不要反问一堆设计参数**。直接根据内容语义识别六大画像(商业咨询、政务述职、学术答辩、科技路演、教育讲义、人文品牌),传 `theme: 'auto'` 或显式匹配 24 套大师主题(含 `bcg-emerald`、`economist-brief`、`venture-daylight`、`stripe-craft`、`aurora-stage`、`obsidian-amber`、`keynote-light`、`financial-ft`、`medical-clean`、`luxury-noir`)。**明亮投影优先**:会议室汇报、政企述职、学术答辩、教学课件一律优先选用 16 套浅底主题(通用默认 `consulting` 蔚蓝战略),绝不在常规办公场景盲目套用纯黑赛博风 `data`!并按场景自动匹配 **6 套差异化母版骨架(`chromeStyle`:`consulting-classic` / `keynote-spatial` / `editorial-folio` / `saas-bento` / `academic-minimal` / `gov-ceremonial`)**,彻底告别「一套模板换颜色」。
21
21
  2. **结论先行(Action Titles)**:除封面、目录与章节页外,每页标题必须是**完整的结论判断句**(如「异步评审将工程师周均例会耗时压缩 75%」),严禁使用「项目背景」「数据分析」「周末到馆人次」等空洞名词标签。
22
- 3. **版式节奏与反要点墙(Anti-Bullet-Wall)**:优先传**结构化 `slides`**(或使用 `::: kpi / cards / comparison / process / matrix / callout / gantt / architecture / harvey / tam / org` 指令)充分利用 **24 套原生版式与专业图示**。**整套文稿严禁连续超过 2 页使用普通 `bullets` 要点列表**;8 页以上文稿须有节奏地交替视觉密度(指标用 `kpi`、排期用 `gantt`、系统分层用 `architecture`、竞品能力用 `harvey`、市场空间用 `tam`、组织团队用 `org`、并列支柱用 `cards[pillars/bento]`、痛点整改用 `comparison[issue-action]`、演进/闭环用 `process[timeline/steps/flywheel]`、四象限用 `matrix`、数据配洞察用 `chart-split`、学术对比用 `table[booktabs]` 三线表)。
22
+ 3. **版式节奏与反要点墙(Anti-Bullet-Wall)**:优先传**结构化 `slides`**(或使用 `::: kpi / cards / comparison / process / chevron / matrix / callout / gantt / architecture / harvey / tam / org` 指令)充分利用 **24+ 套原生版式与专业图示**。**整套文稿严禁连续超过 2 页使用普通 `bullets` 要点列表**;8 页以上文稿须有节奏地交替视觉密度(指标用 `kpi`、端到端价值链用 `chevron`、排期用 `gantt`、系统分层用 `architecture`、竞品能力用 `harvey`、市场空间用 `tam`、组织团队用 `org`、并列支柱用 `cards[pillars/bento]`、痛点整改用 `comparison[issue-action]`、演进/闭环用 `process[timeline/steps/flywheel/funnel]`、四象限用 `matrix`、数据配洞察用 `chart-split`、学术对比用 `table[booktabs]` 三线表)。
23
23
  4. **出版级图表与三线表**:单系列图表自动隐藏冗余图例,使用 `highlight: 'max' | 'last'` 突出焦点色柱、其余灰阶退后,直接显示数据标签,左下角附 `source` 数据来源;学术与严谨数据对比使用无竖线的 `booktabs` 三线表。
24
- 5. **双轨深层吸收优质 PPT**:无外部模板时调用内置 **18 套大师主题**、**6 套母版骨架**与 **16 套行业结构蓝图**;用户提供参考 `.pptx` 时先调 `ppt_absorb` 或直接传 `referencePptx` 自动提取并净化母版色板、字体、Logo、骨架特征(`extractedSkeleton`)、推荐骨架(`recommendedChrome`)与逐页分布(`slideSkeleton`),传 `cloneStructure: true` 可将 Markdown 大纲直接映射到吸收出的逐页版式序列与母版骨架!
24
+ 5. **双轨深层吸收优质 PPT**:无外部模板时调用内置 **24 套大师主题**、**8 套名家范本预设**、**6 套母版骨架**与 **20 套行业结构蓝图**;用户提供参考 `.pptx` 时先调 `ppt_absorb` 或直接传 `referencePptx` 自动递归拆解嵌套组合形状(`<p:grpSp>`)、提取并净化主辅双品牌色(`primaryColor` + `secondaryColor`)、标题/正文字体配对(`headingFont` + `fontFamily`)、深色封面+浅色正文极性(`coverMode: 'inverted-accent'`)、Logo、推荐骨架(`recommendedChrome`)与 24 版式逐页分布(`slideSkeleton`),传 `cloneStructure: true` 可将 Markdown 大纲直接映射到吸收出的逐页版式序列与母版骨架!
25
25
 
26
26
  ## 执行纪律(每次都要遵守)
27
27
 
@@ -34,8 +34,8 @@ allowed-tools: "Bash, Read, Write, Edit"
34
34
  ## 核心流水线
35
35
 
36
36
  1. **Probe & Auto-Direct 定调**:读入用户句子/文档/数据,静默判定听众与六大画像(见 `references/themes.md`)。若用户给了参考 `.pptx`,调 `ppt_absorb` 查看提取结果或在创建时传 `referencePptx`。一句话输入不反问,直接推断并生成完整成品。
37
- 2. **Storyline & Choreography 叙事与排布**:先读 `references/copywriting.md`。按金字塔原理 / SCQA 组织 5–16 页大纲,为每页撰写结论先行 Action Title、章节面包屑 `kicker`(如 `01 · 市场诊断`,禁止满屏重复「要点」)、底栏核心结论 `takeaway` 与数据出处 `source`,并规划多版式交替节奏。可调 `ppt_templates` 参考 **16 套行业结构蓝图**(`weekly | defense | project | pitch | consulting | keynote | gov-report | workshop | architecture-review | financial-earnings | medical-case | postmortem | marketing-campaign | promotion-review | legal-compliance | creative-lookbook`)。
38
- 3. **Theme 选主题与骨架**:不确定时在 `ppt_create` 传 `theme: 'auto'`(自动路由至明亮高质感场景主题与匹配骨架),或从 **18 套内置主题**中精确指定(调 `ppt_themes` 查看),并可通过 `brand.chromeStyle` 或单页 `chrome` 覆盖 6 套母版骨架。
37
+ 2. **Storyline & Choreography 叙事与排布**:先读 `references/copywriting.md`。按金字塔原理 / SCQA 组织 5–16 页大纲,为每页撰写结论先行 Action Title、章节面包屑 `kicker`(如 `01 · 市场诊断`,禁止满屏重复「要点」)、底栏核心结论 `takeaway` 与数据出处 `source`,并规划多版式交替节奏。可调 `ppt_templates` 参考 **20 套行业结构蓝图**(`weekly | defense | project | pitch | consulting | keynote | gov-report | workshop | architecture-review | financial-earnings | medical-case | postmortem | marketing-campaign | promotion-review | legal-compliance | creative-lookbook | quarterly-okr | product-prd | vc-daylight | industry-research`)。
38
+ 3. **Theme 选主题与骨架**:不确定时在 `ppt_create` 传 `theme: 'auto'`(自动路由至明亮高质感场景主题与匹配骨架),或从 **24 套内置主题**中精确指定(调 `ppt_themes` 查看),并可通过 `brand.chromeStyle` 或单页 `chrome` 覆盖 6 套母版骨架。
39
39
  - **重要 CLI 差异**:跨 harness 直接运行 `build-deck.mjs` 时,裸 CLI 缺省 `--theme` 为兼容旧脚本仍回退 `data`,因此 **CLI 调用请务必显式传 `--theme auto` 或具体场景主题 ID(如 `--theme consulting` / `--theme exec-jilan`)**!
40
40
  4. **Build 生成**:先读 `references/syntax.md`(用到图表/多图/外源母版/编辑时读 `references/advanced.md`)。
41
41
  - **推荐方式(DSH 内)**:调 `ppt_create`,优先传结构化 `slides`(精确控制 **24 种原生版式**含 `gantt / architecture / harvey / tam / org / kpi / cards / comparison / matrix / process / chart-split / table[booktabs] / callout`),或传带 `:::` 指令与 `**加粗引导词**:说明` 的 Markdown `content`。
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "dsh-ppt-skill",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Standalone dsh-ppt skill dependencies for image/chart export",
7
- "dependencies": { "@office-kit/pptx": "0.21.0", "csv-parse": "6.1.0", "jsep": "1.4.0" },
8
- "peerDependencies": { "@deepseek-ai/libreoffice-kit": "0.1.5 || 0.2.3" },
9
- "peerDependenciesMeta": { "@deepseek-ai/libreoffice-kit": { "optional": true } },
10
- "engines": { "node": "^22.19.0 || >=24.0.0" }
7
+ "dependencies": {
8
+ "@office-kit/pptx": "0.21.0",
9
+ "csv-parse": "6.1.0",
10
+ "jsep": "1.4.0"
11
+ },
12
+ "peerDependencies": {
13
+ "@deepseek-ai/libreoffice-kit": "0.1.5 || 0.2.3"
14
+ },
15
+ "peerDependenciesMeta": {
16
+ "@deepseek-ai/libreoffice-kit": {
17
+ "optional": true
18
+ }
19
+ },
20
+ "engines": {
21
+ "node": "^22.19.0 || >=24.0.0"
22
+ }
11
23
  }
@@ -4,11 +4,12 @@ Agent 先提炼真实内容与数据结论,再通过结构化参数生成可
4
4
 
5
5
  ---
6
6
 
7
- ## 一、16 套高品味行业结构蓝图(`ppt_templates`)
7
+ ## 一、20 套高品味行业结构蓝图(`ppt_templates`)
8
8
 
9
- 调 `ppt_templates` 可查看 16 套内置叙事与版式骨架(前 8 套兼容经典场景,后 8 套为高频垂直行业蓝图):
9
+ 调 `ppt_templates` 可查看 20 套内置叙事与版式骨架(前 8 套兼容经典场景,后 12 套为高频垂直行业与现代职场蓝图):
10
10
  - **经典 8 套**:`weekly`(周报复盘)、`defense`(学术答辩)、`project`(项目汇报 · 含 `gantt` 排期)、`pitch`(创业路演 · 含 `tam` + `harvey`)、`consulting`(战略咨询)、`keynote`(产品发布)、`gov-report`(政务述职)、`workshop`(培训工坊)
11
- - **新增 8 套**:`architecture-review`(技术架构评审)、`financial-earnings`(季度财报与业绩会)、`medical-case`(临床病例研讨)、`postmortem`(线上故障复盘)、`marketing-campaign`(品牌营销与增长战役)、`promotion-review`(个人述职与晋升答辩)、`legal-compliance`(法务合规与风控审计)、`creative-lookbook`(高端品牌策展与画册)
11
+ - **垂直行业 8 套**:`architecture-review`(技术架构评审)、`financial-earnings`(季度财报与业绩会)、`medical-case`(临床病例研讨)、`postmortem`(线上故障复盘)、`marketing-campaign`(品牌营销与增长战役)、`promotion-review`(个人述职与晋升答辩)、`legal-compliance`(法务合规与风控审计)、`creative-lookbook`(高端品牌策展与画册)
12
+ - **新增高频 4 套**:`quarterly-okr`(季度 OKR 复盘与规划 · 含 `chevron` 价值链)、`product-prd`(产品需求与方案评审 PRD)、`vc-daylight`(阅读版融资商业计划书 · 明亮投资备忘录风)、`industry-research`(行业深度研究与洞察 · 经济学人风)
12
13
 
13
14
  > 注意:`ppt_create` 仅传 `template` 而不提供实际 `content` / `slides` 时,仅生成带占位的待填草稿(返回 `deliveryStatus: "draft"`);必须组织好真实业务内容再生成,方能进入成品验收(`ready`)。
14
15
 
@@ -20,7 +20,7 @@
20
20
  | `cards` | `pillars \| bento \| exec-summary \| numbered` | `kicker, title, subtitle, items`(2–6 项), `takeaway` | **主力去要点墙版式**:并列支柱卡、Apple/Linear 非对称 Bento 网格、麦肯锡顶部总论断+三支柱 `exec-summary` |
21
21
  | `comparison` | `versus \| before-after \| do-dont \| issue-action` | `kicker, title, items`(2 列或 2–4 对配对行), `takeaway` | A/B 方案对比、改造前后、✓ 推荐 vs ✗ 误区、政企「痛点 ──▶ 整改举措」原生箭头配对 |
22
22
  | `matrix` | `2x2 \| grid` | `kicker, title, items`(4 象限), `takeaway` | 咨询四象限矩阵(带原生 X/Y 坐标轴箭头与象限卡片) |
23
- | `process` | `steps \| timeline \| layers \| funnel \| flywheel` | `kicker, title, items`(3–6 步), `takeaway` | 方法管线步骤、里程碑时间轴、技术架构分层、转化漏斗(支持 `delta` 转化率徽章)、4 节点增长飞轮闭环 |
23
+ | `process` | `steps \| timeline \| chevron \| layers \| funnel \| flywheel` | `kicker, title, items`(3–6 步), `takeaway` | 方法管线步骤、里程碑时间轴、**咨询价值链咬合五边形箭头(`chevron`,亦支持 `layout: "chevron" \| "value-chain"` 别名)**、技术分层、转化漏斗、4 节点增长飞轮 |
24
24
  | `callout` | `formula \| definition \| takeaways` | `kicker, title, subtitle, items / bullets, source` | 学术公式/算法定理框、核心概念定义卡、复盘行动清单 |
25
25
  | `table` | `tableStyle`: `consulting \| booktabs \| minimal \| banded \| harvey` | `kicker, title, rows`(首行表头), `takeaway, source` | 原生可编辑对比表(`booktabs` 为**无竖线学术三线表**;`harvey` 支持哈维球;数值列右对齐;> 8 行自动分页) |
26
26
  | **`gantt`** | `quarters \| months \| weeks \| swimlane` | `kicker, title, columns[], items[]`(`start, span, milestone?`), `takeaway` | **原生甘特排期图**:自动时间刻度栅格、泳道标签、比例条形块与菱形里程碑节点 |
@@ -1,8 +1,8 @@
1
- # dsh-ppt 大师主题系统、6 套母版骨架与色彩字体规范(18 套内置主题 + 外源母版吸收)
1
+ # dsh-ppt 大师主题系统、6 套母版骨架与色彩字体规范(24 套内置主题 + 8 套名家预设 + 外源母版吸收)
2
2
 
3
3
  每套主题在独立 HTML 与可编辑 PPTX 中共用同一套 **18 语义设计 Token(`theme.tokens`)**、**6 套差异化母版骨架(`chromeStyle`)** 与跨平台零缺字字体映射,确保屏幕放映、会议室投影仪与打印件视觉完全一致。
4
4
 
5
- > 预览全部 18 套主题:运行 `ppt_themes { preview: true, outputDir: "dist" }`(或 CLI `--theme-preview --out dist`),生成 `themes-preview.html` 对比页与 18 张 `theme-<id>.svg` 色板卡。
5
+ > 预览全部 24 套主题:运行 `ppt_themes { preview: true, outputDir: "dist" }`(或 CLI `--theme-preview --out dist`),生成 `themes-preview.html` 对比页与 24 张 `theme-<id>.svg` 色板卡。
6
6
 
7
7
  ---
8
8
 
@@ -44,9 +44,9 @@
44
44
 
45
45
  ---
46
46
 
47
- ## 三、18 套内置大师主题速查表(12 浅 + 6 深,全部通过 WCAG AA)
47
+ ## 三、24 套内置大师主题速查表(16 浅 + 8 深,全部通过 WCAG AA)
48
48
 
49
- 前 14 套保持向后兼容,第 14–17 项为 Phase 3 新增 4 套世界级专业主题:
49
+ 前 18 套保持向后兼容,第 18–23 项新增 6 套世界级标杆演示主题(BCG 翡翠战略、经济学人社论简报、红杉日间创投、Stripe 工程工坊、极光舞台、彭博黑曜终端):
50
50
 
51
51
  | ID | 中文名 | English | 明暗 | 画布 `canvas` | 卡片表面 `surface1` | 主文字 `inkPrimary` | 主强调 `accent` | 默认 `chromeStyle` |
52
52
  | --- | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -68,6 +68,12 @@
68
68
  | **`financial-ft`** | **金融时报粉** | **FT Salmon Financial** | **亮** | `#FFF1E5` | `#F6E3D2` | `#1A1817` | `#0D3D56` | `consulting-classic` |
69
69
  | **`medical-clean`** | **循证医学蓝绿** | **Clinical Evidence Teal** | **亮** | `#F8FAFC` | `#EEF5F7` | `#0F172A` | `#0F766E` | `academic-minimal` |
70
70
  | **`luxury-noir`** | **黑金典藏** | **Luxury Noir Gold** | **暗** | `#0B0B0D` | `#151519` | `#F5F2EB` | `#D4AF37` | `editorial-folio` |
71
+ | **`bcg-emerald`** | **翡翠战略** | **Emerald Strategy** | **亮** | `#FFFFFF` | `#F1F7F4` | `#0D1F18` | `#006B54` | `consulting-classic` |
72
+ | **`economist-brief`** | **经济学人简报** | **Economist Crimson** | **亮** | `#FBF9F5` | `#F3EEE6` | `#161616` | `#C8102E` | `editorial-folio` |
73
+ | **`venture-daylight`** | **红杉创投简报** | **Venture Memo Light** | **亮** | `#FCFCFA` | `#F4F3EE` | `#141413` | `#155EEF` | `saas-bento` |
74
+ | **`stripe-craft`** | **云靛工坊** | **Indigo Craft** | **亮** | `#F8FAFC` | `#EEF2F8` | `#0A2540` | `#533AFD` | `saas-bento` |
75
+ | **`aurora-stage`** | **极光发布会** | **Aurora Keynote** | **暗** | `#070C12` | `#0E1621` | `#F0F6FC` | `#10B981` | `keynote-spatial` |
76
+ | **`obsidian-amber`** | **黑曜终端** | **Terminal Amber** | **暗** | `#0C0D10` | `#15171D` | `#F4F4F5` | `#F59E0B` | `consulting-classic` |
71
77
 
72
78
  > **政务汇报反土味铁律(`exec-jilan` & `exec-palace`)**:彻底告别 `#FF0000` 刺眼荧光红满屏底色与 `#FFFF00` 土味黄字!两套东方政务主题均采用 `coverMode: 'inverted-accent'`——仅封面/章节过渡页使用深邃霁蓝(`#1A2B4C`)或沉淀故宫红(`#9E1B1E`)配描金细线镇场,**90% 的正文与数据页回归宣纸暖白浅底(`#F7F6F2` / `#F9F6F1`)**,既符合正式站位又确保会议室投影清晰锐利。
73
79