@doc-karta/karta 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{i as h,u as y,r as d,h as b,j as t,c as u,T as w,f as v,Q as z,o as k,p as j,q as _,e as S,l as P}from"./styles-C6S5xD8i.js";var e=h;e(".padding-x1qhigcl{padding:20px}",1e3);e(".fontFamily-x1880mbn{font-family:var(--fontSans-x1k96p3b)}",3e3);e(".color-x185ec43{color:var(--text-x1qdqye4)}",3e3);e(".backgroundColor-x1sv03ar{background-color:var(--bg-xl7qi7f)}",3e3);e(".minHeight-xg6iff7{min-height:100vh}",4e3);e(".fontSize-x4z9k3i{font-size:13px}",3e3);e(".color-xn34zyf{color:var(--muted-x11rjawc)}",3e3);e(".fontSize-x1j6dyjg{font-size:11px}",3e3);e(".textTransform-xtvhhri{text-transform:uppercase}",3e3);e(".letterSpacing-x9pfba7{letter-spacing:.08em}",3e3);e(".fontWeight-x1xlr1w8{font-weight:700}",3e3);e(".fontSize-x1i1m3gp{font-size:22px}",3e3);e(".marginTop-x1gslohp{margin-top:4px}",4e3);e(".marginBottom-x12nagc{margin-bottom:4px}",4e3);e(".fontSize-xfifm61{font-size:12px}",3e3);e(".fontFamily-xtd1war{font-family:var(--fontMono-x3fiz1h)}",3e3);e(".marginBottom-x1yztbdb{margin-bottom:16px}",4e3);e(".lineHeight-x1evy7pa{line-height:1.5}",3e3);e(".paddingTop-xz9dl7a{padding-top:12px}",4e3);e(".paddingBottom-xsag5q8{padding-bottom:12px}",4e3);e(".paddingLeft-xzjhap9{padding-left:14px}",4e3);e(".paddingRight-x19tmk5i{padding-right:14px}",4e3);e(".borderRadius-xur7f20{border-radius:8px}",2e3);e(".backgroundColor-xa3hp3g{background-color:var(--panel-x71edem)}",3e3);e(".borderWidth-xmkeg23{border-width:1px}",2e3);e(".borderStyle-x1y0btm7{border-style:solid}",2e3);e(".borderColor-x1ugr8pw{border-color:var(--border-xcu5if3)}",2e3);e(".marginBottom-xieb3on{margin-bottom:20px}",4e3);e(".fontSize-x1k6wstc{font-size:10px}",3e3);e(".marginBottom-x1e56ztr{margin-bottom:8px}",4e3);e(".display-x78zum5{display:flex}",3e3);e(".flexDirection-xdt5ytf{flex-direction:column}",3e3);e(".gap-x17d4w8g{gap:6px}",2e3);e(".marginBottom-x1c436fg{margin-bottom:18px}",4e3);e(".alignItems-x6s0dn4{align-items:center}",3e3);e(".gap-x167g77z{gap:8px}",2e3);e(".textAlign-xdpxx8g{text-align:left}",3e3);e(".paddingTop-x1y1aw1k{padding-top:8px}",4e3);e(".paddingBottom-xwib8y2{padding-bottom:8px}",4e3);e(".paddingLeft-x1lqa7cf{padding-left:10px}",4e3);e(".paddingRight-xcicffo{padding-right:10px}",4e3);e(".cursor-x1ypdohk{cursor:pointer}",3e3);e(".borderRadius-x1kogg8i{border-radius:6px}",2e3);e(".backgroundColor-xg1eswc:hover{background-color:var(--border-xcu5if3)}",3130);e(".letterSpacing-x1dgsrnt{letter-spacing:.06em}",3e3);function B(){const{registry:i}=y(),[p,m]=d.useState(null);d.useEffect(()=>b("node:select",o=>m(o.id)),[]);const r=i==null?void 0:i.nodes.find(o=>o.id===p);if(!i||!r)return t.jsx("div",{className:"Preview__styles.root padding-x1qhigcl fontFamily-x1880mbn color-x185ec43 backgroundColor-x1sv03ar minHeight-xg6iff7",children:t.jsx("p",{className:"Preview__styles.empty fontSize-x4z9k3i color-xn34zyf",children:"No node selected."})});const f=o=>{var n;return((n=i.nodes.find(a=>a.id===o))==null?void 0:n.title)??o},x=i.edges.filter(o=>o.from===r.id),s=i.edges.filter(o=>o.to===r.id),g=({edge:o,dir:n})=>{const a=n==="out"?o.to:o.from;return t.jsxs("button",{type:"button",onClick:()=>v("node:navigate",{id:a}),className:"Preview__styles.edge display-x78zum5 alignItems-x6s0dn4 gap-x167g77z textAlign-xdpxx8g paddingTop-x1y1aw1k paddingBottom-xwib8y2 paddingLeft-x1lqa7cf paddingRight-xcicffo fontSize-x4z9k3i cursor-x1ypdohk borderRadius-x1kogg8i borderWidth-xmkeg23 borderStyle-x1y0btm7 borderColor-x1ugr8pw backgroundColor-xa3hp3g backgroundColor-xg1eswc color-x185ec43",children:[t.jsx("span",{className:"Preview__styles.kind fontSize-x1k6wstc textTransform-xtvhhri letterSpacing-x1dgsrnt color-xn34zyf fontFamily-xtd1war",children:o.kind}),t.jsx("span",{children:f(a)})]})};return t.jsxs("div",{className:"Preview__styles.root padding-x1qhigcl fontFamily-x1880mbn color-x185ec43 backgroundColor-x1sv03ar minHeight-xg6iff7",children:[t.jsx("div",{className:"Preview__styles.type fontSize-x1j6dyjg textTransform-xtvhhri letterSpacing-x9pfba7 fontWeight-x1xlr1w8",style:{color:w[r.type]},children:u[r.type]}),t.jsx("h1",{className:"Preview__styles.title fontSize-x1i1m3gp fontWeight-x1xlr1w8 marginTop-x1gslohp marginBottom-x12nagc",children:r.title}),t.jsx("div",{className:"Preview__styles.meta fontSize-xfifm61 color-xn34zyf fontFamily-xtd1war marginBottom-x1yztbdb",children:r.id}),t.jsx("p",{className:"Preview__styles.note fontSize-x4z9k3i color-xn34zyf lineHeight-x1evy7pa paddingTop-xz9dl7a paddingBottom-xsag5q8 paddingLeft-xzjhap9 paddingRight-x19tmk5i borderRadius-xur7f20 backgroundColor-xa3hp3g borderWidth-xmkeg23 borderStyle-x1y0btm7 borderColor-x1ugr8pw marginBottom-xieb3on",children:"Rendered MDX body lands here once the core emits it. P2 shows the node's resolved metadata and its place in the dependency graph."}),x.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"Preview__styles.section fontSize-x1k6wstc textTransform-xtvhhri letterSpacing-x9pfba7 color-xn34zyf marginBottom-x1e56ztr",children:"Depends on"}),t.jsx("div",{className:"Preview__styles.edges display-x78zum5 flexDirection-xdt5ytf gap-x17d4w8g marginBottom-x1c436fg",children:x.map(o=>t.jsx(g,{edge:o,dir:"out"},`${o.from}->${o.to}`))})]}),s.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"Preview__styles.section fontSize-x1k6wstc textTransform-xtvhhri letterSpacing-x9pfba7 color-xn34zyf marginBottom-x1e56ztr",children:"Used by"}),t.jsx("div",{className:"Preview__styles.edges display-x78zum5 flexDirection-xdt5ytf gap-x17d4w8g marginBottom-x1c436fg",children:s.map(o=>t.jsx(g,{edge:o,dir:"in"},`${o.from}->${o.to}`))})]})]})}const l=new z;k(l);function C(){return d.useEffect(()=>S(P,()=>window.parent,window.location.origin),[]),t.jsx(B,{})}const c=document.getElementById("root");if(!c)throw new Error("#root not found");j.createRoot(c).render(t.jsx(d.StrictMode,{children:t.jsx(_,{client:l,children:t.jsx(C,{})})}));