{"version":3,"file":"KmtaCellTicks.CScelrNf.mjs","names":["React.useRef","React.useState","__esmMin","_e","de","init_jsx_runtime","c","p","init_npm_react_18_3_1","ce","init_KmtaSystem","COLOR","KmtaCellTicks","ref","on","setOn","host","sync","sq","x","y","props","init_KmtaCellTicks"],"sources":["https:/framerusercontent.com/modules/xd4dMYdF60kaJDd30vgP/5AqC9lfMnqGB6M9tANBr/KmtaCellTicks.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{COLOR}from\"https://framerusercontent.com/modules/Zws9M46JWIR9bItHAx61/orjsrSvfJY43jVjRJlHj/KmtaSystem.js\";/**\n * The k-cell focus-visible corner ticks — the site's only keyboard indicator.\n * Framer frames cannot express :focus-visible as a CSS rule, but the selector\n * works in JS: on focusin/focusout we ask the browser whether the HOST matches\n * :focus-visible. That inherits native modality (tab, shift-tab, click-then-key,\n * programmatic focus) and stays false when a focusable descendant — like the\n * EXPLORE → link inside a catalog cell — holds focus, matching the reference's\n * `.cell:focus-visible` exactly. Focus only, never hover: hover owns the lift.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function KmtaCellTicks(props){const ref=React.useRef(null);const[on,setOn]=React.useState(false);React.useEffect(()=>{// Framer wraps code components on publish: parentElement is the wrapper,\n// not the focusable cell — anchor to the nearest focusable ancestor\nconst host=ref.current?.closest(\"[tabindex], a[href]\")??ref.current?.parentElement;if(!host)return;// focusout fires before focus has actually moved; an immediate read is stale\nconst sync=()=>requestAnimationFrame(()=>{try{setOn(host.matches(\":focus-visible\"));}catch{setOn(false);}});host.addEventListener(\"focusin\",sync);host.addEventListener(\"focusout\",sync);return()=>{host.removeEventListener(\"focusin\",sync);host.removeEventListener(\"focusout\",sync);};},[]);const sq=(x,y)=>({position:\"absolute\",[x]:-4,[y]:-4,width:7,height:7,border:`1px solid ${COLOR.mark}`,background:COLOR.paper,boxSizing:\"border-box\",zIndex:1,opacity:on?1:0,transition:\"opacity .18s ease\"});return /*#__PURE__*/_jsxs(\"div\",{ref:ref,\"data-k\":\"cell-ticks\",\"data-on\":on?\"1\":\"0\",style:{position:\"absolute\",inset:0,pointerEvents:\"none\",...props.style},children:[/*#__PURE__*/_jsx(\"span\",{className:\"tk\",style:sq(\"left\",\"top\")}),/*#__PURE__*/_jsx(\"span\",{className:\"tk\",style:sq(\"right\",\"top\")}),/*#__PURE__*/_jsx(\"span\",{className:\"tk\",style:sq(\"left\",\"bottom\")}),/*#__PURE__*/_jsx(\"span\",{className:\"tk\",style:sq(\"right\",\"bottom\")})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KmtaCellTicks\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,4LAWG,SAAwBY,EAAc,EAAM,CAAC,IAAMC,EAAIb,EAAa,IAAI,EAAO,CAACc,EAAGC,GAAOd,EAAe,EAAK,EAAEQ,MAAoB,CAEvI,IAAMO,EAAKH,EAAI,SAAS,QAAQ,qBAAqB,GAAGA,EAAI,SAAS,cAAc,GAAG,CAACG,EAAK,OAC5F,IAAMC,MAAS,0BAA0B,CAAC,GAAG,CAACF,EAAMC,EAAK,QAAQ,gBAAgB,CAAC,CAAE,MAAM,CAACD,EAAM,EAAK,CAAE,CAAC,CAAC,EAA+E,OAA7EC,EAAK,iBAAiB,UAAUC,CAAI,EAAED,EAAK,iBAAiB,WAAWC,CAAI,MAAY,CAACD,EAAK,oBAAoB,UAAUC,CAAI,EAAED,EAAK,oBAAoB,WAAWC,CAAI,CAAE,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMC,GAAI,EAAE,KAAK,CAAC,SAAS,YAAYC,GAAG,IAAIC,GAAG,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,aAAaT,EAAM,OAAO,WAAWA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