{"version":3,"file":"LevelMark.BJNxOOAW.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/HYVzGJnOLYBmcCbwrf8i/niYWilZoXNfyDyRry1Ze/LevelMark.js"],"sourcesContent":["// LevelMark: an invisible marker. Put one at the top of a section (or of a page) and the level\n// badge in the navigation rolls to this level when the marker passes the middle of the window.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function LevelMark(props){const{level=\"3\",name=\"Rooms\"}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el||isStatic||typeof window===\"undefined\")return;const w=window;w.__mz=w.__mz||{marks:new Set};const mark={el,level:String(level),name:String(name)};w.__mz.marks.add(mark);window.dispatchEvent(new Event(\"mz-level\"));return()=>{w.__mz.marks.delete(mark);};},[level,name,isStatic]);if(isStatic)return /*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-block\",padding:\"3px 8px\",border:\"1px dashed rgba(120,120,120,.6)\",borderRadius:20,font:\"500 11px/1.2 sans-serif\",color:\"rgba(120,120,120,.9)\",whiteSpace:\"nowrap\"},children:[\"Level \",level,\" \\xb7 \",name]});return /*#__PURE__*/_jsx(\"span\",{ref:ref,\"aria-hidden\":\"true\",style:{display:\"block\",width:1,height:1,pointerEvents:\"none\"}});}addPropertyControls(LevelMark,{level:{type:ControlType.String,title:\"Level\",defaultValue:\"3\",description:\"The numeral the navigation shows from here on.\"},name:{type:ControlType.String,title:\"Name\",defaultValue:\"Rooms\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LevelMark\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LevelMark.map"],"mappings":"8MAKG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,IAAI,OAAK,SAAS,EAAY,EAAS,EAAoB,EAAQ,EAAIA,EAAO,IAAI,EAAolB,OAAllB,MAAc,CAAC,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,GAAI,GAAiB,IAAS,OAAY,OAAO,IAAM,EAAE,EAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,IAAM,EAAK,CAAC,KAAG,MAAM,OAAO,CAAK,EAAE,KAAK,OAAO,CAAI,CAAC,EAAqE,OAAnE,EAAE,KAAK,MAAM,IAAI,CAAI,EAAE,EAAO,cAAc,IAAI,MAAM,UAAU,CAAC,MAAY,CAAC,EAAE,KAAK,MAAM,OAAO,CAAI,CAAE,CAAE,EAAE,CAAC,EAAM,EAAK,CAAQ,CAAC,EAAK,EAA6B,EAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,eAAe,QAAQ,UAAU,OAAO,kCAAkC,aAAa,GAAG,KAAK,0BAA0B,MAAM,uBAAuB,WAAW,QAAQ,EAAE,SAAS,CAAC,SAAS,EAAM,MAAS,CAAI,CAAC,CAAC,EAAsB,EAAK,OAAO,CAAK,MAAI,cAAc,OAAO,MAAM,CAAC,QAAQ,QAAQ,MAAM,EAAE,OAAO,EAAE,cAAc,MAAM,CAAC,CAAC,CAAE,qBAHpyB,IAAwE,IAAoC,EAGyrB,EAAoB,EAAU,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,IAAI,YAAY,gDAAgD,EAAE,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,OAAO,CAAC,CAAC"}