dsh-ppt 0.19.0 → 0.20.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/CHANGELOG.md +10 -0
- package/README.en.md +7 -6
- package/README.md +3 -2
- package/docs/WORKBENCH.md +6 -0
- package/lib/client.js +40 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
[历史英文记录](docs/CHANGELOG.en.md)
|
|
6
6
|
|
|
7
|
+
## 0.20.0 (2026-10-29)
|
|
8
|
+
|
|
9
|
+
- 工程库新增关键词搜索和最近 / 最早更新、自然标题排序;保留返回列表时的筛选条件,提供无匹配提示和清空搜索。
|
|
10
|
+
- Add project search and updated / oldest / natural-title sorting, retained filters on return, and a clear no-results state.
|
|
11
|
+
|
|
12
|
+
## 0.19.1 (2026-10-29)
|
|
13
|
+
|
|
14
|
+
- 同步仓库与 npm 的简明介绍、中英文 README 和反馈入口;本次为文档与包元数据更新。
|
|
15
|
+
- Sync npm descriptions and both README guides with the repository, including issue and pull-request links.
|
|
16
|
+
|
|
7
17
|
## 0.19.0 (2026-10-28)
|
|
8
18
|
|
|
9
19
|
- 下载面板区分分享成品包与完整工程包。分享包包含当前 PPTX、离线 HTML 和逐页讲稿,不打包 JSON 工程;工程备份入口继续保留。
|
package/README.en.md
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
# dsh-ppt
|
|
2
2
|
|
|
3
|
-
Optional **visual review and repair** inspects images rendered from the actual PPTX, highlights problem regions, creates a formatting-only copy and renders it again for rechecking. The original stays intact. See [visual review](docs/VISUAL.md#english).
|
|
4
|
-
|
|
5
3
|
[中文](README.md)
|
|
6
4
|
|
|
7
5
|

|
|
8
6
|
|
|
9
|
-
Turn source material into
|
|
10
|
-
|
|
11
|
-
Optional **AI review** and **rehearsal** reuse models configured in DSH. Both are off by default: download the finished presentation directly, or explicitly start a bounded rehearsal. Compare proposed wording edits, save selected changes and backup Q&A slides to an undoable copy, and export Q&A with an evidence checklist. See [the rehearsal guide](docs/COACHING.md#english). AI suggestions are not fact checks.
|
|
7
|
+
Turn source material into a finished HTML slideshow, editable PPTX and reusable project bundle. Edit in DSH, trace numeric sources and explore live scenarios; AI review, rehearsal and visual repair are optional, so you can download the finished deck directly.
|
|
12
8
|
|
|
13
9
|
[](https://www.npmjs.com/package/dsh-ppt) [](https://www.npmjs.com/package/dsh-ppt)
|
|
14
10
|
|
|
15
11
|
Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/dsh-ppt/issues) or submit [pull requests](https://github.com/STARDUSTLC666/dsh-ppt/pulls).
|
|
16
12
|
|
|
17
|
-
Open the
|
|
13
|
+
Open the workbench from the native DSH sidebar. See the [workbench guide](docs/WORKBENCH.md) for configuration and operating boundaries.
|
|
18
14
|
|
|
19
15
|
## What it does
|
|
20
16
|
|
|
17
|
+
- Search projects and sort by update time or natural title; keep filters when returning to the library.
|
|
18
|
+
Optional **visual review and repair** inspects images rendered from the actual PPTX, highlights problem regions, creates a formatting-only copy and renders it again for rechecking. The original stays intact. See [visual review](docs/VISUAL.md#english).
|
|
19
|
+
|
|
20
|
+
Optional **AI review** and **rehearsal** reuse models configured in DSH. Both are off by default: download the finished presentation directly, or explicitly start a bounded rehearsal. Compare proposed wording edits, save selected changes and backup Q&A slides to an undoable copy, and export Q&A with an evidence checklist. See [the rehearsal guide](docs/COACHING.md#english). AI suggestions are not fact checks.
|
|
21
|
+
|
|
21
22
|
- Create branded decks with text, images, tables and native charts.
|
|
22
23
|
- Optionally trace numbers to material, CSV cells or formulas; adjust assumptions, preview affected slides, and save an undoable copy. HTML stays interactive; PPTX includes confirmed static values with formulas and assumptions. See the [data guide](docs/DATA.md#english).
|
|
23
24
|
- Edit text and images in Settings, reorder, duplicate or delete slides, and undo changes.
|
package/README.md
CHANGED
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
把材料制作成可直接交付的 HTML 放映、可编辑 PPTX 与工程包。可在 DSH 工作台轻量编辑、核对数字来源和现场推演;AI 预审、模拟答辩与看图修复均按需选择,也可直接下载成品。
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/dsh-ppt) [](https://www.npmjs.com/package/dsh-ppt)
|
|
10
10
|
|
|
11
11
|
欢迎使用,遇到问题或有改进建议,请提交 [issues](https://github.com/STARDUSTLC666/dsh-ppt/issues) 和 [PR](https://github.com/STARDUSTLC666/dsh-ppt/pulls)。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
从 DSH 原生侧栏打开工作台;配置与操作边界见[工作台说明](docs/WORKBENCH.md)。
|
|
14
14
|
|
|
15
15
|
## 功能
|
|
16
16
|
|
|
17
|
+
- 工程库按关键词搜索,按最近 / 最早更新或标题排序;返回列表时保留筛选条件。
|
|
17
18
|
- 生成图文、表格、原生图表和品牌化演示文稿。
|
|
18
19
|
- 可选数字溯源与现场推演:点击数字追到原始材料、CSV 单元格或公式;调整假设、预览影响并确认保存。HTML 保留交互,PPTX 保存静态结果及公式 / 假设,见[数据说明](docs/DATA.md)。
|
|
19
20
|
- 在设置页编辑文字和图片、调整顺序、复制或删除页面,并支持撤销。
|
package/docs/WORKBENCH.md
CHANGED
|
@@ -39,3 +39,9 @@ Edit the template sources and run pnpm run build. Commit generated lib/client.js
|
|
|
39
39
|
邮件使用受控 AgentMail HTTP 服务,日历使用受控 CalDAV 协议传输;插件处理器、存储、校验和原生宿主均实际运行。未使用真实邮箱、真实日历账号或付费模型。RSS 访问 Node.js 官方公开来源。PPT 实际生成并渲染 PPTX、下载 ZIP;两个视频插件实际运行官方引擎并播放 MP4。
|
|
40
40
|
|
|
41
41
|
这些是 Web 共用界面的验收结果,不代表已验收 Electron 专属菜单、系统权限、真实账号、全部外部来源或所有可选模型/引擎。Docker、Slack、钉钉继续按用户约定搁置。
|
|
42
|
+
|
|
43
|
+
## 工程查找 / Find projects
|
|
44
|
+
|
|
45
|
+
工程列表可按关键词筛选,并按最近更新、最早更新或自然标题顺序排列;多个词需要同时匹配。PPT 只查目录中的标题和工程路径;视频查标题、正文和模板,当前列表与归档列表各自保留筛选条件。清空搜索会恢复完整列表,返回工程库会保留刚才的搜索和排序。筛选只在本机列表中执行,不读取未选工程的完整文件,也不修改工程内容。
|
|
46
|
+
|
|
47
|
+
Search the local project list and sort by newest update, oldest update or natural title. Multiple terms must all match. PPT searches catalog titles and paths; video searches titles, text and templates, with separate active/archive filters. Clear restores the full list; returning from editing preserves filters. Filtering does not load unselected project files or change project contents.
|
package/lib/client.js
CHANGED
|
@@ -613,6 +613,44 @@ const PPT_WORKBENCH_CSS = `
|
|
|
613
613
|
@media(max-width:700px){.ppt-workbench.pptw[data-main=true]{padding:calc(16px + var(--dsh-frame-top-clearance,0px)) 16px 0 max(16px,var(--dsh-frame-leading-clearance,0px))}}
|
|
614
614
|
`;
|
|
615
615
|
|
|
616
|
+
// Per-view preferences stay in this plugin instance; user files are never changed.
|
|
617
|
+
const projectLibraryPreferences = new Map();
|
|
618
|
+
function ProjectLibrary({ items, scope = 'projects', language = 'zh', searchText, updatedAt, renderItem, t, searchHint }) {
|
|
619
|
+
const saved = projectLibraryPreferences.get(scope);
|
|
620
|
+
const [query, setQuery] = React.useState(saved?.query || '');
|
|
621
|
+
const [order, setOrder] = React.useState(saved?.order || 'updated');
|
|
622
|
+
const controlId = React.useId();
|
|
623
|
+
const normalize = text => String(text ?? '').normalize('NFKC').toLocaleLowerCase(language);
|
|
624
|
+
const words = normalize(query).trim().split(/\s+/).filter(Boolean);
|
|
625
|
+
const collator = new Intl.Collator(language, { numeric: true, sensitivity: 'base' });
|
|
626
|
+
const timestamp = row => { const value = Date.parse(updatedAt(row)); return Number.isFinite(value) ? value : 0; };
|
|
627
|
+
const visible = items.filter(row => words.every(word => normalize(searchText(row)).includes(word))).sort((a, b) => {
|
|
628
|
+
const tie = collator.compare(String(a.title || ''), String(b.title || '')) || String(a.id).localeCompare(String(b.id));
|
|
629
|
+
return order === 'title' ? tie : (order === 'oldest' ? timestamp(a) - timestamp(b) : timestamp(b) - timestamp(a)) || tie;
|
|
630
|
+
});
|
|
631
|
+
function change(nextQuery, nextOrder) {
|
|
632
|
+
projectLibraryPreferences.set(scope, { query: nextQuery, order: nextOrder });
|
|
633
|
+
setQuery(nextQuery); setOrder(nextOrder);
|
|
634
|
+
}
|
|
635
|
+
return h('section', { className: 'project-library', 'aria-label': t('工程查找', 'Find projects') },
|
|
636
|
+
h('style', null, PROJECT_LIBRARY_CSS),
|
|
637
|
+
h('div', { className: 'project-library-controls' },
|
|
638
|
+
h('label', { htmlFor: controlId + '-query' }, t('搜索工程', 'Search projects'),
|
|
639
|
+
h('input', { id: controlId + '-query', type: 'search', value: query, placeholder: searchHint, maxLength: 200,
|
|
640
|
+
onChange: e => change(e.target.value, order), onKeyDown: e => { if (e.key === 'Escape' && query) { e.preventDefault(); e.stopPropagation(); change('', order); } } })),
|
|
641
|
+
h('label', { htmlFor: controlId + '-order' }, t('排序', 'Sort by'),
|
|
642
|
+
h('select', { id: controlId + '-order', value: order, onChange: e => change(query, e.target.value) },
|
|
643
|
+
h('option', { value: 'updated' }, t('最近更新', 'Recently updated')),
|
|
644
|
+
h('option', { value: 'oldest' }, t('最早更新', 'Oldest updated')),
|
|
645
|
+
h('option', { value: 'title' }, t('标题', 'Title')))),
|
|
646
|
+
query ? h(W.Button, { variant: 'ghost', onClick: () => change('', order) }, t('清空搜索', 'Clear search')) : null),
|
|
647
|
+
h('p', { className: 'w-muted project-library-count', role: 'status', 'aria-live': 'polite' },
|
|
648
|
+
t('显示 ', 'Showing ') + visible.length + ' / ' + items.length + t(' 个工程', ' projects')),
|
|
649
|
+
visible.length ? visible.map(renderItem) : h(W.Empty, { title: t('没有匹配的工程', 'No matching projects'), icon: 'folder' },
|
|
650
|
+
t('换个关键词,或清空搜索查看全部工程。', 'Try another keyword or clear the search to show all projects.')));
|
|
651
|
+
}
|
|
652
|
+
const PROJECT_LIBRARY_CSS = `.project-library{min-width:0}.project-library-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:12px 0}.project-library-controls>label{display:grid;gap:6px;margin:0!important;min-width:0;color:var(--w-muted);font-size:13px}.project-library-controls>label:first-child{flex:1 1 240px}.project-library-controls>label:nth-child(2){flex:0 1 180px}.project-library-controls input,.project-library-controls select{width:100%;min-width:0;min-height:38px;font:inherit;color:var(--w-text);background:var(--w-bg);border:1px solid var(--w-border);border-radius:8px;padding:8px 10px}.project-library-count{margin:4px 0 12px;font-size:12px}.project-library-controls :focus-visible{outline:2px solid var(--w-accent);outline-offset:3px}@media(max-width:520px){.project-library-controls>label:first-child{flex-basis:100%}.project-library-controls>label:nth-child(2){flex:1 1 160px}}`;
|
|
653
|
+
|
|
616
654
|
const { useState, useEffect, useRef, useMemo } = React;
|
|
617
655
|
const h = React.createElement;
|
|
618
656
|
// Interface language follows DSH; user content and stored records keep their original text.
|
|
@@ -1630,7 +1668,7 @@ if(!rootElement.current?.contains(event.target) || event.target?.closest?.('[rol
|
|
|
1630
1668
|
h(W.Button,{icon:'download',disabled:busy || dirty || dataDirty || imagePending,title:dirty || dataDirty?pptText('先保存当前修改','Save changes first'):undefined,onClick:()=>setDownloadOpen(true)},pptText('下载成品','Download output'))) : h(W.IconButton,{icon:'refresh',label:t('刷新项目'),disabled:busy,onClick:refreshList})},
|
|
1631
1669
|
h('style',null,css),h('style',null,PPT_WORKBENCH_CSS),error && h('div', { role: 'alert', className: 'notice error' }, error, ' ', h('button', { disabled: busy || dataDirty, onClick: () => project ? open(project.id) : refreshList() }, t("重试"))),conflict && project && h('button', { disabled: busy || dataDirty, onClick: keepInputsAndReload }, t("载入最新版本,保留我的输入")),h(W.Status,{tone:'success'},message),busy?h(W.Status,null,job):null,
|
|
1632
1670
|
dataDirty ? h(W.Status,null,h('div',{className:'ppt-data-warning'},pptText('数据推演或材料尚未保存,成品仍是已保存版本。','Scenario or source changes are unsaved. Output still uses saved values.'),h(W.Button,{variant:'ghost',onClick:()=>setActiveTab('data')},pptText('前往数据与推演','Open data and what-if')))) : null,
|
|
1633
|
-
!project ? projects.length ? h('div',{className:'ppt-library'},projects
|
|
1671
|
+
!project ? projects.length ? h('div',{className:'ppt-library'},h(ProjectLibrary,{items:projects,language:languageOf(),t:pptText,searchHint:pptText('搜索标题或工程路径','Search titles or project paths'),searchText:row=>row.title+' '+row.path,updatedAt:row=>row.updatedAt,renderItem:row=>h(W.Row,{key:row.id,title:row.title,description:row.path,disabled:busy,onClick:()=>{setActiveTab('content');open(row.id);}})})) : h('div', { className: 'card' }, h('h3', null, t("还没有可以编辑的项目")), h('p', null, t("先在对话中让助手生成演示文稿。已有项目可以让助手调用 ppt_check 检查一次,它会出现在这里。")), h('p', { className: 'muted' }, t("示例:请把这份材料制作成可直接交付的演示文稿,生成 HTML、PPTX 和工程文件。")), h('div', { className: 'tools' }, h('button', { onClick: copyExample }, t("复制示例")))) :
|
|
1634
1672
|
h(W.Tabs,{label:pptText('演示文稿工作台视图','Presentation workbench views'),value:activeTab,onChange:value=>{setActiveTab(value);if(value==='data' && project.dataModel)setMode('html');},items:[{id:'content',label:pptText('内容编辑','Edit content')},{id:'visual',label:pptText('视觉检查','Visual review')},{id:'rehearsal',label:pptText('演练','Rehearsal')},{id:'data',label:pptText('数据与推演','Data and what-if')}]},
|
|
1635
1673
|
h('div',{className:'ppt-editor','data-view':activeTab},
|
|
1636
1674
|
h(PptPages,{project,selected,busy,imagePending,dirty,dataDirty,onChoose:choose,onDuplicate:()=>structure('duplicate')}),
|
|
@@ -1674,7 +1712,7 @@ W.register(ctx,{id:'dsh-ppt.workbench',label:()=>t('演示文稿'),icon:'slides'
|
|
|
1674
1712
|
ctx.slots.inject('settings.section', () => ctx.slots.register({ name: 'settings.section', id: 'dsh-ppt', order: 58, label: () => t("演示文稿"), inject: () => ({ locale: localeService }) }, Workbench));
|
|
1675
1713
|
}
|
|
1676
1714
|
return { inject: ['slots', 'locale'], apply, __internals: { draftFor, editorHtml, createImageLoader, modelRouteKey, findModelRoute, reconcileModelRoute } };
|
|
1677
|
-
} },{"name":"dsh-ppt","version":"0.1.0","hasWorkbench":true,"packageVersion":"0.
|
|
1715
|
+
} },{"name":"dsh-ppt","version":"0.1.0","hasWorkbench":true,"packageVersion":"0.20.0","label":"演示文稿","labelEn":"PPT","suiteComponent":true}));
|
|
1678
1716
|
|
|
1679
1717
|
})();
|
|
1680
1718
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ppt",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "DSH
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"description": "DSH 演示文稿:HTML / 可编辑 PPTX / 工程包、工程检索与轻量编辑、数字溯源和现场推演,可选 AI 审阅。欢迎提交 issues 和 PR。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|