PageSourceSearch

https://projectmateria.com/assets/wishlist-Bc72KAyn.js

js projectmateria.com collected 2026-10-08 04:31:45 UTC 3,342 bytes, 1 lines download raw bytes

1import{u as d,a as u,r as f,j as s,H as p,L as n,S as v,s as b,b as g,f as j,c as y,T as N,d as w}from"./index-Ci53hMpI.js";function k(){const t=d(e=>e.items),i=d(e=>e.remove),c=d(e=>e.clear),h=u(e=>e.addItem),[l,o]=f.useState(null),x=async e=>{o(e);try{const r=await w(e);if(!r)return;const a=r.variants.edges.find(m=>m.node.availableForSale)?.node??r.variants.edges[0]?.node;if(!a)return;await h({product:{node:r},variantId:a.id,variantTitle:a.title,price:a.price,quantity:1,selectedOptions:a.selectedOptions??[]})}finally{o(null)}};return s.jsx("div",{className:"pt-12 md:pt-20 pb-24",children:s.jsxs("div",{className:"container-rail",children:[s.jsx("div",{className:"eyebrow text-muted-foreground",children:"Saved by you"}),s.jsx("h1",{className:"display-xl mt-4",children:"Wishlist."}),s.jsx("p",{className:"mt-6 max-w-xl text-foreground/80",children:"Pieces you've saved are stored privately in this browser. Add them to cart when you're ready."}),t.length===0?s.jsxs("div",{className:"mt-16 py-24 border border-dashed border-border text-center",children:[s.jsx(p,{className:"h-8 w-8 text-muted-foreground mx-auto mb-4",strokeWidth:1}),s.jsx("p",{className:"font-display text-2xl mb-2",children:"Nothing saved yet."}),s.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Tap the heart on any object to save it."}),s.jsx(n,{to:"/objects",className:"eyebrow underline underline-offset-4 hover:text-[var(--clay)]",children:"Browse objects →"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mt-10 flex items-center justify-between",children:[s.jsxs("div",{className:"eyebrow text-muted-foreground",children:[t.length," piece",t.length===1?"":"s"," saved"]}),s.jsx("button",{onClick:c,className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-4",children:"Clear all"})]}),s.jsx("ul",{className:"mt-6 divide-y divide-border border-y border-border",children:t.map(e=>s.jsxs("li",{className:"flex items-center gap-4 py-5",children:[s.jsx(n,{to:"/product/$handle",params:{handle:e.handle},className:"w-20 h-24 bg-muted overflow-hidden flex-shrink-0",children:e.image&&s.jsx("img",{src:g(e.image,200),srcSet:b(e.image,[120,200,320]),sizes:v.thumbSmall,alt:e.title,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(n,{to:"/product/$handle",params:{handle:e.handle},className:"font-display text-lg leading-tight hover:text-[var(--clay)] transition-colors",children:e.title}),e.vendor&&s.jsx("div",{className:"eyebrow text-muted-foreground text-xs mt-1",children:e.vendor}),e.price&&s.jsx("div",{className:"text-sm mt-1",children:j(e.price.amount,e.price.currencyCode)})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:()=>x(e.handle),disabled:l===e.handle,className:"h-10 px-4 bg-foreground text-background eyebrow hover:bg-[var(--cocoa)] transition-colors disabled:opacity-50 flex items-center",children:l===e.handle?s.jsx(y,{className:"h-4 w-4 animate-spin"}):"Add to cart"}),s.jsx("button",{onClick:()=>i(e.handle),"aria-label":"Remove from wishlist",className:"h-10 w-10 inline-flex items-center justify-center text-muted-foreground hover:text-foreground",children:s.jsx(N,{className:"h-4 w-4"})})]})]},e.handle))})]})]})})}export{k as component};

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.