{"version":3,"file":"Story_Problem.Vj-SZ89s.mjs","names":["useState","useRef","_Fragment","useLayoutEffect","useEffect","__esmMin","le","init_ssg_sandbox_shims","window","l","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BWFVvmND","ControlType","useIsStaticRenderer","useBox","box","setBox","useBrowserLayoutEffect","el","ref","update","w","h","ro","StoryProblem","props","textRef","width","textH","isStatic","stacked","narrow","img","image","list","findings","x","family","font","appear","textW","picW","picH","minRatio","textBlock","kicker","title","PRETTY","text","t","accent","i","goal","goalLabel","picture","imagePosition","anchor","menuLabel","rule","__FramerMetadata__","init_Story_Problem","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerContractVersion\"","\"framerIntrinsicHeight\"","\"framerSupportedLayoutWidth\"","\"framerSupportedLayoutHeight\"","\"framerIntrinsicWidth\"","\"__FramerMetadata__\""],"sources":["https:/framerusercontent.com/modules/rLgpsqOU2fCkh9wnmCCC/vtF74myh74LMIK3n6fxI/Story_Problem.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef,useState,useEffect,useLayoutEffect}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";// layout effects only exist in the browser; the server render uses the plain effect\nconst useBrowserLayoutEffect=typeof window!==\"undefined\"?useLayoutEffect:useEffect;// text-wrap is newer than the bundled CSS typings\nconst PRETTY={textWrap:\"pretty\"};// measured before the first paint, so the picture is the right height from the start\nfunction useBox(ref){const[box,setBox]=useState({w:1280,h:0});useBrowserLayoutEffect(()=>{const el=ref.current;if(!el||typeof ResizeObserver===\"undefined\")return;const update=()=>{// offsetWidth/Height ignore the canvas zoom\nconst w=el.offsetWidth||1280;const h=el.offsetHeight||0;setBox(p=>Math.abs(p.w-w)<1&&Math.abs(p.h-h)<1?p:{w,h});};update();const ro=new ResizeObserver(update);ro.observe(el);return()=>ro.disconnect();},[ref]);return box;}/**\n * Story Problem\n *\n * Stratos's opening row (Sally's pick P2, 11/04): label, title, one muted line, the findings as stacked grey cards and the\n * design goal on the left; the picture on the right runs the full height of the text. Its baked-in label and sign box\n * must never be cut, so the picture never gets narrower than Min ratio × its height (it gets shorter instead).\n * Findings: \"title | line\" per line. Under 810 px the picture goes under the text as a square.\n * Rule above (Sally 11/04): a hairline between the hero and this row. 11/05 (Sally: too far from the hero, compare ADP and\n * To&Fro): the hairline sits right at the top, so the template's gap is the space above it, and 88 below it (phone 48).\n *\n * @framerIntrinsicWidth 1280\n * @framerIntrinsicHeight 700\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function StoryProblem(props){const{kicker=\"\",title=\"\",text=\"\",findings=\"\",goalLabel=\"Design goal\",goal=\"\",image,imagePosition=\"50% 54%\",minRatio=.78,rule=false,anchor=\"\",menuLabel=\"\",accent=\"#6A4BD6\",color=\"#000000\",font}=props;const ref=useRef(null);const textRef=useRef(null);const{w:width}=useBox(ref);const{h:textH}=useBox(textRef);const isStatic=useIsStaticRenderer();const stacked=width<810;const narrow=width<640;const img=typeof image===\"string\"?{src:image}:image||{};const list=findings.split(\"\\n\").map(l=>l.trim()).filter(Boolean).map(l=>l.split(\"|\").map(x=>x.trim()));const family={fontFamily:font?.fontFamily??'\"Open Sauce Sans\", Inter, system-ui, sans-serif',fontWeight:font?.fontWeight??500,fontStyle:font?.fontStyle,letterSpacing:font?.letterSpacing??\"-0.02em\"};const appear=isStatic?{}:{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:true,amount:.1},transition:{type:\"spring\",duration:.8,bounce:0}};// two columns: text ~50%, a 60 px gap, the picture takes the rest\nconst gap=60;const textW=Math.round(width*.5);const picW=width-textW-gap;const picH=textH?Math.min(textH,picW/Math.max(.3,minRatio)):0;const textBlock=/*#__PURE__*/_jsxs(\"div\",{ref:textRef,style:{width:stacked?\"100%\":textW,flex:\"none\"},children:[kicker&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:16,lineHeight:1.4,opacity:.55,marginBottom:12},children:kicker}),title&&/*#__PURE__*/_jsx(\"h2\",{style:{margin:0,fontWeight:\"inherit\",fontSize:narrow?28:36,lineHeight:1.15,letterSpacing:\"-0.03em\",maxWidth:820,...PRETTY},children:title}),text&&/*#__PURE__*/_jsx(\"p\",{style:{margin:\"24px 0 0\",fontSize:narrow?15:17,lineHeight:1.45,opacity:.55,maxWidth:680,...PRETTY},children:text}),list.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:10,marginTop:narrow?28:36},children:list.map(([t,l],i)=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"34px minmax(0, 1fr)\",padding:narrow?\"14px 16px\":\"18px 20px\",borderRadius:16,background:\"color-mix(in srgb, currentColor 6%, transparent)\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:narrow?15:17,lineHeight:1.4,color:accent},children:i+1}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:narrow?17:20,lineHeight:1.3},children:t}),l&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:narrow?15:16,lineHeight:1.45,opacity:.6,marginTop:4,...PRETTY},children:l})]})]},i))}),goal&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:narrow?32:44},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:16,lineHeight:1.4,opacity:.55,marginBottom:8},children:goalLabel}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:narrow?22:26,lineHeight:1.3,color:accent,...PRETTY},children:goal})]})]});const picture=img.src?/*#__PURE__*/_jsx(\"img\",{src:img.src,srcSet:img.srcSet,sizes:stacked?\"100vw\":`${Math.round(picW)}px`,alt:img.alt||\"\",style:{display:\"block\",width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:imagePosition}}):null;return /*#__PURE__*/_jsxs(motion.div,{ref:ref,...appear,id:anchor.trim()||undefined,\"data-story-nav\":menuLabel.trim()||undefined,style:{...props.style,width:\"100%\",boxSizing:\"border-box\",color,...family,paddingTop:rule?0:narrow?72:120},children:[rule&&/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:\"color-mix(in srgb, currentColor 13%, transparent)\",marginBottom:narrow?48:88}}),stacked?/*#__PURE__*/_jsxs(_Fragment,{children:[textBlock,picture&&/*#__PURE__*/_jsx(\"div\",{style:{marginTop:32,width:\"100%\",aspectRatio:\"1\",borderRadius:20,overflow:\"hidden\"},children:picture})]}):/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap,alignItems:\"flex-start\"},children:[textBlock,picture&&/*#__PURE__*/_jsx(\"div\",{style:{width:picW,height:picH,borderRadius:24,overflow:\"hidden\",flex:\"none\",visibility:picH?\"visible\":\"hidden\"},children:picture})]})]});}addPropertyControls(StoryProblem,{kicker:{type:ControlType.String,title:\"Kicker\",defaultValue:\"\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\",displayTextArea:true},text:{type:ControlType.String,title:\"Text\",defaultValue:\"\",displayTextArea:true},findings:{type:ControlType.String,title:\"Findings\",defaultValue:\"\",displayTextArea:true,description:\"title | line, one per line\"},goalLabel:{type:ControlType.String,title:\"Goal label\",defaultValue:\"Design goal\"},goal:{type:ControlType.String,title:\"Goal\",defaultValue:\"\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},imagePosition:{type:ControlType.String,title:\"Image position\",defaultValue:\"50% 54%\"},minRatio:{type:ControlType.Number,title:\"Min ratio\",defaultValue:.78,min:.3,max:2,step:.01,description:\"The picture never gets narrower than this \\xd7 its height\"},rule:{type:ControlType.Boolean,title:\"Rule above\",defaultValue:false},anchor:{type:ControlType.String,title:\"Anchor\",defaultValue:\"\"},menuLabel:{type:ControlType.String,title:\"Menu label\",defaultValue:\"\",description:\"Shown in Story Nav\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#6A4BD6\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Medium\",fontSize:\"16px\",letterSpacing:\"-0.02em\",lineHeight:\"1.4em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StoryProblem\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"700\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"1280\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Story_Problem.map"],"mappings":"A,oRAGA,SAASuB,EAAO,EAAI,CAAC,GAAK,CAACC,EAAIC,GAAQzB,EAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EACqJ,OADnJ0B,MAA2B,CAAC,IAAMC,EAAGC,EAAI,QAAQ,GAAG,CAACD,GAAI,OAAO,eAAiB,IAAY,OAAO,IAAME,MAAW,CACnL,IAAMC,EAAEH,EAAG,aAAa,KAAWI,EAAEJ,EAAG,cAAc,EAAEF,EAAO,GAAG,KAAK,IAAId,EAAE,EAAEmB,CAAC,EAAE,GAAG,KAAK,IAAInB,EAAE,EAAEoB,CAAC,EAAE,EAAEpB,EAAE,CAAC,IAAE,GAAC,CAAC,CAAE,EAAEkB,EAAO,EAAE,IAAMG,EAAG,IAAI,eAAeH,CAAM,EAAiB,OAAfG,EAAG,QAAQL,CAAE,MAAYK,EAAG,WAAW,CAAE,EAAE,CAACJ,CAAG,CAAC,EAASJ,CAAI,CAezN,SAAwBS,EAAa,EAAM,CAAC,GAAK,CAAC,SAAO,GAAG,QAAM,GAAG,OAAK,GAAG,WAAS,GAAG,YAAU,cAAc,OAAK,GAAG,QAAM,gBAAc,UAAU,WAAS,IAAI,OAAK,GAAM,SAAO,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