Skip to content

Rename to Slidewise + PPTX import fidelity#4

Merged
karthikmudunuri merged 5 commits intomainfrom
karthikmudunuri/slidewise-pptx-fidelity
May 3, 2026
Merged

Rename to Slidewise + PPTX import fidelity#4
karthikmudunuri merged 5 commits intomainfrom
karthikmudunuri/slidewise-pptx-fidelity

Conversation

@karthikmudunuri
Copy link
Copy Markdown
Member

Summary

Rebrands the project from Caracas to Slidewise and substantially improves PPTX import fidelity (theme colors, layout/master inheritance, grouped shapes), with two follow-up fixes for line rendering.

Commits

  1. rename: Caracas → Slidewise (files + identifiers) — file renames (CaracasEditor.{tsx,css}SlidewiseEditor.{tsx,css}, CaracasFileEditor.tsxSlidewiseFileEditor.tsx), CSS class names, public exports, tsconfig include list.
  2. rename: Caracas → Slidewise (package metadata + strings)package.json name, HTML title, built CSS asset filename, localStorage key, default file extension, log prefixes, data attributes, comments. No behavior changes.
  3. feat(pptx): theme colors, layout/master inheritance, group flattening — the big fidelity overhaul:
    • Resolve schemeClr tokens (accent1..6, bg1/bg2, tx1/tx2) by walking slide → layout → master → theme rels. Apply lumMod/lumOff/shade/tint/alpha modifiers in HSL space.
    • Title/body placeholders inherit position, size, font family/size, color, alignment, vAlign, line spacing from layout's matching <p:ph>, falling back to master and txStyles defaults. Lookup tries exact type|idx, idx-only, type-only, with ctrTitle→title / subTitle→body aliasing.
    • <p:grpSp> is now flattened recursively, composing xfrm off/ext against chOff/chExt to map child-local coords onto the slide.
    • ~30 more prst values map to the closest ShapeKind; unmapped presets fall back to a colored rect at correct geometry instead of an opaque "Imported content" tile.
  4. fix(pptx): treat <a:prstDash val="solid"/> as a solid line — previously any <a:prstDash> child made a line render dashed, even when val="solid".
  5. fix(pptx): treat <a:headEnd type="none"/> as no arrowhead — same false-positive pattern: type="none" was rendering as an arrow.

Test plan

  • npx tsc -b clean
  • npx vitest run src/lib/pptx/__tests__/roundtrip.test.ts — 6/6 passing
  • Upload a real-world PPTX with theme-colored placeholders, grouped shapes, solid lines, and arrows; confirm fidelity improved across all four

Rename the editor entry-point files and React identifiers to match the
new project name. Files moved from CaracasEditor[.tsx|.css] and
CaracasFileEditor.tsx to their Slidewise equivalents; CSS class names,
public exports, and the tsconfig include list follow.
Update the package name, HTML title, built CSS asset filename,
localStorage key, default file extension, log prefixes, data
attributes, and inline comments to match the new project name. No
behavior changes.
Substantial fidelity overhaul for imported PPTX decks. The previous
importer ignored theme colors, slide layouts/masters, and grouped
shapes — meaning anything that inherited style/position from a layout,
used a theme color, or sat inside a group lost its formatting.

  * Theme colors. Walk slide → layout → master → theme rels and resolve
    schemeClr tokens (accent1..6, bg1/bg2, tx1/tx2) using the loaded
    a:clrScheme. Apply lumMod/lumOff/shade/tint/alpha modifiers in HSL
    space so theme variations render correctly.

  * Placeholder inheritance. Title/body placeholders now inherit
    position, size, font family/size, color, alignment, vAlign, and
    line spacing from the layout's matching <p:ph>, falling back to
    the master and finally to txStyles defaults. Lookup tries exact
    type|idx, idx-only, type-only, and aliases ctrTitle→title,
    subTitle→body.

  * Group shapes. Replaced the UnknownElement fallback for <p:grpSp>
    with a recursive flattener that composes a:xfrm off/ext against
    chOff/chExt to map child-local coordinates back onto the slide.
    Nested groups compose correctly.

  * Shape preset coverage. Added ~30 prst → ShapeKind mappings
    (parallelogram, hexagon, arrows, callouts, flowchart, snipRect
    family). Anything still unmapped falls back to a colored rect at
    correct geometry instead of an opaque "Imported content" tile.
The presence of an <a:prstDash> child does not imply the line is
dashed — PPTX uses val="solid" to declare an explicit solid pattern.
Read the @Val attribute and only mark the line dashed when val is one
of the actual patterns (dash, dashDot, sysDot, etc.).
Imported lines were rendering with arrowheads whenever <a:headEnd> or
<a:tailEnd> existed at all, but PPTX uses type="none" to explicitly
declare a plain end. Read the @type attribute and only mark the line
as an arrow when it is one of the actual arrowhead presets (triangle,
arrow, stealth, oval, diamond, …).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant