PageSourceSearch

https://tesana.com/assets/MarketplaceTagsPage-jDu5RoOL.js

js tesana.com collected 2026-10-09 22:41:01 UTC 6,466 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{u as x,d as k,N as f,L as h,v as j,ao as T,H as P}from"./index-BKzE8EQ8.js";import{r as n}from"./vendor-react-E98sgxjj.js";import{u as b}from"./vendor-query-bOUN_gKe.js";import{M as w,a as _,e as S,S as A}from"./MarketplaceSkeletons-DX_hq4ax.js";import{du as E}from"./vendor-fa-Bn2dnpnC.js";import{G as N,g as L}from"./GameRow-BewUztqS.js";import"./FeaturedCard-CyVcJ61O.js";import"./DashboardLayout-CkgbJsW1.js";import"./useLocaleNavigate-BNriJdRU.js";import"./SidebarContext-BL6EZ3Xi.js";import"./Avatar-B60wpoS5.js";import"./MediaImage-DKgx-nW4.js";import"./Tooltip-C8AvPGtA.js";import"./SiteBanner-DKwegxEe.js";import"./index-BxtVm1Yj.js";import"./exploreHandoff-RQymaHkp.js";import"./AuthShell-DPeun0C_.js";import"./AuthPanel-B4zt6SJ5.js";import"./pendingReferral-B4JPXhl_.js";import"./LaunchPromoClips-eRoWsyBt.js";import"./index-i1nPji9k.js";import"./paywall-CG7xVZtx.js";import"./plans-CbMJY2XS.js";import"./pricingExperiments-zMZby8z7.js";import"./organization-BuGhuc22.js";import"./useDevModelsVisible-BHgONHQI.js";import"./LandingFooter-DjCjfhwD.js";import"./UserAvatarMenu-BoKKInby.js";import"./tabBarStore-624ukDKJ.js";import"./socialLinks-DmmZmq5v.js";
1import"./useMarketplaceTaxonomy-NDNAXXOe.js";import"./BadgeRow-Dfwgl-tB.js";import"./PlayingNowBadge-CH2HUoBo.js";import"./playingNowApi-CB_pr25U.js";import"./MediaVideo-CBR0-TKg.js";const V={genre:"Genres",perspective:"Perspective",mechanic:"Mechanics",visual_style:"Visual Style",feature:"Features",mood:"Mood",other:"More"},M=n.memo(function({groups:t,selectedSlug:l,onSelect:i}){const{t:r}=x("marketplace");return e.jsx("div",{className:"space-y-6",children:t.map(o=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs uppercase text-muted-foreground mb-2",children:r(`tagsPage.groups.${o.group}`,{defaultValue:V[o.group]||o.group})}),e.jsx("div",{className:"flex flex-wrap gap-2",children:o.tags.map(s=>e.jsxs("button",{type:"button",onClick:()=>i(s.slug),"aria-pressed":l===s.slug,className:k("inline-flex items-center gap-1.5 px-2.5 h-8 rounded-md text-sm transition-colors cursor-pointer border",l===s.slug?"bg-secondary border-border-hover text-foreground":"border-border text-muted-foreground hover:text-foreground hover:bg-secondary/50"),children:[e.jsx("span",{children:s.name}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.game_count})]},s.slug))})]},o.group))})}),C=6,G=n.memo(function({slug:t,name:l}){const{t:i}=x("marketplace"),{data:r,isLoading:o}=b({queryKey:["marketplace-tag-preview",t],queryFn:()=>f.getTag(t,{page_size:6,sort:"popular"}),enabled:!!t,staleTime:5*60*1e3});if(!t)return e.jsx("div",{className:"rounded-md border border-border bg-card p-8 text-center",children:e.jsx("p",{className:"text-base text-muted-foreground",children:i("tagsPage.hint",{defaultValue:"Select a tag to preview its top games."})})});const s=r?.results??[],m=r?.tag?.name??l??"…";return e.jsxs("div",{className:"rounded-md border border-border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-lg-sm md:text-lg text-foreground truncate",children:m}),e.jsxs(h,{to:`/play/tag/${t}`,className:"text-sm text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center",children:[i("tagsPage.seeAll",{defaultValue:"See all"}),e.jsx(E,{icon:["fas","chevron-right"],className:"ml-1 text-[0.7em] mt-[0.1em]"})]})]}),o?e.jsx("div",{className:"grid grid-cols-1 gap-6",children:Array.from({length:C}).map((a,d)=>e.jsx(N,{size:"small"},d))}):s.length===0?e.jsx("p",{className:"text-base text-muted-foreground py-8 text-center",children:i("tagsPage.empty",{defaultValue:"No games for this tag yet."})}):e.jsx("ul",{className:"grid grid-cols-1 gap-6",children:s.map((a,d)=>e.jsx("li",{children:e.jsx(L,{game:a,size:"small",onClick:()=>j("rail_card_click",{rail_key:"tag_preview",game_id:a.id,position:d})})},a.id))}),e.jsx("div",{className:"mt-4",children:e.jsxs(h,{to:`/play/tag/${t}`,className:"text-sm text-muted-foreground hover:text-foreground flex items-center justify-center bg-foreground
1/6 rounded-md px-3 h-9 hover:bg-foreground/10 transition-colors",children:[i("tagsPage.seeAll",{defaultValue:"See all"})," in ",m]})})]})});function je(){const c=T(),{t}=x("marketplace"),[l,i]=n.useState(null),{data:r,isLoading:o,isError:s}=b({queryKey:["marketplace-tags-index"],queryFn:()=>f.getTagsIndex(),staleTime:10*60*1e3});n.useEffect(()=>{j("marketplace_view",{surface:"tags_index"})},[]);const m=n.useMemo(()=>r?.groups?.[0]?.tags?.[0]?.slug??null,[r]),a=l??m,d=n.useMemo(()=>{if(!r||!a)return null;for(const g of r.groups){const p=g.tags.find(u=>u.slug===a);if(p)return p.name}return null},[r,a]),v=t("tagsPage.metaTitle",{defaultValue:"Browse all tags | Play on Tesana"}),y=t("tagsPage.metaDescription",{defaultValue:"Browse every genre, mechanic, and style of game made with AI on Tesana."});return e.jsx(w,{children:({topPad:g})=>e.jsxs("div",{className:`${_} ${g}`,children:[e.jsxs(P,{children:[e.jsx("title",{children:v}),e.jsx("meta",{name:"description",content:y}),typeof window>"u"?"":e.jsx("link",{rel:"canonical",href:c})]}),e.jsxs("header",{className:"mb-10 md:mb-12",children:[e.jsx("h1",{className:"text-h3-sm md:text-h3 text-foreground tracking-tight",children:t("tagsPage.heading",{defaultValue:"All Tags"})}),e.jsx("p",{className:"text-base text-muted-foreground mt-2 max-w-2xl",children:t("tagsPage.subtitle",{defaultValue:"Find your next game by genre, mechanic, perspective, mood, and more."})})]}),o&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_420px] gap-6 md:gap-8 items-start",children:[e.jsx(S,{}),e.jsxs("aside",{className:"hidden lg:block rounded-md border border-border bg-card p-4",children:[e.jsx(A,{className:"h-5 w-40 mb-4"}),e.jsx("div",{className:"grid grid-cols-1 gap-6",children:Array.from({length:6}).map((p,u)=>e.jsx(N,{size:"small"},u))})]})]}),s&&e.jsx("div",{"data-prerender-error":"1",className:"text-center py-12 text-base text-muted-foreground",children:t("tagsPage.error",{defaultValue:"Could not load tags right now."})}),r&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_420px] gap-6 md:gap-8 items-start",children:[e.jsx("div",{className:"lg:sticky lg:top-6 self-start",children:e.jsx(M,{groups:r.groups,selectedSlug:a,onSelect:i})}),e.jsx("aside",{className:"hidden lg:block",children:e.jsx(G,{slug:a,name:d})})]})]})})}export{je as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.