{"version":3,"file":"KitWell.D2fTncmx.mjs","names":["useState","useEffect","useLayoutEffect","__esmMin","init_npm_react_18_3_1","window","le","init_jsx_runtime","ce","_e","init_ssg_sandbox_shims","init_framer_BisrWwwE","ControlType","BREAKPOINT","C","isStaticTarget","RADIUS","init_SiteTokens","init_BeatPlayer","init_KitTokens","useDesktopWindow","matches","setMatches","useIsoLayoutEffect","enabled","mq","DESKTOP","on","useFit","PHONE_BELOW","width","setWidth","el","target","ro","entry","desktop","threeUp","scale","drawnWidth","phoneBelow","THREE_UP_CANVAS_MIN","KitWell","well","surface","phone","handlers","phoneHeight","drawn","padding","THREE_UP","SURFACE_CONTROL","init_KitWell"],"sources":["https:/framerusercontent.com/modules/lnGDGfFppjJzSCjdUK36/dQW0BNgIUBr2dF67cQTh/KitWell.js"],"sourcesContent":["// Source: design-systems/rondah/framer-code/KitWell.tsx in rondah-ai/rondah-website. Edit it there and push with the framer-code-push skill; changes made here are overwritten.\n// Rondah product kit — the Well: the paper inset a visual sat in, inside a white site card (style A, retired).\n// With surface \"none\" there is no well: the visual sits straight on the card's surface (Feature\n// card Flat and Outside text, 2026-10-30; paper on the white page since 2026-10-31), and its\n// bleeding edge fades into that surface (the fades are masks).\n// A visual is drawn at a fixed size per slot and scales with its container; below 80% of\n// the drawn size it switches to a phone variant with fewer elements instead of shrinking\n// further (illustration-kit.md §7). Windows are placed absolutely on KitPlanes in both (§5\n// rules 12–17); the phone variant is a well of one height that the visual sets before beat 1,\n// so the card never grows while it plays (§5 rule 21).\n// A visual with a 3-up drawing (341 × 240, a feature card in a 3-up row) uses it below 80% of\n// its drawn width when the window is at Framer's Desktop breakpoint: a 3-up row exists only there,\n// and its 315–341 slot is as wide as a tablet 2×2 card's, so width alone can't tell them apart\n// (decision 2026-10-31: layouts switch where Framer's breakpoints do). On the canvas there is no\n// window to ask, so it follows its own width (THREE_UP_CANVAS_MIN).\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect,useEffect,useState}from\"react\";import{ControlType}from\"framer\";import{C,RADIUS}from\"https://framerusercontent.com/modules/BRMpaEGxk0BG7wj0sOy6/XCzzG7RUxKhqEFROhTB3/KitTokens.js\";import{isStaticTarget}from\"https://framerusercontent.com/modules/ak4cs7R0TZ8tAtVbAO19/6PRWkDxj8RY0ochK5Lx5/BeatPlayer.js\";import{BREAKPOINT}from\"https://framerusercontent.com/modules/pWZdwn8llIp4T5Y22i7E/rlDRMSE7wGimKTxnkNCP/SiteTokens.js\";export const PHONE_BELOW=.8;/** The feature card's 3-up drawing (components/feature-card.md, kit §7) */export const THREE_UP={width:341,height:240};// On the canvas: Desktop's 3-up slot is 315 (a 1200 frame) or more; a tablet 2×2 card's is 309 at 810\nconst THREE_UP_CANVAS_MIN=312;const DESKTOP=`(min-width: ${BREAKPOINT.desktop}px)`;/** The Surface control every kit visual offers; the default keeps the well */export const SURFACE_CONTROL={type:ControlType.Enum,title:\"Surface\",options:[\"well\",\"none\"],optionTitles:[\"Paper well\",\"None\"],defaultValue:\"well\",displaySegmentedControl:true};const useIsoLayoutEffect=typeof window===\"undefined\"?useEffect:useLayoutEffect;/** Framer's Desktop breakpoint, read live from the window; null until measured (and on the canvas) */function useDesktopWindow(enabled){const[matches,setMatches]=useState(null);useIsoLayoutEffect(()=>{if(!enabled||isStaticTarget())return;const mq=window.matchMedia(DESKTOP);const on=()=>setMatches(mq.matches);on();mq.addEventListener(\"change\",on);return()=>mq.removeEventListener(\"change\",on);},[enabled]);return matches;}/**\n * Measures the root's width; returns the scale, and whether to use the phone variant or the 3-up\n * drawing (only for a visual that passes `threeUp`). The scale is of whichever drawing is used.\n * `phoneBelow`: a visual whose smallest type would fall under 11px at 80% switches sooner (Answers every\n * call, 85%).\n */export function useFit(target,drawnWidth,threeUp,phoneBelow=PHONE_BELOW){const[width,setWidth]=useState(null);useIsoLayoutEffect(()=>{const el=target.current;if(!el)return;setWidth(el.getBoundingClientRect().width);const ro=new ResizeObserver(([entry])=>setWidth(entry.contentRect.width));ro.observe(el);return()=>ro.disconnect();},[]);const desktop=useDesktopWindow(!!threeUp);const scale=width?Math.min(1,width/drawnWidth):1;if(scale>=phoneBelow||!threeUp||!width)return{scale,phone:scale<phoneBelow,threeUp:false};const room=width/threeUp.width>=phoneBelow;const slot=desktop===null?width>=THREE_UP_CANVAS_MIN:desktop;if(room&&slot)return{scale:Math.min(1,width/threeUp.width),phone:false,threeUp:true};return{scale,phone:true,threeUp:false};}/**\n * Hover moves focus (§5 rule 19): once the visual rests, a fine pointer over a window brings it\n * forward; leaving the well returns to the rest state. No hover on touch, or before `atRest`.\n * `cause` tells KitPlane which duration to use.\n */export function useHoverFocus(atRest,run=0){const[hover,setHover]=useState(null);const[hoverCause,setHoverCause]=useState(false);// A replay (BeatPlayer's `run`) forgets the last hover: a wheel scroll moves the visual away from a still\n// pointer without a pointerleave (Safari), and the rest frame must not bring a window forward for it\nconst[runAt,setRunAt]=useState(run);if(runAt!==run){setRunAt(run);setHover(null);setHoverCause(false);}const fine=typeof window!==\"undefined\"&&window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches;const enter=which=>()=>{if(!fine||!atRest)return;setHoverCause(true);setHover(which);};const wellHandlers=fine?{onPointerLeave:()=>{setHoverCause(true);setHover(null);}}:{};return{hover:atRest?hover:null,hoverCause:atRest&&hoverCause,enter,wellHandlers};}/**\n * The drawn variant keeps its drawn size and is scaled as a whole (a static fit, never\n * animated); the phone variant lays out at full size, at the height the visual gives it.\n */export function KitWell({drawn,scale,phone,padding=[20,16],phoneHeight,surface=\"well\",handlers,children}){// Still clips with no surface: a bleeding window must stop at the slot's edge (§7)\nconst well=surface===\"none\"?{overflow:\"clip\"}:{background:C.well,borderRadius:RADIUS.card,overflow:\"clip\"};if(phone){return /*#__PURE__*/_jsx(\"div\",{...handlers,style:{...well,position:\"relative\",height:phoneHeight},children:children});}return /*#__PURE__*/_jsx(\"div\",{...handlers,style:{...well,height:drawn.height*scale,display:\"flex\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:drawn.width*scale,height:drawn.height*scale,flexShrink:0},children:/*#__PURE__*/_jsx(\"div\",{style:{width:drawn.width,height:drawn.height,padding:padding[0],boxSizing:\"border-box\",position:\"relative\",display:\"flex\",gap:12,alignItems:\"flex-start\",transform:scale<1?`scale(${scale})`:undefined,transformOrigin:\"top left\"},children:children})})});}\nexport const __FramerMetadata__ = {\"exports\":{\"useFit\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SURFACE_CONTROL\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"THREE_UP\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"KitWell\":{\"type\":\"reactComponent\",\"name\":\"KitWell\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"KitSurface\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PHONE_BELOW\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useHoverFocus\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,6RAgBugB,SAASoB,EAAiB,EAAQ,CAAC,GAAK,CAACC,EAAQC,GAAYtB,EAAS,IAAI,EAAwO,OAAtOuB,MAAuB,CAAC,GAAG,CAACC,GAAST,EAAe,EAAE,OAAO,IAAMU,EAAGpB,EAAO,WAAWqB,CAAO,EAAQC,MAAOL,EAAWG,EAAG,OAAO,EAAwC,OAAtCE,EAAG,EAAEF,EAAG,iBAAiB,SAASE,CAAE,MAAYF,EAAG,oBAAoB,SAASE,CAAE,CAAE,EAAE,CAACH,CAAO,CAAC,EAASH,CAAQ,CAKr0B,SAAgBO,EAAO,EAAO,EAAW,EAAQ,EAAWC,EAAY,CAAC,GAAK,CAACC,EAAMC,GAAU/B,EAAS,IAAI,EAAEuB,MAAuB,CAAC,IAAMS,EAAGC,EAAO,QAAQ,GAAG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