{"version":3,"file":"ProseLinkHover.CoAzkwfB.mjs","names":["_Fragment","useRef"],"sources":["https:/framerusercontent.com/modules/GgNoZu3Z9A5WsGBVE1Sw/hFoepuXgQTEN6vSwp9q9/ProseLinkHover.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";const BOLD_CSS=`\n.fr-link-hover a { transition: font-weight .12s ease; }\n.fr-link-hover a:hover { font-weight: 600; }\n`;// \"View Figma prototype\": semi-bold at rest (it carries its own weight instead\n// of an underline), and no underline on hover either — the hover is just the\n// arrow rotating. The underline removal itself lives on the \"Figma Link\"\n// style preset; this only handles the weight.\nconst SEMIBOLD_CSS=`\n.fr-link-semibold a, .fr-link-semibold a * { font-weight: 600 !important; }\n`;// The trailing ↗ is drawn by CSS so it can rotate on hover without splitting\n// the text run. Fixed at Inter 600 / 24px so every arrow on the site matches\n// regardless of the size of the link text beside it. `vertical-align: middle`\n// keeps it centred on the text; on hover it just rotates flat and stays\n// centred. Link text must NOT already contain an arrow character. The footer's\n// arrow honours --fa-scale so it shrinks in step with its link.\n//\n// The gap to the label is a plain `margin-left: 8px` — the standard 8px used\n// everywhere an arrow sits next to text on this site. It used to be a leading\n// U+00A0 (non-breaking space) baked into `content`, which added its own\n// (font- and size-dependent, uncontrolled) width on top of nothing else —\n// there was no actual `margin`/`gap` at all, so the visible gap was whatever\n// that nbsp happened to render as. Fixed size, one property, everywhere.\nconst ARROW_CSS=`\n.fr-link-arrow a::after {\n    content: \"\\\\2197\\\\FE0E\";\n    display: inline-block;\n    vertical-align: middle;\n    margin-left: 8px;\n    font-family: \"Inter\", \"Inter Placeholder\", sans-serif;\n    font-weight: 600;\n    font-size: calc(24px * var(--fa-scale, 1));\n    line-height: 1;\n    transition: transform .16s cubic-bezier(.16, 0, .3, 1);\n    transform: translateY(-0.06em);\n}\n.fr-link-arrow a:hover::after {\n    transform: translateY(0) rotate(45deg);\n}\n`;// Same glyph, same font-family/weight/transition/rotate-on-hover as\n// .fr-link-arrow above, sized to the Prototype Button's 17px label instead of\n// the 24px used next to larger body/footer text. This replaces that button's\n// old approach — a literal \"↗\" character living in its own RichText node,\n// rotated via a Framer node-level `rotation` attribute on the hover variant.\n// Two different rendering paths for the same glyph (a live text node here,\n// a CSS pseudo-element there) is exactly what let it render inconsistently\n// across platforms; converging both onto this one mechanism, with the\n// U+FE0E \"render as text, not emoji\" selector on the glyph, removes the\n// last thing a mobile browser could substitute a different glyph for.\n//\n// Every Prototype Button instance sits on a black fill with a white label —\n// but the label's white is set directly on its own text node, which a `::after`\n// on the parent <a> does NOT inherit. Left unset, the arrow fell back to the\n// browser's default link colour (link-blue), not the button's own white — a\n// coloured arrow on a black button. `color` is set explicitly here so the\n// arrow always matches the label regardless of what the <a> itself resolves to.\n//\n// The button's own flex `gap` (a canvas attribute, between the Label and this\n// generated ::after box — both participate in the same flex row) used to be\n// the only thing spacing them, at whatever the component happened to have it\n// set to — not the site's 8px standard, and not something this file controls.\n// Neutralised here and replaced with the same `margin-left: 8px` every other\n// arrow instance uses, so there is exactly one place the gap is set at all.\nconst BUTTON_ARROW_CSS=`\n.fr-btn-arrow a {\n    gap: 0 !important;\n}\n.fr-btn-arrow a::after {\n    content: \"\\\\2197\\\\FE0E\";\n    display: inline-block;\n    vertical-align: middle;\n    margin-left: 8px;\n    font-family: \"Inter\", \"Inter Placeholder\", sans-serif;\n    font-weight: 600;\n    font-size: 17px;\n    line-height: 1;\n    color: var(--token-138ef10f-c9a0-41b2-8a54-b5baa6e3b33b, #fff);\n    transition: transform .16s cubic-bezier(.16, 0, .3, 1);\n    transform: translateY(-0.06em);\n}\n.fr-btn-arrow a:hover::after {\n    transform: translateY(0) rotate(45deg);\n}\n`;/** Prototype Button: same CSS-drawn arrow as .fr-link-arrow, sized to the\n * button's own label instead of body/footer text. */export function withButtonArrow(Component){return props=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:BUTTON_ARROW_CSS}),/*#__PURE__*/_jsx(\"span\",{className:\"fr-btn-arrow\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});}/** Inline text link: hovered <a> goes bold. */export function withLinkBoldHover(Component){return props=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:BOLD_CSS}),/*#__PURE__*/_jsx(\"span\",{className:\"fr-link-hover\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});}/**\n * \"View Figma prototype\": semi-bold at rest, no underline (see the Figma Link\n * preset), and a trailing ↗ that rotates flat on hover.\n */export function withLinkArrowHover(Component){return props=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:SEMIBOLD_CSS+ARROW_CSS}),/*#__PURE__*/_jsx(\"span\",{className:\"fr-link-semibold fr-link-arrow\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});}/**\n * Like withLinkArrowHover but WITHOUT the bold — for the big footer links where\n * a weight change would reflow. Just the rotate-and-centre-on-hover arrow.\n */export function withLinkArrow(Component){return props=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:ARROW_CSS}),/*#__PURE__*/_jsx(\"span\",{className:\"fr-link-arrow\",style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})})]});}// ── footer link fitter ───────────────────────────────────────────\n// Applied to the footer's \"Footer Links\" container. The email address and the\n// LinkedIn link + arrow are kept on one line at their design size until the\n// wider of the two would hit the footer's right padding; past that point both\n// scale down by the same factor so they always fit and stay matched.\nfunction clearFont(a){a.style.removeProperty(\"font-size\");a.querySelectorAll(\"*\").forEach(c=>c.style.removeProperty(\"font-size\"));}function setFont(a,px){a.style.setProperty(\"font-size\",px+\"px\",\"important\");a.querySelectorAll(\"*\").forEach(c=>c.style.setProperty(\"font-size\",px+\"px\",\"important\"));}function textWidth(a){try{const r=document.createRange();r.selectNodeContents(a);const w=r.getBoundingClientRect().width;r.detach();return w;}catch(_){return a.getBoundingClientRect().width;}}export function withFooterFit(Component){return props=>{const ref=useRef(null);useEffect(()=>{const host=ref.current;if(!host)return;const emailA=host.querySelector('a[href^=\"mailto:\"]');const linkA=host.querySelector('a[href*=\"linkedin\"]');const footer=host.closest(\"footer\");if(!emailA||!linkA||!footer)return;const fit=()=>{clearFont(emailA);clearFont(linkA);linkA.style.removeProperty(\"--fa-scale\");const cs=getComputedStyle(footer);const avail=footer.clientWidth-parseFloat(cs.paddingLeft||\"0\")-parseFloat(cs.paddingRight||\"0\");// + ~arrow width on the LinkedIn side (Range can't see ::after)\nconst need=Math.max(textWidth(emailA),textWidth(linkA)+32);if(!(need>0)||!(avail>0))return;// shrink only once the wider of the two reaches the padding\nconst scale=Math.min(1,(avail-4)/need);if(scale<1){const be=parseFloat(getComputedStyle(emailA).fontSize);const bl=parseFloat(getComputedStyle(linkA).fontSize);setFont(emailA,be*scale);setFont(linkA,bl*scale);linkA.style.setProperty(\"--fa-scale\",String(scale));}};fit();const ro=new ResizeObserver(fit);ro.observe(footer);window.addEventListener(\"resize\",fit);const fonts=document.fonts;if(fonts?.ready?.then)fonts.ready.then(fit);return()=>{ro.disconnect();window.removeEventListener(\"resize\",fit);};},[]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .fr-foot-fit a[href^=\"mailto:\"],\n                    .fr-foot-fit a[href^=\"mailto:\"] *,\n                    .fr-foot-fit a[href*=\"linkedin\"],\n                    .fr-foot-fit a[href*=\"linkedin\"] * {\n                        white-space: nowrap !important;\n                    }\n                `}),/*#__PURE__*/_jsx(\"div\",{ref:ref,className:\"fr-foot-fit\",children:/*#__PURE__*/_jsx(Component,{...props})})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withButtonArrow\":{\"type\":\"reactHoc\",\"name\":\"withButtonArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkArrow\":{\"type\":\"reactHoc\",\"name\":\"withLinkArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkArrowHover\":{\"type\":\"reactHoc\",\"name\":\"withLinkArrowHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFooterFit\":{\"type\":\"reactHoc\",\"name\":\"withFooterFit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkBoldHover\":{\"type\":\"reactHoc\",\"name\":\"withLinkBoldHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProseLinkHover.map"],"mappings":"qJAmFqD,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAoB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,CAAgB,CAAC,EAAe,EAAK,OAAO,CAAC,UAAU,eAAe,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAgD,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAoB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,CAAQ,CAAC,EAAe,EAAK,OAAO,CAAC,UAAU,gBAAgB,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAGrpB,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAoB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,EAAa,CAAS,CAAC,EAAe,EAAK,OAAO,CAAC,UAAU,iCAAiC,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAGvT,SAAgB,EAAc,EAAU,CAAC,MAAO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