The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Mixed Media and Canvas: real looks on 24 tiles; examples on 18 pages
Adarshd48d1876d5fe
diff --git a/public/previews/presets/peak/app-3d-figure.jpg b/public/previews/presets/peak/app-3d-figure.jpgnew file mode 100644index 00000000..0dbeb733Binary files /dev/null and b/public/previews/presets/peak/app-3d-figure.jpg differdiff --git a/public/previews/presets/peak/app-3d-rotation.jpg b/public/previews/presets/peak/app-3d-rotation.jpgnew file mode 100644index 00000000..f787c214Binary files /dev/null and b/public/previews/presets/peak/app-3d-rotation.jpg differdiff --git a/public/previews/presets/peak/app-ad-creative.jpg b/public/previews/presets/peak/app-ad-creative.jpgnew file mode 100644index 00000000..85b5b58eBinary files /dev/null and b/public/previews/presets/peak/app-ad-creative.jpg differdiff --git a/public/previews/presets/peak/app-asmr-classic.jpg b/public/previews/presets/peak/app-asmr-classic.jpgnew file mode 100644index 00000000..8997d8baBinary files /dev/null and b/public/previews/presets/peak/app-asmr-classic.jpg differdiff --git a/public/previews/presets/peak/app-billboard-ad.jpg b/public/previews/presets/peak/app-billboard-ad.jpgnew file mode 100644index 00000000..07826247Binary files /dev/null and b/public/previews/presets/peak/app-billboard-ad.jpg differdiff --git a/public/previews/presets/peak/app-character-swap.jpg b/public/previews/presets/peak/app-character-swap.jpgnew file mode 100644index 00000000..05fd1835Binary files /dev/null and b/public/previews/presets/peak/app-character-swap.jpg differdiff --git a/public/previews/presets/peak/app-clean-up-voice.jpg b/public/previews/presets/peak/app-clean-up-voice.jpgnew file mode 100644index 00000000..c52ae435Binary files /dev/null and b/public/previews/presets/peak/app-clean-up-voice.jpg differdiff --git a/public/previews/presets/peak/app-clipcut.jpg b/public/previews/presets/peak/app-clipcut.jpgnew file mode 100644index 00000000..9065e819Binary files /dev/null and b/public/previews/presets/peak/app-clipcut.jpg differdiff --git a/public/previews/presets/peak/app-dance.jpg b/public/previews/presets/peak/app-dance.jpgnew file mode 100644index 00000000..0527cc32Binary files /dev/null and b/public/previews/presets/peak/app-dance.jpg differdiff --git a/public/previews/presets/peak/app-expand-image.jpg b/public/previews/presets/peak/app-expand-image.jpgnew file mode 100644index 00000000..f274ebdeBinary files /dev/null and b/public/previews/presets/peak/app-expand-image.jpg differdiff --git a/public/previews/presets/peak/app-giant-product.jpg b/public/previews/presets/peak/app-giant-product.jpgnew file mode 100644index 00000000..b09349ecBinary files /dev/null and b/public/previews/presets/peak/app-giant-product.jpg differdiff --git a/public/previews/presets/peak/app-image-to-3d.jpg b/public/previews/presets/peak/app-image-to-3d.jpgnew file mode 100644index 00000000..89d63e4eBinary files /dev/null and b/public/previews/presets/peak/app-image-to-3d.jpg differdiff --git a/public/previews/presets/peak/app-object-remover.jpg b/public/previews/presets/peak/app-object-remover.jpgnew file mode 100644index 00000000..e76c47b1Binary files /dev/null and b/public/previews/presets/peak/app-object-remover.jpg differdiff --git a/public/previews/presets/peak/app-packshot.jpg b/public/previews/presets/peak/app-packshot.jpgnew file mode 100644index 00000000..07c70f6cBinary files /dev/null and b/public/previews/presets/peak/app-packshot.jpg differdiff --git a/public/previews/presets/peak/app-product-360.jpg b/public/previews/presets/peak/app-product-360.jpgnew file mode 100644index 00000000..c5a2fdc0Binary files /dev/null and b/public/previews/presets/peak/app-product-360.jpg differdiff --git a/public/previews/presets/peak/app-rap-god.jpg b/public/previews/presets/peak/app-rap-god.jpgnew file mode 100644index 00000000..4be52bfaBinary files /dev/null and b/public/previews/presets/peak/app-rap-god.jpg differdiff --git a/public/previews/presets/peak/app-recast.jpg b/public/previews/presets/peak/app-recast.jpgnew file mode 100644index 00000000..f99e8297Binary files /dev/null and b/public/previews/presets/peak/app-recast.jpg differdiff --git a/public/previews/presets/peak/app-remove-background.jpg b/public/previews/presets/peak/app-remove-background.jpgnew file mode 100644index 00000000..2c7ba4e1Binary files /dev/null and b/public/previews/presets/peak/app-remove-background.jpg differdiff --git a/public/previews/presets/peak/app-restore-photo.jpg b/public/previews/presets/peak/app-restore-photo.jpgnew file mode 100644index 00000000..0c9e9f8eBinary files /dev/null and b/public/previews/presets/peak/app-restore-photo.jpg differdiff --git a/public/previews/presets/peak/app-skin-enhancer.jpg b/public/previews/presets/peak/app-skin-enhancer.jpgnew file mode 100644index 00000000..9e02c7b1Binary files /dev/null and b/public/previews/presets/peak/app-skin-enhancer.jpg differdiff --git a/public/previews/presets/peak/app-sticker-match-cut.jpg b/public/previews/presets/peak/app-sticker-match-cut.jpgnew file mode 100644index 00000000..44566d18Binary files /dev/null and b/public/previews/presets/peak/app-sticker-match-cut.jpg differdiff --git a/public/previews/presets/peak/app-talking-photo.jpg b/public/previews/presets/peak/app-talking-photo.jpgnew file mode 100644index 00000000..f1511ffdBinary files /dev/null and b/public/previews/presets/peak/app-talking-photo.jpg differdiff --git a/public/previews/presets/peak/app-text-edit.jpg b/public/previews/presets/peak/app-text-edit.jpgnew file mode 100644index 00000000..e6edbc51Binary files /dev/null and b/public/previews/presets/peak/app-text-edit.jpg differdiff --git a/public/previews/presets/peak/app-upscale.jpg b/public/previews/presets/peak/app-upscale.jpgnew file mode 100644index 00000000..530c6ea8Binary files /dev/null and b/public/previews/presets/peak/app-upscale.jpg differdiff --git a/public/previews/presets/peak/app-urban-cuts.jpg b/public/previews/presets/peak/app-urban-cuts.jpgnew file mode 100644index 00000000..fdaef020Binary files /dev/null and b/public/previews/presets/peak/app-urban-cuts.jpg differdiff --git a/public/previews/presets/peak/app-video-face-swap.jpg b/public/previews/presets/peak/app-video-face-swap.jpgnew file mode 100644index 00000000..7d0f50e3Binary files /dev/null and b/public/previews/presets/peak/app-video-face-swap.jpg differdiff --git a/public/previews/presets/peak/app-what-s-next.jpg b/public/previews/presets/peak/app-what-s-next.jpgnew file mode 100644index 00000000..eb6d735aBinary files /dev/null and b/public/previews/presets/peak/app-what-s-next.jpg differdiff --git a/public/previews/presets/peak/app-zoom-out.jpg b/public/previews/presets/peak/app-zoom-out.jpgnew file mode 100644index 00000000..c00485fbBinary files /dev/null and b/public/previews/presets/peak/app-zoom-out.jpg differdiff --git a/public/previews/presets/peak/effect-acid.jpg b/public/previews/presets/peak/effect-acid.jpgnew file mode 100644index 00000000..ddf4c336Binary files /dev/null and b/public/previews/presets/peak/effect-acid.jpg differdiff --git a/public/previews/presets/peak/effect-agamemnon.jpg b/public/previews/presets/peak/effect-agamemnon.jpgnew file mode 100644index 00000000..119e4240Binary files /dev/null and b/public/previews/presets/peak/effect-agamemnon.jpg differdiff --git a/public/previews/presets/peak/effect-akrill.jpg b/public/previews/presets/peak/effect-akrill.jpgnew file mode 100644index 00000000..e6d228b3Binary files /dev/null and b/public/previews/presets/peak/effect-akrill.jpg differdiff --git a/public/previews/presets/peak/effect-blue-depth.jpg b/public/previews/presets/peak/effect-blue-depth.jpgnew file mode 100644index 00000000..7a24dbf1Binary files /dev/null and b/public/previews/presets/peak/effect-blue-depth.jpg differdiff --git a/public/previews/presets/peak/effect-cannabis.jpg b/public/previews/presets/peak/effect-cannabis.jpgnew file mode 100644index 00000000..9d045ac4Binary files /dev/null and b/public/previews/presets/peak/effect-cannabis.jpg differdiff --git a/public/previews/presets/peak/effect-canvas.jpg b/public/previews/presets/peak/effect-canvas.jpgnew file mode 100644index 00000000..fa9d3238Binary files /dev/null and b/public/previews/presets/peak/effect-canvas.jpg differdiff --git a/public/previews/presets/peak/effect-comic.jpg b/public/previews/presets/peak/effect-comic.jpgnew file mode 100644index 00000000..847306e8Binary files /dev/null and b/public/previews/presets/peak/effect-comic.jpg differdiff --git a/public/previews/presets/peak/effect-dolphin-ride.jpg b/public/previews/presets/peak/effect-dolphin-ride.jpgnew file mode 100644index 00000000..4aafadbbBinary files /dev/null and b/public/previews/presets/peak/effect-dolphin-ride.jpg differdiff --git a/public/previews/presets/peak/effect-fragments.jpg b/public/previews/presets/peak/effect-fragments.jpgnew file mode 100644index 00000000..d935936fBinary files /dev/null and b/public/previews/presets/peak/effect-fragments.jpg differdiff --git a/public/previews/presets/peak/effect-jump-transition.jpg b/public/previews/presets/peak/effect-jump-transition.jpgnew file mode 100644index 00000000..d88ec047Binary files /dev/null and b/public/previews/presets/peak/effect-jump-transition.jpg differdiff --git a/public/previews/presets/peak/effect-marble.jpg b/public/previews/presets/peak/effect-marble.jpgnew file mode 100644index 00000000..5ec19c5eBinary files /dev/null and b/public/previews/presets/peak/effect-marble.jpg differdiff --git a/public/previews/presets/peak/effect-modern.jpg b/public/previews/presets/peak/effect-modern.jpgnew file mode 100644index 00000000..4106d9a2Binary files /dev/null and b/public/previews/presets/peak/effect-modern.jpg differdiff --git a/public/previews/presets/peak/effect-monet-muse.jpg b/public/previews/presets/peak/effect-monet-muse.jpgnew file mode 100644index 00000000..7ad06cd5Binary files /dev/null and b/public/previews/presets/peak/effect-monet-muse.jpg differdiff --git a/public/previews/presets/peak/effect-selfie-posing.jpg b/public/previews/presets/peak/effect-selfie-posing.jpgnew file mode 100644index 00000000..c342edcaBinary files /dev/null and b/public/previews/presets/peak/effect-selfie-posing.jpg differdiff --git a/public/previews/presets/peak/effect-selfie.jpg b/public/previews/presets/peak/effect-selfie.jpgnew file mode 100644index 00000000..236253a0Binary files /dev/null and b/public/previews/presets/peak/effect-selfie.jpg differdiff --git a/public/previews/presets/peak/effect-skatedog.jpg b/public/previews/presets/peak/effect-skatedog.jpgnew file mode 100644index 00000000..93e8042dBinary files /dev/null and b/public/previews/presets/peak/effect-skatedog.jpg differdiff --git a/public/previews/presets/peak/effect-superstar.jpg b/public/previews/presets/peak/effect-superstar.jpgnew file mode 100644index 00000000..ecfe5b3aBinary files /dev/null and b/public/previews/presets/peak/effect-superstar.jpg differdiff --git a/public/previews/presets/peak/effect-turning-metal.jpg b/public/previews/presets/peak/effect-turning-metal.jpgnew file mode 100644index 00000000..5912e3cfBinary files /dev/null and b/public/previews/presets/peak/effect-turning-metal.jpg differdiff --git a/public/previews/presets/peak/effect-vintage.jpg b/public/previews/presets/peak/effect-vintage.jpgnew file mode 100644index 00000000..4a272042Binary files /dev/null and b/public/previews/presets/peak/effect-vintage.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-3d-figure.jpg b/public/previews/presets/peak/thumbs/app-3d-figure.jpgnew file mode 100644index 00000000..7b7ed947Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-3d-figure.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-3d-rotation.jpg b/public/previews/presets/peak/thumbs/app-3d-rotation.jpgnew file mode 100644index 00000000..4d0ed93bBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-3d-rotation.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-ad-creative.jpg b/public/previews/presets/peak/thumbs/app-ad-creative.jpgnew file mode 100644index 00000000..f51b3bf0Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-ad-creative.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-asmr-classic.jpg b/public/previews/presets/peak/thumbs/app-asmr-classic.jpgnew file mode 100644index 00000000..ae7f0b69Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-asmr-classic.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-billboard-ad.jpg b/public/previews/presets/peak/thumbs/app-billboard-ad.jpgnew file mode 100644index 00000000..68c4659cBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-billboard-ad.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-character-swap.jpg b/public/previews/presets/peak/thumbs/app-character-swap.jpgnew file mode 100644index 00000000..f6b9a57cBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-character-swap.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-clean-up-voice.jpg b/public/previews/presets/peak/thumbs/app-clean-up-voice.jpgnew file mode 100644index 00000000..0a68ad6dBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-clean-up-voice.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-clipcut.jpg b/public/previews/presets/peak/thumbs/app-clipcut.jpgnew file mode 100644index 00000000..ade8c85bBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-clipcut.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-dance.jpg b/public/previews/presets/peak/thumbs/app-dance.jpgnew file mode 100644index 00000000..9b7b58f0Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-dance.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-expand-image.jpg b/public/previews/presets/peak/thumbs/app-expand-image.jpgnew file mode 100644index 00000000..03ec9747Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-expand-image.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-giant-product.jpg b/public/previews/presets/peak/thumbs/app-giant-product.jpgnew file mode 100644index 00000000..217262dcBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-giant-product.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-image-to-3d.jpg b/public/previews/presets/peak/thumbs/app-image-to-3d.jpgnew file mode 100644index 00000000..4358dd5eBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-image-to-3d.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-object-remover.jpg b/public/previews/presets/peak/thumbs/app-object-remover.jpgnew file mode 100644index 00000000..1b5ddee9Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-object-remover.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-packshot.jpg b/public/previews/presets/peak/thumbs/app-packshot.jpgnew file mode 100644index 00000000..953e9524Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-packshot.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-product-360.jpg b/public/previews/presets/peak/thumbs/app-product-360.jpgnew file mode 100644index 00000000..920c7426Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-product-360.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-rap-god.jpg b/public/previews/presets/peak/thumbs/app-rap-god.jpgnew file mode 100644index 00000000..bc5d71bbBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-rap-god.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-recast.jpg b/public/previews/presets/peak/thumbs/app-recast.jpgnew file mode 100644index 00000000..4b78f7e6Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-recast.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-remove-background.jpg b/public/previews/presets/peak/thumbs/app-remove-background.jpgnew file mode 100644index 00000000..c017c475Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-remove-background.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-restore-photo.jpg b/public/previews/presets/peak/thumbs/app-restore-photo.jpgnew file mode 100644index 00000000..e5419b29Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-restore-photo.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-skin-enhancer.jpg b/public/previews/presets/peak/thumbs/app-skin-enhancer.jpgnew file mode 100644index 00000000..3c1f1879Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-skin-enhancer.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-sticker-match-cut.jpg b/public/previews/presets/peak/thumbs/app-sticker-match-cut.jpgnew file mode 100644index 00000000..d36123e4Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-sticker-match-cut.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-talking-photo.jpg b/public/previews/presets/peak/thumbs/app-talking-photo.jpgnew file mode 100644index 00000000..ba728272Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-talking-photo.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-text-edit.jpg b/public/previews/presets/peak/thumbs/app-text-edit.jpgnew file mode 100644index 00000000..fd85a722Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-text-edit.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-upscale.jpg b/public/previews/presets/peak/thumbs/app-upscale.jpgnew file mode 100644index 00000000..098e3529Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-upscale.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-urban-cuts.jpg b/public/previews/presets/peak/thumbs/app-urban-cuts.jpgnew file mode 100644index 00000000..3db213c9Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-urban-cuts.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-video-face-swap.jpg b/public/previews/presets/peak/thumbs/app-video-face-swap.jpgnew file mode 100644index 00000000..40a7b20dBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-video-face-swap.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-what-s-next.jpg b/public/previews/presets/peak/thumbs/app-what-s-next.jpgnew file mode 100644index 00000000..a2594e23Binary files /dev/null and b/public/previews/presets/peak/thumbs/app-what-s-next.jpg differdiff --git a/public/previews/presets/peak/thumbs/app-zoom-out.jpg b/public/previews/presets/peak/thumbs/app-zoom-out.jpgnew file mode 100644index 00000000..c1284e4aBinary files /dev/null and b/public/previews/presets/peak/thumbs/app-zoom-out.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-acid.jpg b/public/previews/presets/peak/thumbs/effect-acid.jpgnew file mode 100644index 00000000..98e27e2eBinary files /dev/null and b/public/previews/presets/peak/thumbs/effect-acid.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-agamemnon.jpg b/public/previews/presets/peak/thumbs/effect-agamemnon.jpgnew file mode 100644index 00000000..02d8e97aBinary files /dev/null and b/public/previews/presets/peak/thumbs/effect-agamemnon.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-akrill.jpg b/public/previews/presets/peak/thumbs/effect-akrill.jpgnew file mode 100644index 00000000..dc4a7ec7Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-akrill.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-blue-depth.jpg b/public/previews/presets/peak/thumbs/effect-blue-depth.jpgnew file mode 100644index 00000000..2fddfbf6Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-blue-depth.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-cannabis.jpg b/public/previews/presets/peak/thumbs/effect-cannabis.jpgnew file mode 100644index 00000000..5be697a8Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-cannabis.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-canvas.jpg b/public/previews/presets/peak/thumbs/effect-canvas.jpgnew file mode 100644index 00000000..882452ceBinary files /dev/null and b/public/previews/presets/peak/thumbs/effect-canvas.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-comic.jpg b/public/previews/presets/peak/thumbs/effect-comic.jpgnew file mode 100644index 00000000..0f044b43Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-comic.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-dolphin-ride.jpg b/public/previews/presets/peak/thumbs/effect-dolphin-ride.jpgnew file mode 100644index 00000000..23ccf808Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-dolphin-ride.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-fragments.jpg b/public/previews/presets/peak/thumbs/effect-fragments.jpgnew file mode 100644index 00000000..6fdf6f06Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-fragments.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-jump-transition.jpg b/public/previews/presets/peak/thumbs/effect-jump-transition.jpgnew file mode 100644index 00000000..8a6899ebBinary files /dev/null and b/public/previews/presets/peak/thumbs/effect-jump-transition.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-marble.jpg b/public/previews/presets/peak/thumbs/effect-marble.jpgnew file mode 100644index 00000000..9d113f93Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-marble.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-modern.jpg b/public/previews/presets/peak/thumbs/effect-modern.jpgnew file mode 100644index 00000000..35d629d6Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-modern.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-monet-muse.jpg b/public/previews/presets/peak/thumbs/effect-monet-muse.jpgnew file mode 100644index 00000000..fa0ce144Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-monet-muse.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-selfie-posing.jpg b/public/previews/presets/peak/thumbs/effect-selfie-posing.jpgnew file mode 100644index 00000000..f07b53b3Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-selfie-posing.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-selfie.jpg b/public/previews/presets/peak/thumbs/effect-selfie.jpgnew file mode 100644index 00000000..0571e4b2Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-selfie.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-skatedog.jpg b/public/previews/presets/peak/thumbs/effect-skatedog.jpgnew file mode 100644index 00000000..1703ca3bBinary files /dev/null and b/public/previews/presets/peak/thumbs/effect-skatedog.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-superstar.jpg b/public/previews/presets/peak/thumbs/effect-superstar.jpgnew file mode 100644index 00000000..b5a974e6Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-superstar.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-turning-metal.jpg b/public/previews/presets/peak/thumbs/effect-turning-metal.jpgnew file mode 100644index 00000000..b9a0fc63Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-turning-metal.jpg differdiff --git a/public/previews/presets/peak/thumbs/effect-vintage.jpg b/public/previews/presets/peak/thumbs/effect-vintage.jpgnew file mode 100644index 00000000..e0e78774Binary files /dev/null and b/public/previews/presets/peak/thumbs/effect-vintage.jpg differdiff --git a/scripts/eval/lib/template-covers.mjs b/scripts/eval/lib/template-covers.mjsindex ee18ac8c..0bc7ab7e 100644--- a/scripts/eval/lib/template-covers.mjs+++ b/scripts/eval/lib/template-covers.mjs@@ -13,6 +13,8 @@ import { bareUrl, COVERS_DIR, encode, newer, previewFile, readManifest, thumbOf,import { REPO_DIR, safeName } from "./paths.mjs";export const TEMPLATE_MANIFEST = path.join(REPO_DIR, "src", "lib", "template-covers.generated.ts");+/** The preset clips' peak frames (scripts/gen-preset-peaks.mjs): where a tile that shows a preset's cover rests. */+export const PEAKS_FILE = path.join(REPO_DIR, "src", "lib", "preset-peaks.generated.ts");/** The tile groups, as the manifest's keys start (`<group>/<tile id>`) and the folders under previews/templates/ are named. */export const TEMPLATE_GROUPS = ["marketing", "fashion", "photodump", "shorts", "mixed-media", "canvas", "content-factory", "explainer"];@@ -77,6 +79,30 @@ export function readTemplateManifest(file = TEMPLATE_MANIFEST) {}}+/** The presets' peak frames ({ "<preset id>": { at, from, v } }); none when there is no file yet. */+export function readPresetPeaks(file = PEAKS_FILE) {+ let text;+ try {+ text = fs.readFileSync(file, "utf8");+ } catch (e) {+ if (e?.code === "ENOENT") return {};+ throw e;+ }+ const at = text.indexOf("export const PRESET_PEAKS");+ if (at < 0) throw new Error(`${file} has no PRESET_PEAKS`);+ return JSON.parse(text.slice(text.indexOf("=", at) + 1).trim().replace(/;\s*$/, ""));+}++/**+ * A tile that shows a preset's cover: its poster and clip, or, for a clip with a peak frame, that frame and where it+ * is in the clip, so the tile rests on the change (a look already drawn) as Home's cards do (onPeak), not on the photo+ * the clip starts from.+ */+export function presetCoverEntry(id, cover, peak) {+ if (cover.video !== undefined && peak) return { poster: `/previews/presets/peak/${id}.jpg?v=${peak.v}`, video: cover.video, at: peak.at };+ return { poster: cover.poster, ...(cover.video !== undefined && { video: cover.video }) };+}+/** Write the manifest (slim), a line per tile. */export function writeTemplateManifest(entries, file = TEMPLATE_MANIFEST) {const lines = Object.entries(entries)@@ -171,11 +197,12 @@ function readMaster(folder) {* still.png a still cover (also still.jpg / still.webp, or start.png);* frame-2.png … the tile's other frames, in order, up to frame-4 (a carousel's slides, a contact sheet's cells);* meta.json { "rest": "end" } for a reveal: the clip is kept to its end and its last frame is the poster,- * or { "same": "<preset id>" }: the tile shows that preset's cover (no files of its own).+ * or { "same": "<preset id>" }: the tile shows that preset's cover (no files of its own),+ * resting on its clip's peak frame when it has one (presetCoverEntry).* The manifest is merged: other tiles' entries stay. A tile whose cover is newer than its masters is kept (force makes* it again). Files a tile no longer uses (a clip that's now a still, a dropped frame) are removed.* @param {string} dir the masters folder- * @param {{ only?: string[], force?: boolean, dryRun?: boolean, publicDir?: string, manifest?: string, presetManifest?: string }} [opts]+ * @param {{ only?: string[], force?: boolean, dryRun?: boolean, publicDir?: string, manifest?: string, presetManifest?: string, peaks?: string }} [opts]*/export function templateCoversFromMasters(dir, opts = {}) {if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) throw new Error(`No masters folder at ${dir}`);@@ -183,6 +210,7 @@ export function templateCoversFromMasters(dir, opts = {}) {const web = (f) => `/${path.relative(publicDir, f).split(path.sep).join("/")}`;const only = opts.only?.length ? new Set(opts.only) : null;const presets = readManifest(opts.presetManifest);+ const peaks = readPresetPeaks(opts.peaks);const manifest = readTemplateManifest(opts.manifest);const result = { covers: [], skipped: [], manifest: opts.manifest ?? TEMPLATE_MANIFEST, folder: path.join(publicDir, "previews", "templates") };for (const group of fs.readdirSync(dir).sort()) {@@ -207,7 +235,7 @@ export function templateCoversFromMasters(dir, opts = {}) {result.skipped.push({ key, why: `${m.meta.same} has no cover` });continue;}- const entry = { poster: p.poster, ...(p.video !== undefined && { video: p.video }) };+ const entry = presetCoverEntry(m.meta.same, p, peaks[m.meta.same]);if (!opts.dryRun) {dropUnused(manifest[key], entry, publicDir);manifest[key] = entry;diff --git a/src/app/(studio)/ads/multiplier/page.tsx b/src/app/(studio)/ads/multiplier/page.tsxindex c37a0cd9..8a685e50 100644--- a/src/app/(studio)/ads/multiplier/page.tsx+++ b/src/app/(studio)/ads/multiplier/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { AdMultiplier } from "@/components/ads/multiplier";import { marketingModelInfo } from "@/components/marketing/model-info";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Ad Multiplier" };export default function Page() {- return <AdMultiplier models={marketingModelInfo()} />;+ return <AdMultiplier models={marketingModelInfo()} examples={studioExamples("ads")} />;}diff --git a/src/app/(studio)/ads/page.tsx b/src/app/(studio)/ads/page.tsxindex f97a53fe..134f2fb9 100644--- a/src/app/(studio)/ads/page.tsx+++ b/src/app/(studio)/ads/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { AdsHome } from "@/components/ads/ads-home";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Ads Studio" };export default function Page() {- return <AdsHome />;+ return <AdsHome examples={studioExamples("ads")} />;}diff --git a/src/app/(studio)/audio/page.tsx b/src/app/(studio)/audio/page.tsxindex 7b92ec0d..fd615518 100644--- a/src/app/(studio)/audio/page.tsx+++ b/src/app/(studio)/audio/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { ModeSwitchStudio } from "@/components/studio/mode-switch-studio";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Audio" };export default function Page() {- return <ModeSwitchStudio kind="audio" />;+ return <ModeSwitchStudio kind="audio" examples={studioExamples("audio")} />;}diff --git a/src/app/(studio)/character-swap/page.tsx b/src/app/(studio)/character-swap/page.tsxindex 8bc84483..239b806b 100644--- a/src/app/(studio)/character-swap/page.tsx+++ b/src/app/(studio)/character-swap/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { SwapStudioHome } from "@/components/swap-studio/home";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Character Swap Studio" };export default function Page() {- return <SwapStudioHome />;+ return <SwapStudioHome examples={studioExamples("character-swap")} />;}diff --git a/src/app/(studio)/cinema/page.tsx b/src/app/(studio)/cinema/page.tsxindex be156618..3562bb85 100644--- a/src/app/(studio)/cinema/page.tsx+++ b/src/app/(studio)/cinema/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { CinemaProjects } from "@/components/cinema/projects-view";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Cinema Studio" };export default function Page() {- return <CinemaProjects />;+ return <CinemaProjects examples={studioExamples("cinema")} />;}diff --git a/src/app/(studio)/extend/page.tsx b/src/app/(studio)/extend/page.tsxindex 6bceb411..7bc27235 100644--- a/src/app/(studio)/extend/page.tsx+++ b/src/app/(studio)/extend/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { EXTEND_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Extend video" };export default function Page() {- return <Studio config={EXTEND_STUDIO} />;+ return <Studio config={EXTEND_STUDIO} examples={studioExamples("extend")} />;}diff --git a/src/app/(studio)/genjutsu/page.tsx b/src/app/(studio)/genjutsu/page.tsxindex 920ced0b..b9c9f49d 100644--- a/src/app/(studio)/genjutsu/page.tsx+++ b/src/app/(studio)/genjutsu/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { GenjutsuStudio } from "@/components/genjutsu/genjutsu-studio";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Genjutsu" };export default function Page() {- return <GenjutsuStudio />;+ return <GenjutsuStudio examples={studioExamples("genjutsu")} />;}diff --git a/src/app/(studio)/image-to-3d/page.tsx b/src/app/(studio)/image-to-3d/page.tsxindex d83a4db2..d8361226 100644--- a/src/app/(studio)/image-to-3d/page.tsx+++ b/src/app/(studio)/image-to-3d/page.tsx@@ -6,6 +6,7 @@ import { ALL_MODELS_3D, CLOUD_NOTICES, RIG_MODEL } from "@/lib/av/model3d";import { getModel } from "@/lib/catalog";import type { Manifest } from "@/lib/comfy";import { buildLicenceList, FLAG_LABEL } from "@/lib/licences";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Image to 3D" };@@ -59,5 +60,5 @@ export default async function Page() {{ name: getModel(id)?.name ?? id, notices: licences[id]?.notices ?? CLOUD_NOTICES[id] ?? [], ...(licences[id] && { licence: licences[id] }) },]),);- return <Model3dStudio info={info} />;+ return <Model3dStudio info={info} examples={studioExamples("image-to-3d")} />;}diff --git a/src/app/(studio)/inpaint/page.tsx b/src/app/(studio)/inpaint/page.tsxindex 27874853..51bbfc8f 100644--- a/src/app/(studio)/inpaint/page.tsx+++ b/src/app/(studio)/inpaint/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { INPAINT_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Inpaint" };export default function Page() {- return <Studio config={INPAINT_STUDIO} />;+ return <Studio config={INPAINT_STUDIO} examples={studioExamples("inpaint")} />;}diff --git a/src/app/(studio)/katana/page.tsx b/src/app/(studio)/katana/page.tsxindex da6ba673..92e0d311 100644--- a/src/app/(studio)/katana/page.tsx+++ b/src/app/(studio)/katana/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { KatanaStudio } from "@/components/katana/katana-studio";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Katana" };export default function Page() {- return <KatanaStudio />;+ return <KatanaStudio examples={studioExamples("katana")} />;}diff --git a/src/app/(studio)/layers/page.tsx b/src/app/(studio)/layers/page.tsxindex 82d9e179..24e8fe9c 100644--- a/src/app/(studio)/layers/page.tsx+++ b/src/app/(studio)/layers/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { LayersProjects } from "@/components/layers/projects-view";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Layers" };export default function Page() {- return <LayersProjects />;+ return <LayersProjects examples={studioExamples("layers")} />;}diff --git a/src/app/(studio)/lipsync/page.tsx b/src/app/(studio)/lipsync/page.tsxindex 52fe6cd8..908282c5 100644--- a/src/app/(studio)/lipsync/page.tsx+++ b/src/app/(studio)/lipsync/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { LIPSYNC_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Lipsync & avatars" };export default function Page() {- return <Studio config={LIPSYNC_STUDIO} />;+ return <Studio config={LIPSYNC_STUDIO} examples={studioExamples("lipsync")} />;}diff --git a/src/app/(studio)/mixed-media/page.tsx b/src/app/(studio)/mixed-media/page.tsxindex 3fd1f2b7..cd0194de 100644--- a/src/app/(studio)/mixed-media/page.tsx+++ b/src/app/(studio)/mixed-media/page.tsx@@ -2,6 +2,7 @@ import type { Metadata } from "next";import { MixedStudio } from "@/components/mixed-media/mixed-studio";import { MIXED_FRAME_MODELS, MIXED_MODELS } from "@/lib/catalog/mixed-media";import { modelInfos } from "@/lib/catalog/shorts-models";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Mixed Media" };@@ -14,5 +15,5 @@ const MODELS = { cloud: modelInfos(MIXED_MODELS.cloud, "cloud"), open: modelInfoconst FRAME_MODELS = { cloud: modelInfos([...MIXED_FRAME_MODELS], "cloud"), open: modelInfos(MIXED_MODELS.open, "open") };export default function Page() {- return <MixedStudio models={MODELS} frameModels={FRAME_MODELS} />;+ return <MixedStudio models={MODELS} frameModels={FRAME_MODELS} how={studioExamples("mixed-media")} />;}diff --git a/src/app/(studio)/motion-control/page.tsx b/src/app/(studio)/motion-control/page.tsxindex be3dbc89..63d64666 100644--- a/src/app/(studio)/motion-control/page.tsx+++ b/src/app/(studio)/motion-control/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { MOTION_CONTROL_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Motion control" };export default function Page() {- return <Studio config={MOTION_CONTROL_STUDIO} />;+ return <Studio config={MOTION_CONTROL_STUDIO} examples={studioExamples("motion-control")} />;}diff --git a/src/app/(studio)/reframe/page.tsx b/src/app/(studio)/reframe/page.tsxindex 7426bca9..978c0357 100644--- a/src/app/(studio)/reframe/page.tsx+++ b/src/app/(studio)/reframe/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { REFRAME_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Reframe" };export default function Page() {- return <Studio config={REFRAME_STUDIO} />;+ return <Studio config={REFRAME_STUDIO} examples={studioExamples("reframe")} />;}diff --git a/src/app/(studio)/upscale/page.tsx b/src/app/(studio)/upscale/page.tsxindex f7172999..e9cffe23 100644--- a/src/app/(studio)/upscale/page.tsx+++ b/src/app/(studio)/upscale/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { ModeSwitchStudio } from "@/components/studio/mode-switch-studio";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Upscale" };export default function Page() {- return <ModeSwitchStudio kind="upscale" />;+ return <ModeSwitchStudio kind="upscale" examples={studioExamples("upscale")} />;}diff --git a/src/app/(studio)/video-edit/page.tsx b/src/app/(studio)/video-edit/page.tsxindex 558c6dbc..cbec68db 100644--- a/src/app/(studio)/video-edit/page.tsx+++ b/src/app/(studio)/video-edit/page.tsx@@ -1,9 +1,10 @@import type { Metadata } from "next";import { Studio } from "@/components/studio/studio";+import { studioExamples } from "@/lib/studio-examples";import { VIDEO_EDIT_STUDIO } from "@/lib/studios";export const metadata: Metadata = { title: "Edit video" };export default function Page() {- return <Studio config={VIDEO_EDIT_STUDIO} />;+ return <Studio config={VIDEO_EDIT_STUDIO} examples={studioExamples("video-edit")} />;}diff --git a/src/app/(studio)/video-tools/page.tsx b/src/app/(studio)/video-tools/page.tsxindex f5c0a61b..6b5cbe48 100644--- a/src/app/(studio)/video-tools/page.tsx+++ b/src/app/(studio)/video-tools/page.tsx@@ -1,8 +1,9 @@import type { Metadata } from "next";import { ModeSwitchStudio } from "@/components/studio/mode-switch-studio";+import { studioExamples } from "@/lib/studio-examples";export const metadata: Metadata = { title: "Video tools" };export default function Page() {- return <ModeSwitchStudio kind="video-tools" />;+ return <ModeSwitchStudio kind="video-tools" examples={studioExamples("video-tools")} />;}diff --git a/src/components/ads/ads-home.tsx b/src/components/ads/ads-home.tsxindex a0f537df..dc3d4744 100644--- a/src/components/ads/ads-home.tsx+++ b/src/components/ads/ads-home.tsx@@ -10,10 +10,12 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTriggeimport { Skeleton } from "@/components/ui/skeleton";import { BrandStart } from "@/components/brand/brand-dialog";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useIsVisitor } from "@/lib/api";import { ResearchLabel } from "@/components/brand/research-progress";import type { BrandKit } from "@/lib/catalog/marketing";import { timeAgo } from "@/lib/format";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";import { useBrandActions, useBrands } from "@/components/marketing/hooks";@@ -95,8 +97,11 @@ function DeleteBrand({ brand, onClose }: { brand: BrandKit | null; onClose: () =);}-/** Ads Studio home: start from a website (or by hand), and the brand shelf. */-export function AdsHome() {+/**+ * Ads Studio home: start from a website (or by hand), and the brand shelf.+ * examples: "See what it makes" (studioExamples("ads"), from the page), while there are no brands of one's own.+ */+export function AdsHome({ examples }: { examples?: StudioExampleRow }) {const router = useRouter();const { engine, setEngine } = useMarketingEngine();const brands = useBrands();@@ -119,6 +124,8 @@ export function AdsHome() {</div></section>+ {examples && (visitor || (brands.isSuccess && !brands.data.length)) && <ExampleRow row={examples} className="mt-12" />}+<section className="mt-14"><div className="mb-4 flex flex-col gap-1 sm:flex-row sm:items-end sm:justify-between sm:gap-3"><h2 className="font-heading text-[24px] whitespace-nowrap">Your brands</h2>diff --git a/src/components/ads/multiplier.tsx b/src/components/ads/multiplier.tsxindex 9dcd41f9..70e601a1 100644--- a/src/components/ads/multiplier.tsx+++ b/src/components/ads/multiplier.tsx@@ -10,6 +10,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@import { Switch } from "@/components/ui/switch";import { areaCls } from "@/components/brand/fields";import { uploadImages } from "@/components/brand/image-list";+import { ExampleRow } from "@/components/studio/example-row";import { fileToSlot, LibraryGrid, type SlotValue } from "@/components/studio/media-slot";import { VideoTrimmer } from "@/components/studio/video-trimmer";import { initialClip, mentionedImages, MULTIPLIER, MULTIPLIER_MODELS, multiplierResolution, type ClipRange as Range, type MarketingRun, type RunEstimate } from "@/lib/catalog/marketing";@@ -17,6 +18,7 @@ import { formatCost } from "@/lib/format";import { probeBlob, probeUrl } from "@/lib/media-probe";import { useAskBeforeUpload, useModelAccess } from "@/lib/api";import { keepOffered, offered } from "@/lib/model-access";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";import { addRuns, send, useEstimate } from "@/components/marketing/hooks";@@ -176,8 +178,11 @@ function MentionImages({ value, onChange, onMention, max }: { value: string[]; o);}-/** Ad Multiplier: a reference ad (4–30 s) → new versions: recreated from a prompt, or with a new hook / CTA. */-export function AdMultiplier({ models }: { models: Record<string, ModelInfo> }) {+/**+ * Ad Multiplier: a reference ad (4–30 s) → new versions: recreated from a prompt, or with a new hook / CTA.+ * examples: "See what it makes" (studioExamples("ads"), from the page), under the empty list of versions.+ */+export function AdMultiplier({ models, examples }: { models: Record<string, ModelInfo>; examples?: StudioExampleRow }) {const qc = useQueryClient();const { engine, setEngine } = useMarketingEngine();const access = useModelAccess();@@ -491,10 +496,13 @@ export function AdMultiplier({ models }: { models: Record<string, ModelInfo> })<RunsListfeature="ad-multiplier"empty={- <div className="rounded-2xl border border-dashed py-12 text-center">- <EmptyIcon icon={Copy} />- <p className="mt-4 text-[14px] text-muted-foreground">{video ? "Pick what to change and press Generate." : "Start with an ad that already works."}</p>- </div>+ <>+ <div className="rounded-2xl border border-dashed py-12 text-center">+ <EmptyIcon icon={Copy} />+ <p className="mt-4 text-[14px] text-muted-foreground">{video ? "Pick what to change and press Generate." : "Start with an ad that already works."}</p>+ </div>+ {examples && <ExampleRow row={examples} className="mt-10" />}+ </>}/></div>diff --git a/src/components/canvas/canvas-list.tsx b/src/components/canvas/canvas-list.tsxindex a52d36de..8a3b1790 100644--- a/src/components/canvas/canvas-list.tsx+++ b/src/components/canvas/canvas-list.tsx@@ -341,6 +341,8 @@ function ListInner({ templates }: { templates: TemplateCardData[] }) {<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">{templates.filter((t) => (t.group ?? "") === group)+ // Templates with a real cover lead their section; the rest keep their order after them.+ .sort((a, b) => Number(!templateCover("canvas", a.id)) - Number(!templateCover("canvas", b.id))).map((t) => (<TemplateCard key={t.id} t={t} engine={engine} busy={creating === t.id} onUse={visitor ? undefined : () => void start(t.id, { templateId: t.id, engine })} />))}diff --git a/src/components/cinema/projects-view.tsx b/src/components/cinema/projects-view.tsxindex 3b33a7ef..98449702 100644--- a/src/components/cinema/projects-view.tsx+++ b/src/components/cinema/projects-view.tsx@@ -8,6 +8,7 @@ import { PageShell } from "@/components/page-shell";import { PageHeader } from "@/components/page-shell";import { HadItemsScript, useHadItems } from "@/components/use-had-items";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useIsVisitor } from "@/lib/api";import { Button } from "@/components/ui/button";import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";@@ -15,6 +16,7 @@ import { Skeleton } from "@/components/ui/skeleton";import type { CinemaProject } from "@/lib/catalog/cinema";import { formatUsd } from "./money";import { timeAgo } from "@/lib/format";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { copyWithToast } from "@/lib/clipboard";import { useCinemaProjects, useUpdateProject } from "./hooks";@@ -163,7 +165,8 @@ function EmptyProjects({ loading, onCreate, className }: { loading?: boolean; on);}-export function CinemaProjects() {+/** examples: "See what it makes" (studioExamples("cinema"), from the page), under a guest's or an account's empty list. */+export function CinemaProjects({ examples }: { examples?: StudioExampleRow }) {const { data, isLoading } = useCinemaProjects();const router = useRouter();const [creating, setCreating] = useState(false);@@ -208,7 +211,10 @@ export function CinemaProjects() {<EmptyProjects loading className="[html[data-had-cinema-projects='1']_&]:hidden" onCreate={onCreate} /></div>) : !data?.length ? (- <EmptyProjects key="empty" onCreate={onCreate} />+ <div key="empty">+ <EmptyProjects onCreate={onCreate} />+ {examples && <ExampleRow row={examples} className="mt-12" />}+ </div>) : (<div key="cards" className={GRID}>{data.map((p) => (diff --git a/src/components/fashion/fashion-view.tsx b/src/components/fashion/fashion-view.tsxindex b1c19600..74c78d38 100644--- a/src/components/fashion/fashion-view.tsx+++ b/src/components/fashion/fashion-view.tsx@@ -1,8 +1,8 @@"use client";-import { ArrowLeft, ArrowRight, Library, Loader2, RefreshCw, RotateCcw, Sparkles, X } from "lucide-react";+import { ArrowLeft, ArrowRight, Library, Loader2, RefreshCw, RotateCcw, Sparkles } from "lucide-react";import Link from "next/link";-import { useMemo, useState, useSyncExternalStore } from "react";+import { useMemo, useState } from "react";import { toast } from "sonner";import { PageHeader, PageShell } from "@/components/page-shell";import { SelfHostNote } from "@/components/self-host-note";@@ -25,7 +25,6 @@ import { useStoredReducer } from "./stored";import { TemplatePreview } from "./template-preview";const LABELS = ["Select a template", "Character", "Generation", "Clothing", "Photoset"];-const BANNER_KEY = "fuobe.fashion.banner";/*** The outfit and photoset models' names (FASHION_MODELS has each step's per engine): Fuobe Try-On (the Original, FLUX.2* [klein] 4B + a try-on LoRA), the Qwen-Image and Krea 2 edit models, partners after.@@ -40,36 +39,6 @@ const MODEL_LABELS: Record<string, string> = {"oss-krea2-identity-edit": "Krea 2 Identity Edit",};-const bannerListeners = new Set<() => void>();-function readBanner(): boolean {- try {- return localStorage.getItem(BANNER_KEY) === "1";- } catch {- return true;- }-}--/** The first-visit banner: hidden on the server and until the browser says it hasn't been seen. */-function useBannerSeen(): [boolean, () => void] {- const seen = useSyncExternalStore(- (cb) => {- bannerListeners.add(cb);- return () => bannerListeners.delete(cb);- },- readBanner,- () => true,- );- return [- seen,- () => {- try {- localStorage.setItem(BANNER_KEY, "1");- } catch {}- bannerListeners.forEach((l) => l());- },- ];-}-/** /fashion-factory: template → character → pick 1 of 4 base shots → outfit → photoset. */export function FashionView() {const [s, dispatch] = useStoredReducer<FashionState, Parameters<typeof fashionReducer>[1]>("fuobe.fashion", fashionReducer, FASHION_START);@@ -88,7 +57,6 @@ export function FashionView() {const outfitModel = pickedOutfit && outfitModels.includes(pickedOutfit) ? pickedOutfit : outfitModels[0];const setModels = choices(FASHION_MODELS.photoset[engine]);const setModel = pickedSet && setModels.includes(pickedSet) ? pickedSet : setModels[0];- const [bannerSeen, hideBanner] = useBannerSeen();const { data } = useGenerations({ features: ["fashion"], limit: 200 });const base = useRun<Record<string, unknown>>("/api/photodump/fashion");const outfit = useRun<Record<string, unknown>>("/api/photodump/fashion");@@ -154,17 +122,6 @@ export function FashionView() {</PageHeader>{visitor && <SelfHostNote className="-mt-3 mb-6 max-w-2xl">Fashion Factory isn't available here.</SelfHostNote>}- {!bannerSeen && at === 0 && (- <div className="relative mb-6 overflow-hidden rounded-2xl border bg-gradient-to-br from-brand-faint to-background p-5">- <button type="button" onClick={hideBanner} aria-label="Hide" className="absolute top-3 right-3 grid size-7 place-items-center rounded-full hover:bg-accent">- <X className="size-4" />- </button>- <Button className="mt-3" size="sm" onClick={hideBanner}>- Select template- </Button>- </div>- )}-<div className="mb-6"><Steps steps={LABELS} current={at} reached={reached} onGo={(i) => dispatch({ type: "goto", step: FASHION_STEPS[i] })} /></div>diff --git a/src/components/genjutsu/genjutsu-studio.tsx b/src/components/genjutsu/genjutsu-studio.tsxindex 7ef2bfbf..f0be2783 100644--- a/src/components/genjutsu/genjutsu-studio.tsx+++ b/src/components/genjutsu/genjutsu-studio.tsx@@ -25,6 +25,7 @@ import { SketchEditor, type Stroke } from "@/components/studio/sketch-editor";import { VideoTrimmer, type TrimRange, type VideoTrimmerHandle } from "@/components/studio/video-trimmer";import { openInStudio } from "@/components/swap-studio/hooks";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useEdgeFade } from "@/components/studio/use-edge-fade";import { useEngine, useGenerations, useLikelyVisitor, useModelAccess } from "@/lib/api";import { CHARACTER_SWAP, cutsInPart, cutWarning, partWords, seedProblem, type CharacterOptions, type CharacterQuality } from "@/lib/catalog/character-swap";@@ -57,6 +58,7 @@ import { withoutOwnGpu } from "@/lib/catalog/engines";import type { Generation, PixelPoint } from "@/lib/catalog/types";import { downloadHref, downloadName } from "@/lib/library";import { keepOffered, offered } from "@/lib/model-access";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { refusalShown, toastError } from "@/lib/refusals";import { CharacterControls, CharacterFacts } from "./character-panel";@@ -99,8 +101,9 @@ const seedOf = (s: string): number | undefined => (s.trim() === "" ? undefined :* and your references, say what changes, see the price (or "Free" on your ComfyUI), get the result with a before /* after wipe. Fuobe's Originals run by default on both engines; open weights and partners are labelled alternatives.* Setups copy and paste as a short code. The plan: src/lib/catalog/genjutsu.ts; the server: src/server/genjutsu.ts.+ * examples: "See what it makes" (studioExamples("genjutsu"), from the page), under the clip drop until there is a run of one's own.*/-export function GenjutsuStudio() {+export function GenjutsuStudio({ examples }: { examples?: StudioExampleRow }) {const [engine, setEngine, engineMode] = useEngine();// Genjutsu doesn't run on an account's own GPU yet (only the studios' generations do): said here, not after Generate.const visitor = useLikelyVisitor();@@ -788,6 +791,8 @@ export function GenjutsuStudio() {)}</div>+ {examples && !clip && !run && (visitor || (history.isSuccess && !history.data.length)) && <ExampleRow row={examples} className="mt-12" />}+{run && <RunPanel run={run} onAgain={() => start(run)} />}{(history.data?.length ?? 0) > 0 && (diff --git a/src/components/katana/katana-studio.tsx b/src/components/katana/katana-studio.tsxindex 4fdcc599..e467086c 100644--- a/src/components/katana/katana-studio.tsx+++ b/src/components/katana/katana-studio.tsx@@ -19,10 +19,12 @@ import { MediaDrop } from "@/components/av/media-drop";import { StepList, type StepRow } from "@/components/av/step-list";import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useEngine, useLikelyVisitor, useModelAccess } from "@/lib/api";import { formatCueTime } from "@/lib/av/cue-edit";import { detectCutIndices, KATANA_LIMITS, katanaProgress, katanaStage, motionModel, MOTION_MODELS, nearestAspect, OPEN_KEYFRAME_PHOTOS, planSegments, refineCut, refineTimes, type KatanaJobView, type Segment } from "@/lib/av/katana";import { keepOffered, offered } from "@/lib/model-access";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";import { useKatanaActions, useKatanaJobs, useKatanaPreview, type KatanaBody } from "./hooks";@@ -59,8 +61,11 @@ async function findCuts(src: string, duration: number, onProgress: (p: number) =const money = (usd: number | null | undefined, demo?: boolean, open?: boolean, visitor?: boolean) =>visitor && (demo || open) ? "Not available here" : demo ? "Placeholder · free" : open ? "Free · your GPU" : usd == null ? "Price unknown" : `≈ $${usd.toFixed(2)}`;-/** Katana: rebuild a reference edit with your subject, shot for shot. */-export function KatanaStudio() {+/**+ * Katana: rebuild a reference edit with your subject, shot for shot.+ * examples: "See what it makes" (studioExamples("katana"), from the page), where the runs go until there is one.+ */+export function KatanaStudio({ examples }: { examples?: StudioExampleRow }) {const [engine] = useEngine();// An edit doesn't run on an account's own GPU or key yet (only the studios' generations do): said up front, and the// uploads and Recreate are off, instead of a run the server refuses.@@ -303,6 +308,7 @@ export function KatanaStudio() {</div></div></div>+ {examples && (visitor || (jobs.isSuccess && !jobs.data.length)) && <ExampleRow row={examples} className="mt-12" />}<Runs jobs={jobs.data} loading={jobs.isLoading} /></ToolShell>);diff --git a/src/components/layers/projects-view.tsx b/src/components/layers/projects-view.tsxindex aeee848c..cda082b2 100644--- a/src/components/layers/projects-view.tsx+++ b/src/components/layers/projects-view.tsx@@ -13,12 +13,14 @@ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTiimport { Input } from "@/components/ui/input";import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";import { Skeleton } from "@/components/ui/skeleton";+import { ExampleRow } from "@/components/studio/example-row";import { LibraryGrid } from "@/components/studio/media-slot";import { PageShell } from "@/components/page-shell";import { SelfHostNote } from "@/components/self-host-note";import { uploadFile, useHydrated, useIsOwner, useLikelyVisitor, useViewer } from "@/lib/api";import { timeAgo } from "@/lib/format";import type { LayerProject } from "@/lib/layers";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";import { loadImage, sizeOf } from "./render";@@ -185,7 +187,7 @@ function Capabilities() {);}-function ProjectsInner() {+function ProjectsInner({ examples }: { examples?: StudioExampleRow }) {const params = useSearchParams();const projects = useLayerProjects();const { rename, remove } = useLayerActions();@@ -308,6 +310,9 @@ function ProjectsInner() {</p></section>+ {/* What it makes, while there are no projects of one's own to show (a guest or an account never has any). */}+ {examples && (visitor || (projects.isSuccess && !items.length)) && <ExampleRow row={examples} className="mt-12" />}+<section className={cn("mt-14", visitor && "hidden")} aria-labelledby="my-projects"><h2 id="my-projects" className="font-heading text-[24px]">My projects@@ -436,10 +441,11 @@ function ProjectsInner() {);}-export function LayersProjects() {+/** examples: "See what it makes" (studioExamples("layers"), from the page). */+export function LayersProjects({ examples }: { examples?: StudioExampleRow }) {return (<Suspense fallback={null}>- <ProjectsInner />+ <ProjectsInner examples={examples} /></Suspense>);}diff --git a/src/components/mixed-media/how-reveal.tsx b/src/components/mixed-media/how-reveal.tsxnew file mode 100644index 00000000..699b4d34--- /dev/null+++ b/src/components/mixed-media/how-reveal.tsx@@ -0,0 +1,24 @@+"use client";++import { PresetPreview, usePreviewPlayback } from "@/components/preset-preview";+import type { StudioExampleRow } from "@/lib/studio-examples";++/**+ * "How it works" opens on one look playing out: a real clip drawn again in the look (studioExamples("mixed-media")),+ * resting on the look and playing in view, as a look card does. A picture to watch, not a link.+ */+export function HowReveal({ row }: { row: StudioExampleRow }) {+ const [tile] = row.tiles;+ const { ref, playing, asked, handlers, onTap } = usePreviewPlayback<HTMLDivElement>(tile.card.id, tile.card.preview);+ return (+ <figure className="mx-auto mt-8 max-w-[512px]">+ <p className="mb-2 text-center text-[12.5px] font-medium text-muted-foreground">{row.heading}</p>+ <div ref={ref} {...handlers} onPointerUp={onTap} className="relative aspect-[4/3] overflow-hidden rounded-2xl bg-muted">+ <PresetPreview preview={tile.card.preview} hue={tile.card.hue} playing={playing} asked={asked} sizes="(min-width: 560px) 512px, 100vw" />+ </div>+ <figcaption className="mt-2 text-center text-[13px] text-muted-foreground">+ <span className="font-medium text-foreground">{tile.card.name}</span> · {tile.caption}+ </figcaption>+ </figure>+ );+}diff --git a/src/components/mixed-media/mixed-studio.tsx b/src/components/mixed-media/mixed-studio.tsxindex 232cf873..6d5c4be2 100644--- a/src/components/mixed-media/mixed-studio.tsx+++ b/src/components/mixed-media/mixed-studio.tsx@@ -40,10 +40,13 @@ import { downloadHref, downloadName } from "@/lib/library";import type { TrimRange } from "@/lib/trim-range";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";+import type { StudioExampleRow } from "@/lib/studio-examples";import { MixedHistory } from "./history";+import { HowReveal } from "./how-reveal";import { isFrameRender, renderSteps, useFramesProgress, useMixedActions, useMixedEstimate, useWatchedChain, useWatchedGeneration, type MixedBody } from "./hooks";import { AdvancedSettings, loadSaved } from "./settings";import { plainTagline } from "@/lib/plain-tagline";+import { templateCover } from "@/lib/template-covers";type Tab = "presets" | "history" | "how";const TABS: { id: Tab; label: string }[] = [@@ -72,7 +75,16 @@ const MODE_OPTIONS: { value: MixedMode; label: string; title: string }[] = [];/** Mixed Media: pick a look, add a ≤10 s clip, tune the settings, preview one frame, render. */-export function MixedStudio({ models, frameModels }: { models: Record<Engine, RestyleModelInfo[]>; frameModels: Record<Engine, RestyleModelInfo[]> }) {+export function MixedStudio({+ models,+ frameModels,+ how,+}: {+ models: Record<Engine, RestyleModelInfo[]>;+ frameModels: Record<Engine, RestyleModelInfo[]>;+ /** "How it works"'s reveal: one look playing out (studioExamples("mixed-media"), from the page). */+ how?: StudioExampleRow;+}) {const [tab, setTab] = useState<Tab>("presets");const [engine, setEngine, engineMode] = useEngine();// A render doesn't run on an account's own GPU or key yet (only the studios' generations do): said up front, and the@@ -119,7 +131,7 @@ export function MixedStudio({ models, frameModels }: { models: Record<Engine, Re{tab === "history" ? (<MixedHistory onStart={() => pick("presets")} />) : tab === "how" ? (- <How onStart={() => pick("presets")} cloud={engineMode !== "open"} />+ <How onStart={() => pick("presets")} cloud={engineMode !== "open"} reveal={how} />) : (<><div className="mx-auto max-w-[720px] pt-8 pb-6 text-center sm:pt-12">@@ -139,10 +151,11 @@ export function MixedStudio({ models, frameModels }: { models: Record<Engine, Re);}-function How({ onStart, cloud }: { onStart: () => void; cloud: boolean }) {+function How({ onStart, cloud, reveal }: { onStart: () => void; cloud: boolean; reveal?: StudioExampleRow }) {return (<div className="mx-auto max-w-[920px] pt-10"><h2 className="text-center font-heading text-[34px] leading-tight">How it works</h2>+ {!!reveal?.tiles.length && <HowReveal row={reveal} />}<ol className="mt-8 grid gap-3 sm:grid-cols-2">{HOW.map((h, i) => (<li key={h.step} className="rounded-2xl border bg-background p-5">@@ -187,7 +200,11 @@ function Workspace({ visitor, engine, models, frameModels }: { visitor: boolean;const [values, setValues] = useState<MixedValues>({});const [q, setQ] = useState("");const query = useDeferredValue(q.trim().toLowerCase());- const list = useMemo(() => MIXED_PRESETS.filter((p) => !query || `${p.name} ${p.description}`.toLowerCase().includes(query)), [query]);+ // Looks with a real cover lead; the rest keep their order after them.+ const list = useMemo(() => {+ const hits = MIXED_PRESETS.filter((p) => !query || `${p.name} ${p.description}`.toLowerCase().includes(query));+ return [...hits.filter((p) => templateCover("mixed-media", p.id)), ...hits.filter((p) => !templateCover("mixed-media", p.id))];+ }, [query]);const panel = useRef<HTMLElement>(null);const [panelVisible, setPanelVisible] = useState(false);useEffect(() => {diff --git a/src/components/model3d/model3d-studio.tsx b/src/components/model3d/model3d-studio.tsxindex 0f94f30a..a28fc09f 100644--- a/src/components/model3d/model3d-studio.tsx+++ b/src/components/model3d/model3d-studio.tsx@@ -15,6 +15,7 @@ import { MediaSlot, type SlotValue } from "@/components/studio/media-slot";import { MediaDrop } from "@/components/av/media-drop";import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useCreateGeneration, useEngine, useGenerations, useHydrated, useLikelyVisitor, useModelAccess, useStatus } from "@/lib/api";import {MAX_3D_PROMPT,@@ -35,6 +36,7 @@ import {} from "@/lib/av/model3d";import type { Engine, Generation, GenerationRequest } from "@/lib/catalog/types";import { keepOffered, offered } from "@/lib/model-access";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";import { priceLine, useRunPreview } from "./hooks";@@ -121,8 +123,11 @@ function ModePicker({ mode, onChange }: { mode: Model3dMode; onChange: (m: Model);}-/** Image to 3D: a photo, several photos, words, an object in a photo or a splat → a model to spin, download, rig and animate. */-export function Model3dStudio({ info }: { info: Record<string, Model3dInfo> }) {+/**+ * Image to 3D: a photo, several photos, words, an object in a photo or a splat → a model to spin, download, rig and animate.+ * examples: "See what it makes" (studioExamples("image-to-3d"), from the page), where the models go until there is one.+ */+export function Model3dStudio({ info, examples }: { info: Record<string, Model3dInfo>; examples?: StudioExampleRow }) {const [engine, setEngine, engineMode] = useEngine();// A 3D model is finished on this server, so accounts don't get Image to 3D yet, even on their own GPU or key: said up// front, and the uploads and Make it 3D are off, instead of a run the server refuses.@@ -337,6 +342,7 @@ export function Model3dStudio({ info }: { info: Record<string, Model3dInfo> }) {)}</Panel></div>+ {examples && (visitor || (results.isSuccess && !items.length)) && <ExampleRow row={examples} className="mt-12" />}<section id="your-3d-models" className="mx-auto mt-12 max-w-[880px] scroll-mt-6" aria-labelledby="models3d">{(results.isLoading || items.length > 0) && (<h3 id="models3d" className="mb-3 font-heading text-[22px]">diff --git a/src/components/studio/example-row.tsx b/src/components/studio/example-row.tsxnew file mode 100644index 00000000..54c73b35--- /dev/null+++ b/src/components/studio/example-row.tsx@@ -0,0 +1,34 @@+"use client";++import dynamic from "next/dynamic";+import { useId } from "react";+import type { StudioExampleRow } from "@/lib/studio-examples";+import { cn } from "@/lib/utils";++/** The covers are their own chunk, as in the studios (studio-page.tsx): only a page that shows the row loads them. */+const ShowcaseTile = dynamic(() => import("@/components/home/showcase-tile").then((m) => m.ShowcaseTile));++/** A tile's width: half a phone, else a quarter of the row (1000 px at most). */+const SIZES = "(min-width: 640px) 240px, 50vw";++/**+ * "See what it makes" on a tool or a project list (Layers, Genjutsu, Katana, Cinema, Ads Studio…), from the page's+ * studioExamples() (src/lib/studio-examples.ts): real covers, each opening its app, or its motion or effect in the+ * Video studio. The studios' own row (studio-page.tsx) is the same, and picks a move in place.+ */+export function ExampleRow({ row, className }: { row: StudioExampleRow; className?: string }) {+ const heading = useId();+ if (!row.tiles.length) return null;+ return (+ <section aria-labelledby={heading} className={cn("mx-auto w-full max-w-[1000px]", className)}>+ <h2 id={heading} className="mb-2 text-center text-[12.5px] font-medium text-muted-foreground">+ {row.heading}+ </h2>+ <div className="grid grid-cols-2 gap-3 sm:grid-cols-4">+ {row.tiles.map((e, i) => (+ <ShowcaseTile key={e.card.id} card={e.card} kind={e.kind} caption={e.caption} href={e.href} index={i} sizes={SIZES} small />+ ))}+ </div>+ </section>+ );+}diff --git a/src/components/studio/mode-studio.tsx b/src/components/studio/mode-studio.tsxindex b9a2c212..4244cc39 100644--- a/src/components/studio/mode-studio.tsx+++ b/src/components/studio/mode-studio.tsx@@ -3,6 +3,7 @@import Link from "next/link";import { useEffect, useRef } from "react";import type { StudioCatalog } from "@/lib/studio-catalog";+import type { StudioExampleRow } from "@/lib/studio-examples";import { useLikelyVisitor } from "@/lib/api";import { cn } from "@/lib/utils";import { StudioPage } from "./studio-page";@@ -71,6 +72,18 @@ export function ModeTabs({ tabs, current }: { tabs: ModeTab[]; current: string }}/** One mode of a hub (Audio, Video tools, Upscale): its studio with the hub's tabs. Each mode has its own path. */-export function ModeStudio({ tabs, current, config, catalog }: { tabs: ModeTab[]; current: string; config: StudioConfig; catalog: StudioCatalog }) {- return <StudioPage config={config} catalog={catalog} tabs={<ModeTabs tabs={tabs} current={current} />} />;+export function ModeStudio({+ tabs,+ current,+ config,+ catalog,+ examples,+}: {+ tabs: ModeTab[];+ current: string;+ config: StudioConfig;+ catalog: StudioCatalog;+ examples?: StudioExampleRow;+}) {+ return <StudioPage config={config} catalog={catalog} tabs={<ModeTabs tabs={tabs} current={current} />} examples={examples} />;}diff --git a/src/components/studio/mode-switch-studio.tsx b/src/components/studio/mode-switch-studio.tsxindex 0b2f6e94..802019b0 100644--- a/src/components/studio/mode-switch-studio.tsx+++ b/src/components/studio/mode-switch-studio.tsx@@ -1,6 +1,7 @@import type { Metadata } from "next";import { notFound } from "next/navigation";import { Suspense } from "react";+import type { StudioExampleRow } from "@/lib/studio-examples";import {AUDIO_STUDIO,DIALOGUE_STUDIO,@@ -83,14 +84,14 @@ const HUB_TITLE: Record<HubKind, string> = { upscale: "Upscale", audio: "Audio",* component: the page is prerendered with that mode's hero, tabs and composer, and ships only* that mode's models. `mode` omitted = the first mode (the hub's own URL).*/-export function ModeSwitchStudio({ kind, mode }: { kind: HubKind; mode?: string }) {+export function ModeSwitchStudio({ kind, mode, examples }: { kind: HubKind; mode?: string; examples?: StudioExampleRow }) {const current = mode ?? HUB_MODES[kind][0].id;const tabs = HUB_MODES[kind].map((m) => ({ id: m.id, label: m.label, href: modeHref(kind, m.id), ...(m.ownerOnly && { ownerOnly: true as const }) }));const Tool = TOOLS[kind]?.[current];if (Tool) return <Tool tabs={<ModeTabs tabs={tabs} current={current} />} />;const config = CONFIGS[kind][current];if (!config) notFound();- return <ModeStudio key={current} tabs={tabs} current={current} config={config} catalog={studioCatalog(config)} />;+ return <ModeStudio key={current} tabs={tabs} current={current} config={config} catalog={studioCatalog(config)} examples={examples} />;}/** `generateStaticParams` for /<hub>/[mode]: every mode is prerendered. */diff --git a/src/components/swap-studio/home.tsx b/src/components/swap-studio/home.tsxindex d4ccee6b..6ec9b177 100644--- a/src/components/swap-studio/home.tsx+++ b/src/components/swap-studio/home.tsx@@ -11,11 +11,13 @@ import { Skeleton } from "@/components/ui/skeleton";import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";import { EngineSwitch } from "@/components/studio/engine-switch";import { SelfHostNote } from "@/components/self-host-note";+import { ExampleRow } from "@/components/studio/example-row";import { useEngine, useLikelyVisitor } from "@/lib/api";import { characterLicenceLine } from "@/lib/catalog/character-swap";import { SWAP_STUDIO, type SwapProjectCard } from "@/lib/catalog/swap-studio";import { STUDIO_MODELS } from "@/lib/catalog/swap-studio-plan";import { toastError } from "@/lib/refusals";+import type { StudioExampleRow } from "@/lib/studio-examples";import { cn } from "@/lib/utils";import { useCreateSwapProject, useDeleteSwapProject, useSwapProjects } from "./hooks";@@ -34,7 +36,8 @@ const ago = (t: number) => {return new Date(t).toLocaleDateString();};-export function SwapStudioHome() {+/** examples: "See what it makes" (studioExamples("character-swap"), from the page), while there are no projects of one's own. */+export function SwapStudioHome({ examples }: { examples?: StudioExampleRow }) {const router = useRouter();const [engine, setEngine] = useEngine();const projects = useSwapProjects();@@ -88,6 +91,8 @@ export function SwapStudioHome() {{visitor && <SelfHostNote className="mt-3 max-w-lg">Character Swap isn't available here.</SelfHostNote>}</ToolHero>+ {examples && (visitor || (projects.isSuccess && !projects.data.length)) && <ExampleRow row={examples} className="mt-10" />}+<ol className="mx-auto mt-8 grid max-w-[1040px] gap-3 sm:grid-cols-2 lg:grid-cols-4" aria-label="How it works">{STEPS.map((s, i) => (<li key={s.title} className="rounded-2xl border bg-background p-3 shadow-soft">diff --git a/src/lib/home-showcase.ts b/src/lib/home-showcase.tsindex 2db30bbd..cfe3b507 100644--- a/src/lib/home-showcase.ts+++ b/src/lib/home-showcase.ts@@ -92,17 +92,18 @@ export const HOME_REVEALS = [];/**- * Studio cards: a real cover (a clip, or a still: Mixed Media's looks, Marketing's product shot and Image to 3D's- * turntable shot) and one line each; Audio shows its tools instead of a picture.+ * Studio cards: a real cover (a clip, or a still: Marketing's product shot and Image to 3D's+ * turntable shot) and one line each. Audio’s is the demo its Clean up voice tool opens on (a studio without a cover+ * would show its tools by name: AudioCard).*/export const HOME_STUDIOS: { href: string; id?: string; line: (f: HomeFacts) => string }[] = [{ href: "/cinema", id: "motion-arc-left", line: (f) => `Direct a film shot by shot: camera, lens, light and ${f.cinemaMoves} moves.` },{ href: "/genjutsu", id: "effect-turning-metal", line: () => "Keep a clip’s motion. Change what’s in it." },{ href: "/character-swap", id: "app-character-swap", line: () => "Put your character into whole clips, shot by shot." },{ href: "/marketing", id: "app-macroshot-product", line: (f) => `From a product link to a finished ad. ${f.adTemplates} ad templates.` },- { href: "/mixed-media", id: "effect-magazine", line: (f) => `Redraw a clip as collage, paper or paint, in ${f.mixedLooks} looks.` },+ { href: "/mixed-media", id: "effect-paper", line: (f) => `Redraw a clip as collage, paper or paint, in ${f.mixedLooks} looks.` },{ href: "/motion-control", id: "motion-static", line: () => "Give anyone the moves from any clip." },- { href: "/audio", line: () => "Voices, music and sound for any clip, made or split apart." },+ { href: "/audio", id: "app-clean-up-voice", line: () => "Voices, music and sound for any clip, made or split apart." },{ href: "/image-to-3d", id: "app-3d-rotation", line: () => "A photo or a sentence to a 3D model you can spin." },];diff --git a/src/lib/preset-peaks.generated.ts b/src/lib/preset-peaks.generated.tsindex 84450170..b5fbb986 100644--- a/src/lib/preset-peaks.generated.ts+++ b/src/lib/preset-peaks.generated.ts@@ -5,32 +5,63 @@* again gets a new URL. Generated by scripts/gen-preset-peaks.mjs: run it again rather than editing.*/export const PRESET_PEAKS: Record<string, { at: number; from: number; v: string }> = {+ "app-3d-figure": { "at": 3.5625, "from": 0.0208, "v": "3754dbe0" },+ "app-3d-rotation": { "at": 2.6042, "from": 0.0208, "v": "011b454a" },+ "app-ad-creative": { "at": 3.5625, "from": 0.2292, "v": "59be88a1" },"app-age-shift": { "at": 3.5625, "from": 1.2708, "v": "8d5ba60d" },"app-asmr-add-on": { "at": 2.0208, "from": 0.8125, "v": "744ba9e8" },+ "app-asmr-classic": { "at": 3.5625, "from": 0.7708, "v": "43886beb" },"app-behind-the-scenes": { "at": 2.5625, "from": 0.0625, "v": "51e134e4" },+ "app-billboard-ad": { "at": 3.5625, "from": 0.0208, "v": "9227cdd4" },"app-breakdown": { "at": 2.8958, "from": 0.4375, "v": "4140b331" },"app-chameleon": { "at": 1.7708, "from": 1.5208, "v": "72d760e6" },"app-change-background": { "at": 2.5208, "from": 0.6458, "v": "0ad44b04" },+ "app-character-swap": { "at": 2.8958, "from": 0.5625, "v": "bb9c8194" },+ "app-clean-up-voice": { "at": 3.5625, "from": 1.1042, "v": "e3056264" },"app-click-to-ad": { "at": 2.8958, "from": 0.6875, "v": "8778f202" },+ "app-clipcut": { "at": 3.5625, "from": 0.2708, "v": "5d952f80" },"app-color-grading": { "at": 2.8958, "from": 0.6458, "v": "4bc51659" },"app-colorize": { "at": 2.8958, "from": 0.5625, "v": "764b7df6" },+ "app-dance": { "at": 3.5625, "from": 0.0208, "v": "0f54cc49" },+ "app-expand-image": { "at": 3.5625, "from": 0.1042, "v": "b7eeda01" },"app-expression-edit": { "at": 3.3542, "from": 0.8125, "v": "258f4c52" },"app-face-swap": { "at": 2.8958, "from": 0.6042, "v": "ba7c34bd" },+ "app-giant-product": { "at": 3.5625, "from": 0.0208, "v": "874ac6ff" },"app-hairstyle-try-on": { "at": 2.8958, "from": 0.3542, "v": "9d5cbbf9" },"app-headshot-generator": { "at": 2.4375, "from": 0.3542, "v": "c772cd11" },+ "app-image-to-3d": { "at": 2.6042, "from": 0.2708, "v": "fada8409" },"app-japanese-show": { "at": 2.5208, "from": 0.5625, "v": "57142802" },"app-makeup-studio": { "at": 2.8958, "from": 0.9375, "v": "bdcf948a" },"app-match-colors": { "at": 2.8958, "from": 0.3542, "v": "314cf6c8" },+ "app-object-remover": { "at": 2.8958, "from": 0.4792, "v": "ff2579bd" },"app-outfit-shot": { "at": 2.8958, "from": 0.4375, "v": "80181bdf" },"app-outfit-swap": { "at": 2.8958, "from": 0.4792, "v": "dc9ba318" },+ "app-packshot": { "at": 2.8958, "from": 0.4375, "v": "6400e1f9" },+ "app-product-360": { "at": 2.6042, "from": 0.0208, "v": "bcf239e2" },"app-product-shot": { "at": 2.8958, "from": 0.6458, "v": "46133020" },+ "app-rap-god": { "at": 2.7708, "from": 0.0208, "v": "43855f9a" },+ "app-recast": { "at": 3.5625, "from": 0.0208, "v": "91b69f40" },"app-relight": { "at": 2.8958, "from": 0.7292, "v": "a3445db0" },+ "app-remove-background": { "at": 2.8958, "from": 0.4792, "v": "5db97a7c" },+ "app-restore-photo": { "at": 2.8958, "from": 0.3542, "v": "41c1beb0" },"app-sketch-to-real": { "at": 2.8958, "from": 0.6042, "v": "fd5d0ee7" },+ "app-skin-enhancer": { "at": 2.8958, "from": 0.7292, "v": "0f0775f9" },"app-steal-the-look": { "at": 2.8958, "from": 0.3125, "v": "7559c6b2" },+ "app-sticker-match-cut": { "at": 3.5625, "from": 0.2708, "v": "8ee55b84" },"app-storm-creature": { "at": 3.3958, "from": 0.5625, "v": "8003fbd8" },"app-style-snap": { "at": 2.1042, "from": 0.6042, "v": "3638409a" },"app-style-transfer": { "at": 2.8958, "from": 0.4792, "v": "cd3b9f39" },+ "app-talking-photo": { "at": 3.5625, "from": 0.2708, "v": "fc25ab24" },+ "app-text-edit": { "at": 2.8958, "from": 0.2292, "v": "5edec22b" },+ "app-upscale": { "at": 2.8958, "from": 0.3542, "v": "09b04163" },+ "app-urban-cuts": { "at": 3.5625, "from": 0.0208, "v": "b52b25b8" },+ "app-video-face-swap": { "at": 3.5625, "from": 0.3125, "v": "5dac08a7" },"app-virtual-try-on": { "at": 2.8958, "from": 0.6042, "v": "955e44b7" },+ "app-what-s-next": { "at": 3.5625, "from": 0.1875, "v": "ad80d920" },+ "app-zoom-out": { "at": 3.5625, "from": 0.0208, "v": "e2bcb936" },+ "effect-acid": { "at": 3.5625, "from": 0.3542, "v": "5dd1cc1f" },+ "effect-agamemnon": { "at": 3.5625, "from": 0.3125, "v": "665eb99f" },+ "effect-akrill": { "at": 3.5625, "from": 0.2708, "v": "a5148de3" },"effect-angel-wings": { "at": 3.5625, "from": 0.6042, "v": "0527eb83" },"effect-aquarium": { "at": 3.5625, "from": 0.1042, "v": "8b679f01" },"effect-atomic": { "at": 3.6042, "from": 0.4375, "v": "c9bdcebb" },@@ -41,9 +72,12 @@ export const PRESET_PEAKS: Record<string, { at: number; from: number; v: string"effect-black-tears": { "at": 3.3542, "from": 2.1042, "v": "4fb9c2fc" },"effect-bleach-bypass": { "at": 2.8958, "from": 0.5625, "v": "07570ee5" },"effect-bleached-warm": { "at": 2.8958, "from": 0.6875, "v": "09c7b7bf" },+ "effect-blue-depth": { "at": 3.5625, "from": 0.3958, "v": "d34ebadc" },"effect-bubbles": { "at": 3.6875, "from": 0.5208, "v": "6cebaf31" },"effect-building-explosion": { "at": 3.5625, "from": 0.0208, "v": "3cead33e" },"effect-candy-pink": { "at": 2.8958, "from": 0.9375, "v": "c9133f15" },+ "effect-cannabis": { "at": 3.5625, "from": 0.2708, "v": "ac4accf9" },+ "effect-canvas": { "at": 4.9792, "from": 0.0208, "v": "b641cf06" },"effect-car-drive": { "at": 3.5625, "from": 0.0208, "v": "bfedba9d" },"effect-car-explosion": { "at": 2.3542, "from": 0.0625, "v": "6b2368e2" },"effect-classic-bw": { "at": 2.8958, "from": 0.3958, "v": "3bbbe71a" },@@ -51,12 +85,14 @@ export const PRESET_PEAKS: Record<string, { at: number; from: number; v: string"effect-clothes-rain": { "at": 3.0208, "from": 0.3125, "v": "b618283f" },"effect-cold-steel": { "at": 2.8958, "from": 0.3542, "v": "2bd6d695" },"effect-cold-vision": { "at": 3.6875, "from": 0.5208, "v": "53f7ba2b" },+ "effect-comic": { "at": 3.5625, "from": 1.3125, "v": "3579cae4" },"effect-contre-jour": { "at": 3.5208, "from": 0.5208, "v": "e3050e03" },"effect-cotton-cloud": { "at": 3.6042, "from": 0.3542, "v": "401ac5ee" },"effect-crimson-vigil": { "at": 2.8958, "from": 0.4375, "v": "fe3d63a0" },"effect-cyborg": { "at": 3.2708, "from": 0.5625, "v": "f6a0ed54" },"effect-diamond": { "at": 3.5208, "from": 1.1458, "v": "8b7974a5" },"effect-dirty-lens": { "at": 3.5625, "from": 0.1042, "v": "9a4758ba" },+ "effect-dolphin-ride": { "at": 3.5625, "from": 0.0208, "v": "8876d2b7" },"effect-duplicate": { "at": 3.1042, "from": 0.0208, "v": "36c74910" },"effect-explosion": { "at": 2.0208, "from": 0.0208, "v": "16434261" },"effect-fairies-around": { "at": 3.1042, "from": 0.1042, "v": "ff7e1f92" },@@ -67,13 +103,18 @@ export const PRESET_PEAKS: Record<string, { at: number; from: number; v: string"effect-flame-on": { "at": 3.5625, "from": 0.6458, "v": "71f81645" },"effect-flood": { "at": 3.5625, "from": 0.4375, "v": "bdc90be5" },"effect-floral-eyes": { "at": 3.5208, "from": 0.5208, "v": "a1531350" },+ "effect-fragments": { "at": 3.5625, "from": 0.3958, "v": "dba30306" },"effect-freezing": { "at": 3.6042, "from": 1.2708, "v": "2d6db5d0" },"effect-hyper-neon": { "at": 2.8958, "from": 0.4375, "v": "9d8daceb" },"effect-ice-rose": { "at": 3.3542, "from": 0.3542, "v": "135f4d90" },+ "effect-jump-transition": { "at": 3.5625, "from": 0.0208, "v": "b6de464d" },"effect-lava": { "at": 3.3542, "from": 0.1042, "v": "182b756e" },"effect-lens-flare": { "at": 3.5625, "from": 0.4792, "v": "8f03b767" },"effect-levitation": { "at": 3.5625, "from": 0.6042, "v": "d97e31a8" },"effect-lime-jam": { "at": 2.8958, "from": 0.3125, "v": "30987041" },+ "effect-marble": { "at": 3.5625, "from": 0.8542, "v": "339bc7bf" },+ "effect-modern": { "at": 3.5625, "from": 0.2292, "v": "3af0c35b" },+ "effect-monet-muse": { "at": 3.5625, "from": 0.4375, "v": "3a1b7195" },"effect-morphskin": { "at": 3.6042, "from": 0.4792, "v": "cdbe5b6b" },"effect-multiverse": { "at": 1.6875, "from": 0.3125, "v": "d511f53d" },"effect-muscle-up": { "at": 3.5208, "from": 0.5625, "v": "96185bbd" },@@ -98,19 +139,25 @@ export const PRESET_PEAKS: Record<string, { at: number; from: number; v: string"effect-saint-glow": { "at": 3.3125, "from": 1.3542, "v": "da963411" },"effect-sand-storm": { "at": 2.8125, "from": 0.4792, "v": "25e87ea3" },"effect-scrapbook-collage": { "at": 3.5625, "from": 0.0208, "v": "487fcbe8" },+ "effect-selfie": { "at": 3.5625, "from": 0.0208, "v": "57b93f61" },+ "effect-selfie-posing": { "at": 3.5625, "from": 0.0208, "v": "b1862f01" },"effect-shadow-smoke": { "at": 3.5625, "from": 0.8542, "v": "04d19a93" },"effect-silhouette": { "at": 3.1875, "from": 0.8542, "v": "9a9ef0d8" },+ "effect-skatedog": { "at": 3.5625, "from": 0.0208, "v": "90062c7b" },"effect-sketch": { "at": 2.4375, "from": 0.0208, "v": "24e23540" },"effect-sodium-decay": { "at": 2.8958, "from": 0.4375, "v": "57d33068" },"effect-soft-palette": { "at": 2.8958, "from": 0.3542, "v": "69be20ec" },"effect-soul-jump": { "at": 3.6042, "from": 0.9792, "v": "b84e1725" },"effect-spirit-animal": { "at": 3.3542, "from": 0.1042, "v": "7196f3d0" },+ "effect-superstar": { "at": 3.5625, "from": 0.8958, "v": "8eb5e622" },"effect-teal-orange-epic": { "at": 3.5208, "from": 0.6458, "v": "da7d3551" },"effect-thunder-god": { "at": 3.5625, "from": 1.1875, "v": "673581aa" },"effect-tiny-planet": { "at": 3.4375, "from": 0.1458, "v": "809486ff" },"effect-toxic": { "at": 3.3542, "from": 0.6875, "v": "146b540c" },"effect-tracking": { "at": 3.5208, "from": 0.0208, "v": "820420f2" },"effect-train-rush": { "at": 3.5625, "from": 0.8958, "v": "8994e787" },+ "effect-turning-metal": { "at": 3.5625, "from": 1.0625, "v": "26c5fac5" },+ "effect-vintage": { "at": 3.5625, "from": 0.0208, "v": "286de484" },"effect-wind-to-face": { "at": 3.5625, "from": 0.7292, "v": "77ab569a" },"effect-windows": { "at": 3.0208, "from": 0.0208, "v": "6566b7b2" },"effect-wireframe": { "at": 3.6042, "from": 0.7708, "v": "69a56666" },diff --git a/src/lib/studio-examples.ts b/src/lib/studio-examples.tsindex 483cc605..936c6ddd 100644--- a/src/lib/studio-examples.ts+++ b/src/lib/studio-examples.ts@@ -1,20 +1,45 @@/**- * What the empty Image, Video and Edit studios show under the composer: four real covers each, so a first visit sees- * what the studio makes before it types anything. Server only, like Home's showcase it borrows from: the page gets- * four slim cards, and the catalog stays here (tests/studio-examples.test.ts checks every id, cover and line).+ * What a studio or tool shows before a visitor has made anything: four real covers of what it makes (Image, Video and+ * Edit under the composer; the other studios and tools under their composer, upload box or empty list), and Mixed+ * Media's one reveal in "How it works". Server only, like Home's showcase it borrows from: the page gets a few slim+ * cards, and the catalog stays here (tests/studio-examples.test.ts checks every id, cover and line).*/import "server-only";import { getPreset } from "@/lib/catalog";import { HOME_EFFECTS, HOME_MOTIONS, HOME_REVEALS, HOME_WALL, homeCard, presetHref } from "@/lib/home-showcase";+import { PRESET_BEFORE_AFTER } from "@/lib/preset-before-after.generated";import type { PresetType } from "@/lib/catalog/types";import type { PresetCardData } from "@/lib/preset-cards";-export type ExampleStudio = "image" | "video" | "edit";+export type ExampleStudio =+ | "image"+ | "video"+ | "edit"+ | "video-edit"+ | "extend"+ | "reframe"+ | "inpaint"+ | "lipsync"+ | "motion-control"+ | "upscale"+ | "video-tools"+ | "audio"+ | "layers"+ | "genjutsu"+ | "character-swap"+ | "image-to-3d"+ | "katana"+ | "cinema"+ | "ads"+ | "mixed-media";++const SEE = "See what it makes";/**- * Each studio's row: the line above it, and its four in the order they show. A line of its own where Home has none- * for that preset, else Home's (HOME_CAPTION_MAX.card holds either whole on a phone's tile). Video's tiles pick their- * move in the studio itself; Image's and Edit's are apps, each on a page of its own, and their heading says so.+ * Each studio's row: the line above it, and its tiles in the order they show (four; Mixed Media's "How it works" has+ * one). A tile's line is its own here, else EXAMPLE_LINES', else Home's (HOME_CAPTION_MAX.card holds any of them whole+ * on a phone's tile). Video's tiles pick their move in the studio itself; Image's, Edit's and Upscale's are apps, each on a page+ * of its own, and their heading says so. Ads Studio and Ad Multiplier share the "ads" row.*/export const STUDIO_EXAMPLES: Record<ExampleStudio, { heading: string; tiles: { id: string; caption?: string }[] }> = {image: {@@ -27,7 +52,7 @@ export const STUDIO_EXAMPLES: Record<ExampleStudio, { heading: string; tiles: {],},video: {- heading: "See what it makes",+ heading: SEE,tiles: [{ id: "motion-fpv-drone" }, { id: "effect-sand-storm" }, { id: "motion-dolly-in" }, { id: "effect-nature-bloom" }],},edit: {@@ -39,6 +64,71 @@ export const STUDIO_EXAMPLES: Record<ExampleStudio, { heading: string; tiles: {{ id: "app-steal-the-look" },],},+ "video-edit": { heading: SEE, tiles: [{ id: "app-recast" }, { id: "app-video-face-swap" }, { id: "app-change-background" }, { id: "effect-outfit-switch" }] },+ extend: { heading: SEE, tiles: [{ id: "app-what-s-next" }, { id: "app-zoom-out" }, { id: "motion-drone-reveal" }, { id: "motion-fpv-drone" }] },+ reframe: { heading: SEE, tiles: [{ id: "app-expand-image" }, { id: "app-zoom-out" }, { id: "app-behind-the-scenes" }, { id: "motion-aerial-pullback" }] },+ inpaint: { heading: SEE, tiles: [{ id: "app-object-remover" }, { id: "app-text-edit" }, { id: "app-expression-edit" }, { id: "app-change-background" }] },+ lipsync: { heading: SEE, tiles: [{ id: "app-talking-photo" }, { id: "app-rap-god" }, { id: "app-japanese-show" }, { id: "effect-selfie" }] },+ "motion-control": { heading: SEE, tiles: [{ id: "app-dance" }, { id: "effect-selfie-posing" }, { id: "motion-static" }, { id: "motion-boxing" }] },+ upscale: { heading: "Or start from an app", tiles: [{ id: "app-upscale" }, { id: "app-restore-photo" }, { id: "app-skin-enhancer" }, { id: "app-colorize" }] },+ "video-tools": { heading: SEE, tiles: [{ id: "app-remove-background" }, { id: "app-object-remover" }, { id: "app-relight" }, { id: "app-match-colors" }] },+ audio: { heading: SEE, tiles: [{ id: "app-clean-up-voice" }, { id: "app-talking-photo" }, { id: "app-rap-god" }, { id: "app-asmr-classic" }] },+ layers: { heading: SEE, tiles: [{ id: "app-text-edit" }, { id: "app-relight" }, { id: "app-object-remover" }, { id: "app-change-background" }] },+ genjutsu: { heading: SEE, tiles: [{ id: "app-recast" }, { id: "app-character-swap" }, { id: "app-video-face-swap" }, { id: "effect-turning-metal" }] },+ "character-swap": { heading: SEE, tiles: [{ id: "app-character-swap" }, { id: "app-recast" }, { id: "app-face-swap" }, { id: "app-video-face-swap" }] },+ "image-to-3d": { heading: SEE, tiles: [{ id: "app-image-to-3d" }, { id: "app-3d-rotation" }, { id: "app-product-360" }, { id: "app-3d-figure" }] },+ katana: { heading: SEE, tiles: [{ id: "app-clipcut" }, { id: "app-urban-cuts" }, { id: "app-sticker-match-cut" }, { id: "effect-jump-transition" }] },+ cinema: { heading: SEE, tiles: [{ id: "motion-arc-left" }, { id: "motion-dolly-in" }, { id: "motion-crane-up" }, { id: "motion-fpv-drone" }] },+ ads: { heading: SEE, tiles: [{ id: "app-ad-creative" }, { id: "app-billboard-ad" }, { id: "app-giant-product" }, { id: "app-packshot" }] },+ "mixed-media": { heading: "See a look play out", tiles: [{ id: "effect-paper" }] },+};++/** What each cover shows, for the presets Home has no line for (one line per preset, whichever studio shows it). */+export const EXAMPLE_LINES: Record<string, string> = {+ "app-recast": "A new dancer takes the stage",+ "app-video-face-swap": "A new face in the back seat",+ "app-change-background": "From a grey studio to the Alps",+ "app-what-s-next": "A whale breaches beside the yacht",+ "app-zoom-out": "Pulls back to show the whole fjord",+ "motion-drone-reveal": "Rises over a seaplane on the reef",+ "app-expand-image": "The frame opens up across the bay",+ "motion-aerial-pullback": "Pulls back over a hedge maze",+ "app-object-remover": "The tourists beside her are gone",+ "app-text-edit": "The shop sign now reads BELLE",+ "app-expression-edit": "A calm look turns into a smile",+ "app-talking-photo": "A portrait speaks your words",+ "app-rap-god": "A full verse on a neon stage",+ "app-japanese-show": "A guest on a Japanese TV show",+ "app-asmr-classic": "Soft taps on a glazed pink vase",+ "effect-selfie": "A selfie chat at the canyon's edge",+ "app-dance": "A dance across a gilded ballroom",+ "effect-selfie-posing": "Quick selfie poses in a blue alley",+ "motion-static": "Flamenco in a Moorish courtyard",+ "motion-boxing": "Jabs and hooks in a sunlit gym",+ "app-upscale": "Soft to sharp, down to every strand",+ "app-restore-photo": "A creased wedding portrait, restored",+ "app-skin-enhancer": "Natural skin, gently retouched",+ "app-colorize": "A black and white beach, in color",+ "app-remove-background": "Cut out clean, every curl kept",+ "app-relight": "Grey skies to golden hour",+ "app-character-swap": "He steps into her place by the lake",+ "effect-turning-metal": "His skin turns to liquid chrome",+ "app-face-swap": "A new face, same suit and light",+ "app-image-to-3d": "A teapot photo, now a 3D model",+ "app-3d-rotation": "A black gown turns full circle",+ "app-product-360": "A red heel on a turntable",+ "app-3d-figure": "You as a boxed collectible figure",+ "app-clipcut": "A new outfit on every beat",+ "app-urban-cuts": "New looks down a neon street",+ "app-sticker-match-cut": "She pops out as a glossy sticker",+ "effect-jump-transition": "One jump from Rio to the dunes",+ "motion-arc-left": "Circles her on the baobab road",+ "app-ad-creative": "A chocolate bar made a bold ad",+ "app-billboard-ad": "A perfume ad over the skyline",+ "app-giant-product": "A lipstick towers over the city",+ "app-packshot": "A handbag, cut out on clean white",+ "app-clean-up-voice": "A noisy brasserie, a clear voice",+ "effect-paper": "Whale and sea, redrawn in cut paper",};/** A tile of the studio's row: its cover, what kind of preset it is, its line, and where it opens. */@@ -56,9 +146,18 @@ export interface StudioExampleRow {}const homeCaptions = new Map<string, string>([...HOME_WALL, ...HOME_EFFECTS, ...HOME_MOTIONS, ...HOME_REVEALS].map((t) => [t.id, t.caption]));+const homeKinds = new Map<string, string>(HOME_WALL.map((t) => [t.id, t.kind]));-/** The kind a tile names (from xl, as Home's wall does): the apps here all wipe from a before to an after. */-const KIND: Record<PresetType, string> = { app: "App · before → after", motion: "Camera motion", effect: "Effect" };+/** The kind a tile names (from xl, as Home's wall does). */+const KIND: Record<PresetType, string> = { app: "App", motion: "Camera motion", effect: "Effect" };+/** An app whose cover wipes from a before to an after (its pair is Home's slider's) says so, as Home's wall does. */+const BEFORE_AFTER = "App · before → after";++export function exampleKind(id: string): string {+ const type = getPreset(id)!.type;+ if (type !== "app") return KIND[type];+ return homeKinds.get(id) ?? (PRESET_BEFORE_AFTER[id] ? BEFORE_AFTER : KIND.app);+}/** The studio's row, as cards (each resting on its peak frame, as on Home). */export function studioExamples(studio: ExampleStudio): StudioExampleRow {@@ -68,9 +167,9 @@ export function studioExamples(studio: ExampleStudio): StudioExampleRow {tiles: tiles.map(({ id, caption }) => {// homeCard throws for an id the catalog doesn't have, so the build fails rather than the page.const card = homeCard(id);- const line = caption ?? homeCaptions.get(id);+ const line = caption ?? EXAMPLE_LINES[id] ?? homeCaptions.get(id);if (!line) throw new Error(`The ${studio} studio's example ${id} has no line`);- return { card, kind: KIND[getPreset(id)!.type], caption: line, href: presetHref(id) };+ return { card, kind: exampleKind(id), caption: line, href: presetHref(id) };}),};}diff --git a/src/lib/template-covers.generated.ts b/src/lib/template-covers.generated.tsindex 5e91242d..8439de88 100644--- a/src/lib/template-covers.generated.ts+++ b/src/lib/template-covers.generated.ts@@ -9,4 +9,29 @@*/export type TemplateCoverEntry = string | [poster: string, clip: string] | { poster: string; video?: string; at?: number; frames?: string[] };-export const TEMPLATE_COVERS: Record<string, TemplateCoverEntry> = {};+export const TEMPLATE_COVERS: Record<string, TemplateCoverEntry> = {+ "canvas/effect-chain-agamemnon": {"poster":"/previews/presets/peak/effect-agamemnon.jpg?v=665eb99f","video":"/previews/presets/effect-agamemnon.mp4?v=54eb9b67","at":3.5625},+ "canvas/effect-chain-blue-depth": {"poster":"/previews/presets/peak/effect-blue-depth.jpg?v=d34ebadc","video":"/previews/presets/effect-blue-depth.mp4?v=82a75eae","at":3.5625},+ "canvas/effect-chain-dolphin-ride": {"poster":"/previews/presets/peak/effect-dolphin-ride.jpg?v=8876d2b7","video":"/previews/presets/effect-dolphin-ride.mp4?v=49b7f290","at":3.5625},+ "canvas/effect-chain-fairytale-castle": {"poster":"/previews/presets/peak/effect-fairytale-castle.jpg?v=f4f7fc3b","video":"/previews/presets/effect-fairytale-castle.mp4?v=58c4ae65","at":3.1875},+ "canvas/effect-chain-pearl-earring": {"poster":"/previews/presets/peak/effect-pearl-earring.jpg?v=dbbf9f2f","video":"/previews/presets/effect-pearl-earring.mp4?v=b73f4ae9","at":2.3542},+ "canvas/effect-chain-skatedog": {"poster":"/previews/presets/peak/effect-skatedog.jpg?v=90062c7b","video":"/previews/presets/effect-skatedog.mp4?v=af3f7f5c","at":3.5625},+ "canvas/effect-chain-superstar": {"poster":"/previews/presets/peak/effect-superstar.jpg?v=8eb5e622","video":"/previews/presets/effect-superstar.mp4?v=c0066397","at":3.5625},+ "mixed-media/mixed-acid": {"poster":"/previews/presets/peak/effect-acid.jpg?v=5dd1cc1f","video":"/previews/presets/effect-acid.mp4?v=eda1dc9e","at":3.5625},+ "mixed-media/mixed-akrill": {"poster":"/previews/presets/peak/effect-akrill.jpg?v=a5148de3","video":"/previews/presets/effect-akrill.mp4?v=b09a4205","at":3.5625},+ "mixed-media/mixed-bubbles": {"poster":"/previews/presets/peak/effect-bubbles.jpg?v=6cebaf31","video":"/previews/presets/effect-bubbles.mp4?v=0f81e24b","at":3.6875},+ "mixed-media/mixed-comic": {"poster":"/previews/presets/peak/effect-comic.jpg?v=3579cae4","video":"/previews/presets/effect-comic.mp4?v=744e8e53","at":3.5625},+ "mixed-media/mixed-fragments": {"poster":"/previews/presets/peak/effect-fragments.jpg?v=dba30306","video":"/previews/presets/effect-fragments.mp4?v=c27fac93","at":3.5625},+ "mixed-media/mixed-lava": {"poster":"/previews/presets/peak/effect-lava.jpg?v=182b756e","video":"/previews/presets/effect-lava.mp4?v=47305cdc","at":3.3542},+ "mixed-media/mixed-marble": {"poster":"/previews/presets/peak/effect-marble.jpg?v=339bc7bf","video":"/previews/presets/effect-marble.mp4?v=5a2db430","at":3.5625},+ "mixed-media/mixed-multiverse": {"poster":"/previews/presets/peak/effect-multiverse.jpg?v=d511f53d","video":"/previews/presets/effect-multiverse.mp4?v=c81efde6","at":1.6875},+ "mixed-media/mixed-noir": {"poster":"/previews/presets/peak/effect-noir.jpg?v=3bb96dc5","video":"/previews/presets/effect-noir.mp4?v=3e3ac107","at":3.1875},+ "mixed-media/mixed-overexposed": {"poster":"/previews/presets/peak/effect-overexposed.jpg?v=5e499f55","video":"/previews/presets/effect-overexposed.mp4?v=bdbc6cf2","at":2.3542},+ "mixed-media/mixed-paper": {"poster":"/previews/presets/peak/effect-paper.jpg?v=9ed040b9","video":"/previews/presets/effect-paper.mp4?v=e4242b6c","at":3.5208},+ "mixed-media/mixed-particles": {"poster":"/previews/presets/peak/effect-particles.jpg?v=f5d797f7","video":"/previews/presets/effect-particles.mp4?v=d9a1a5dd","at":3.3958},+ "mixed-media/mixed-random-glow": {"poster":"/previews/presets/peak/effect-random-glow.jpg?v=c243a3c6","video":"/previews/presets/effect-random-glow.mp4?v=a9964f90","at":3.2708},+ "mixed-media/mixed-sketch": {"poster":"/previews/presets/peak/effect-sketch.jpg?v=24e23540","video":"/previews/presets/effect-sketch.mp4?v=4e4bc4c0","at":2.4375},+ "mixed-media/mixed-toxic": {"poster":"/previews/presets/peak/effect-toxic.jpg?v=146b540c","video":"/previews/presets/effect-toxic.mp4?v=f160fa6a","at":3.3542},+ "mixed-media/mixed-tracking": {"poster":"/previews/presets/peak/effect-tracking.jpg?v=820420f2","video":"/previews/presets/effect-tracking.mp4?v=b0482bde","at":3.5208},+ "mixed-media/mixed-windows": {"poster":"/previews/presets/peak/effect-windows.jpg?v=6566b7b2","video":"/previews/presets/effect-windows.mp4?v=ddb89362","at":3.0208}+};diff --git a/tests/home-showcase.test.ts b/tests/home-showcase.test.tsindex b556a68a..c706c5fe 100644--- a/tests/home-showcase.test.ts+++ b/tests/home-showcase.test.ts@@ -46,8 +46,8 @@ const exists = (url: string) => (fs.statSync(path.join(root, "public", url.split/** Covers the reviews turned down: no real cover yet, or white bars at the sides (and Text Edit's white edge). */const NO_COVER = ["app-fuobe-angles", "app-talking-photo", "motion-dolly-zoom-out", "motion-buckle-up"];const WHITE_BARS = ["app-dance", "app-simlife", "app-game-dump", "app-japanese-show", "app-comic-book", "app-banana-eating", "app-change-background", "effect-boiling-point", "effect-color-rain", "app-text-edit"];-/** Studio cards that rest on a still: Mixed Media's look, Marketing's product shot and Image to 3D's turntable shot. */-const STILLS = ["effect-magazine", "app-macroshot-product", "app-3d-rotation"];+/** Studio cards that rest on a still: Marketing's product shot and Image to 3D's turntable shot. */+const STILLS = ["app-macroshot-product", "app-3d-rotation"];/*** Slots whose clip was taken down with the still it was made from (Flying's eagle had three wings): the card rests* on its new still until the new clip is published. Take an id out when its clip is back.@@ -180,7 +180,9 @@ describe("Home's showcase", () => {// The pills keep the sidebar's order and labels.const order = [...create, ...studios].map((i) => i.href);expect(home.pills.map((p) => order.indexOf(p.href))).toEqual(home.pills.map((p) => order.indexOf(p.href)).sort((a, b) => a - b));- expect(home.studios.find((s) => s.href === "/audio")?.card).toBeUndefined();+ // Audio shows a real cover too: Clean up voice’s demo, as its page does.+ expect(home.studios.find((s) => s.href === "/audio")?.card?.id).toBe("app-clean-up-voice");+ expect(home.studios.every((s) => s.card)).toBe(true);});it("quotes the catalog's own numbers", async () => {diff --git a/tests/studio-examples.test.ts b/tests/studio-examples.test.tsindex 2ced4eb5..e0cddf38 100644--- a/tests/studio-examples.test.ts+++ b/tests/studio-examples.test.ts@@ -1,22 +1,25 @@import fs from "node:fs";import path from "node:path";import { describe, expect, it, vi } from "vitest";-import { getPreset } from "@/lib/catalog";-import { HOME_CAPTION_MAX } from "@/lib/home-showcase";+import { getPreset, MODELS } from "@/lib/catalog";+import { HOME_CAPTION_MAX, HOME_WALL } from "@/lib/home-showcase";import { thumbOf } from "@/lib/preset-cards";+import { PRESET_BEFORE_AFTER } from "@/lib/preset-before-after.generated";import { PRESET_PEAKS } from "@/lib/preset-peaks.generated";import { PRESET_PREVIEWS } from "@/lib/preset-previews.generated";-import { STUDIO_EXAMPLES, studioExamples, type ExampleStudio } from "@/lib/studio-examples";+import { EXAMPLE_LINES, STUDIO_EXAMPLES, studioExamples, type ExampleStudio } from "@/lib/studio-examples";// home-showcase.ts (which the examples borrow from) imports next/cache for its own showcase.vi.mock("next/cache", () => ({ cacheLife: () => {} }));/*- * The empty Image, Video and Edit studios' row of examples (src/lib/studio-examples.ts) against the catalog and the- * files in public/: every preset it names is real and has its cover, clip and small copies, and every line fits.+ * The studios' and tools' rows of examples (src/lib/studio-examples.ts) against the catalog and the files in public/:+ * every preset a row names is real and has its cover, clip, peak frame and small copies, every line fits a phone's+ * tile and reads as plain copy, and every page that has a row passes it on.*/const root = process.cwd();+const read = (...p: string[]) => fs.readFileSync(path.join(root, "src", ...p), "utf8");/** A cover URL's file in public/ is there and not empty: the URL as the site gives it, ending in its version (?v=). */const exists = (url: string) => {expect(url, url).toMatch(/^\/previews\/[^?]+\?v=[0-9a-f]{8}$/);@@ -24,23 +27,41 @@ const exists = (url: string) => {};const studios = Object.keys(STUDIO_EXAMPLES) as ExampleStudio[];+/** The Studio pages (a composer of their own), the hubs (ModeSwitchStudio) and the tools or project lists (ExampleRow). */+const COMPOSER = ["image", "video", "edit", "video-edit", "extend", "reframe", "inpaint", "lipsync", "motion-control"] as const;+const HUBS = ["upscale", "video-tools", "audio"] as const;+/** Each tool's or list's component, which shows the row itself. */+const ROW_IN: Record<string, string[][]> = {+ layers: [["components", "layers", "projects-view.tsx"]],+ genjutsu: [["components", "genjutsu", "genjutsu-studio.tsx"]],+ "character-swap": [["components", "swap-studio", "home.tsx"]],+ "image-to-3d": [["components", "model3d", "model3d-studio.tsx"]],+ katana: [["components", "katana", "katana-studio.tsx"]],+ cinema: [["components", "cinema", "projects-view.tsx"]],+ ads: [+ ["components", "ads", "ads-home.tsx"],+ ["components", "ads", "multiplier.tsx"],+ ],+};+describe("the studios' examples", () => {- it("shows four for each of Image, Video and Edit, none twice", () => {- expect(studios.sort()).toEqual(["edit", "image", "video"]);+ it("has a row for every studio and tool without covers of its own: four each, none twice, and Mixed Media's one reveal", () => {+ expect([...studios].sort()).toEqual([...COMPOSER, ...HUBS, ...Object.keys(ROW_IN), "mixed-media"].sort());for (const s of studios) {const ids = STUDIO_EXAMPLES[s].tiles.map((e) => e.id);- expect(ids, s).toHaveLength(4);- expect(new Set(ids).size, s).toBe(4);+ expect(ids, s).toHaveLength(s === "mixed-media" ? 1 : 4);+ expect(new Set(ids).size, s).toBe(ids.length);}});- it("says over Image's and Edit's apps that they are apps, and over Video's moves what the studio makes", () => {- expect(studioExamples("image").heading).toBe("Or start from an app");- expect(studioExamples("edit").heading).toBe("Or start from an app");- expect(studioExamples("video").heading).toBe("See what it makes");+ it("says over Image's and Edit's apps that they are apps, over Mixed Media's reveal that it plays, and elsewhere what the studio makes", () => {+ for (const s of studios) {+ const heading = { image: "Or start from an app", edit: "Or start from an app", upscale: "Or start from an app", "mixed-media": "See a look play out" }[s as string] ?? "See what it makes";+ expect(studioExamples(s).heading, s).toBe(heading);+ }});- it("names real presets, each with its cover, its clip and their small copies", () => {+ it("names real presets, each with its cover, its clip, its peak frame and their small copies", () => {for (const s of studios) {for (const { card } of studioExamples(s).tiles) {expect(getPreset(card.id), card.id).toBeDefined();@@ -51,10 +72,10 @@ describe("the studios' examples", () => {expect(exists(thumbOf(cover.poster)), thumbOf(cover.poster)).toBe(true);expect(cover.video, `${card.id} has a clip`).toBeDefined();expect(exists(cover.video!), cover.video).toBe(true);- // An effect or an app rests on its peak frame, as on Home; a camera motion on its poster.+ // An effect or an app rests on its peak frame (what it made), as on Home; a camera motion on its poster.if (card.id.startsWith("motion-")) expect(card.preview.rest, card.id).toBeUndefined();else {- expect(PRESET_PEAKS[card.id], card.id).toBeDefined();+ expect(PRESET_PEAKS[card.id], `${card.id} has a peak frame (node scripts/gen-preset-peaks.mjs ${card.id})`).toBeDefined();expect(exists(card.preview.rest!.src), card.preview.rest!.src).toBe(true);expect(exists(thumbOf(card.preview.rest!.src)), thumbOf(card.preview.rest!.src)).toBe(true);}@@ -63,36 +84,82 @@ describe("the studios' examples", () => {});it("gives each a line that fits a phone's tile whole, and says what kind it is", () => {+ const wallKinds = new Map<string, string>(HOME_WALL.map((t) => [t.id, t.kind]));for (const s of studios) {for (const e of studioExamples(s).tiles) {expect(e.caption.length, e.card.id).toBeGreaterThan(0);expect(e.caption.length, e.card.id).toBeLessThanOrEqual(HOME_CAPTION_MAX.card);- expect(e.kind, e.card.id).toBe({ app: "App · before → after", motion: "Camera motion", effect: "Effect" }[getPreset(e.card.id)!.type]);+ const type = getPreset(e.card.id)!.type;+ // An app whose cover wipes from a before to an after (Home's wall says so, or it has Home's HD pair) says so.+ const kind =+ type === "motion" ? "Camera motion" : type === "effect" ? "Effect" : (wallKinds.get(e.card.id) ?? (PRESET_BEFORE_AFTER[e.card.id] ? "App · before → after" : "App"));+ expect(e.kind, e.card.id).toBe(kind);}}});+ it("writes every line as plain copy: no model or maker, no status words, a sentence without a full stop", () => {+ const lines = studios.flatMap((s) => studioExamples(s).tiles.map((e) => [e.card.id, e.caption] as const));+ // Every line of EXAMPLE_LINES is shown by a row, and every line a row shows is checked here.+ const shown = new Set(lines.map(([id]) => id));+ for (const id of Object.keys(EXAMPLE_LINES)) expect(shown.has(id), `${id} is in no row`).toBe(true);+ const names = [...new Set(MODELS.flatMap((m) => [m.name, m.vendor]).filter((n) => n.trim().length >= 3))];+ const status = /\b(placeholder|demo|sample|beta|unverified|not checked|coming soon|todo|tbd|draft|gpu|comfy|lora|checkpoint)\b/i;+ for (const [id, line] of lines) {+ expect(line, id).toBe(line.trim());+ expect(line, id).toMatch(/^[A-Z]/);+ expect(line, id).not.toMatch(/[.!?;:]$/);+ expect(line, id).not.toMatch(status);+ for (const n of names) expect(line.toLowerCase().includes(n.toLowerCase()), `${id}: "${line}" names ${n}`).toBe(false);+ }+ });+it("opens an app on its own page, and picks a motion or effect in the Video studio", () => {- const [image, video] = [studioExamples("image").tiles, studioExamples("video").tiles];- expect(image[0].href).toBe(`/apps/${image[0].card.id}`);- for (const e of video) expect(e.href, e.card.id).toBe(`/video?preset=${e.card.id}`);+ for (const s of studios) {+ for (const e of studioExamples(s).tiles) {+ expect(e.href, e.card.id).toBe(getPreset(e.card.id)!.type === "app" ? `/apps/${e.card.id}` : `/video?preset=${e.card.id}`);+ }+ }// Edit and Image show apps, Video shows what its studio picks.for (const s of ["image", "edit"] as const) for (const e of studioExamples(s).tiles) expect(getPreset(e.card.id)!.type, e.card.id).toBe("app");- for (const e of video) expect(["motion", "effect"], e.card.id).toContain(getPreset(e.card.id)!.type);+ for (const e of studioExamples("video").tiles) expect(["motion", "effect"], e.card.id).toContain(getPreset(e.card.id)!.type);});- it("stays on the server: the studio page takes only its type, and loads the tiles in their own chunk", () => {- const read = (...p: string[]) => fs.readFileSync(path.join(root, "src", ...p), "utf8");+ it("stays on the server: the pages take only its type, and load the tiles in their own chunk", () => {expect(read("lib", "studio-examples.ts")).toMatch(/^import "server-only";$/m);const page = read("components", "studio", "studio-page.tsx");expect(page).toMatch(/^import type \{ StudioExample, StudioExampleRow \} from "@\/lib\/studio-examples";$/m);expect(page).toMatch(/dynamic\(\(\) => import\("@\/components\/home\/showcase-tile"\)/);expect(page).not.toMatch(/^import [^;]*from "@\/components\/home\/showcase-tile";$/m);- for (const s of studios) expect(read("app", "(studio)", s, "page.tsx"), s).toContain(`examples={studioExamples("${s}")}`);+ const row = read("components", "studio", "example-row.tsx");+ expect(row).toMatch(/^import type \{ StudioExampleRow \} from "@\/lib\/studio-examples";$/m);+ expect(row).toMatch(/dynamic\(\(\) => import\("@\/components\/home\/showcase-tile"\)/);+ expect(row).not.toMatch(/^import [^;]*from "@\/components\/home\/showcase-tile";$/m);+ for (const [s, files] of Object.entries(ROW_IN)) {+ for (const f of files) {+ const code = read(...f);+ expect(code, f.join("/")).toMatch(/^import type \{ StudioExampleRow \} from "@\/lib\/studio-examples";$/m);+ expect(code, f.join("/")).not.toMatch(/^import (?!type )[^;]*from "@\/lib\/studio-examples";$/m);+ expect(code, `${s}: ${f.join("/")}`).toContain("<ExampleRow row={examples}");+ }+ }+ });++ it("is passed on by every page that shows a row", () => {+ const pageOf = (...p: string[]) => read("app", "(studio)", ...p, "page.tsx");+ for (const s of [...COMPOSER, ...HUBS, ...Object.keys(ROW_IN)]) expect(pageOf(s), s).toContain(`examples={studioExamples("${s}")}`);+ // Ad Multiplier shows Ads Studio's row; Mixed Media's reveal opens "How it works".+ expect(pageOf("ads", "multiplier")).toContain('examples={studioExamples("ads")}');+ expect(pageOf("mixed-media")).toContain('how={studioExamples("mixed-media")}');+ const mixed = read("components", "mixed-media", "mixed-studio.tsx");+ expect(mixed).toMatch(/<How onStart=\{[^}]+\} cloud=\{[^}]+\} reveal=\{how\} \/>/);+ expect(mixed).toMatch(/\{!!reveal\?\.tiles\.length && <HowReveal row=\{reveal\} \/>\}/);+ // A hub hands its row to its first mode's studio (the hub's own URL), as the Studio pages do.+ expect(read("components", "studio", "mode-switch-studio.tsx")).toMatch(/<ModeStudio [^>]*examples=\{examples\} \/>/);+ expect(read("components", "studio", "mode-studio.tsx")).toMatch(/<StudioPage .*examples=\{examples\} \/>/);});it("shows only once the feed is known to be empty, and a Video tile picks its move through the composer", () => {- const read = (...p: string[]) => fs.readFileSync(path.join(root, "src", ...p), "utf8");const page = read("components", "studio", "studio-page.tsx");expect(page).toMatch(/\{feed\.isSuccess && !hasItems && !!examples\?\.tiles\.length && <StudioExamples /);expect(page).toMatch(/onNavigate=\{pickHere\(e\.href\)\}/);diff --git a/tests/template-covers.test.ts b/tests/template-covers.test.tsindex 25aa0dd8..0d67ea2f 100644--- a/tests/template-covers.test.ts+++ b/tests/template-covers.test.ts@@ -12,6 +12,7 @@ import { TEMPLATES } from "@/lib/catalog/marketing";import { MIXED_PRESETS } from "@/lib/catalog/mixed-media";import { FASHION, PACKS } from "@/lib/catalog/packs";import { SHORTS_PRESETS } from "@/lib/catalog/shorts";+import { PRESET_PEAKS } from "@/lib/preset-peaks.generated";import { PRESET_PREVIEWS } from "@/lib/preset-previews.generated";import { TEMPLATE_GROUPS, templateCover, type TemplateGroup } from "@/lib/template-covers";import { TEMPLATE_COVERS } from "@/lib/template-covers.generated";@@ -79,8 +80,12 @@ describe("the template covers manifest", () => {});it("stays small with every tile listed: it ships with the studios' pages", () => {- const pick = (list: { poster: string; video?: string }[], i: number) => list[i % list.length];- const presetCovers = Object.values(PRESET_PREVIEWS);+ const pick = <T,>(list: T[], i: number) => list[i % list.length];+ // A tile that shows a preset's cover rests on its peak frame where it has one (the longer entry).+ const presetCovers = Object.entries(PRESET_PREVIEWS).map(([id, c]): Entry => {+ const peak = PRESET_PEAKS[id];+ return c.video && peak ? { poster: `/previews/presets/peak/${id}.jpg?v=${peak.v}`, video: c.video, at: peak.at } : c;+ });const v = (n: number) => n.toString(16).padStart(8, "0");const t = (key: string, n: number, more = "") => `/previews/templates/${key}${more}.jpg?v=${v(n)}`;const lines: string[] = [];@@ -124,7 +129,16 @@ describe.skipIf(!hasFfmpeg)("pnpm eval:covers --templates", () => {}};const run = (opts: Record<string, unknown> = {}) => gen.templateCoversFromMasters(masters, { publicDir, manifest, ...opts });- const sameId = Object.keys(PRESET_PREVIEWS)[0];+ // A preset with no peak frame, and a clip with one (a look that draws itself in, as Mixed Media's effects do).+ const sameId = Object.keys(PRESET_PREVIEWS).find((id) => !PRESET_PEAKS[id])!;+ const peakId = Object.keys(PRESET_PEAKS).find((id) => PRESET_PREVIEWS[id]?.video)!;+ /** The site's copy of a file under public/, in the sample public folder (in this order, so a 320 px copy is never older than its still). */+ const copyIn = (...urls: (string | undefined)[]) => {+ for (const url of urls.filter((u): u is string => !!u)) {+ fs.mkdirSync(path.dirname(fileOf(url, publicDir)), { recursive: true });+ fs.copyFileSync(fileOf(url), fileOf(url, publicDir));+ }+ };it("encodes stills, clips, reveals and frames, versions every URL, and lists a preset's cover as it is", () => {spawnSync("ffmpeg", ["-v", "error", "-y", "-i", SAMPLE_CLIP, "-frames:v", "1", still]);@@ -133,16 +147,23 @@ describe.skipIf(!hasFfmpeg)("pnpm eval:covers --templates", () => {put("shorts/shorts-warm-glow", { "clip.mp4": SAMPLE_CLIP, "meta.json": '{"rest":"end"}' });put("photodump/zen", { "still.png": still, "frame-2.png": still, "frame-3.png": still, "frame-4.png": still });put("mixed-media/mixed-sketch", { "meta.json": JSON.stringify({ same: sameId }) });- // The preset's own files, as the site has them.+ put("mixed-media/mixed-paper", { "meta.json": JSON.stringify({ same: peakId }) });+ // The presets' own files, as the site has them: their covers, and the one's peak frame.const p = PRESET_PREVIEWS[sameId];- for (const url of [p.poster, thumbOf(p.poster), p.video].filter((u): u is string => !!u)) {- fs.mkdirSync(path.dirname(fileOf(url, publicDir)), { recursive: true });- fs.copyFileSync(fileOf(url), fileOf(url, publicDir));- }+ copyIn(p.poster, thumbOf(p.poster), p.video);+ const peak = `/previews/presets/peak/${peakId}.jpg?v=${PRESET_PEAKS[peakId].v}`;+ copyIn(PRESET_PREVIEWS[peakId].video, peak, thumbOf(peak));put("nope/x", { "still.png": still });const r = run();- expect(r.covers.map((c) => c.key).sort()).toEqual(["marketing/m2-sticker-pop", "marketing/ps-sunlit-plinth", "mixed-media/mixed-sketch", "photodump/zen", "shorts/shorts-warm-glow"]);+ expect(r.covers.map((c) => c.key).sort()).toEqual([+ "marketing/m2-sticker-pop",+ "marketing/ps-sunlit-plinth",+ "mixed-media/mixed-paper",+ "mixed-media/mixed-sketch",+ "photodump/zen",+ "shorts/shorts-warm-glow",+ ]);expect(r.skipped).toEqual([{ key: "nope", why: expect.stringMatching(/not a tile group/) }]);const m = gen.readTemplateManifest(manifest);const out = (f: string) => path.join(publicDir, "previews", "templates", f);@@ -154,6 +175,9 @@ describe.skipIf(!hasFfmpeg)("pnpm eval:covers --templates", () => {expect(reveal.video).toMatch(VERSIONED);expect(m["photodump/zen"].frames).toEqual([2, 3, 4].map((k) => `/previews/templates/photodump/zen-${k}.jpg?v=${sha8(out(`photodump/zen-${k}.jpg`), out(`photodump/thumbs/zen-${k}.jpg`))}`));expect(m["mixed-media/mixed-sketch"]).toEqual({ poster: PRESET_PREVIEWS[sameId].poster, ...(PRESET_PREVIEWS[sameId].video && { video: PRESET_PREVIEWS[sameId].video }) });+ // A clip with a peak rests on it: the look, not the photo the clip starts from (and the versions stay the peak's own).+ expect(m["mixed-media/mixed-paper"]).toEqual({ poster: peak, video: PRESET_PREVIEWS[peakId].video, at: PRESET_PEAKS[peakId].at });+ expect(templateCover("mixed-media", "mixed-paper", { "mixed-media/mixed-paper": gen.slimEntry("mixed-media/mixed-paper", m["mixed-media/mixed-paper"]) } as never)).toMatchObject({ poster: peak, at: PRESET_PEAKS[peakId].at });// The file lists a plain cover by its versions alone.const text = fs.readFileSync(manifest, "utf8");expect(text).toMatch(/"marketing\/ps-sunlit-plinth": "[0-9a-f]{8}"/);@@ -175,11 +199,11 @@ describe.skipIf(!hasFfmpeg)("pnpm eval:covers --templates", () => {expect(fs.existsSync(path.join(publicDir, "previews/templates/photodump/zen-4.jpg"))).toBe(false);expect(fs.existsSync(path.join(publicDir, "previews/templates/photodump/thumbs/zen-4.jpg"))).toBe(false);// The other tiles stay as they were.- expect(Object.keys(m)).toHaveLength(5);+ expect(Object.keys(m)).toHaveLength(6);});it("versions the manifest from the files as they are (--versions), and finds nothing to do when it's current", () => {- expect(gen.versionTemplateCovers({ publicDir, manifest, dryRun: true })).toMatchObject({ entries: 5, changed: 0, thumbs: [], unversioned: [] });+ expect(gen.versionTemplateCovers({ publicDir, manifest, dryRun: true })).toMatchObject({ entries: 6, changed: 0, thumbs: [], unversioned: [] });// A still replaced by hand: its copy is made again first, then both get a new version.const poster = path.join(publicDir, "previews/templates/marketing/ps-sunlit-plinth.jpg");const was = gen.readTemplateManifest(manifest)["marketing/ps-sunlit-plinth"].poster;