@topmindspace/tms-skills 0.1.14 → 0.1.16

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.en.md +3 -3
  3. package/README.md +3 -3
  4. package/package.json +1 -1
  5. package/top-ppt-html/README.en.md +2 -2
  6. package/top-ppt-html/README.md +1 -1
  7. package/top-ppt-html/SKILL.md +3 -3
  8. package/top-ppt-html/assets/examples/2026-09-09-architecture-graphite-dark.html +13 -12
  9. package/top-ppt-html/assets/examples/2026-09-09-presentation-business-blue.html +13 -12
  10. package/top-ppt-html/assets/examples/2026-09-09-research-mckinsey.html +13 -12
  11. package/top-ppt-html/assets/examples/2026-09-26-topmind-tms-skills-showcase.html +75 -40
  12. package/top-ppt-html/assets/examples/2026-09-26-topmind-tms-skills-showcase.model.json +82 -37
  13. package/top-ppt-html/assets/pptx-export.js +5 -5
  14. package/top-ppt-html/assets/showcase/showcase-charts.png +0 -0
  15. package/top-ppt-html/assets/showcase/showcase-cover.png +0 -0
  16. package/top-ppt-html/assets/showcase/showcase-gates.png +0 -0
  17. package/top-ppt-html/assets/showcase/showcase-modes.png +0 -0
  18. package/top-ppt-html/assets/showcase/showcase-positioning.png +0 -0
  19. package/top-ppt-html/assets/showcase/showcase-split.png +0 -0
  20. package/top-ppt-html/assets/showcase/showcase-toolbar.png +0 -0
  21. package/top-ppt-html/assets/showcase/style-business-blue-cover.png +0 -0
  22. package/top-ppt-html/assets/showcase/style-graphite-cover.png +0 -0
  23. package/top-ppt-html/assets/showcase/style-mckinsey-cover.png +0 -0
  24. package/top-ppt-html/assets/style-gallery.html +1 -1
  25. package/top-ppt-html/assets/templates/architecture.html +14 -13
  26. package/top-ppt-html/assets/templates/engine.css +7 -6
  27. package/top-ppt-html/assets/templates/presentation.html +14 -13
  28. package/top-ppt-html/assets/templates/research.html +14 -13
  29. package/top-ppt-html/assets/theme-overview-architecture.png +0 -0
  30. package/top-ppt-html/assets/theme-overview-research.png +0 -0
  31. package/top-ppt-html/assets/theme-overview.png +0 -0
  32. package/top-ppt-html/package-lock.json +2 -2
  33. package/top-ppt-html/package.json +1 -1
  34. package/top-ppt-html/references/components-atoms.md +3 -3
  35. package/top-ppt-html/references/content-rules.md +1 -1
  36. package/top-ppt-html/references/design-system.md +2 -1
  37. package/top-ppt-html/references/pptx-export.md +1 -1
  38. package/top-ppt-html/scripts/build_pptx.js +5 -5
  39. package/top-ppt-html/scripts/capture_showcase_pages.js +145 -0
  40. package/top-ppt-html/scripts/layout-constants.json +6 -2
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Capture every band section of showcase + golden examples into docs/showcase/*.
4
+ * Usage: node scripts/capture_showcase_pages.js
5
+ */
6
+ const path = require('path');
7
+ const fs = require('fs');
8
+ const { pathToFileURL } = require('url');
9
+ const { chromium } = require('playwright');
10
+
11
+ const ROOT = path.resolve(__dirname, '..');
12
+ const REPO = path.resolve(ROOT, '..');
13
+ const VIEW = { width: 1440, height: 810 }; // 16:9-ish at common laptop
14
+
15
+ const JOBS = [
16
+ {
17
+ html: path.join(ROOT, 'assets/examples/2026-09-26-topmind-tms-skills-showcase.html'),
18
+ outDir: path.join(REPO, 'docs/showcase/topmind-showcase'),
19
+ prefix: 'showcase',
20
+ sections: ['cover', 'agenda', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10', 's11', 's12', 'closing'],
21
+ aliases: {
22
+ cover: [
23
+ path.join(ROOT, 'assets/showcase/showcase-cover.png'),
24
+ path.join(REPO, 'docs/site-assets/showcase-cover.png'),
25
+ ],
26
+ s1: [
27
+ path.join(ROOT, 'assets/showcase/showcase-positioning.png'),
28
+ ],
29
+ s3: [
30
+ path.join(ROOT, 'assets/showcase/showcase-split.png'),
31
+ ],
32
+ s4: [
33
+ path.join(ROOT, 'assets/showcase/showcase-modes.png'),
34
+ path.join(REPO, 'docs/site-assets/showcase-modes.png'),
35
+ ],
36
+ s5: [
37
+ path.join(ROOT, 'assets/showcase/showcase-charts.png'),
38
+ ],
39
+ s6: [
40
+ path.join(REPO, 'docs/site-assets/showcase-s6.png'),
41
+ ],
42
+ s4_alt: null,
43
+ s8: [
44
+ path.join(ROOT, 'assets/showcase/showcase-gates.png'),
45
+ path.join(REPO, 'docs/site-assets/showcase-gates.png'),
46
+ ],
47
+ s11: [
48
+ path.join(ROOT, 'assets/showcase/showcase-toolbar.png'),
49
+ ],
50
+ },
51
+ },
52
+ {
53
+ html: path.join(ROOT, 'assets/examples/2026-09-09-presentation-business-blue.html'),
54
+ outDir: path.join(REPO, 'docs/showcase/presentation-business-blue'),
55
+ prefix: 'bizblue',
56
+ sections: ['cover', 'agenda', 's1', 's3', 'closing'],
57
+ styleCover: path.join(ROOT, 'assets/showcase/style-business-blue-cover.png'),
58
+ },
59
+ {
60
+ html: path.join(ROOT, 'assets/examples/2026-09-09-research-mckinsey.html'),
61
+ outDir: path.join(REPO, 'docs/showcase/research-mckinsey'),
62
+ prefix: 'mckinsey',
63
+ sections: ['cover', 'agenda', 's1', 's2', 'closing'],
64
+ // also try a donut section if present
65
+ extraFind: { donut: 'svg[data-chart="donut"]' },
66
+ styleCover: path.join(ROOT, 'assets/showcase/style-mckinsey-cover.png'),
67
+ },
68
+ {
69
+ html: path.join(ROOT, 'assets/examples/2026-09-09-architecture-graphite-dark.html'),
70
+ outDir: path.join(REPO, 'docs/showcase/architecture-graphite-dark'),
71
+ prefix: 'graphite',
72
+ sections: ['cover', 'agenda', 's1', 'closing'],
73
+ styleCover: path.join(ROOT, 'assets/showcase/style-graphite-cover.png'),
74
+ },
75
+ ];
76
+
77
+ async function captureSection(page, sectionId) {
78
+ const el = await page.$(`section#${sectionId}`);
79
+ if (!el) return null;
80
+ await el.scrollIntoViewIfNeeded();
81
+ await page.waitForTimeout(120);
82
+ return el.screenshot({ type: 'png' });
83
+ }
84
+
85
+ async function run() {
86
+ const browser = await chromium.launch({ headless: true });
87
+ const ctx = await browser.newContext({
88
+ viewport: VIEW,
89
+ deviceScaleFactor: 1.25,
90
+ });
91
+ const page = await ctx.newPage();
92
+
93
+ for (const job of JOBS) {
94
+ fs.mkdirSync(job.outDir, { recursive: true });
95
+ const url = pathToFileURL(job.html).href;
96
+ console.log('open', path.basename(job.html));
97
+ await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
98
+ // hide sticky bar for cleaner section shots when present
99
+ await page.addStyleTag({ content: '.bar{opacity:0!important;pointer-events:none!important}' });
100
+ await page.waitForTimeout(400);
101
+
102
+ for (const sid of job.sections) {
103
+ const buf = await captureSection(page, sid);
104
+ if (!buf) {
105
+ console.warn(' MISSING section', sid);
106
+ continue;
107
+ }
108
+ const out = path.join(job.outDir, `${job.prefix}-${sid}.png`);
109
+ fs.writeFileSync(out, buf);
110
+ console.log(' wrote', path.relative(REPO, out));
111
+ if (job.aliases && job.aliases[sid]) {
112
+ for (const alias of job.aliases[sid]) {
113
+ fs.mkdirSync(path.dirname(alias), { recursive: true });
114
+ fs.copyFileSync(out, alias);
115
+ console.log(' alias', path.relative(REPO, alias));
116
+ }
117
+ }
118
+ if (sid === 'cover' && job.styleCover) {
119
+ fs.copyFileSync(out, job.styleCover);
120
+ console.log(' styleCover', path.relative(REPO, job.styleCover));
121
+ }
122
+ }
123
+
124
+ if (job.extraFind) {
125
+ for (const [name, sel] of Object.entries(job.extraFind)) {
126
+ const el = await page.$(sel);
127
+ if (!el) { console.warn(' MISSING', name, sel); continue; }
128
+ // nearest section
129
+ const sec = await el.evaluateHandle(node => node.closest('section'));
130
+ if (!sec) continue;
131
+ await sec.asElement().scrollIntoViewIfNeeded();
132
+ await page.waitForTimeout(100);
133
+ const buf = await sec.asElement().screenshot({ type: 'png' });
134
+ const out = path.join(job.outDir, `${job.prefix}-${name}.png`);
135
+ fs.writeFileSync(out, buf);
136
+ console.log(' wrote', path.relative(REPO, out));
137
+ }
138
+ }
139
+ }
140
+
141
+ await browser.close();
142
+ console.log('done');
143
+ }
144
+
145
+ run().catch(err => { console.error(err); process.exit(1); });
@@ -1298,7 +1298,7 @@
1298
1298
  "需要进一步",
1299
1299
  "保持关注"
1300
1300
  ],
1301
- "$comment": " 结论条无 So what 标签;HTML margin 与 PPTX chartBottom/soWhatY 共同保证呼吸间距。"
1301
+ "$comment": "结论条无 So what 标签、无左侧 accent 装饰轨(anti-AI-flavor:tonal soft 满铺);HTML margin 与 PPTX chartBottom/soWhatY 共同保证呼吸间距。"
1302
1302
  },
1303
1303
  "researchTitle": {
1304
1304
  "$comment": "判断词负向前瞻(应用/需求/一览/将来…)不可省:去掉后『智能体平台的应用架构说明』这类主题词式长标题会因命中单字『应』而被误判为结论句,门禁形同虚设。",
@@ -2184,7 +2184,11 @@
2184
2184
  ]
2185
2185
  },
2186
2186
  "aiFlavor": {
2187
- "$comment": "去AI味高危词(validate_report.py 与 content-rules.md 共用同一份;正则为子串/表达式)。",
2187
+ "$comment": "去AI味:words=文案高危词(validate_report.py);visual=视觉禁则(结论条等,由 engine/PPTX/docs 落实,非词表扫描)。",
2188
+ "visual": {
2189
+ "forbidConclusionLeftRail": true,
2190
+ "$comment": "结论条/.sowhat 禁止左侧 accent 装饰轨;用 accent-soft 满铺 + 舒适字阶/行高/内边距。禁止把竖色条/霓虹边/装饰 chip 当 AI chrome。"
2191
+ },
2188
2192
  "words": [
2189
2193
  "赋能",
2190
2194
  "彰显",