Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

AI Influencer: Accessories choices show photo cards

Adarsh818ea57d53a8
diff --git a/public/previews/templates/influencer/accessory-acc_bag.jpg b/public/previews/templates/influencer/accessory-acc_bag.jpg
new file mode 100644
index 00000000..3ec58048
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_bag.jpg differ
diff --git a/public/previews/templates/influencer/accessory-acc_glasses.jpg b/public/previews/templates/influencer/accessory-acc_glasses.jpg
new file mode 100644
index 00000000..fd7f3d4b
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_glasses.jpg differ
diff --git a/public/previews/templates/influencer/accessory-acc_hat.jpg b/public/previews/templates/influencer/accessory-acc_hat.jpg
new file mode 100644
index 00000000..4ea4369b
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_hat.jpg differ
diff --git a/public/previews/templates/influencer/accessory-acc_headphones.jpg b/public/previews/templates/influencer/accessory-acc_headphones.jpg
new file mode 100644
index 00000000..1abca837
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_headphones.jpg differ
diff --git a/public/previews/templates/influencer/accessory-acc_jewelry.jpg b/public/previews/templates/influencer/accessory-acc_jewelry.jpg
new file mode 100644
index 00000000..86c3ee41
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_jewelry.jpg differ
diff --git a/public/previews/templates/influencer/accessory-acc_none.jpg b/public/previews/templates/influencer/accessory-acc_none.jpg
new file mode 100644
index 00000000..0de0ad91
Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_none.jpg differ
diff --git a/public/previews/templates/influencer/aesthetic-goth.jpg b/public/previews/templates/influencer/aesthetic-goth.jpg
new file mode 100644
index 00000000..eb20d991
Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-goth.jpg differ
diff --git a/public/previews/templates/influencer/aesthetic-retro.jpg b/public/previews/templates/influencer/aesthetic-retro.jpg
new file mode 100644
index 00000000..dee74674
Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-retro.jpg differ
diff --git a/public/previews/templates/influencer/aesthetic-suits.jpg b/public/previews/templates/influencer/aesthetic-suits.jpg
new file mode 100644
index 00000000..dc47c036
Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-suits.jpg differ
diff --git a/public/previews/templates/influencer/aesthetic-theatrical.jpg b/public/previews/templates/influencer/aesthetic-theatrical.jpg
new file mode 100644
index 00000000..fdf063d6
Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-theatrical.jpg differ
diff --git a/public/previews/templates/influencer/aesthetic-y2k.jpg b/public/previews/templates/influencer/aesthetic-y2k.jpg
new file mode 100644
index 00000000..2b1a33a8
Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-y2k.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_afro.jpg b/public/previews/templates/influencer/hair-hair_afro.jpg
new file mode 100644
index 00000000..ca785384
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_afro.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_bald.jpg b/public/previews/templates/influencer/hair-hair_bald.jpg
new file mode 100644
index 00000000..24e13175
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_bald.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_bowl.jpg b/public/previews/templates/influencer/hair-hair_bowl.jpg
new file mode 100644
index 00000000..a199b43a
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_bowl.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_braids.jpg b/public/previews/templates/influencer/hair-hair_braids.jpg
new file mode 100644
index 00000000..6e213b28
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_braids.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_long.jpg b/public/previews/templates/influencer/hair-hair_long.jpg
new file mode 100644
index 00000000..0eee40ec
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_long.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_pigtails.jpg b/public/previews/templates/influencer/hair-hair_pigtails.jpg
new file mode 100644
index 00000000..b13e22cd
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_pigtails.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_punk.jpg b/public/previews/templates/influencer/hair-hair_punk.jpg
new file mode 100644
index 00000000..9850c83f
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_punk.jpg differ
diff --git a/public/previews/templates/influencer/hair-hair_short.jpg b/public/previews/templates/influencer/hair-hair_short.jpg
new file mode 100644
index 00000000..8b7f4493
Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_short.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_beehive.jpg b/public/previews/templates/influencer/hair-hs_beehive.jpg
new file mode 100644
index 00000000..37af3718
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_beehive.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_corkscrews.jpg b/public/previews/templates/influencer/hair-hs_corkscrews.jpg
new file mode 100644
index 00000000..3fd8e6f8
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_corkscrews.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_dome.jpg b/public/previews/templates/influencer/hair-hs_dome.jpg
new file mode 100644
index 00000000..98a49d3e
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_dome.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_hedgehog.jpg b/public/previews/templates/influencer/hair-hs_hedgehog.jpg
new file mode 100644
index 00000000..1d5d9fe8
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_hedgehog.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_horns.jpg b/public/previews/templates/influencer/hair-hs_horns.jpg
new file mode 100644
index 00000000..d2a97371
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_horns.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_lampshade.jpg b/public/previews/templates/influencer/hair-hs_lampshade.jpg
new file mode 100644
index 00000000..e6d59610
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_lampshade.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_mouse.jpg b/public/previews/templates/influencer/hair-hs_mouse.jpg
new file mode 100644
index 00000000..f343cfa1
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_mouse.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_mushroom.jpg b/public/previews/templates/influencer/hair-hs_mushroom.jpg
new file mode 100644
index 00000000..ebc163f3
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_mushroom.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_pompadour.jpg b/public/previews/templates/influencer/hair-hs_pompadour.jpg
new file mode 100644
index 00000000..6ae836c9
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_pompadour.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_shelf.jpg b/public/previews/templates/influencer/hair-hs_shelf.jpg
new file mode 100644
index 00000000..114c052a
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_shelf.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_sidecoil.jpg b/public/previews/templates/influencer/hair-hs_sidecoil.jpg
new file mode 100644
index 00000000..3ce0931b
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_sidecoil.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_stairs.jpg b/public/previews/templates/influencer/hair-hs_stairs.jpg
new file mode 100644
index 00000000..4e2430dc
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_stairs.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_tufts.jpg b/public/previews/templates/influencer/hair-hs_tufts.jpg
new file mode 100644
index 00000000..fb332e07
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_tufts.jpg differ
diff --git a/public/previews/templates/influencer/hair-hs_wings.jpg b/public/previews/templates/influencer/hair-hs_wings.jpg
new file mode 100644
index 00000000..d3716ac2
Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_wings.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpg
new file mode 100644
index 00000000..2b05d419
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpg
new file mode 100644
index 00000000..4ca72677
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpg
new file mode 100644
index 00000000..b33c1fbc
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpg
new file mode 100644
index 00000000..27459bed
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpg
new file mode 100644
index 00000000..9c992cc9
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/accessory-acc_none.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_none.jpg
new file mode 100644
index 00000000..1a6a1881
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_none.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/aesthetic-goth.jpg b/public/previews/templates/influencer/thumbs/aesthetic-goth.jpg
new file mode 100644
index 00000000..171d6c47
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-goth.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/aesthetic-retro.jpg b/public/previews/templates/influencer/thumbs/aesthetic-retro.jpg
new file mode 100644
index 00000000..7f4f1ca3
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-retro.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/aesthetic-suits.jpg b/public/previews/templates/influencer/thumbs/aesthetic-suits.jpg
new file mode 100644
index 00000000..5ab916f0
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-suits.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpg b/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpg
new file mode 100644
index 00000000..6b6b1807
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpg b/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpg
new file mode 100644
index 00000000..61939bb8
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_afro.jpg b/public/previews/templates/influencer/thumbs/hair-hair_afro.jpg
new file mode 100644
index 00000000..0f844d1b
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_afro.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_bald.jpg b/public/previews/templates/influencer/thumbs/hair-hair_bald.jpg
new file mode 100644
index 00000000..5fc9949a
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_bald.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpg b/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpg
new file mode 100644
index 00000000..658a51d6
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_braids.jpg b/public/previews/templates/influencer/thumbs/hair-hair_braids.jpg
new file mode 100644
index 00000000..69fa3c71
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_braids.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_long.jpg b/public/previews/templates/influencer/thumbs/hair-hair_long.jpg
new file mode 100644
index 00000000..a929d888
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_long.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpg b/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpg
new file mode 100644
index 00000000..a6cabce8
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_punk.jpg b/public/previews/templates/influencer/thumbs/hair-hair_punk.jpg
new file mode 100644
index 00000000..d39a7bd3
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_punk.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hair_short.jpg b/public/previews/templates/influencer/thumbs/hair-hair_short.jpg
new file mode 100644
index 00000000..07397956
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_short.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpg b/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpg
new file mode 100644
index 00000000..1cec92ab
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpg b/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpg
new file mode 100644
index 00000000..5168d03a
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_dome.jpg b/public/previews/templates/influencer/thumbs/hair-hs_dome.jpg
new file mode 100644
index 00000000..0f6a7f48
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_dome.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpg b/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpg
new file mode 100644
index 00000000..df729b79
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_horns.jpg b/public/previews/templates/influencer/thumbs/hair-hs_horns.jpg
new file mode 100644
index 00000000..f544d583
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_horns.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpg b/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpg
new file mode 100644
index 00000000..1d2717f4
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpg b/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpg
new file mode 100644
index 00000000..a1e1d69a
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpg b/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpg
new file mode 100644
index 00000000..0f72de86
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpg b/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpg
new file mode 100644
index 00000000..abbd6e36
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpg b/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpg
new file mode 100644
index 00000000..d53993c2
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpg b/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpg
new file mode 100644
index 00000000..7acb1254
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpg b/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpg
new file mode 100644
index 00000000..29bfbdfb
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpg b/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpg
new file mode 100644
index 00000000..05152da7
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpg differ
diff --git a/public/previews/templates/influencer/thumbs/hair-hs_wings.jpg b/public/previews/templates/influencer/thumbs/hair-hs_wings.jpg
new file mode 100644
index 00000000..afa9628f
Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_wings.jpg differ
diff --git a/src/components/influencer/option-panel.tsx b/src/components/influencer/option-panel.tsx
index d926e8da..c98ad7d0 100644
--- a/src/components/influencer/option-panel.tsx
+++ b/src/components/influencer/option-panel.tsx
@@ -113,6 +113,13 @@ const CREATURE_PHOTOS = allCovered(CREATURE_TYPES.map((c) => c.id));
/** A photo card's width: a third of the panel. */
const PHOTO_SIZES = "(min-width: 1024px) 200px, 33vw";
+/** The categories whose options a portrait shows best: Hairstyle, Style and Accessories. */
+const PHOTO_CATEGORIES = new Set(["hair", "aesthetic", "accessory"]);
+/** An option's real cover ("influencer/<category>-<option id>"), or undefined. */
+export const optionCover = (category: string, id: string) => (PHOTO_CATEGORIES.has(category) ? templateCover("influencer", `${category}-${id}`) : undefined);
+/** A category shows photo cards only when every option it shows has its cover; otherwise its icon tiles. */
+export const optionPhotos = (c: InfluencerCategory) => c.options.length > 0 && c.options.every((o) => optionCover(c.id, o.id));
+
/** The Character type panel: three human tiers, six creature types, then the species and body colour. */
export function TierPanel({ state, onTier, onSpecies, onBodyColor }: { state: InfluencerState; onTier: (t: InfluencerTier) => void; onSpecies: (s?: string) => void; onBodyColor: (c?: string) => void }) {
const creature = CREATURE_TYPES.find((c) => c.id === state.tier);
@@ -246,6 +253,44 @@ export function OptionTiles({ category, state, onPick }: { category: InfluencerC
const picked = state.picks[category.id] ?? [];
const Icon = CATEGORY_ICON[category.id] ?? Sparkles;
const colour = category.kind === "color";
+ if (optionPhotos(category)) {
+ return (
+ <div role="group" aria-label={category.label} className="grid grid-cols-3 gap-2">
+ {category.options.map((o) => {
+ const on = picked.includes(o.id);
+ const conflict = on ? null : conflictFor(state, category.id, o.id);
+ const cover = optionCover(category.id, o.id)!;
+ return (
+ <button
+ key={o.id}
+ type="button"
+ aria-pressed={on}
+ aria-disabled={conflict ? true : undefined}
+ title={conflict ?? undefined}
+ onClick={() => onPick(o.id)}
+ className={cn(
+ "group relative block aspect-[4/5] min-w-0 overflow-hidden rounded-xl bg-muted text-left ring-offset-2 ring-offset-background outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ on && "ring-2 ring-primary",
+ conflict && "opacity-50",
+ )}
+ >
+ <CoverImg frame={cover.frames[0]} sizes={PHOTO_SIZES} className="absolute inset-0 transition-transform duration-300 group-hover:scale-[1.03]" />
+ <span aria-hidden className="absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/65 to-transparent" />
+ <span className="absolute inset-x-2 bottom-2 min-w-0 text-white drop-shadow-sm">
+ <span className="block truncate text-[13px] font-medium">{o.label}</span>
+ </span>
+ {on && (
+ <span aria-hidden className="absolute top-1.5 right-1.5 grid size-5 place-items-center rounded-full bg-primary text-primary-foreground">
+ <Check className="size-3" />
+ </span>
+ )}
+ {conflict && <span className="sr-only">. {conflict}</span>}
+ </button>
+ );
+ })}
+ </div>
+ );
+ }
return (
<div role="group" aria-label={category.label} className="grid grid-cols-2 gap-2 sm:grid-cols-3">
{category.options.map((o) => {
diff --git a/src/lib/template-covers.generated.ts b/src/lib/template-covers.generated.ts
index 94502367..8686bd29 100644
--- a/src/lib/template-covers.generated.ts
+++ b/src/lib/template-covers.generated.ts
@@ -28,6 +28,39 @@ export const TEMPLATE_COVERS: Record<string, TemplateCoverEntry> = {
"fashion/street-style-paparazzi": {"poster":"/previews/templates/fashion/street-style-paparazzi.jpg?v=234bd621","frames":["/previews/templates/fashion/street-style-paparazzi-2.jpg?v=7a819d47","/previews/templates/fashion/street-style-paparazzi-3.jpg?v=50dd7234"]},
"fashion/ultra-bold": {"poster":"/previews/templates/fashion/ultra-bold.jpg?v=f8fe8f25","frames":["/previews/templates/fashion/ultra-bold-2.jpg?v=f6e59833","/previews/templates/fashion/ultra-bold-3.jpg?v=7f62ff3b"]},
"fashion/view-from-the-top": {"poster":"/previews/templates/fashion/view-from-the-top.jpg?v=df7c92d1","frames":["/previews/templates/fashion/view-from-the-top-2.jpg?v=c4dc1eec","/previews/templates/fashion/view-from-the-top-3.jpg?v=d98022dd"]},
+ "influencer/accessory-acc_bag": "691d5c30",
+ "influencer/accessory-acc_glasses": "08870d0c",
+ "influencer/accessory-acc_hat": "199b2891",
+ "influencer/accessory-acc_headphones": "93714622",
+ "influencer/accessory-acc_jewelry": "77d4bdc9",
+ "influencer/accessory-acc_none": "dce40317",
+ "influencer/aesthetic-goth": "70990589",
+ "influencer/aesthetic-retro": "16f2d358",
+ "influencer/aesthetic-suits": "f880c495",
+ "influencer/aesthetic-theatrical": "4bd262cf",
+ "influencer/aesthetic-y2k": "d2662d31",
+ "influencer/hair-hair_afro": "71ae17e5",
+ "influencer/hair-hair_bald": "eb9147a0",
+ "influencer/hair-hair_bowl": "7bbb060d",
+ "influencer/hair-hair_braids": "62518dbe",
+ "influencer/hair-hair_long": "a5f7613a",
+ "influencer/hair-hair_pigtails": "eaee95f4",
+ "influencer/hair-hair_punk": "b7ebecfe",
+ "influencer/hair-hair_short": "5a53a2f1",
+ "influencer/hair-hs_beehive": "2ae5997a",
+ "influencer/hair-hs_corkscrews": "5cff8bf5",
+ "influencer/hair-hs_dome": "a9fbed9e",
+ "influencer/hair-hs_hedgehog": "1e6183bd",
+ "influencer/hair-hs_horns": "c4a0a5ab",
+ "influencer/hair-hs_lampshade": "dd84ef4c",
+ "influencer/hair-hs_mouse": "2923f1fe",
+ "influencer/hair-hs_mushroom": "c4526ef9",
+ "influencer/hair-hs_pompadour": "a984cc9b",
+ "influencer/hair-hs_shelf": "4e21d303",
+ "influencer/hair-hs_sidecoil": "ca29286d",
+ "influencer/hair-hs_stairs": "ca30f7e1",
+ "influencer/hair-hs_tufts": "f17ddb0f",
+ "influencer/hair-hs_wings": "519c976f",
"influencer/tier-birds": "3de65fe3",
"influencer/tier-capybaras": "69e7c980",
"influencer/tier-cats": "7990f28e",
diff --git a/tests/template-cover-tiles.test.ts b/tests/template-cover-tiles.test.ts
index 721de51c..7436c029 100644
--- a/tests/template-cover-tiles.test.ts
+++ b/tests/template-cover-tiles.test.ts
@@ -32,6 +32,10 @@ vi.mock("@/lib/template-covers.generated", () => ({
"influencer/tier-freak": "920a1b26",
"influencer/tier-total": "0a1b2c37",
"influencer/tier-cats": "1b2c3d48",
+ // Every accessory has its cover; of the hairstyles only two.
+ ...Object.fromEntries(["acc_none", "acc_glasses", "acc_headphones", "acc_jewelry", "acc_hat", "acc_bag"].map((id, k) => [`influencer/accessory-${id}`, `5a6b7c8${k}`])),
+ "influencer/hair-hair_bald": "6b7c8d90",
+ "influencer/hair-hair_afro": "7c8d9ea1",
"examples/character-sheet": "2c3d4e59",
"examples/storyboard-heist": {
poster: "/previews/templates/examples/storyboard-heist.jpg?v=3d4e5f6a",
@@ -61,8 +65,8 @@ const { PRESETS } = await import("@/lib/catalog/content-factory");
const { templateCover } = await import("@/lib/template-covers");
const { CuratedCover } = await import("@/components/moodboards/cards");
const { CURATED_SETS, curatedLook } = await import("@/components/moodboards/logic");
-const { TierPanel } = await import("@/components/influencer/option-panel");
-const { INFLUENCER_START } = await import("@/lib/influencer");
+const { OptionTiles, TierPanel } = await import("@/components/influencer/option-panel");
+const { categoriesFor, INFLUENCER_START } = await import("@/lib/influencer");
const { BoardExample, ElementsExample, SheetExample, hasBoardExample } = await import("@/components/empty-examples");
/** A component's markup as the server renders it first (a memo component or a function). */
@@ -256,6 +260,26 @@ describe("AI Influencer's character types", () => {
});
});
+describe("AI Influencer's option tiles", () => {
+ const tiles = (id: string, picks: Record<string, string[]> = {}) =>
+ html(OptionTiles, { category: categoriesFor("normal").find((c) => c.id === id)!, state: { ...INFLUENCER_START, picks }, onPick: noop });
+
+ it("show photo cards for a category whose every option has its cover, the picked ones pressed", () => {
+ const h = tiles("accessory", { accessory: ["acc_hat"] });
+ expect(h.match(/<img/g)).toHaveLength(6);
+ expect(h).toContain('src="/previews/templates/influencer/accessory-acc_none.jpg?v=5a6b7c80"');
+ expect(h).toContain("/previews/templates/influencer/thumbs/accessory-acc_bag.jpg?v=5a6b7c85 320w");
+ expect(h).toMatch(/aria-pressed="true"[^>]*>(?:(?!<\/button>).)*accessory-acc_hat/);
+ expect(h).toContain(">Headphones<");
+ expect(unversioned(h)).toEqual([]);
+ });
+
+ it("keep the icon tiles for a category with options still waiting for a cover, and for categories a photo doesn't show", () => {
+ expect(tiles("hair")).not.toContain("<img");
+ expect(tiles("body_type")).not.toContain("<img");
+ });
+});
+
describe("The empty pages' examples", () => {
it("show Character Sheet's example sheet with its chip", () => {
const h = html(SheetExample, {});
diff --git a/tests/template-covers.test.ts b/tests/template-covers.test.ts
index 66972f89..44e9900f 100644
--- a/tests/template-covers.test.ts
+++ b/tests/template-covers.test.ts
@@ -12,7 +12,7 @@ import { MIXED_PRESETS } from "@/lib/catalog/mixed-media";
import { FASHION, PACKS } from "@/lib/catalog/packs";
import { SHORTS_PRESETS } from "@/lib/catalog/shorts";
import { lookSet } from "@/lib/catalog/soul-cards";
-import { CREATURE_TYPES, HUMAN_TIERS } from "@/lib/influencer";
+import { CREATURE_TYPES, getCategory, HUMAN_TIERS } from "@/lib/influencer";
import { PRESET_PEAKS } from "@/lib/preset-peaks.generated";
import { PRESET_PREVIEWS } from "@/lib/preset-previews.generated";
import { STARTERS } from "@/lib/starters/catalog";
@@ -53,8 +53,12 @@ const TILES: Record<TemplateGroup, string[]> = {
explainer: [...EXPLAINER_STYLE_IDS],
// Fuobe Soul's looks, Soul 2.0's and Soul's, by look id.
soul: [...lookSet("v2").items, ...lookSet("v1").items].map((c) => c.id),
- // AI Influencer's character types as tier-<type>.
- influencer: [...HUMAN_TIERS, ...CREATURE_TYPES].map((t) => `tier-${t.id}`),
+ // AI Influencer's character types as tier-<type>, and its Hairstyle, Style and Accessories options as
+ // <category>-<option id>.
+ influencer: [
+ ...[...HUMAN_TIERS, ...CREATURE_TYPES].map((t) => `tier-${t.id}`),
+ ...["hair", "aesthetic", "accessory"].flatMap((c) => getCategory(c)!.options.map((o) => `${c}-${o.id}`)),
+ ],
// The example pictures of the empty pages: Character Sheet, Storyboard (six frames), Elements (four pictures).
examples: ["character-sheet", "storyboard-heist", "element-maya", "element-rooftop-bar", "element-aurora", "element-together"],
// The studios' ready-made starters, by starter id (src/lib/starters/catalog.ts).
@@ -136,12 +140,13 @@ describe("the template covers manifest", () => {
}
}
// The studios' tiles (254, with Keyframes → animation, Outfit lookbook, Music video and Marketing's twelve code-drawn
- // templates), Fuobe Soul's looks (139), AI Influencer's types (9), the empty pages' examples (6) and the studios'
+ // templates), Fuobe Soul's looks (139), AI Influencer's types (9) and options (40), the empty pages' examples (6) and the studios'
// ready-made starters with a cover of their own (24).
- expect(lines).toHaveLength(254 + 139 + 9 + 6 + 24);
+ expect(lines).toHaveLength(254 + 139 + 9 + 40 + 6 + 24);
const text = `{\n${lines.join(",\n")}\n}`;
- // More preset covers are clips now (a poster and a video each), so the shared preset entries are longer.
- expect(text.length).toBeLessThan(38_000);
+ // More preset covers are clips now (a poster and a video each), so the shared preset entries are longer; AI
+ // Influencer's option photos add 40 short entries.
+ expect(text.length).toBeLessThan(40_000);
expect(gzipSync(text).length).toBeLessThan(8_000);
});
});