var Q=Object.defineProperty;var T=(j)=>j;function V(j,z){this[j]=T.bind(null,z)}var Z=(j,z)=>{for(var q in z)Q(j,q,{get:z[q],enumerable:!0,configurable:!0,set:V.bind(z,q)})};var _=(j,z)=>()=>(j&&(z=j(j=0)),z);var J={meta:{key:"contractspec.docs",version:"1.0.0",title:"Documentation",description:"Comprehensive documentation system for ContractSpec",domain:"platform",owners:["@platform.docs"],tags:["documentation","guides","api-reference"],stability:"stable"},operations:[{key:"docs_search",version:"1.0.0"},{key:"docs.navigate",version:"1.0.0"}],events:[{key:"docs.page_viewed",version:"1.0.0"},{key:"docs.search_performed",version:"1.0.0"}],presentations:[{key:"docs.landing",version:"1.0.0"},{key:"docs.getting-started",version:"1.0.0"},{key:"docs.architecture",version:"1.0.0"}],capabilities:{provides:[{key:"contracts.docs",version:"1.0.0"}],requires:[]}};var K={meta:{key:"contractspec.mcp",version:"1.0.0",title:"MCP Integration",description:"Model Context Protocol server for AI agent integration",domain:"platform",owners:["@platform.mcp"],tags:["mcp","ai-agents","tooling"],stability:"beta"},operations:[{key:"mcp.tool.register",version:"1.0.0"},{key:"mcp.resource.register",version:"1.0.0"},{key:"mcp.prompt.register",version:"1.0.0"}],events:[{key:"mcp.tool_invoked",version:"1.0.0"},{key:"mcp.resource_accessed",version:"1.0.0"}],presentations:[],capabilities:{provides:[{key:"contracts.mcp",version:"1.0.0"}],requires:[{key:"contracts.operations",version:"1.0.0"}]}};var L={meta:{key:"contractspec.presentations",version:"1.0.0",title:"Presentation Runtime",description:"Cross-platform rendering of contract-driven UI",domain:"platform",owners:["@platform.presentations"],tags:["presentations","ui","rendering","cross-platform"],stability:"beta"},operations:[{key:"presentation.render",version:"1.0.0"},{key:"presentation.transform",version:"1.0.0"}],events:[{key:"presentation.rendered",version:"1.0.0"},{key:"presentation.transformed",version:"1.0.0"}],presentations:[{key:"form.standard",version:"1.0.0"},{key:"list.standard",version:"1.0.0"},{key:"detail.standard",version:"1.0.0"}],capabilities:{provides:[{key:"contracts.presentations",version:"1.0.0"}],requires:[]}};import{AppConfigFeature as W}from"@contractspec/lib.contracts-spec/app-config";import{FeatureRegistry as X}from"@contractspec/lib.contracts-spec/features";function Y(){let j=new X;return j.register(J),j.register(K),j.register(L),j.register(W),j}var G=null;function N(){if(!G)G=Y();return G}function R(){G=null}import{useMemo as O}from"react";function I(){let j=O(()=>N(),[]);return O(()=>{let z=j.list();return{features:z,getFeature:(q)=>j.get(q),getByTag:(q)=>j.listByTag(q),getByOwner:(q)=>j.listByOwner(q),getUniqueTags:()=>j.getUniqueTags(),getUniqueDomains:()=>{let q=new Set;for(let B of z)if(B.meta.domain)q.add(B.meta.domain);return[...q].sort()},getUniqueStabilities:()=>{let q=new Set;for(let B of z)if(B.meta.stability)q.add(B.meta.stability);return[...q].sort()}}},[j])}export{I as useFeatureRegistry};
