{"version":3,"file":"AlphaRoomButton.BEdBc8W0.mjs","names":["useRef","useMemo","FramerLink"],"sources":["https:/framerusercontent.com/modules/LnhmCBYW5hXDjTNFqIGz/QaZVBVjQ5baRvKAoPJAN/AlphaRoomButton.js"],"sourcesContent":["// User request: Create a new Framer code component named `AlphaRoomButton` from the user's provided component, fixing the malformed missing anchor opening tag while otherwise matching its CSS and behavior exactly. Use the literal Alpha Room visual values: primary background #061019, label #F6FAF9, border rgba(6,16,25,.16), hover gradient #00FFA7 to #008EFF moving upward from translateY(101%) to 0, hover glow rgba(0,255,167,.36), font IBM Plex Mono loaded once, 12px / 0.14em uppercase, default small mode padding 10px 20px / 11px, full mode 14px 26px / 12px, and optional 14px right arrow that nudges 4px. Implement the exact fine-pointer magnetic pull constants 0.22 x, 0.32 y, 0.4 sec response and 0.55 sec elastic-like return without GSAP or external scripts. Respect reduced-motion. Keep label/link/newTab/small/showArrow as Framer controls. The result must be a standalone valid TypeScript code component, not an override. Do not include any canvas overlay handling; it will be wrapped by a native interaction layer.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useMemo,useRef}from\"react\";import{addPropertyControls,ControlType,Link as FramerLink,useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";const STYLE_ID=\"ar-alpha-room-button-style-v1\";const FONT_LINK_ID=\"ar-alpha-room-ibm-plex-mono-v1\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function AlphaRoomButton(props){const{label=\"Enter Alpha Room\",link=\"https://example.com\",newTab=false,small=true,showArrow=false,fullWidth=false}=props;const rootRef=useRef(null);const isStaticRenderer=useIsStaticRenderer();const isInView=useInView(rootRef,{once:false,margin:\"-10% 0px -10% 0px\"});const reduceMotion=useMemo(()=>{if(typeof window===\"undefined\")return true;return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;},[]);useEffect(()=>{if(typeof document===\"undefined\")return;if(!document.getElementById(FONT_LINK_ID)){const preconnectA=document.createElement(\"link\");preconnectA.rel=\"preconnect\";preconnectA.href=\"https://fonts.googleapis.com\";preconnectA.setAttribute(\"data-ar-font-preconnect\",\"googleapis\");document.head.appendChild(preconnectA);const preconnectB=document.createElement(\"link\");preconnectB.rel=\"preconnect\";preconnectB.href=\"https://fonts.gstatic.com\";preconnectB.crossOrigin=\"anonymous\";preconnectB.setAttribute(\"data-ar-font-preconnect\",\"gstatic\");document.head.appendChild(preconnectB);const fontLink=document.createElement(\"link\");fontLink.id=FONT_LINK_ID;fontLink.rel=\"stylesheet\";fontLink.href=\"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&display=swap\";document.head.appendChild(fontLink);}if(!document.getElementById(STYLE_ID)){const style=document.createElement(\"style\");style.id=STYLE_ID;style.textContent=`\n.ar-alpha-room-button {\n    position: relative;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 10px;\n    text-decoration: none;\n    border-radius: 999px;\n    overflow: hidden;\n    background: #061019;\n    color: #F6FAF9;\n    border: 1px solid rgba(255,255,255,.04);\n    box-shadow: 0 0 0 rgba(0,255,167,0);\n    transition: color .35s, border-color .35s, box-shadow .35s;\n    transform: translate3d(0px, 0px, 0px);\n    isolation: isolate;\n    will-change: transform;\n}\n\n.arbtn {\n    position: relative;\n    display: inline-block;\n    width: auto;\n    box-sizing: border-box;\n    padding: 0;\n    margin: 0;\n    overflow: visible;\n}\n\n.ar-alpha-room-button::before {\n    content: \"\";\n    position: absolute;\n    inset: 0;\n    background: linear-gradient(135deg, #00FFA7, #008EFF);\n    transform: translateY(101%);\n    transition: transform .45s cubic-bezier(.22,1,.36,1);\n    z-index: 0;\n}\n\n.ar-alpha-room-button:hover::before,\n.ar-alpha-room-button:focus-visible::before,\n.arbtn:hover .ar-alpha-room-button::before,\n.arbtn:focus-within .ar-alpha-room-button::before {\n    transform: translateY(0%);\n}\n\n.ar-alpha-room-button:hover,\n.ar-alpha-room-button:focus-visible,\n.arbtn:hover .ar-alpha-room-button,\n.arbtn:focus-within .ar-alpha-room-button {\n    border-color: transparent;\n    box-shadow: 0 10px 30px -10px rgba(0,255,167,.36);\n}\n\n.ar-alpha-room-button__content {\n    position: relative;\n    z-index: 1;\n    display: inline-flex;\n    align-items: center;\n    gap: 10px;\n}\n\n.ar-alpha-room-button__label {\n    font-family: \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.14em;\n    line-height: 1;\n    white-space: nowrap;\n}\n\n.ar-alpha-room-button__arrow {\n    font-family: \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n    font-size: 14px;\n    line-height: 1;\n    transition: transform 0.22s ease;\n}\n\n.ar-alpha-room-button:hover .ar-alpha-room-button__arrow,\n.ar-alpha-room-button:focus-visible .ar-alpha-room-button__arrow,\n.arbtn:hover .ar-alpha-room-button .ar-alpha-room-button__arrow,\n.arbtn:focus-within .ar-alpha-room-button .ar-alpha-room-button__arrow {\n    transform: translateX(4px);\n}\n\n@media (prefers-reduced-motion: reduce) {\n    .ar-alpha-room-button,\n    .ar-alpha-room-button::before,\n    .ar-alpha-room-button__arrow {\n        transition: none !important;\n    }\n}\n`;document.head.appendChild(style);}},[]);useEffect(()=>{const el=rootRef.current;if(!el)return;if(isStaticRenderer||reduceMotion)return;if(typeof window===\"undefined\")return;if(!window.matchMedia(\"(pointer: fine)\").matches)return;let rafId=0;let currentX=0;let currentY=0;let targetX=0;let targetY=0;const animate=()=>{currentX+=(targetX-currentX)*.25;currentY+=(targetY-currentY)*.25;el.style.transform=`translate3d(${currentX.toFixed(2)}px, ${currentY.toFixed(2)}px, 0px)`;const done=Math.abs(targetX-currentX)<.03&&Math.abs(targetY-currentY)<.03;if(!done){rafId=window.requestAnimationFrame(animate);}else{rafId=0;}};const ensureRaf=()=>{if(rafId)return;rafId=window.requestAnimationFrame(animate);};const onMove=event=>{if(!isInView)return;const rect=el.getBoundingClientRect();const dx=event.clientX-(rect.left+rect.width/2);const dy=event.clientY-(rect.top+rect.height/2);const maxX=rect.width*.35;const maxY=rect.height*.45;targetX=Math.max(-maxX,Math.min(maxX,dx*.22));targetY=Math.max(-maxY,Math.min(maxY,dy*.32));el.style.transition=\"transform 0.4s cubic-bezier(0.22, 1, 0.36, 1)\";ensureRaf();};const onLeave=()=>{targetX=0;targetY=0;el.style.transition=\"transform 0.55s cubic-bezier(0.22, 1.35, 0.36, 1)\";ensureRaf();};el.addEventListener(\"pointermove\",onMove);el.addEventListener(\"pointerleave\",onLeave);el.addEventListener(\"pointercancel\",onLeave);return()=>{if(rafId&&typeof window!==\"undefined\"){window.cancelAnimationFrame(rafId);}el.removeEventListener(\"pointermove\",onMove);el.removeEventListener(\"pointerleave\",onLeave);el.removeEventListener(\"pointercancel\",onLeave);el.style.transition=\"\";el.style.transform=\"translate3d(0px, 0px, 0px)\";};},[isInView,isStaticRenderer,reduceMotion]);return /*#__PURE__*/_jsx(\"div\",{className:\"arbtn\",style:{position:\"relative\",display:fullWidth?\"block\":\"inline-block\",width:fullWidth?\"100%\":\"auto\",boxSizing:\"border-box\"},children:/*#__PURE__*/_jsx(FramerLink,{href:link,style:{display:fullWidth?\"block\":\"inline-block\",width:fullWidth?\"100%\":\"auto\",boxSizing:\"border-box\"},children:/*#__PURE__*/_jsx(\"a\",{ref:rootRef,className:\"ar-alpha-room-button\",role:\"button\",\"aria-label\":label,target:newTab?\"_blank\":undefined,rel:newTab?\"noreferrer noopener\":undefined,style:{position:\"relative\",display:\"flex\",boxSizing:\"border-box\",justifyContent:\"center\",padding:small?\"10px 20px\":\"14px 26px\",width:fullWidth?\"100%\":\"max-content\"},children:/*#__PURE__*/_jsxs(\"span\",{className:\"ar-alpha-room-button__content\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"ar-alpha-room-button__label\",style:{fontSize:small?\"11px\":\"12px\"},children:label}),showArrow?/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":true,className:\"ar-alpha-room-button__arrow\",children:\"→\"}):null]})})})});}addPropertyControls(AlphaRoomButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Enter Alpha Room\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"https://example.com\"},newTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},small:{type:ControlType.Boolean,title:\"Small\",defaultValue:true,enabledTitle:\"Small\",disabledTitle:\"Full\"},showArrow:{type:ControlType.Boolean,title:\"Arrow\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},fullWidth:{type:ControlType.Boolean,title:\"Full Width\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AlphaRoomButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AlphaRoomButton.map"],"mappings":"8QAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,mBAAmB,OAAK,sBAAsB,SAAO,GAAM,QAAM,GAAK,YAAU,GAAM,YAAU,IAAO,EAAY,EAAQA,EAAO,IAAI,EAAQ,EAAiB,EAAoB,EAAQ,EAAS,EAAU,EAAQ,CAAC,KAAK,GAAM,OAAO,mBAAmB,CAAC,EAAQ,EAAaC,MAAuB,IAAS,QAA+B,EAAO,WAAW,kCAAkC,CAAC,CAAC,QAAU,CAAC,CAAC,EA6FwtC,OA7FttC,MAAc,CAAI,YAAO,SAAW,KAAmB,IAAG,CAAC,SAAS,eAAe,CAAY,EAAE,CAAC,IAAM,EAAY,SAAS,cAAc,MAAM,EAAE,EAAY,IAAI,aAAa,EAAY,KAAK,+BAA+B,EAA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