Commit Graph
70 Commits
Author SHA1 Message Date
李进 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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
oldliandClaude 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