{"version":3,"file":"GridTextSystem.CGtGPhaI.mjs","names":[],"sources":["https:/framerusercontent.com/modules/fldk0Xyne6e4nAPbodv4/aPhhLawe7IpNIxnmYSk3/GridTextSystem.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";const VERTICAL_STEP=25.5;const MINIMUM_ROW=51;const PROJECT_ROW_SELECTOR='[data-framer-name^=\"Project Unit Row\"]';const GRID_TEXT_CSS=`\n[data-framer-component-type=\"RichTextContainer\"] {\n    margin: 0 !important;\n    padding: 0 !important;\n}\n\n[data-framer-component-type=\"RichTextContainer\"] .framer-text {\n    margin-inline: 0 !important;\n    padding-inline: 0 !important;\n}\n\n[data-framer-component-type=\"RichTextContainer\"] .framer-text:first-child {\n    margin-block-start: 0 !important;\n    padding-block-start: 0 !important;\n}\n\n[data-framer-component-type=\"RichTextContainer\"] .framer-text:last-child {\n    margin-block-end: 0 !important;\n    padding-block-end: 0 !important;\n}\n\n[data-framer-name^=\"Project Unit Row\"] {\n    min-height: 51px !important;\n    box-sizing: border-box !important;\n    overflow: visible !important;\n}\n\n@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {\n    [data-framer-component-type=\"RichTextContainer\"] .framer-text {\n        text-box-edge: cap alphabetic !important;\n    }\n\n    [data-framer-component-type=\"RichTextContainer\"] .framer-text:only-child {\n        text-box-trim: trim-both !important;\n    }\n\n    [data-framer-component-type=\"RichTextContainer\"] .framer-text:first-child:not(:last-child) {\n        text-box-trim: trim-start !important;\n    }\n\n    [data-framer-component-type=\"RichTextContainer\"] .framer-text:last-child:not(:first-child) {\n        text-box-trim: trim-end !important;\n    }\n}\n`;function naturalRowHeight(row){const textNodes=Array.from(row.querySelectorAll(\".framer-text\"));if(textNodes.length===0)return 0;return textNodes.reduce((maximum,node)=>Math.max(maximum,node.scrollHeight,node.getBoundingClientRect().height),0);}function snappedRowHeight(row){const natural=naturalRowHeight(row);if(natural<=0)return MINIMUM_ROW;// Browser scroll metrics round 25.5px line bands, so use the nearest band.\nconst contentSteps=Math.max(1,Math.round(natural/VERTICAL_STEP));// Reserve one 25.5px breathing unit around the centered text.\nreturn Math.max(MINIMUM_ROW,(contentSteps+1)*VERTICAL_STEP);}/**\n * Installs the Hello Giant text-edge and project-page unit-grid rules.\n * Project table rows grow only in 25.5px increments and never below 51px.\n *\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function GridTextSystem(props){useEffect(()=>{if(typeof document===\"undefined\"||typeof window===\"undefined\"||typeof ResizeObserver===\"undefined\"){return;}const observed=new Set;const pending=new Set;let animationFrame=0;const flush=()=>{animationFrame=0;for(const row of pending){if(!row.isConnected)continue;const next=snappedRowHeight(row);const current=Number(row.dataset.hgUnitHeight||\"0\");if(Math.abs(current-next)<.01)continue;row.dataset.hgUnitHeight=String(next);row.style.setProperty(\"height\",`${next}px`,\"important\");row.style.setProperty(\"min-height\",`${next}px`,\"important\");}pending.clear();};const schedule=row=>{pending.add(row);if(!animationFrame)animationFrame=requestAnimationFrame(flush);};const observer=new ResizeObserver(entries=>{for(const entry of entries){const target=entry.target;const row=target.matches(PROJECT_ROW_SELECTOR)?target:target.closest(PROJECT_ROW_SELECTOR);if(row)schedule(row);}});const bindRows=()=>{const rows=document.querySelectorAll(PROJECT_ROW_SELECTOR);for(const row of rows){if(!observed.has(row)){observer.observe(row);observed.add(row);}const textNodes=row.querySelectorAll(\".framer-text\");for(const textNode of textNodes){if(observed.has(textNode))continue;observer.observe(textNode);observed.add(textNode);}schedule(row);}};const mutations=new MutationObserver(bindRows);mutations.observe(document.documentElement,{childList:true,subtree:true});window.addEventListener(\"resize\",bindRows);bindRows();return()=>{cancelAnimationFrame(animationFrame);mutations.disconnect();observer.disconnect();window.removeEventListener(\"resize\",bindRows);document.querySelectorAll(PROJECT_ROW_SELECTOR).forEach(row=>{delete row.dataset.hgUnitHeight;row.style.removeProperty(\"height\");row.style.removeProperty(\"min-height\");});};},[]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...props.style,width:\"100%\",height:\"100%\",overflow:\"visible\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"style\",{children:GRID_TEXT_CSS})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GridTextSystem\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GridTextSystem.map"],"mappings":"2HA4CE,SAAS,EAAiB,EAAI,CAAC,IAAM,EAAU,MAAM,KAAK,EAAI,iBAAiB,cAAc,CAAC,EAAmC,OAA9B,EAAU,SAAS,EAAS,EAAS,EAAU,QAAQ,EAAQ,IAAO,KAAK,IAAI,EAAQ,EAAK,aAAa,EAAK,sBAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAE,CAAC,SAAS,EAAiB,EAAI,CAAC,IAAM,EAAQ,EAAiB,CAAG,EAAE,GAAG,GAAS,EAAE,OAAO,EAC/U,IAAM,EAAa,KAAK,IAAI,EAAE,KAAK,MAAM,EAAQ,CAAa,CAAC,EAC/D,OAAO,KAAK,IAAI,GAAa,EAAa,GAAG,CAAa,CAAE,CAQzD,SAAwB,EAAe,EAAM,CAA6sD,OAA5sD,MAAc,CAAC,GAAG,OAAO,SAAW,KAAoB,IAAS,QAAa,OAAO,eAAiB,IAAa,OAAQ,IAAM,EAAS,IAAI,IAAU,EAAQ,IAAI,IAAQ,EAAe,EAAQ,MAAU,CAAC,EAAe,EAAE,IAAI,IAAM,KAAO,EAAQ,CAAC,GAAG,CAAC,EAAI,YAAY,SAAS,IAAM,EAAK,EAAiB,CAAG,EAAQ,EAAQ,OAAO,EAAI,QAAQ,cAAc,GA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