Skip to content

SmartArt: node pictures from the data model, Brick Scene camera, four more layouts - #613

Merged
h-a-n-a-s-h-i merged 6 commits into
storytold:mainfrom
NikitkaRa:smartart-pictures-import
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 6 commits into
storytold:mainfrom
NikitkaRa:smartart-pictures-import

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Stacked on #610 (→ #606 → #601 → #596). Review/merge those first; the diff here includes them until they land.

Summary

  • Node pictures come back from .pptx: pictures are now written the way PowerPoint stores them. Each one sits on a type="pres" point of the data model, with presAssocID naming the node and an a:blipFill/a:blip r:embed that points through the data part's own rels. On import, dgm::node_pictures maps those points back to nodes in outline order, and the reader resolves each blip to media. So DiagramNode.picture survives a round trip, and it's also read from PowerPoint-made files that use the same structure.
  • Layout id check: checked against PowerPoint's SmartArt layout list (its SmartArtLayouts ids). pList2 is Horizontal Picture List, not Picture Accent Process. Picture Accent Process is now written as hProcess10, and pList2 is used for the new Horizontal Picture List layout. All the other ids DeckCraft writes matched the list (vList2, default, hList1, process1, chevron1, process2, StepUpProcess, cycle2, cycle5, radial1, hierarchy1, pyramid1, pyramid3, matrix3, matrix1, vList4, pList1).
  • Brick Scene camera: the shapes are seen through isometricOffAxis2Top. The same camera is set on the shapes' 3-D XML and in the quickStyle scene3d.
  • Four more layouts:
    • Horizontal Picture List (pList2)
    • Basic Timeline (hProcess11): an arrow with dots, text alternating above and below
    • Basic Venn (venn1): see-through overlapping circles
    • Basic Target (target1): nested rings, with labels beside them joined by lines
    • On import, layout ids containing venn, target or timeline also map to these.

Test plan

  • cargo xtask ci: all 6 steps pass.
  • Tests:
    • The engine picture test now checks that the node's picture comes back after .pptx export and import, and only on that node.
    • New node_pictures_come_from_presentation_points (pptx), which includes an out-of-range node.
    • style_and_colour_ids_round_trip now pins hProcess10 and pList2 and round-trips the new layout kinds.
    • The every-layout bounds test covers the new layouts.
  • Visual: rendered to PNG and checked by eye: Brick Scene on a block list and a process, Horizontal Picture List with a picture, the timeline, 3- and 2-circle Venn, and the target. The exported .pptx also converts through LibreOffice.
  • Not done: opening in PowerPoint (needs a human). The things to check there are that PowerPoint shows the node pictures from the data model and the Brick Scene camera.

NikitkaRa and others added 6 commits October 14, 2026 01:22
A SmartArt group now keeps its outline (Shape.diagram: layout + nodes with
levels) and its shapes are regenerated from it inside the group's child
rectangle. New commands: smartArt.nodes, setNodes, addNode (after, before,
above, below), removeNode, promote, demote and layout. Sub-points become
bullets in their parent's shape; the hierarchy layout is a real tree with
connector lines. Text typed into a diagram shape is read back first.

UI: a SmartArt Design contextual tab and a Text Pane (Enter adds a line,
Tab/Shift+Tab demote/promote, Backspace on an empty line removes it).

Co-authored-by: Cursor <cursoragent@cursor.com>
…the data model

Export: a group with a diagram becomes a graphicFrame naming ppt/diagrams
data, layout, quickStyle and colors parts, plus the group's shapes as the
cached drawing (dsp). The data model is built from the outline (doc, node,
parTrans/sibTrans points and parOf links). A diagram read from a file keeps
its own layout, quick style and colour parts until its layout is switched.

Import: the outline is rebuilt from the data model's parOf tree, so
PowerPoint diagrams get the Text Pane. Their shapes stay the file's drawing
until the first outline edit (typed text isn't mapped back to nodes then).

Co-authored-by: Cursor <cursoragent@cursor.com>
Layouts now include Vertical and Horizontal Bullet List, Basic Block List,
Basic/Chevron/Vertical/Step Up Process, Basic and Block Cycle, Basic Radial,
Basic and Inverted Pyramid (bands drawn as polygons so the slope and the
text stay right), Basic and Titled Matrix, and Hierarchy. Each layout says
which nodes each shape shows, so typed text maps back for any layout.

SmartArt Styles (flat, subtle, intense, white outline) and Change Colors
(colourful or one accent) are kept on the diagram, offered in the SmartArt
Design tab, and written to .pptx as quick style / colour definition ids
(and read back from them).

Co-authored-by: Cursor <cursoragent@cursor.com>
Inset each pyramid band's text past the band's mid width so bullets no longer hang over the sloped sides; capped so the tip band still has room.

Co-authored-by: Cursor <cursoragent@cursor.com>
…lours

Each shape's text shrinks so its longest word fits on a line (the pyramid tip no longer breaks words). Three picture layouts (Vertical Picture List, Picture Caption List, Picture Accent Process) with a picture placeholder per node and smartArt.picture to fill it. Five 3-D SmartArt Styles (Polished, Inset, Cartoon, Powder, Brick Scene) drawn with lit bevels, and Colorful Range and Gradient Range colours; all written to and read from the .pptx quickStyle and colors parts.

Co-authored-by: Cursor <cursoragent@cursor.com>
… more layouts

Node pictures are written on the data model's presentation points (blip through the data part's rels) and read back into the outline on import. Picture Accent Process is hProcess10, not pList2 (checked against PowerPoint's layout list); pList2 is now Horizontal Picture List. Brick Scene looks through an isometric camera. New layouts: Horizontal Picture List, Basic Timeline, Basic Venn, Basic Target.

Co-authored-by: Cursor <cursoragent@cursor.com>
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
)

On Linux, pdfcraft-cli shipped only inside the desktop packages (about
55 MB), while macOS already publishes pdfcraft-cli-<v>-macos-universal.zip.
Servers, CI and agent sandboxes only need the headless CLI.

packaging/linux/package.sh gains a `cli` format, on by default, that writes
pdfcraft-cli-<v>-linux-<arch>.tar.gz: the stripped pdfcraft-cli from the
shared staging tree plus the licences/README via copy_docs. copy_docs now
also copies NOTICE (every package benefits). The release job already
uploads and checksums every file in dist/release; its package check now
lists the archive and runs the extracted binary. README and
docs/releasing.md list the new artifact and state the glibc 2.35 baseline.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants