李进
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
oldli and Claude Sonnet 5
eec8c8c215
feat: add web-to-pixpo JSON to Schema JSON converter
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 20:03:24 +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
oldli and Claude Sonnet 5
0d05e9f0a8
feat: add advanced UI dashboard schema example with fine-grained style params
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 14:56:39 +08:00
oldli and Claude Sonnet 5
15575b37d6
feat: add data dashboard ui schema example
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 14:49:15 +08:00
oldli and Claude Sonnet 5
ec7a44d6fb
refactor: complete three-layer serial refactoring (knowledge→schema→renderer)
...
Step 1 — Knowledge base: perfect all reference/*.md with type, range, default, unit
- text.md: add DataOrPathProps, path/data, bullet deprecated params
- chart.md: add deprecated section, fix 19 params with missing elements
- slide.md: add bkgd→background deprecated mapping
- output.md: add masterSlide, presLayout
Step 2 — Schema: align schema/presentation.schema.json with KB
- Add catAxisItem and valAxisItem definitions with full sub-property constraints
- Fix 7 enum constraints (barDir, displayBlanksAs, bar3DShape, etc.)
- Add 4 missing fields (verbose, autoPageCharWeight, autoPageLineWeight, notes,
masterSlide, presLayout)
Step 3 — Translation engine: transform renderers from passthrough to validation
- index.js: add normalizePosition, normalizeColor, validateEnum shared utilities
- All renderers: position validation, color hex normalization, enum validation
- Image: graceful failure handling (catch load errors, warn, continue)
- Chart: chartType enum validation, data parity check
- Table: colspan/rowspan integer validation, border array check
- Full verification: basic.json and full.json generate valid PPTX
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 13:10:01 +08:00
oldli and Claude Sonnet 5
c1a9c2fcda
feat: add presentation JSON Schema with basic and full examples
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 12:37:09 +08:00
oldli and Claude Sonnet 5
17d232dcef
feat: add reference docs for shape, table, image, chart, slide, master, output, coordinate
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 12:36:09 +08:00
oldli and Claude Sonnet 5
768ac12740
feat: add pptxgenjs translation engine (mechanical mapping)
...
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 12:34:45 +08:00
李进
ba8d17ba62
add: pptxgenjs v4.0.1 full API reference
2026-07-23 12:00:19 +08:00
oldli and Claude Sonnet 5
355b01b9dc
PM: html2pptx v4 - add .imported-theme-root slide detection
...
DashiAI real HTML uses .imported-theme-root > .slide.imported-theme-slide,
not .ppt-deck > .ppt-slide. Added as first priority selector,
. ppt-deck kept as fallback for backward compatibility.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-23 11:27:38 +08:00
oldli and Claude Sonnet 5
0f8a797b7a
PM: html2pptx v3 - add rich text preservation + PPTX adapt
...
- extractRuns(): recursive DOM walker to extract inline formatting
(bold, italic, color, fontSize, fontFamily) from strong/em/span
- Element data now includes 'runs' array alongside flat text
- PPTX generation: rich text uses pptxgenjs run array format,
plain text keeps original single-style logic
- Added bounds constraints to prevent textbox overflow
- Verified: 14 slides from dashi-deck, 10 from simple,
54 rich text elements detected
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-22 20:20:22 +08:00
oldli and Claude Sonnet 5
ca1e4dfa72
PM: html2pptx v3 - fix slide detection to direct children only
...
- deck.querySelectorAll('.ppt-slide') -> deck.querySelectorAll(':scope > .ppt-slide')
prevents nested .ppt-slide elements from being counted as separate slides
- Enhanced visibility filter: check opacity, display, visibility in addition to rect size
- Tested: dashi-deck.html now returns 14 slides (was 20), simple.html returns 10
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-22 20:17:39 +08:00
oldli
34d0460130
fix: 修复slide分割/文字聚合/字号计算三个缺陷
2026-07-22 19:29:02 +08:00
oldli and Claude Sonnet 5
dc1320aada
feat: core html2pptx implementation
...
Rewrite with element-based DOM extraction (replacing TreeWalker text node
approach), proper CSS-to-PPTX attribute mapping, robust CLI flag parsing
(-o/-p), auto port selection, 30s timeout guard, and graceful cleanup.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-07-22 18:46:35 +08:00
oldli
d2bc6b3623
chore: init deps and test fixture
2026-07-22 18:03:49 +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