33 Commits
Author SHA1 Message Date
5fadda5ecf chore: resolve SonarCloud maintainability issues (#1255)
* chore: resolve SonarCloud maintainability issues

* fix: address shellcheck SC2059 and fix generic cast ambiguity

* style: apply rustfmt formatting

* fix: restore compile and behaviour in Sonar refactors

- fonts: char::is_alphanumeric takes &self, so filter needs a closure
- h264: keep the mvd accumulator as i32 (prefix is usize)
- model: annotate the non-stacked range accumulators as f64
- engine: chart.options still clears the raw chart XML for upDownBars
  and quartiles; smartart goes back to the glob import (cmd! macro)
- web: keep the original viewport meta (behaviour change)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assign positional parameters to locals in sha256 verification

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan Taylor <dylan@craftmaker.dev>
2026-10-23 23:28:09 -04:00
Marco Arnulfo 19ebd9c2dc Animation Pane: Play From the selected effect
With an effect selected the pane's play button reads Play From and the
canvas preview starts at that effect on the play-all clock, so the
effects before it have already played. With nothing selected it is
still Play All. animation.preview takes an optional from index.
2026-10-22 23:03:35 +02:00
Marco Arnulfo c7423aa986 Show: Back leaves a slide whose first animation plays by itself (part of #844) 2026-10-16 15:47:21 +02:00
Brandon ThomasandClaude Opus 5.5 0997d1e4cd Merge PR #520 from NikitkaRa: Insert: Summary, Section and Slide Zoom with Return to Zoom
Fix-ups in the merge (review): zoom targets, sections and titles are looked up with get()
instead of indexing; Hyperlink literals carry both main's sound fields and zoom_return;
duplicated test statements left by the test-file union are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:58:31 -04:00
Brandon Thomas e80d3f4aed Merge PR #137 from alexanderalber: Morph: a picture cropped differently on the next slide morphs its crop (#118)
# Conflicts:
#	crates/anim/src/lib.rs
#	crates/anim/src/tests.rs
2026-10-14 15:05:27 -04:00
Brandon Thomas c40b2d53ee Merge PR #136 from alexanderalber: Morph: text boxes without a partner fade in place instead of moving (#119) 2026-10-14 15:04:43 -04:00
Brandon ThomasandClaude Opus 5.5 b61cf33836 Fix up merged PRs: custom-show links carry 'returns'; prefetch follows the show's own order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:49:36 -04:00
Brandon Thomas e74015490b Merge PR #660 from NikitkaRa: Show: play a custom show
# Conflicts:
#	crates/anim/src/show.rs
#	crates/engine/src/cmd/review.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/show.rs
2026-10-14 13:49:10 -04:00
Brandon Thomas ab3b1defbf Merge PR #140 from alexanderalber: Slide show: media set to play in the click sequence starts on Next (#116)
# Conflicts:
#	crates/anim/src/tests.rs
#	crates/ui-egui/src/show.rs
2026-10-14 13:20:15 -04:00
Brandon Thomas e171e47a81 Merge PR #551 from NikitkaRa: Animations: add 34 PowerPoint motion path presets
# Conflicts:
#	crates/engine/src/tests.rs
2026-10-14 13:08:52 -04:00
Brandon Thomas 5b26eeb7f7 Merge PR #541 from NikitkaRa: Morph: the same text moves and resizes instead of cross-fading
# Conflicts:
#	crates/anim/src/tests.rs
2026-10-14 13:08:51 -04:00
Brandon Thomas 21c5f8e745 Merge PR #472 from NikitkaRa: Anim: group animations by sequence in one pass (#410)
# Conflicts:
#	crates/anim/src/tests.rs
2026-10-14 13:08:43 -04:00
Brandon Thomas 402c1f4611 Merge PR #222 from justinjohn0306: Animations: nine PowerPoint exit effects import as themselves (#147)
# Conflicts:
#	crates/anim/src/tests.rs
#	crates/pptx/tests/roundtrip.rs
2026-10-14 12:58:00 -04:00
Brandon Thomas 5d406be3b0 Merge PR #460 from albayazid: Slide show: Honeycomb's hexagons cover the whole slide again (#420) 2026-10-14 12:53:42 -04:00
Claude 887ea1e706 Slide show: click-triggered animations, per-slide state and hit testing
Make the slide show behave like PowerPoint for interactive decks.

- Hit testing resolves the topmost visible shape under the pointer.
  Non-interactive shapes block shapes beneath them; the hand cursor
  shows only over interactive shapes.
- Click-triggered animations (interactive sequences) play on shape
  click, repeat after their last step, and apply in click order so
  cycling "score ring" shapes work.
- Each slide keeps its own progress: returning to a slide through a
  link or Back restores hidden shapes and animation state.
- A shape with a link and an animation follows the link immediately;
  its animation clock only runs while the slide is shown and resumes
  with the remaining time on return.
- With advance-on-click off, background clicks still play animation
  steps but never change slide.
- A click on a playing step completes it at once.

Docs (gaps, animation and slide show parity, roadmap) are updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:22:23 +09:00
Nikita Rakitin dfee72e742 Show: play a custom show 2026-10-14 04:19:36 +03:00
Nikita RakitinandCursor d4175d2902 Animations: add 34 PowerPoint motion path presets
Adds Basic (stars, heart, crescent moon, teardrop, ...), Lines & Curves
(zigzag, waves, S curves, spirals, bounces, ...) and Special (figure 8,
bean, peanut, neutron, ...) motion paths with PowerPoint preset ids, so
they appear in the Motion Paths gallery, play back, and round-trip
through PPTX.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 23:37:00 +03:00
Nikita RakitinandCursor c22747b104 Morph: the same text moves and resizes instead of cross-fading
A title typed as "TEST" on a title slide and on a content slide pairs
the two titles, but they differ in placeholder, size and alignment, so
Morph with the default Objects option cross-faded them: the old title
rose and faded out while the new one faded in.

Paired shapes whose text is the same now use the word morph (shared
words travel and resize from their old place to their new one) whatever
the Morph option, as PowerPoint does. Different texts still cross-fade
with Objects.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 23:22:19 +03:00
Nikita RakitinandCursor 5007c6919e Insert: Summary, Section and Slide Zoom with Return to Zoom
Insert › Links gains Zoom, with PowerPoint's three kinds: Slide Zoom
(pictures of chosen slides on the current slide), Section Zoom (one per
chosen section) and Summary Zoom (a new Title Only slide in front of
the chosen parts). Each zoom is a picture of its target that jumps to
it in the show. With Return to Zoom, on by default for section and
summary zooms as in PowerPoint, the show comes back to the zoom slide,
fully built, after the target slide or the section's last slide; going
elsewhere (a slide number, See All Slides) forgets it. Hyperlink gains
zoom_return for this; .pptx saves zooms as the linked pictures
PowerPoint writes as their fallback, so the return flag is DeckCraft-
only for now. Live thumbnails, the zoom-in animation and the native
p166:sldZm element are still missing; gaps.md says so.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 22:40:37 +03:00
Nikita RakitinandCursor de098cfa52 Anim: group animations by sequence in one pass (#410)
Timeline::with found trigger sequences with Vec::contains and then rescanned
every animation once per sequence, and checked MAX_EFFECTS only after a
match, so a slide with many distinct triggers cost quadratic work before the
effect cap could stop it.

Animations are now grouped once (an index by sequence, first-appearance order
kept, main first), the build stops at MAX_EFFECTS before the next sequence,
and paragraph groups are deduplicated with a set instead of Vec::contains.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 20:39:57 +03:00
Sazid Al Bayazid 8ba97e61be Slide show: Honeycomb's hexagons cover the whole slide again (#420)
The row count came from 1/(1.5*rh) - the row spacing alone - and
ignored how far a settled hexagon actually reaches. On a 16:9 slide
the eleven rows stopped at ~75% of the height: from t~0.9, when every
cell has settled, the bottom quarter was plain black until the t=1
endpoint snapped to the full new slide.

The count now derives from the real geometry: rows sit 0.866*rh apart
and the flat bottom zone of a settled hexagon reaches 0.289*rh past
its centre, so counting to the flat-zone reach covers the slide for
every aspect ratio - counting to the vertex reach still left small
V-notches of black above the bottom edge on about a third of them
(US Letter, square, ...). 16:9 gains four rows (15, was 11), 4:3
seven (20, was 13).

Tests: at t=0.99, when every cell is settled and the seams are nearly
closed, a 0.02-step grid over the slide must sit inside settled
incoming cells (padded 1% past the hairline seams) on five aspect
ratios including US Letter and square. Fails on the old count at
(0.2, 0.74); before/after frames rendered with render-transition.
2026-10-13 21:58:25 +06:00
Brandon ThomasandClaude Opus 5.5 d5e30557eb Transitions like PowerPoint: measured frame by frame and retuned (#366)
Every transition and Effect Option was built in PowerPoint (COM), exported as
video and compared frame by frame with DeckCraft at the same progress
(mean abs diff over 150 variants 35.7 -> 15.0, 0-255).

- anim: transition_frame(kind, option, t, aspect) with measured curves
  (smoothstep fades, ease-in-out moves, Cover/Uncover/Pan curves), directions
  and option meanings, soft edges as per-corner opacity, 3-D effects as
  perspective-projected cards, Dynamic Content moving slide contents over
  cross-fading backgrounds (Source::OldBack/NewBack/OldContent/NewContent);
  layer_mesh subdivides perspective quads so textures stay straight.
- New options: Page Curl Single, Glitter Hexagons, Shred In/Out, Zoom and
  Rotate; PowerPoint-style Effect Options labels.
- render: composite_transition (CPU twin of the show), render_slide_part,
  render_transition; deckcraft-cli render-transition FILE --slide N --t T.
- show: per-vertex opacity meshes, slide parts rendered once per transition.
- pptx: PowerPoint's elements and defaults (p:strips diagonal wipes, p14:warp
  and p:newsflash for Zoom, p:zoom for Shape In/Out, glitter pattern, shred
  rectangle/dir, prstTrans invX per preset, pageCurlSingle, defaults for
  randomBar/doors/window/pan/zoom); PowerPoint reopens DeckCraft's files with
  the same effects.
- Tests: measured curves, probes of which slide shows where at t, option
  coverage, per-frame triangle budget, PowerPoint XML and defaults round trip.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 05:31:13 -04:00
justinjohn0306andClaude Opus 5.5 bd61308cf9 Animations: nine PowerPoint exit effects import as themselves (#147)
Exit effects DeckCraft had no entry for (Peek Out, Strips, Blinds, Box,
Checkerboard, Diamond, Sink Down, Spinner, Contract) imported as a plain
Fade and lost their direction, so a Peek Out or Sink Down didn't move.
Each mirrors an entrance DeckCraft already plays, so it is played as that
entrance in reverse (Sink Down as Rise Up, leaving downward); the import
keeps PowerPoint's direction and saving writes a matching filter or
motion. Float Out now also writes its motion.

The preset ids and directions come from PowerPoint: every effect, as
entrance and exit, in every direction it accepts, saved and read back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:59:59 +05:30
Alexander Alber 208c163647 Slide show: media set to play in the click sequence starts on Next (#116)
PPTX import already read PowerPoint's media effects (presetClass
mediacall: Play, Pause, Stop) into the timeline, but the show never
carried them out: media started only with autoplay or a click on it.
The show now sets off a step's media effects as the step reaches them,
and also when a click cuts the step short.

A step also no longer lasts as long as the media it starts: the video
plays on by itself and the next click goes on at once. An After Previous
effect behind it still waits for the media to end.

generated with Claude Code
2026-10-11 09:55:36 +02:00
Alexander Alber 7db770d91d Morph: a picture cropped differently on the next slide morphs its crop (#118)
Two paired pictures that differed only in crop counted as changed
content, so the new one faded in over the old one on the moving box.
Now they stay one picture whose crop morphs: the whole image moves and
scales linearly between where it lies on either slide, and each frame's
crop is what the interpolated box shows of it (morph_crop).

generated with Claude Code
2026-10-11 09:16:27 +02:00
Alexander Alber 04069e1968 Morph: text boxes without a partner fade in place instead of moving (#119)
The last matching pass paired any two shapes of one kind and preset
geometry, so a text box leaving the slide was paired with an unrelated
one arriving and flew across to it. That pass now only pairs shapes
without text: a text box needs its name or its text on the other slide
to morph, otherwise it fades out (or in) where it is, as in PowerPoint.

generated with Claude Code
2026-10-11 09:03:01 +02:00
7f1e152870 Links: Insert Hyperlink with a bare caret inserts the address; the show follows links (#31) (#45)
Three causes, each making links look like they "don't save":

- With the caret at a word boundary (end of text, empty paragraph),
  insert.hyperlink formatted an empty range and changed nothing. It now
  inserts the address (or the slide's title, or `text`) as linked text, as
  PowerPoint does. Typing right after a link no longer extends it.
- The slide show ignored hyperlinks and shape actions. A click on one now
  follows it (ShowState::follow): slides, next/previous/first/last, Last
  Slide Viewed, End Show, and URLs; the pointer turns into a hand over links.
- The desktop app was built without eframe's `links` feature, so
  ctx.open_url did nothing natively (also the ribbon's app page link).
  Enabled as in DesignCraft, EffectCraft and PrintCraft.

Saving was fine: links round-trip through .deckcraft and .pptx.

generated with Claude Code

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:23:01 -04:00
alexanderalberandBrandon Thomas 788831834b Morph: a changed geometry morphs its outline (a circle turns into a star) (#27)
* Morph: a changed geometry morphs its outline (a circle turns into a star)

Paired shapes that differ only in geometry (another preset, other adjust
values, a custom path) and fill colour no longer cross-fade: one shape moves
and its outline turns from the old geometry into the new one.

- geom::morph aligns two outlines the way manim does: the same number of
  contours, the same number of cubic curves per contour pair, then every
  point moves in a straight line. Closed contours are turned and reversed so
  the points travel least (a triangle does not twist into a circle), extra
  points go to the longest curves, and a sub-path without partner grows out
  of (or shrinks into) a point, so a cube's faces appear and a donut's hole
  closes. Fill mode, outline and fill rule switch at the midpoint.
- anim::morph_frame lists such shapes in MorphFrame::paths; the renderer
  draws them with the morphed geometry (PathMorph, a new render_blend
  argument next to TextMorph).

Ported from the path morph in alexplain (MIT, same author).

generated with Claude Code

* Morph: differing looks of an outline cross-fade instead of switching

When a sub-path pair differs in fill mode, outline or fill rule, the two
looks no longer switch at the midpoint. A fill or outline only one side has
fades out (or in), so a filled shape turning into a line loses its fill
gradually. When both fill, the even-odd side lies opaque underneath and the
other fades over it, so a donut's hole fills smoothly while it shrinks.

generated with Claude Code

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-10 06:19:32 -04:00
alexanderalber 08d57ca15c Morph test: sort the ids before dedup so it really checks uniqueness (#25)
dedup only removes consecutive duplicates, so two equal ids that were not
adjacent would have passed. Follow-up to the review note on #5.

generated with Claude Code
2026-10-10 06:17:24 -04:00
alexanderalberandBrandon Thomas fa9a94a1c0 Morph: shapes move, resize and blend; Words and Characters options morph text (#5)
* Morph: shapes move, resize and blend in the slide show

Morph used to fall back to a plain crossfade in the show: morph_pairs and
morph_xfrm existed, but nothing rendered frames with them.

- anim: morph_frame builds a frame from two slides. Paired shapes move along
  morph_xfrm (eased); a pure fill colour change blends, other content changes
  cross-fade on the same moving box. Unpaired shapes fade out/in, shapes with
  entrance animations or hidden media stay out of the frame.
- render: render_blend draws such a frame in one pass: both backdrops
  (background, master and layout graphics) cross-fade, every shape resolves
  against the slide it comes from, so placeholders keep their own layout.
  Renderer::slide is split into canvas/fields/backdrop to share the code.
- ui-egui: the show renders morph frames with these, crossfade otherwise.

generated with Claude Code

* Contributors: add my own entry (alexanderalber)

generated with Claude Code

* Morph: Words and Characters options morph text token by token

The transition option (objects/words/characters) was stored and round-tripped
but ignored by the show. With Words or Characters, paired shapes whose text
differs now morph their text instead of cross-fading it:

- text: GlyphRun records per glyph the paragraph character it draws, so
  glyphs can be grouped into words or characters.
- anim: morph_frame reads the option and lists such pairs in MorphFrame::text.
- render: morph_text draws them. Shared words (or characters) travel from their
  place in the old text to their place in the new one and grow or shrink to the
  new size; a different look cross-fades on the way. The remaining tokens fade
  while following a scale and shift fitted to the shared ones, so a line moves
  and rearranges as one. Rotated text falls back to a cross-fade.
  draw_layout_with's glyph drawing moved into draw_glyph for reuse.
- ui-egui: the show passes the pairs to render_blend.

generated with Claude Code

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-09 10:32:41 -04:00
Brandon ThomasandClaude Opus 5.5 ae9d525bce Rename SlideCraft to DeckCraft: crates, apps, binaries, app id, file extension (.deckcraft; .slidecraft files still open), packaging, docs; ROADMAP alpha and parity estimates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:46:40 -04:00
Brandon ThomasandClaude Opus 5.5 55a5752d25 Slide show: by-paragraph text builds render per paragraph, sub-bullets follow their parent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:14:59 -04:00
Brandon ThomasandClaude Opus 5.5 e62b7ccd15 M0: PowerPoint-style egui UI, slide show engine, icons, desktop app
- ui-egui: title bar, ribbon with every tab (Home, Insert, Draw, Design, Transitions,
  Animations, Slide Show, Record, Review, View) plus contextual Shape/Picture Format,
  Table Design/Layout, Chart Design, Playback and Slide Master tabs; thumbnail pane with
  sections and drag reorder; canvas with selection handles, smart guides, marquee,
  in-place text editing; notes pane; status bar with views and zoom; task panes
  (Format Shape, Background, Animation, Selection, Comments, Design Ideas); dialogs;
  Slide Sorter, Notes Page, Outline view; command palette; control channel
- anim: timelines for every animation effect, transition layers for every transition,
  morph pairing, show navigation (hidden slides, custom shows, loops)
- show: full-screen slide show with transitions, animations, pen, black/white
  screens, presenter view window, rehearse timings, reading view
- icons: 238 original icons drawn in code
- render: filters force single-threaded rendering (regression test), panic guard
- engine: chart type/data/options, SmartArt-style graphics
- apps/slidecraft: desktop host with control server, file dialogs, clipboard images
- placeholder app icon rendered by SlideCraft itself

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:08:13 -04:00