diff --git a/package-lock.json b/package-lock.json index 76d35e97..db0ad634 100644 --- a/package-lock.json +++ b/package-lock.json @@ -249,7 +249,7 @@ "react": "18.3.1", "react-dom": "18.3.1", "ws": "^8.21.3", - "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz" + "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz" }, "devDependencies": { "@types/node": "24.10.1", @@ -16409,8 +16409,8 @@ }, "node_modules/dsh-kimi-ppt": { "version": "0.1.1-rc.2", - "resolved": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz", - "integrity": "sha512-0ju1WByFBgL+PSLeZZSlrL5XJjearWaBvrHyqCkPI7jsmXQ0v6XMZ3U8Ch5RqUGScMN31nn135j9CR+EdLli7w==", + "resolved": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz", + "integrity": "sha512-tUWnVk/m1RCPNTAooKtN8zp283L7lw+t+EMwI92JAfrYQBROygLj1+KT5QEbZFaPMKlrs7NVO6Bazo7FrtIcdQ==", "license": "MIT", "dependencies": { "@aiden0z/pptx-renderer": "1.2.4", diff --git a/package.json b/package.json index 3413614c..b57fdb9a 100644 --- a/package.json +++ b/package.json @@ -274,7 +274,7 @@ "dsh-desktop-hmr-fallback": "file:packages/dsh-desktop-hmr-fallback", "dsh-desktop-market-installer": "file:packages/dsh-desktop-market-installer", "dsh-desktop-preset-transfer": "file:packages/dsh-desktop-preset-transfer", - "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz", + "dsh-kimi-ppt": "file:packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz", "dshmarket": "file:packages/dshmarket", "electron-updater": "^6.8.9", "node": "24.9.0", diff --git a/packages/kimi-ppt/README.md b/packages/kimi-ppt/README.md index 00e6d4e0..b37b300f 100644 --- a/packages/kimi-ppt/README.md +++ b/packages/kimi-ppt/README.md @@ -2,7 +2,7 @@ 本目录固定 DSH Desktop 的 Kimi-only 演示文稿插件: -- `dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz`:PPTD 编辑、渲染、模板、Skill、审计和交付核心。 +- `dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz`:PPTD 编辑、渲染、模板、Skill、审计和交付核心;渲染前按字体、换行、字符宽度和文本框几何阻断文本溢出。 - `deepseek-ai-dsh-experimental-kimi-ppt-standard-adapter-0.1.1-rc.2-desktop-kimi-20260904.tgz`:Harness 0.1.2 标准 Composer 适配器。 这条分支只挂载 `experimental-kimi-ppt-standard-adapter`,Host 只注册 `pptd_*` 与 Kimi 模板工具。模板目录包含 22 套:7 个分类各保留 3 套核心模板,并在商务分类增加用户提供的 58 页活力蓝逻辑图表模板。活力蓝模板已在共享版式层移除右上角 logo,58 页预览与源页语义索引完整保留。产物不包含腾讯 `editor_sdk`、SlideP 运行时和腾讯专用 `ppt_*` 工具。 @@ -10,7 +10,7 @@ SHA-256: ```text -300bd0f4f423a6d046cb61b193e4b5d4e535ca3d5921d21bbc0dc4f4aa002464 dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz +dc33194b7ab015aa37504271d646cb28719cdd11d86aa5f14551ec10f8613894 dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz 97adcb338ced61cbbfaf9b453bf26a3c01265bd96b25778bd00061e092d10aa3 deepseek-ai-dsh-experimental-kimi-ppt-standard-adapter-0.1.1-rc.2-desktop-kimi-20260904.tgz ``` diff --git a/packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz b/packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz similarity index 64% rename from packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz rename to packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz index 5f88c537..9ee634f4 100644 Binary files a/packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz and b/packages/kimi-ppt/dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz differ diff --git a/test/kimi-ppt-integration.test.ts b/test/kimi-ppt-integration.test.ts index a4bff9d3..01d72cb8 100644 --- a/test/kimi-ppt-integration.test.ts +++ b/test/kimi-ppt-integration.test.ts @@ -7,8 +7,8 @@ import { projectRoot } from './patch-path' const artifacts = { core: { - file: 'dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-20260904.tgz', - sha256: '300bd0f4f423a6d046cb61b193e4b5d4e535ca3d5921d21bbc0dc4f4aa002464' + file: 'dsh-kimi-ppt-0.1.1-rc.2-desktop-kimi-overflow-20260905.tgz', + sha256: 'dc33194b7ab015aa37504271d646cb28719cdd11d86aa5f14551ec10f8613894' }, adapter: { file: 'deepseek-ai-dsh-experimental-kimi-ppt-standard-adapter-0.1.1-rc.2-desktop-kimi-20260904.tgz', @@ -91,6 +91,22 @@ describe('Kimi PPT built-in plugin', () => { expect(skill).toContain('每个文本区的 `textCapacity` 是该区域的最大建议字符数') }) + it('blocks overflowing text before rendering and preserves the authored font size', async () => { + const entries = tarEntries(await artifact('core')) + const chunkName = [...entries.keys()].find(name => /^package\/lib\/pptd-[A-Za-z0-9_-]+\.js$/u.test(name)) + const renderer = chunkName === undefined ? '' : entries.get(chunkName)?.toString('utf8') ?? '' + const renderTextStart = renderer.indexOf('function renderText(') + const renderTextEnd = renderer.indexOf('function solidFill(', renderTextStart) + const renderText = renderer.slice(renderTextStart, renderTextEnd) + + expect(renderer).toContain('code: "text-overflow"') + expect(renderer).toContain('severity: "error"') + expect(renderer).toContain('请缩短文案、增大文本框或拆分页面') + expect(renderTextStart).toBeGreaterThan(-1) + expect(renderTextEnd).toBeGreaterThan(renderTextStart) + expect(renderText).not.toContain('fit: "shrink"') + }) + it('ships three core templates in each category plus the 58-page Vitality Blue pack', async () => { const entries = tarEntries(await artifact('core')) const designs = [...entries.keys()]