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
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.jpgnew file mode 100644index 00000000..3ec58048Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_bag.jpg differdiff --git a/public/previews/templates/influencer/accessory-acc_glasses.jpg b/public/previews/templates/influencer/accessory-acc_glasses.jpgnew file mode 100644index 00000000..fd7f3d4bBinary files /dev/null and b/public/previews/templates/influencer/accessory-acc_glasses.jpg differdiff --git a/public/previews/templates/influencer/accessory-acc_hat.jpg b/public/previews/templates/influencer/accessory-acc_hat.jpgnew file mode 100644index 00000000..4ea4369bBinary files /dev/null and b/public/previews/templates/influencer/accessory-acc_hat.jpg differdiff --git a/public/previews/templates/influencer/accessory-acc_headphones.jpg b/public/previews/templates/influencer/accessory-acc_headphones.jpgnew file mode 100644index 00000000..1abca837Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_headphones.jpg differdiff --git a/public/previews/templates/influencer/accessory-acc_jewelry.jpg b/public/previews/templates/influencer/accessory-acc_jewelry.jpgnew file mode 100644index 00000000..86c3ee41Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_jewelry.jpg differdiff --git a/public/previews/templates/influencer/accessory-acc_none.jpg b/public/previews/templates/influencer/accessory-acc_none.jpgnew file mode 100644index 00000000..0de0ad91Binary files /dev/null and b/public/previews/templates/influencer/accessory-acc_none.jpg differdiff --git a/public/previews/templates/influencer/aesthetic-goth.jpg b/public/previews/templates/influencer/aesthetic-goth.jpgnew file mode 100644index 00000000..eb20d991Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-goth.jpg differdiff --git a/public/previews/templates/influencer/aesthetic-retro.jpg b/public/previews/templates/influencer/aesthetic-retro.jpgnew file mode 100644index 00000000..dee74674Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-retro.jpg differdiff --git a/public/previews/templates/influencer/aesthetic-suits.jpg b/public/previews/templates/influencer/aesthetic-suits.jpgnew file mode 100644index 00000000..dc47c036Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-suits.jpg differdiff --git a/public/previews/templates/influencer/aesthetic-theatrical.jpg b/public/previews/templates/influencer/aesthetic-theatrical.jpgnew file mode 100644index 00000000..fdf063d6Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-theatrical.jpg differdiff --git a/public/previews/templates/influencer/aesthetic-y2k.jpg b/public/previews/templates/influencer/aesthetic-y2k.jpgnew file mode 100644index 00000000..2b1a33a8Binary files /dev/null and b/public/previews/templates/influencer/aesthetic-y2k.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_afro.jpg b/public/previews/templates/influencer/hair-hair_afro.jpgnew file mode 100644index 00000000..ca785384Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_afro.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_bald.jpg b/public/previews/templates/influencer/hair-hair_bald.jpgnew file mode 100644index 00000000..24e13175Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_bald.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_bowl.jpg b/public/previews/templates/influencer/hair-hair_bowl.jpgnew file mode 100644index 00000000..a199b43aBinary files /dev/null and b/public/previews/templates/influencer/hair-hair_bowl.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_braids.jpg b/public/previews/templates/influencer/hair-hair_braids.jpgnew file mode 100644index 00000000..6e213b28Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_braids.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_long.jpg b/public/previews/templates/influencer/hair-hair_long.jpgnew file mode 100644index 00000000..0eee40ecBinary files /dev/null and b/public/previews/templates/influencer/hair-hair_long.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_pigtails.jpg b/public/previews/templates/influencer/hair-hair_pigtails.jpgnew file mode 100644index 00000000..b13e22cdBinary files /dev/null and b/public/previews/templates/influencer/hair-hair_pigtails.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_punk.jpg b/public/previews/templates/influencer/hair-hair_punk.jpgnew file mode 100644index 00000000..9850c83fBinary files /dev/null and b/public/previews/templates/influencer/hair-hair_punk.jpg differdiff --git a/public/previews/templates/influencer/hair-hair_short.jpg b/public/previews/templates/influencer/hair-hair_short.jpgnew file mode 100644index 00000000..8b7f4493Binary files /dev/null and b/public/previews/templates/influencer/hair-hair_short.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_beehive.jpg b/public/previews/templates/influencer/hair-hs_beehive.jpgnew file mode 100644index 00000000..37af3718Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_beehive.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_corkscrews.jpg b/public/previews/templates/influencer/hair-hs_corkscrews.jpgnew file mode 100644index 00000000..3fd8e6f8Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_corkscrews.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_dome.jpg b/public/previews/templates/influencer/hair-hs_dome.jpgnew file mode 100644index 00000000..98a49d3eBinary files /dev/null and b/public/previews/templates/influencer/hair-hs_dome.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_hedgehog.jpg b/public/previews/templates/influencer/hair-hs_hedgehog.jpgnew file mode 100644index 00000000..1d5d9fe8Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_hedgehog.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_horns.jpg b/public/previews/templates/influencer/hair-hs_horns.jpgnew file mode 100644index 00000000..d2a97371Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_horns.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_lampshade.jpg b/public/previews/templates/influencer/hair-hs_lampshade.jpgnew file mode 100644index 00000000..e6d59610Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_lampshade.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_mouse.jpg b/public/previews/templates/influencer/hair-hs_mouse.jpgnew file mode 100644index 00000000..f343cfa1Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_mouse.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_mushroom.jpg b/public/previews/templates/influencer/hair-hs_mushroom.jpgnew file mode 100644index 00000000..ebc163f3Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_mushroom.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_pompadour.jpg b/public/previews/templates/influencer/hair-hs_pompadour.jpgnew file mode 100644index 00000000..6ae836c9Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_pompadour.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_shelf.jpg b/public/previews/templates/influencer/hair-hs_shelf.jpgnew file mode 100644index 00000000..114c052aBinary files /dev/null and b/public/previews/templates/influencer/hair-hs_shelf.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_sidecoil.jpg b/public/previews/templates/influencer/hair-hs_sidecoil.jpgnew file mode 100644index 00000000..3ce0931bBinary files /dev/null and b/public/previews/templates/influencer/hair-hs_sidecoil.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_stairs.jpg b/public/previews/templates/influencer/hair-hs_stairs.jpgnew file mode 100644index 00000000..4e2430dcBinary files /dev/null and b/public/previews/templates/influencer/hair-hs_stairs.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_tufts.jpg b/public/previews/templates/influencer/hair-hs_tufts.jpgnew file mode 100644index 00000000..fb332e07Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_tufts.jpg differdiff --git a/public/previews/templates/influencer/hair-hs_wings.jpg b/public/previews/templates/influencer/hair-hs_wings.jpgnew file mode 100644index 00000000..d3716ac2Binary files /dev/null and b/public/previews/templates/influencer/hair-hs_wings.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpgnew file mode 100644index 00000000..2b05d419Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_bag.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpgnew file mode 100644index 00000000..4ca72677Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_glasses.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpgnew file mode 100644index 00000000..b33c1fbcBinary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_hat.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpgnew file mode 100644index 00000000..27459bedBinary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_headphones.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpgnew file mode 100644index 00000000..9c992cc9Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_jewelry.jpg differdiff --git a/public/previews/templates/influencer/thumbs/accessory-acc_none.jpg b/public/previews/templates/influencer/thumbs/accessory-acc_none.jpgnew file mode 100644index 00000000..1a6a1881Binary files /dev/null and b/public/previews/templates/influencer/thumbs/accessory-acc_none.jpg differdiff --git a/public/previews/templates/influencer/thumbs/aesthetic-goth.jpg b/public/previews/templates/influencer/thumbs/aesthetic-goth.jpgnew file mode 100644index 00000000..171d6c47Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-goth.jpg differdiff --git a/public/previews/templates/influencer/thumbs/aesthetic-retro.jpg b/public/previews/templates/influencer/thumbs/aesthetic-retro.jpgnew file mode 100644index 00000000..7f4f1ca3Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-retro.jpg differdiff --git a/public/previews/templates/influencer/thumbs/aesthetic-suits.jpg b/public/previews/templates/influencer/thumbs/aesthetic-suits.jpgnew file mode 100644index 00000000..5ab916f0Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-suits.jpg differdiff --git a/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpg b/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpgnew file mode 100644index 00000000..6b6b1807Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-theatrical.jpg differdiff --git a/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpg b/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpgnew file mode 100644index 00000000..61939bb8Binary files /dev/null and b/public/previews/templates/influencer/thumbs/aesthetic-y2k.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_afro.jpg b/public/previews/templates/influencer/thumbs/hair-hair_afro.jpgnew file mode 100644index 00000000..0f844d1bBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_afro.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_bald.jpg b/public/previews/templates/influencer/thumbs/hair-hair_bald.jpgnew file mode 100644index 00000000..5fc9949aBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_bald.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpg b/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpgnew file mode 100644index 00000000..658a51d6Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_bowl.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_braids.jpg b/public/previews/templates/influencer/thumbs/hair-hair_braids.jpgnew file mode 100644index 00000000..69fa3c71Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_braids.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_long.jpg b/public/previews/templates/influencer/thumbs/hair-hair_long.jpgnew file mode 100644index 00000000..a929d888Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_long.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpg b/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpgnew file mode 100644index 00000000..a6cabce8Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_pigtails.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_punk.jpg b/public/previews/templates/influencer/thumbs/hair-hair_punk.jpgnew file mode 100644index 00000000..d39a7bd3Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_punk.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hair_short.jpg b/public/previews/templates/influencer/thumbs/hair-hair_short.jpgnew file mode 100644index 00000000..07397956Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hair_short.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpg b/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpgnew file mode 100644index 00000000..1cec92abBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_beehive.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpg b/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpgnew file mode 100644index 00000000..5168d03aBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_corkscrews.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_dome.jpg b/public/previews/templates/influencer/thumbs/hair-hs_dome.jpgnew file mode 100644index 00000000..0f6a7f48Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_dome.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpg b/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpgnew file mode 100644index 00000000..df729b79Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_hedgehog.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_horns.jpg b/public/previews/templates/influencer/thumbs/hair-hs_horns.jpgnew file mode 100644index 00000000..f544d583Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_horns.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpg b/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpgnew file mode 100644index 00000000..1d2717f4Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_lampshade.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpg b/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpgnew file mode 100644index 00000000..a1e1d69aBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_mouse.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpg b/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpgnew file mode 100644index 00000000..0f72de86Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_mushroom.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpg b/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpgnew file mode 100644index 00000000..abbd6e36Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_pompadour.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpg b/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpgnew file mode 100644index 00000000..d53993c2Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_shelf.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpg b/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpgnew file mode 100644index 00000000..7acb1254Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_sidecoil.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpg b/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpgnew file mode 100644index 00000000..29bfbdfbBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_stairs.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpg b/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpgnew file mode 100644index 00000000..05152da7Binary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_tufts.jpg differdiff --git a/public/previews/templates/influencer/thumbs/hair-hs_wings.jpg b/public/previews/templates/influencer/thumbs/hair-hs_wings.jpgnew file mode 100644index 00000000..afa9628fBinary files /dev/null and b/public/previews/templates/influencer/thumbs/hair-hs_wings.jpg differdiff --git a/src/components/influencer/option-panel.tsx b/src/components/influencer/option-panel.tsxindex 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: InfluencerCconst 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.tsindex 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.tsindex 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.tsindex 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);});});