{"version":3,"file":"NotesWithin.CfTodfHY.mjs","names":["useRef","useState","useMemo","__esmMin","pe","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","te","_e","p","init_jsx_runtime","ce","de","init_framer_DymZktPS","RenderTarget","ControlType","addPropertyControls","sized","src","px","srcSetFor","sizes","n","NotesWithin","props","isCanvas","ref","width","setWidth","mounted","setMounted","seen","setSeen","el","update","w","ro","io","entries","items","names","s","r","roles","imageUrls","i","reduce","setReduce","hidden","animate","cols","isPhone","side","t","SOFT","delay","extra","SERIF","ink","heading","it","EASE","SANS","muted","emptyText","init_NotesWithin"],"sources":["https:/framerusercontent.com/modules/yod6HLJGkW5DpcLtBqMZ/SJ5yFuI9IXlgz3KRkyjF/NotesWithin.js"],"sourcesContent":["// Profumo di Vero: \"The notes within\" for the product pages.\n// Request: \"I especially love how it's got the notes within, with the different types of things that are included.\n// That's really important for us.\" Four ingredient studies with their names, as on the Arum product page.\n// The ingredient photos sit on white; mix-blend-mode multiply melts the white into the paper background.\n// When a scent's notes are still under wraps (Westmere), it shows a short line instead.\n// 16 Oct (evening): text now fades up softly and comes into focus instead of sliding up from behind an edge\n// (Ryan: \"a lot of the text is still snapping into place\").\n// 16 Oct (late): Ryan: the notes images showed \"a white background originally, and then they remove it ... the white\n// background should just never be there.\" The fade on each image's frame cut the image off from the page while it\n// ran, so the multiply blend only reached the paper once the fade ended. The blend now sits on the fading frame\n// itself, so the white melts into the paper from the first frame.\n// 18 Oct: speed. The ingredient images are shown at 300px at most, so they are now asked for at that size\n// (with a srcset for sharp screens) instead of the full upload, which was up to 122KB each.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useMemo,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const SERIF='\"Newsreader\", \"Newsreader Placeholder\", Georgia, serif';const SANS='\"Instrument Sans\", \"Instrument Sans Placeholder\", system-ui, sans-serif';const EASE=\"cubic-bezier(0.16, 1, 0.3, 1)\";const SOFT=\"cubic-bezier(0.25, 0.6, 0.3, 1)\";// Framer-hosted images can be resized on the fly; anything else is left as it is.\nfunction sized(src,px){if(!src||!/framerusercontent\\.com\\/(images|assets)\\//.test(src)||/scale-down-to=/.test(src))return src;return src+(src.includes(\"?\")?\"&\":\"?\")+\"scale-down-to=\"+px;}function srcSetFor(src,sizes){if(!src||!/framerusercontent\\.com\\/(images|assets)\\//.test(src)||/scale-down-to=/.test(src))return undefined;return sizes.map(n=>`${sized(src,n)} ${n}w`).join(\", \");}/**\n * Notes within\n *\n * @framerIntrinsicWidth 1440\n * @framerIntrinsicHeight 760\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function NotesWithin(props){const{heading,imageUrls,names,roles,emptyText,ink,muted}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const[width,setWidth]=useState(1440);const[mounted,setMounted]=useState(false);const[seen,setSeen]=useState(false);useEffect(()=>{const el=ref.current;if(!el)return;const update=()=>{const w=el.getBoundingClientRect().width;if(w>0)startTransition(()=>setWidth(w));};update();startTransition(()=>setMounted(true));let ro=null;if(typeof ResizeObserver!==\"undefined\"){ro=new ResizeObserver(update);ro.observe(el);}let io=null;if(typeof IntersectionObserver!==\"undefined\"&&!isCanvas){io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){startTransition(()=>setSeen(true));if(io)io.disconnect();}},{rootMargin:\"0px 0px -15% 0px\",threshold:.05});io.observe(el);}else startTransition(()=>setSeen(true));return()=>{if(ro)ro.disconnect();if(io)io.disconnect();};},[isCanvas]);const items=useMemo(()=>{const n=(names||\"\").split(\"|\").map(s=>s.trim());const r=(roles||\"\").split(\"|\").map(s=>s.trim());return(imageUrls||\"\").split(/\\s+/).filter(Boolean).map((src,i)=>({src,name:n[i]||\"\",role:r[i]||\"\"}));},[imageUrls,names,roles]);const[reduce,setReduce]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"&&window.matchMedia)startTransition(()=>setReduce(window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches));},[]);const hidden=mounted&&!seen&&!isCanvas&&!reduce;const animate=mounted&&!isCanvas&&!reduce;const cols=width>=900?4:2;const isPhone=width<600;const side=width>=1200?32:isPhone?20:24;const t=(delay,extra={})=>({opacity:hidden?0:1,transform:hidden?\"translate3d(0, 20px, 0)\":\"none\",transition:animate?`opacity 1.2s ${SOFT} ${delay}s, transform 1.6s ${SOFT} ${delay}s`:\"none\",...extra});return /*#__PURE__*/_jsxs(\"section\",{ref:ref,style:{...props.style,width:props.style&&props.style.width?props.style.width:\"100%\",boxSizing:\"border-box\",padding:`${width>=900?140:96}px ${side}px ${width>=900?120:80}px`,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:width>=900?88:56},children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",paddingBottom:\"0.12em\"},children:/*#__PURE__*/_jsx(\"h2\",{style:{fontFamily:SERIF,fontWeight:400,fontSize:isPhone?34:44,lineHeight:1.1,letterSpacing:\"-0.012em\",color:ink,margin:0,textAlign:\"center\",opacity:hidden?0:1,transform:hidden?\"translate3d(0, 16px, 0)\":\"none\",filter:hidden?\"blur(6px)\":\"none\",transition:animate?`opacity 1.2s ${SOFT}, transform 1.6s ${SOFT}, filter 1.3s ${SOFT}`:\"none\"},children:heading})}),items.length?/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"grid\",gridTemplateColumns:`repeat(${cols}, minmax(0, 1fr))`,columnGap:isPhone?12:24,rowGap:isPhone?40:56},children:items.map((it,i)=>/*#__PURE__*/_jsxs(\"figure\",{style:{margin:0,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:18},children:[/*#__PURE__*/_jsx(\"div\",{style:t(.15+i*.12,{width:\"100%\",maxWidth:300,aspectRatio:\"1 / 1\",position:\"relative\",mixBlendMode:\"multiply\"}),children:/*#__PURE__*/_jsx(\"img\",{src:sized(it.src,600),srcSet:srcSetFor(it.src,[300,450,600,900]),sizes:\"(min-width: 900px) 300px, 50vw\",alt:it.name,loading:\"lazy\",decoding:\"async\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"contain\",transform:hidden?\"scale(0.9)\":\"none\",transition:animate?`transform 1.8s ${EASE} ${.15+i*.12}s`:\"none\"}})}),/*#__PURE__*/_jsxs(\"figcaption\",{style:t(.35+i*.12,{textAlign:\"center\",display:\"flex\",flexDirection:\"column\",gap:4}),children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:SANS,fontSize:isPhone?14:15,color:ink},children:it.name}),it.role?/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:SANS,fontSize:13,color:muted},children:it.role}):null]})]},it.src+i))}):/*#__PURE__*/_jsx(\"p\",{style:t(.25,{fontFamily:SANS,fontSize:15,lineHeight:1.5,color:muted,textAlign:\"center\",maxWidth:460,margin:0}),children:emptyText})]});}addPropertyControls(NotesWithin,{heading:{type:ControlType.String,title:\"Heading\",defaultValue:\"The notes within\"},imageUrls:{type:ControlType.String,title:\"Image URLs\",displayTextArea:true,defaultValue:\"\"},names:{type:ControlType.String,title:\"Names\",description:\"Separate with |\",defaultValue:\"\"},roles:{type:ControlType.String,title:\"Roles\",description:\"Separate with |, e.g. Opens|Settles\",defaultValue:\"\"},emptyText:{type:ControlType.String,title:\"No notes text\",displayTextArea:true,defaultValue:\"The full notes are kept close for now. Try it on in store and judge for yourself.\"},ink:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#1E1A17\"},muted:{type:ControlType.Color,title:\"Muted\",defaultValue:\"#7A7068\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NotesWithin\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"1440\",\"framerIntrinsicHeight\":\"760\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sour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