{"version":3,"file":"BibTexButton.DAfMPsWT.mjs","names":["React.useCallback"],"sources":["https:/framerusercontent.com/modules/UvXDGVpMyNXjiBHW4KQH/xAAad2KIqYx4gH3cosHN/BibTexButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * BibTexButton\n *\n * Matches Contact Us (secondary-btn filled) behavior:\n *  - Idle: white background, black text, sharp corners, no visible icon\n *  - Hover/focus: background flips to black, text flips to white,\n *    animated download icon slides in and loops while hovered\n * On click: generates a .bib file and triggers a download.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 147\n * @framerIntrinsicHeight 40\n */export default function BibTexButton(props){const{label=\"Download BibTex\",bibtex=`@article{odyssey2,\n  title         = {TODO: title},\n  author        = {TODO, Odyssey team list},\n  year          = {2026},\n  url           = {}\n}`,filename=\"Odyssey2Max.bib\",bgIdle=\"#FFFFFF\",fgIdle=\"#000000\",bgHover=\"#000000\",fgHover=\"#FFFFFF\",style}=props;const handleClick=React.useCallback(()=>{try{const blob=new Blob([bibtex],{type:\"application/x-bibtex;charset=utf-8\"});const url=URL.createObjectURL(blob);const a=document.createElement(\"a\");a.href=url;a.download=filename;document.body.appendChild(a);a.click();document.body.removeChild(a);setTimeout(()=>URL.revokeObjectURL(url),1e3);}catch(err){// eslint-disable-next-line no-console\nconsole.error(\"BibTex download failed:\",err);}},[bibtex,filename]);// Use CSS custom properties so the <style> block can reference prop values.\nconst cssVars={[\"--bx-bg-idle\"]:bgIdle,[\"--bx-fg-idle\"]:fgIdle,[\"--bx-bg-hover\"]:bgHover,[\"--bx-fg-hover\"]:fgHover};return /*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:handleClick,\"aria-label\":`Download ${filename}`,className:\"bibtex-btn\",style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:34,padding:\"8px 8px 8px 12px\",width:\"100%\",height:\"100%\",minWidth:147,minHeight:40,borderRadius:0,border:\"none\",background:\"var(--bx-bg-idle)\",color:\"var(--bx-fg-idle)\",fontFamily:\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif\",fontSize:14,fontWeight:500,lineHeight:1,cursor:\"pointer\",userSelect:\"none\",WebkitTapHighlightColor:\"transparent\",transition:\"background-color 200ms ease, color 500ms ease\",...cssVars,...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .bibtex-btn:hover,\n                .bibtex-btn:focus-visible {\n                    background: var(--bx-bg-hover) !important;\n                    color: var(--bx-fg-hover) !important;\n                }\n\n                /* Icon hidden + collapsed by default */\n                .bibtex-btn .bibtex-icon {\n                    display: inline-flex;\n                    align-items: center;\n                    justify-content: center;\n                    width: 0;\n                    opacity: 0;\n                    transform: translateX(-6px);\n                    overflow: hidden;\n                    transition:\n                        width 220ms ease,\n                        opacity 220ms ease,\n                        transform 220ms ease;\n                    line-height: 0;\n                }\n                .bibtex-btn:hover .bibtex-icon,\n                .bibtex-btn:focus-visible .bibtex-icon {\n                    width: 20px;\n                    opacity: 1;\n                    transform: translateX(0);\n                }\n\n                @keyframes bibtex-arrow-bounce {\n                    0%   { transform: translateY(-3px); }\n                    50%  { transform: translateY(2px);  }\n                    100% { transform: translateY(-3px); }\n                }\n                @keyframes bibtex-tray-pulse {\n                    0%, 50% { transform: scaleX(1); }\n                    65%     { transform: scaleX(1.15); }\n                    100%    { transform: scaleX(1); }\n                }\n                .bibtex-btn .bibtex-icon .arrow,\n                .bibtex-btn .bibtex-icon .tray {\n                    animation-play-state: paused;\n                    transform-origin: 50% 50%;\n                }\n                .bibtex-btn:hover .bibtex-icon .arrow,\n                .bibtex-btn:focus-visible .bibtex-icon .arrow {\n                    animation: bibtex-arrow-bounce 1.4s ease-in-out infinite;\n                    animation-play-state: running;\n                }\n                .bibtex-btn:hover .bibtex-icon .tray,\n                .bibtex-btn:focus-visible .bibtex-icon .tray {\n                    animation: bibtex-tray-pulse 1.4s ease-in-out infinite;\n                    transform-origin: 50% 100%;\n                    animation-play-state: running;\n                }\n            `}),/*#__PURE__*/_jsx(\"span\",{style:{whiteSpace:\"nowrap\"},children:label}),/*#__PURE__*/_jsx(\"span\",{className:\"bibtex-icon\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsxs(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsxs(\"g\",{className:\"arrow\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M10 3 V12\",stroke:\"currentColor\",strokeWidth:\"1.6\",strokeLinecap:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M6 9 L10 13 L14 9\",stroke:\"currentColor\",strokeWidth:\"1.6\",strokeLinecap:\"round\",strokeLinejoin:\"round\",fill:\"none\"})]}),/*#__PURE__*/_jsx(\"path\",{className:\"tray\",d:\"M4 16 H16\",stroke:\"currentColor\",strokeWidth:\"1.6\",strokeLinecap:\"round\"})]})})]});}addPropertyControls(BibTexButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Download BibTex\"},filename:{type:ControlType.String,title:\"Filename\",defaultValue:\"Odyssey2Max.bib\"},bgIdle:{type:ControlType.Color,title:\"BG Idle\",defaultValue:\"#FFFFFF\"},fgIdle:{type:ControlType.Color,title:\"FG Idle\",defaultValue:\"#000000\"},bgHover:{type:ControlType.Color,title:\"BG Hover\",defaultValue:\"#000000\"},fgHover:{type:ControlType.Color,title:\"FG Hover\",defaultValue:\"#FFFFFF\"},bibtex:{type:ControlType.String,title:\"BibTex\",defaultValue:`@article{odyssey2,\n  title         = {TODO: title},\n  author        = {TODO, Odyssey team list},\n  year          = {2026},\n  url           = {}\n}`,displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BibTexButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"40\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"147\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BibTexButton.map"],"mappings":"kLAaG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,kBAAkB,SAAO;;;;;GAKjF,WAAS,kBAAkB,SAAO,UAAU,SAAO,UAAU,UAAQ,UAAU,UAAQ,UAAU,SAAO,EAAY,EAAYA,MAAsB,CAAC,GAAG,CAAC,IAAM,EAAK,IAAI,KAAK,CAAC,EAAO,CAAC,CAAC,KAAK,qCAAqC,CAAC,CAAO,EAAI,IAAI,gBAAgB,EAAK,CAAO,EAAE,SAAS,cAAc,IAAI,CAAC,EAAE,KAAK,EAAI,EAAE,SAAS,EAAS,SAAS,KAAK,YAAY,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,KAAK,YAAY,EAAE,CAAC,eAAe,IAAI,gBAAgB,EAAI,CAAC,IAAI,OAAQ,EAAI,CAC3c,QAAQ,MAAM,0BAA0B,EAAI,GAAI,CAAC,EAAO,EAAS,CAAC,CAC5D,EAAQ,CAAE,eAAgB,EAAQ,eAAgB,EAAQ,gBAAiB,EAAS,gBAAiB,EAAQ,CAAC,OAAoB,EAAM,SAAS,CAAC,KAAK,SAAS,QAAQ,EAAY,aAAa,YAAY,IAAW,UAAU,aAAa,MAAM,CAAC,QAAQ,cAAc,WAAW,SAAS,eAAe,gBAAgB,IAAI,GAAG,QAAQ,mBAAmB,MAAM,OAAO,OAAO,OAAO,SAAS,IAAI,UAAU,GAAG,aAAa,EAAE,OAAO,OAAO,WAAW,oBAAoB,MAAM,oBAAoB,WAAW,+EAA+E,SAAS,GAAG,WAAW,IAAI,WAAW,EAAE,OAAO,UAAU,WAAW,OAAO,wBAAwB,cAAc,WAAW,gDAAgD,GAAG,EAAQ,GA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