{"version":3,"file":"AutoTableOfContents.Dy7Rupoy.mjs","names":["useState","useMemo","useCallback","__esmMin","pe","te","init_npm_react_18_3_1","window","_e","init_jsx_runtime","ne","p","ce","init_ssg_sandbox_shims","init_framer_CaDWdxiz","ControlType","useIsStaticRenderer","addPropertyControls","idToTitle","id","char","parseCsv","value","part","parseDepthMap","entries","map","entry","idPart","depthPart","parsedDepth","inferLabelFromElement","element","AutoTableOfContents","customItems","props","isStatic","items","setItems","activeId","setActiveId","hasMounted","setHasMounted","resolvedFontSize","font","fontSize","depthLookup","depthMap","includeList","includeIds","includeSet","fallbackItems","friendlyFallbackLabels","displayItems","discoveredLabelMap","item","visibleCustomItems","hasCustomItems","useCustomItems","inferLabelById","discovered","renderRows","safeDepth","itemType","baseLabel","fallbackLabel","index","key","latestKeyByDepth","depth","parentDepth","parentKey","d","showAutoDetectHint","resolvedRenderRows","effectiveNumberMode","numberStyle","numberMode","rowNumbers","numbers","count","row","parentCounts","nearestGroupKey","resolvedParent","counters","depthIndex","i","hierarchical","excludedIdPattern","collectItems","query","selector","selectedElements","idToElement","node","elementId","nextItems","observer","visible","b","a","first","handleLinkClick","event","target","backgroundColor","borderColor","radius","textColor","rowGap","isCurrent","depthIndent","indentSize","numberValue","showNumber","currentBackground","numberWidth","mutedColor","accentColor","groupTextColor","groupBackground","groupFontSize","groupFontWeight","init_AutoTableOfContents"],"sources":["https:/framerusercontent.com/modules/yzzpC6QCLf9ItHNhrAQ8/1DXFxOT7AXwCKyIkRRBq/AutoTableOfContents.js"],"sourcesContent":["// User request: Create a new Framer code component named AutoTableOfContents that auto-builds a TOC from page anchors, supports includeIds/depthMap parsing, smooth scrolling, active-section highlighting, accessibility, dark translucent styling, and configurable property controls with SSR-safe runtime document/window access.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";function idToTitle(id){return id.replace(/[-_]+/g,\" \").replace(/\\s+/g,\" \").trim().replace(/\\b\\w/g,char=>char.toUpperCase());}function parseCsv(value){return value.split(\",\").map(part=>part.trim()).filter(Boolean);}function parseDepthMap(value){const entries=parseCsv(value);const map={};for(const entry of entries){const[idPart,depthPart]=entry.split(\":\").map(part=>part?.trim()??\"\");if(!idPart)continue;const parsedDepth=Number(depthPart);if(parsedDepth===2||parsedDepth===3){map[idPart]=parsedDepth;}else{map[idPart]=1;}}return map;}function inferLabelFromElement(element){const ariaLabel=element.getAttribute(\"aria-label\")?.trim();if(ariaLabel)return ariaLabel;const dataLabel=element.getAttribute(\"data-toc-label\")?.trim();if(dataLabel)return dataLabel;const heading=element.querySelector(\"h1, h2, h3\");const headingText=heading?.textContent?.trim();if(headingText)return headingText;return idToTitle(element.id);}const friendlyFallbackLabels={\"storm-reavers\":\"Storm Reavers\",\"version-1\":\"Version 1 — Concept\",\"version-2\":\"Version 2 — The pivot\",\"gravity-mechanics\":\"Gravity mechanic overview\",\"island-generation\":\"Island generation\",\"enemies-movement\":\"Enemies\",tooling:\"Tooling\",\"rd-movement\":\"R&D / Experiments — 3D movement in 2D\"};/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AutoTableOfContents(props){const{useCustomItems,items:customItems,includeIds,depthMap,selector,backgroundColor,borderColor,accentColor,textColor,mutedColor,currentBackground,radius,padding,rowGap,fontSize,numberStyle,numberMode,indentSize,numberWidth,groupTextColor,groupBackground,groupFontSize,groupFontWeight,font}=props;const isStatic=useIsStaticRenderer();const[items,setItems]=useState([]);const[activeId,setActiveId]=useState(\"\");const[hasMounted,setHasMounted]=useState(false);const resolvedFontSize=font?.fontSize??`${fontSize}px`;const depthLookup=useMemo(()=>parseDepthMap(depthMap),[depthMap]);const includeList=useMemo(()=>parseCsv(includeIds),[includeIds]);const includeSet=useMemo(()=>new Set(includeList),[includeList]);const fallbackItems=useMemo(()=>includeList.map(id=>({id,label:friendlyFallbackLabels[id]??idToTitle(id),depth:depthLookup[id]??1})),[includeList,depthLookup]);const displayItems=useMemo(()=>items.length>0?items:fallbackItems,[items,fallbackItems]);const discoveredLabelMap=useMemo(()=>{const map=new Map;for(const item of displayItems){map.set(item.id,item.label);}return map;},[displayItems]);const visibleCustomItems=useMemo(()=>(customItems||[]).filter(item=>item?.visible!==false),[customItems]);const hasCustomItems=useCustomItems&&visibleCustomItems.length>0;const inferLabelById=useCallback(id=>{const discovered=discoveredLabelMap.get(id);if(discovered)return discovered;if(typeof document!==\"undefined\"){const element=document.getElementById(id);if(element)return inferLabelFromElement(element);}return friendlyFallbackLabels[id]??idToTitle(id);},[discoveredLabelMap]);const renderRows=useMemo(()=>{if(hasCustomItems){return visibleCustomItems.map((item,index)=>{const safeDepth=Math.max(1,Math.min(4,Number(item.depth)||1));const itemType=item.type===\"Group\"?\"Group\":\"Link\";const id=itemType===\"Link\"?(item.id||\"\").trim():\"\";const baseLabel=(item.label||\"\").trim();const fallbackLabel=id?inferLabelById(id):`Group ${index+1}`;const key=(item.key||id||`row-${index}`).trim();return{type:itemType,id:id||undefined,label:baseLabel||fallbackLabel,depth:safeDepth,parentKey:(item.parentKey||\"\").trim(),key,numbered:item.numbered!==false};});}const latestKeyByDepth={};return displayItems.map((item,index)=>{const depth=Math.max(1,Math.min(4,item.depth));const key=item.id||`row-${index}`;const parentDepth=depth-1;const parentKey=depth===1?\"root\":latestKeyByDepth[parentDepth]||\"root\";latestKeyByDepth[depth]=key;for(let d=depth+1;d<=4;d++){delete latestKeyByDepth[d];}return{type:\"Link\",id:item.id,label:item.label,depth,parentKey,key,numbered:true};});},[hasCustomItems,visibleCustomItems,displayItems,inferLabelById]);const showAutoDetectHint=!useCustomItems&&includeList.length===0&&(isStatic||!hasMounted&&renderRows.length===0);const resolvedRenderRows=useMemo(()=>{if(!showAutoDetectHint||renderRows.length>0)return renderRows;return[{type:\"Group\",label:\"Auto-detecting page sections…\",depth:1,parentKey:\"root\",key:\"__auto_detect_hint__\",numbered:false}];},[showAutoDetectHint,renderRows]);const effectiveNumberMode=useMemo(()=>{if(numberStyle===\"None\")return\"None\";return numberMode;},[numberMode,numberStyle]);const rowNumbers=useMemo(()=>{const numbers=new Map;if(effectiveNumberMode===\"None\")return numbers;if(effectiveNumberMode===\"Global\"){let count=0;for(const row of resolvedRenderRows){if(!row.numbered)continue;count+=1;numbers.set(row.key,count.toString().padStart(2,\"0\"));}return numbers;}if(effectiveNumberMode===\"Reset by parent\"){const parentCounts={};let nearestGroupKey=\"\";for(const row of resolvedRenderRows){if(row.type===\"Group\"&&row.key){nearestGroupKey=row.key;}if(!row.numbered)continue;const resolvedParent=row.parentKey||nearestGroupKey||\"root\";parentCounts[resolvedParent]=(parentCounts[resolvedParent]??0)+1;numbers.set(row.key,parentCounts[resolvedParent].toString().padStart(2,\"0\"));}return numbers;}const counters=[0,0,0,0];for(const row of resolvedRenderRows){if(!row.numbered)continue;const depthIndex=row.depth-1;counters[depthIndex]+=1;for(let i=depthIndex+1;i<counters.length;i++)counters[i]=0;for(let i=0;i<depthIndex;i++){if(counters[i]===0)counters[i]=1;}const hierarchical=counters.slice(0,depthIndex+1).map(value=>value.toString().padStart(2,\"0\")).join(\".\");numbers.set(row.key,hierarchical);}return numbers;},[resolvedRenderRows,effectiveNumberMode]);const excludedIdPattern=/^(framer|__framer|header|footer|nav|navigation|menu|top|bottom|skip|page|root)/i;const collectItems=useCallback(()=>{if(typeof document===\"undefined\")return;const query=selector?.trim()||\"[id]\";const selectedElements=Array.from(document.querySelectorAll(query));const idToElement=new Map;for(const node of selectedElements){if(!(node instanceof HTMLElement))continue;const elementId=node.id?.trim();if(!elementId)continue;if(node.closest(\"header, footer, nav\"))continue;if(excludedIdPattern.test(elementId))continue;idToElement.set(elementId,node);}const nextItems=[];if(includeList.length>0){for(const id of includeList){const element=idToElement.get(id)||document.getElementById(id);if(!element)continue;nextItems.push({id,label:inferLabelFromElement(element),depth:depthLookup[id]??1});}}else{for(const element of idToElement.values()){const id=element.id;if(includeSet.size>0&&!includeSet.has(id))continue;nextItems.push({id,label:inferLabelFromElement(element),depth:depthLookup[id]??1});}}startTransition(()=>{setItems(nextItems);});},[selector,includeList,depthLookup,includeSet]);useEffect(()=>{if(typeof window!==\"undefined\"){startTransition(()=>setHasMounted(true));}else{startTransition(()=>setHasMounted(false));}},[]);useEffect(()=>{if(!hasMounted||isStatic)return;collectItems();},[collectItems,hasMounted,isStatic]);useEffect(()=>{if(!hasMounted||isStatic||resolvedRenderRows.length===0)return;if(typeof window===\"undefined\"||typeof document===\"undefined\")return;if(!(\"IntersectionObserver\"in window))return;const observer=new IntersectionObserver(entries=>{const visible=entries.filter(entry=>entry.isIntersecting).sort((a,b)=>b.intersectionRatio-a.intersectionRatio);if(visible.length===0)return;const first=visible[0].target;if(!first?.id)return;startTransition(()=>setActiveId(first.id));},{root:null,rootMargin:\"-20% 0px -65% 0px\",threshold:[.1,.25,.5,.75]});for(const item of resolvedRenderRows){if(item.type!==\"Link\"||!item.id)continue;const element=document.getElementById(item.id);if(element)observer.observe(element);}return()=>observer.disconnect();},[resolvedRenderRows,hasMounted,isStatic]);const handleLinkClick=useCallback((event,id)=>{event.preventDefault();if(typeof document!==\"undefined\"){const target=document.getElementById(id);if(target){target.scrollIntoView({behavior:\"smooth\",block:\"start\"});}}if(typeof window!==\"undefined\"){window.history.pushState(null,\"\",`#${id}`);}startTransition(()=>setActiveId(id));},[]);return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Table of contents\",style:{position:\"relative\",width:\"100%\",height:\"auto\",boxSizing:\"border-box\",background:backgroundColor,border:`1px solid ${borderColor}`,borderRadius:radius,padding,color:textColor,fontFamily:font?.fontFamily},children:[/*#__PURE__*/_jsx(\"ol\",{style:{margin:0,padding:0,listStyle:\"none\",display:\"flex\",flexDirection:\"column\",gap:rowGap},children:resolvedRenderRows.map(item=>{const isCurrent=item.type===\"Link\"&&item.id===activeId;const depthIndent=(item.depth-1)*indentSize;const numberValue=rowNumbers.get(item.key);const showNumber=effectiveNumberMode!==\"None\"&&item.numbered&&!!numberValue;return /*#__PURE__*/_jsx(\"li\",{style:{margin:0,padding:0},children:item.type===\"Link\"&&item.id?/*#__PURE__*/_jsxs(\"a\",{href:`#${item.id}`,onClick:event=>handleLinkClick(event,item.id),style:{minHeight:36,display:\"flex\",alignItems:\"center\",columnGap:10,textDecoration:\"none\",color:textColor,background:isCurrent?currentBackground:\"transparent\",borderRadius:8,padding:\"6px 8px\",paddingLeft:8+depthIndent,outline:\"none\",transition:\"background-color 180ms ease\"},children:[showNumber?/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{width:numberWidth,minWidth:numberWidth,textAlign:\"right\",color:mutedColor,fontSize:12,lineHeight:\"1.35\"},children:numberValue}):null,/*#__PURE__*/_jsx(\"span\",{style:{color:isCurrent?accentColor:textColor,fontSize:resolvedFontSize,lineHeight:font?.lineHeight??\"1.35\",letterSpacing:font?.letterSpacing,fontWeight:font?.fontWeight,fontStyle:font?.fontStyle,textAlign:font?.textAlign??\"left\",minWidth:0,width:\"100%\",overflowWrap:\"anywhere\"},children:item.label})]}):/*#__PURE__*/_jsxs(\"div\",{role:\"listitem\",style:{minHeight:32,display:\"flex\",alignItems:\"center\",columnGap:10,color:groupTextColor,background:groupBackground,borderRadius:8,padding:\"6px 8px\",paddingLeft:8+depthIndent},children:[showNumber?/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{width:numberWidth,minWidth:numberWidth,textAlign:\"right\",color:mutedColor,fontSize:12,lineHeight:\"1.35\"},children:numberValue}):null,/*#__PURE__*/_jsx(\"span\",{style:{color:groupTextColor,fontSize:groupFontSize,fontWeight:groupFontWeight,lineHeight:\"1.35\",minWidth:0,width:\"100%\",overflowWrap:\"anywhere\"},children:item.label})]})},item.key);})}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    a[href^=\"#\"]:hover {\n                        background: ${currentBackground};\n                    }\n                    a[href^=\"#\"]:focus-visible {\n                        box-shadow: 0 0 0 2px ${accentColor} inset;\n                        background: ${currentBackground};\n                    }\n                `})]});}addPropertyControls(AutoTableOfContents,{// Custom items provide saved/manual structure. Disable to use runtime auto mode from selector/includeIds.\nuseCustomItems:{type:ControlType.Boolean,title:\"Use Custom\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Auto\"},items:{type:ControlType.Array,title:\"Items\",control:{type:ControlType.Object,controls:{type:{type:ControlType.Enum,options:[\"Link\",\"Group\"],optionTitles:[\"Link\",\"Group\"],defaultValue:\"Link\"},id:{type:ControlType.String,defaultValue:\"\",placeholder:\"section-id\"},label:{type:ControlType.String,defaultValue:\"\",placeholder:\"Optional label\"},depth:{type:ControlType.Number,defaultValue:1,min:1,max:4,step:1},parentKey:{type:ControlType.String,defaultValue:\"\",placeholder:\"root or group key\"},key:{type:ControlType.String,defaultValue:\"\",placeholder:\"Unique key\"},numbered:{type:ControlType.Boolean,defaultValue:true},visible:{type:ControlType.Boolean,defaultValue:true}}},defaultValue:[{type:\"Link\",id:\"storm-reavers\",label:\"Storm Reavers\",depth:1,parentKey:\"root\",key:\"storm-reavers\",numbered:true,visible:true},{type:\"Group\",key:\"versions\",label:\"Versions\",depth:2,parentKey:\"\",numbered:false,visible:true},{type:\"Link\",id:\"version-1\",label:\"Version 1 — Concept\",depth:3,parentKey:\"versions\",key:\"version-1\",numbered:true,visible:true},{type:\"Link\",id:\"version-2\",label:\"Version 2 — The pivot\",depth:3,parentKey:\"versions\",key:\"version-2\",numbered:true,visible:true},{type:\"Link\",id:\"gravity-mechanics\",label:\"Gravity mechanic overview\",depth:2,parentKey:\"root\",key:\"gravity-mechanics\",numbered:true,visible:true},{type:\"Link\",id:\"island-generation\",label:\"Island generation\",depth:2,parentKey:\"root\",key:\"island-generation\",numbered:true,visible:true},{type:\"Link\",id:\"enemies-movement\",label:\"Enemies\",depth:2,parentKey:\"root\",key:\"enemies-movement\",numbered:true,visible:true},{type:\"Link\",id:\"tooling\",label:\"Tooling\",depth:1,parentKey:\"root\",key:\"tooling\",numbered:true,visible:true},{type:\"Link\",id:\"rd-movement\",label:\"R&D / Experiments — 3D movement in 2D\",depth:1,parentKey:\"root\",key:\"rd-movement\",numbered:true,visible:true}]},includeIds:{type:ControlType.String,title:\"Include IDs\",defaultValue:\"storm-reavers,version-1,version-2,gravity-mechanics,island-generation,enemies-movement,tooling,rd-movement\",placeholder:\"id-one,id-two,id-three\"},depthMap:{type:ControlType.String,title:\"Depth Map\",defaultValue:\"storm-reavers:1,version-1:2,version-2:2,gravity-mechanics:2,island-generation:2,enemies-movement:2,tooling:1,rd-movement:1\",placeholder:\"id:1,id:2,id:3\"},selector:{type:ControlType.String,title:\"Selector\",defaultValue:\"[id]\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(20,20,20,0.75)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(255,114,89,0.24)\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#FF7259\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#F5F5F5\"},mutedColor:{type:ControlType.Color,title:\"Number\",defaultValue:\"rgba(255,114,89,0.7)\"},currentBackground:{type:ControlType.Color,title:\"Current Row\",defaultValue:\"rgba(255,114,89,0.14)\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:40,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:14,min:0,max:40,step:1,unit:\"px\"},rowGap:{type:ControlType.Number,title:\"Row Gap\",defaultValue:4,min:0,max:24,step:1,unit:\"px\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:14,min:10,max:24,step:1,unit:\"px\"},numberStyle:{type:ControlType.Enum,title:\"Numbers\",defaultValue:\"Decimal\",options:[\"Decimal\",\"None\"],optionTitles:[\"Decimal\",\"None\"],displaySegmentedControl:true},numberMode:{type:ControlType.Enum,title:\"Number Mode\",defaultValue:\"Reset by parent\",options:[\"Global\",\"Reset by parent\",\"Hierarchical\",\"None\"],optionTitles:[\"Global\",\"Reset\",\"Hierarchy\",\"None\"]},indentSize:{type:ControlType.Number,title:\"Indent\",defaultValue:20,min:8,max:48,step:1,unit:\"px\"},numberWidth:{type:ControlType.Number,title:\"Num Width\",defaultValue:28,min:16,max:64,step:1,unit:\"px\"},groupTextColor:{type:ControlType.Color,title:\"Group Text\",defaultValue:\"#F5F5F5\"},groupBackground:{type:ControlType.Color,title:\"Group BG\",defaultValue:\"rgba(255,114,89,0.08)\"},groupFontSize:{type:ControlType.Number,title:\"Group Size\",defaultValue:13,min:10,max:24,step:1,unit:\"px\"},groupFontWeight:{type:ControlType.Number,title:\"Group Weight\",defaultValue:600,min:100,max:900,step:100},font:{type:ControlType.Font,title:\"Label Font\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.35em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoTableOfContents\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AutoTableOfContents.map"],"mappings":"A,oOAC2M,SAASkB,EAAU,EAAG,CAAC,OAAOC,EAAG,QAAQ,SAAS,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,QAAQ,GAAMC,EAAK,YAAY,CAAC,CAAE,CAAC,SAASC,EAAS,EAAM,CAAC,OAAOC,EAAM,MAAM,GAAG,CAAC,CAAC,IAAI,GAAMC,EAAK,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,CAAE,CAAC,SAASC,EAAc,EAAM,CAAC,IAAMC,EAAQJ,EAASC,CAAK,EAAQI,EAAI,CAAC,EAAE,IAAI,IAAMC,KAASF,EAAQ,CAAC,GA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