李进
|
4bc747201f
|
Revert "Reapply "fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值""
This reverts commit a5f1efa7cc.
|
2026-07-27 15:49:56 +08:00 |
|
李进
|
a5f1efa7cc
|
Reapply "fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值"
This reverts commit 82d384bd1f.
|
2026-07-27 15:49:56 +08:00 |
|
李进
|
82d384bd1f
|
Revert "fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值"
This reverts commit 33fc8b06d6.
|
2026-07-27 15:49:42 +08:00 |
|
李进
|
33fc8b06d6
|
fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值
|
2026-07-27 15:48:20 +08:00 |
|
李进
|
5127df5e96
|
debug: SVG 处理日志
|
2026-07-27 15:45:51 +08:00 |
|
李进
|
ecc1a0d77e
|
fix: SVG tag 大小写判断修复
|
2026-07-27 15:40:47 +08:00 |
|
李进
|
5ef970337d
|
feat: SVG 图标序列化为图片
SVG 元素(如 Octicons)在 capture 阶段序列化为 SVG data URL,
存储到 backgroundImages,转化时作为图片渲染到 PPT。
|
2026-07-27 15:34:35 +08:00 |
|
李进
|
197642b410
|
debug: 采集后保存 JSON 供调试
|
2026-07-27 15:28:47 +08:00 |
|
李进
|
00b3150d1c
|
fix: 不用 saveAs,直接下载到默认文件夹
Chrome Bug 417112:saveAs 在'下载前询问'开启时不可靠。
这是 Chrome 扩展的已知限制,官方无解决方案。
|
2026-07-27 15:25:26 +08:00 |
|
李进
|
0ce890f45e
|
fix: background 用 saveAs 下载,兼容下载前询问设置
原版插件模式:采集和下载在 background 同一 async 函数中执行,
background 上下文一直活着,saveAs 弹框不会被 popup 关闭打断。
|
2026-07-27 15:23:32 +08:00 |
|
李进
|
06e63fbe3e
|
fix: 去掉 saveAs,显示下载位置
|
2026-07-27 15:20:12 +08:00 |
|
李进
|
df699f1134
|
fix: saveAs 优先,失败 fallback 直接下载
先尝试弹出保存对话框(saveAs: true),如果和 Chrome 设置冲突
则 fallback 到直接下载到默认文件夹。兼容所有 Chrome 设置。
|
2026-07-27 15:16:33 +08:00 |
|
李进
|
20458d16ab
|
fix: 清理调试日志,确认下载机制
根因:Chrome '下载前询问保存位置' 设置与 saveAs 冲突。
关闭该设置后下载正常。background 通过 storage.session 传 base64 并下载。
|
2026-07-27 15:13:56 +08:00 |
|
李进
|
e19b80de47
|
debug: background 下载日志
|
2026-07-27 15:12:32 +08:00 |
|
李进
|
984b03c3d6
|
fix: 用 chrome.storage.session 传 base64,background 下载
|
2026-07-27 15:07:51 +08:00 |
|
李进
|
7b8b560dc0
|
debug: 下载日志
|
2026-07-27 14:57:08 +08:00 |
|
李进
|
42a869aaaf
|
fix: popup 直接下载,不通过 background
|
2026-07-27 14:49:58 +08:00 |
|
李进
|
224983c790
|
fix: background 完整重写,添加下载日志
|
2026-07-27 14:47:53 +08:00 |
|
李进
|
aeb75c746c
|
refactor: popup 流程简化 — 采集→获取→转化→background下载
|
2026-07-27 14:45:09 +08:00 |
|
李进
|
3f7c9648d2
|
fix: 下载移到 background.js 执行,和原插件一致
|
2026-07-27 14:43:29 +08:00 |
|
李进
|
1df8a826c4
|
fix: 用 data URL 下载,和原插件方式一致
|
2026-07-27 14:41:31 +08:00 |
|
李进
|
87f191e27f
|
debug: 添加下载过程日志
|
2026-07-27 14:36:08 +08:00 |
|
李进
|
6e9bec5856
|
fix: 去掉 saveAs,保证下载可用
|
2026-07-27 14:34:29 +08:00 |
|
李进
|
558f4aba4c
|
fix: 加回 saveAs,依赖 Chrome 设置
|
2026-07-27 14:31:05 +08:00 |
|
李进
|
18b5f63fc7
|
fix: 去掉 saveAs 测试下载是否正常
|
2026-07-27 14:27:42 +08:00 |
|
李进
|
75e0268a35
|
fix: 加回 saveAs,不自动关闭 popup
|
2026-07-27 14:25:37 +08:00 |
|
李进
|
119f406a75
|
fix: 去掉 saveAs,直接下载;延迟 revoke URL
|
2026-07-27 14:23:08 +08:00 |
|
李进
|
dca8a40508
|
fix: 去掉自动下载 JSON,只下载 PPTX
|
2026-07-27 14:21:13 +08:00 |
|
李进
|
f20f256197
|
fix: 浏览器端用 pres.write() 替代 pres.writeFile()
writeFile 在浏览器中直接下载文件,不返回 buffer。
改用 write({ outputType: 'arraybuffer' }) 返回数据供后处理。
|
2026-07-27 14:17:43 +08:00 |
|
李进
|
f7307a0891
|
refactor: web-to-pixso → web-to-ppt 全面改名
- 目录 web-to-pixso/ → web-to-ppt/
- 所有代码引用:PIXSO → WEB_TO_PPT, webToPixso → webToPPT
- 数据格式:pixso-design-capture → web-to-ppt-capture
- CSS 选择器:__web_to_pixso_ → __web_to_ppt_
- README 重写,移除 Pixso 相关描述
- docs/web-to-pixso-mapping.md → docs/web-to-ppt-mapping.md
|
2026-07-27 14:12:44 +08:00 |
|
李进
|
e1c8b3d94e
|
feat: v2.0 — 插件改造,集成 PPTX 导出
改造内容:
- 改名 Web to Pixso → Web to PPT
- 删除 pixso-plugin/、element-picker.js、popup-panel.js
- 新增 convert-browser.js(浏览器版转化逻辑)
- 新增 lib-pptxgen.js(pptxgenjs 浏览器 bundle)
- 重写 popup.js(触发捕获→转化→下载)
- 重写 background.js(缓存采集数据,支持 WEB_TO_PPT_GET_DATA)
- manifest.json 改名 + 添加 default_popup
流程:popup 点击导出 → background 抓取 DOM → popup 运行转化 → chrome.downloads 下载 PPTX
|
2026-07-27 13:54:11 +08:00 |
|
李进
|
330f4e96ce
|
feat: 加入 web-to-pixso 插件源码
Chrome 扩展,用于从网页提取 DOM 树为 JSON 格式。
核心文件:capture.js(76KB,提取逻辑)
|
2026-07-27 12:22:27 +08:00 |
|
李进
|
a10969b562
|
feat: jszip 后处理注入 type=custom + 画布高度限制140cm
- 用 jszip 原地修改 PPTX 的 sldSz,加 type=custom(WPS 识别自定义尺寸)
- 画布最大高度限制 140cm(WPS 上限)
- zip 命令行打包会破坏 PPTX 结构,改用 jszip 保证完整性
|
2026-07-27 12:20:22 +08:00 |
|
李进
|
f3d60360ac
|
fix: 画布尺寸 — 多slide用容器rect,单slide用canvas
- PPT设计稿(多slide):用容器rect,每页独立尺寸
- 网页(单slide):用canvas尺寸,确保内容不溢出
|
2026-07-27 12:00:07 +08:00 |
|
李进
|
5035647c91
|
fix: TEXT 被 IMAGE 包含时也移除(aria-label 等隐藏文字)
|
2026-07-24 18:29:06 +08:00 |
|
李进
|
d4d86eb1da
|
fix: IMAGE 覆盖的 TEXT 节点自动移除
当 TEXT 节点和 IMAGE 节点同坐标同尺寸时,移除 TEXT(图片替代文字)
|
2026-07-24 18:27:12 +08:00 |
|
李进
|
8ab3f479a7
|
feat: 图片自动下载 + 重叠去重 bug 修复
- IMG 标签自动从 src URL 下载图片并嵌入 PPT
- URL 拼接用 origin 而非完整 pageUrl(修复 404)
- collectSlideChildren 补全 backgroundImages 字段传递
- 重叠去重 key 加 type,避免不同类型节点被误删
- 三个 PPT 都验证通过
|
2026-07-24 18:25:01 +08:00 |
|
李进
|
f3853e31d4
|
feat: z-index排序 + 重叠去重 + overflow裁剪 + 图片支持
- z-index 排序:兄弟节点按 zIndex 排序,高层在上
- 重叠去重:同坐标完全相同的节点只保留后者
- overflow:hidden:用 clipRect 裁剪,完全在区域外的节点跳过
- 图片支持:RECTANGLE 有 backgroundImages 的也作为图片渲染
- 三个 PPT 都验证通过
|
2026-07-24 18:05:41 +08:00 |
|
李进
|
0ed04eb3ea
|
refactor: 背景色兜底用 canvas 背景色替代硬编码
|
2026-07-24 17:36:07 +08:00 |
|
李进
|
8f507256ef
|
fix: 合并文本框宽度用 rect.w 而非 parentW
合并节点的 parentW 继承自第一个子节点(如 strong 的窄宽度),
导致文本框太窄。改为用合并后的 rect.w。
|
2026-07-24 17:25:12 +08:00 |
|
李进
|
f4adac77c5
|
feat: TEXT 节点合并 — 同 y 坐标的内联文本合并为富文本
- 同 y(误差<5px)且 x 相邻或重叠的 TEXT 节点合并
- 合并后保留 bold/italic/color 等格式差异
- 用 pptxgenjs 原生富文本支持渲染
- 16个合并对象,不影响其他独立文本框
|
2026-07-24 17:16:07 +08:00 |
|
李进
|
58ee40f71a
|
fix: slide name 正则精确匹配 — 排除 page-info/page-num
- /^(slide([- ]\w+)*|page)$/i
- slide / slide-1 / slide hero dark active 都匹配
- page-info / page-num 不匹配
- 三个 PPT 都正确识别
|
2026-07-24 16:47:52 +08:00 |
|
李进
|
aaa28f1bd8
|
refactor: TEXT 宽度通用化 — 去掉 depth===1 硬编码
- parentW 超过 contentW 的 80% 时视为顶层,用 contentW
- 否则用 parentW(表格单元格等嵌套容器)
- 不再依赖 _depth 字段判断层级
|
2026-07-24 16:44:54 +08:00 |
|
李进
|
dd916dcf9e
|
feat: 补全 styles 映射 — opacity/lineHeight/letterSpacing/textDecoration/display/visibility
TEXT 新增:
- textDecorationLine → underline/strike
- letterSpacing → charSpacing
- opacity → transparency
- lineHeight → lineSpacingMultiple
- display:none / visibility:hidden → 跳过
Shape 新增:
- opacity → transparency
- display:none / visibility:hidden → 跳过
PPTX 渲染端同步传递所有新属性
|
2026-07-24 16:44:19 +08:00 |
|
李进
|
0e60f7525b
|
refactor: 通用化背景色逻辑
- 去掉 dark/light 关键词硬编码
- 优先级:styles.backgroundColor → 文字颜色反推 → canvas.backgroundColor
- 文字颜色反推:亮度>128用深色背景,否则用浅色背景
- 两个 PPT 都正确识别背景色
|
2026-07-24 16:40:50 +08:00 |
|
李进
|
a2c7f23107
|
refactor: 通用化 slide 识别和游离节点收集
- findSlides(): 不靠命名,靠结构识别(面积/children/已知模式)
- collectOrphans(): 用 slide 子树 id 集合判断,不靠名字前缀
- 先递归子节点,子节点有 slide 则父节点是容器
- 7月汇报(6 slide) 和 A2A(7 slide) 都正确识别
|
2026-07-24 16:36:51 +08:00 |
|
李进
|
d079a4b4cc
|
fix: 文本框宽度/阴影/边框/背景/去重 — 通用化前稳定版
- 文本框宽度:contentW 从 slide 子节点推算,排除游离节点
- TEXT 宽度:顶层用 contentW,嵌套用 parentW,最小1.5in,x+w≤slideW
- collectSlideChildren 新增 _depth 参数标记层级
- boxShadow 正确传给 pptxgenjs(之前 addShape 只传了 fill)
- 单边 border 不加 shape line,由四周边框线逻辑单独处理
- shape 默认 line: { type: 'none' } 去掉 pptxgenjs 默认边框
- 背景色:从 slide name 推断 dark/light 兜底
- findSlides 支持 'slide ' 前缀
- collectOrphans 跳过 'slide ' 子树(修复文字重复)
- 新增 docs/ 目录:映射分析和通用架构文档
|
2026-07-24 16:30:24 +08:00 |
|
李进
|
56daab6b67
|
fix: frame before text for proper z-order, remove 1.2x width multiplier
|
2026-07-24 14:05:14 +08:00 |
|
李进
|
8802b00bdc
|
feat: complete web-to-pixso JSON mapping - border sides, image assets, orphan nodes, slide container borders
|
2026-07-24 13:22:28 +08:00 |
|
李进
|
7735bb75de
|
feat: extract all 4 border sides, border-radius, box-shadow from web-to-pixso nodes
|
2026-07-24 12:33:33 +08:00 |
|
李进
|
46ecb17956
|
fix: traverse all nodes, use slide container size for canvas, extract slide bg color
|
2026-07-24 10:07:00 +08:00 |
|
李进
|
cff5b12975
|
docs: update README and REQUIREMENTS to reflect current architecture (knowledge base + schema + renderer)
|
2026-07-23 19:07:47 +08:00 |
|
李进
|
37839c1e86
|
clean: remove experimental scripts, keep only knowledge base + schema + renderer
|
2026-07-23 19:04:31 +08:00 |
|
李进
|
ba8d17ba62
|
add: pptxgenjs v4.0.1 full API reference
|
2026-07-23 12:00:19 +08:00 |
|
李进
|
39ef403842
|
add: requirements doc for HTML-to-PPTX export engine
|
2026-07-22 17:54:46 +08:00 |
|
李进
|
9744adbd52
|
init: html2pptx project scaffold + requirements doc
|
2026-07-22 17:54:42 +08:00 |
|