@ltm-blueverse/alpha-hub-studio 0.7.0

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.
Files changed (57) hide show
  1. package/README.md +22 -0
  2. package/package.json +23 -0
  3. package/static/apple-touch-icon.png +0 -0
  4. package/static/assets/DecisionWorkspace-DG6zPNls.js +1 -0
  5. package/static/assets/DiffMergeWorkspace-C8yIdDC7.js +1 -0
  6. package/static/assets/EntityResolutionTab-RBysMLhB.js +6 -0
  7. package/static/assets/GraphInspectorPanel-Bbrbhd03.js +1 -0
  8. package/static/assets/GraphWorkspace-AxTFEhNP.js +1116 -0
  9. package/static/assets/ImportExportWorkspace-BK3TofDv.js +6 -0
  10. package/static/assets/KGOverviewTab-D9EWKL_n.js +1 -0
  11. package/static/assets/LineageDiagram-XxBVa1Ij.js +27 -0
  12. package/static/assets/MarkdownContentViewer-Chx4ysCK.js +45 -0
  13. package/static/assets/MemoryWorkspace-CIjaTN_S.js +6 -0
  14. package/static/assets/OntologySummaryTab-NJ3ZrkoJ.js +1 -0
  15. package/static/assets/ReasoningWorkspace-B127Rd-S.js +19 -0
  16. package/static/assets/RegistryTab-BE2-yKLC.js +11 -0
  17. package/static/assets/SparqlWorkspace-RwPj2YK7.js +26 -0
  18. package/static/assets/TimelinePanel-DmtiXgmN.js +36 -0
  19. package/static/assets/VocabularyWorkspace-YF9waL5N.js +44 -0
  20. package/static/assets/book-open-BqEIxx1e.js +6 -0
  21. package/static/assets/chevron-right-CiEuNwKq.js +11 -0
  22. package/static/assets/circle-check-BToWKwbO.js +6 -0
  23. package/static/assets/copy-BfQXGhHP.js +6 -0
  24. package/static/assets/download-gQOgYz3q.js +6 -0
  25. package/static/assets/external-link-DqNu6T-f.js +6 -0
  26. package/static/assets/file-text-Bbz-r0FQ.js +6 -0
  27. package/static/assets/git-branch-B8yDcUSY.js +6 -0
  28. package/static/assets/graph-vendor-CUDaIrp7.js +312 -0
  29. package/static/assets/graphTheme-DNKLxzKZ.js +6 -0
  30. package/static/assets/hero-B5GXDCBc.png +0 -0
  31. package/static/assets/index-Bt8w1Tz_.css +1 -0
  32. package/static/assets/index-C00aFykz.js +9 -0
  33. package/static/assets/index-DHWWI-uw.js +1730 -0
  34. package/static/assets/index-Dli_3Iwd.js +22 -0
  35. package/static/assets/index-DtC_GayB.js +16 -0
  36. package/static/assets/index-MVDNL3vw.js +127 -0
  37. package/static/assets/info-vaffNQOD.js +6 -0
  38. package/static/assets/layers-Cct6D_wK.js +6 -0
  39. package/static/assets/loader-circle-C8NUmtFx.js +6 -0
  40. package/static/assets/neighborhoodPanelPlugin-w1yJlm0A.js +1 -0
  41. package/static/assets/pencil-DYlEC6ri.js +6 -0
  42. package/static/assets/play-G1gyOk2a.js +6 -0
  43. package/static/assets/queries-CYtdSB4H.js +1 -0
  44. package/static/assets/query-vendor-BqVbYexz.js +34 -0
  45. package/static/assets/refresh-cw-CL9OXZ89.js +6 -0
  46. package/static/assets/registryStore-MVt_NgVV.js +1 -0
  47. package/static/assets/style-BZV40eAE.css +1 -0
  48. package/static/assets/style-D8TqSrGs.js +15 -0
  49. package/static/assets/temporalOverlayPlugin-CRhLa1FU.js +1 -0
  50. package/static/assets/timeline-vendor-WyY-t3YQ.js +97 -0
  51. package/static/assets/timeline-vendor-lG7zfUUF.css +1 -0
  52. package/static/assets/trash-2-DiZNV6Gj.js +6 -0
  53. package/static/assets/x-DpqMYq96.js +6 -0
  54. package/static/favicon-32.png +0 -0
  55. package/static/favicon.svg +13 -0
  56. package/static/icons.svg +24 -0
  57. package/static/index.html +18 -0
@@ -0,0 +1,6 @@
1
+ import{b as A,j as e,C as H}from"./index-DHWWI-uw.js";import{a as c}from"./query-vendor-BqVbYexz.js";import{u as U,C as l}from"./index-Dli_3Iwd.js";import{l as E}from"./registryStore-MVt_NgVV.js";import{F as I}from"./file-text-Bbz-r0FQ.js";import{L as N}from"./loader-circle-C8NUmtFx.js";import{D as f}from"./download-gQOgYz3q.js";import{C as L}from"./circle-check-BToWKwbO.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const V=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],g=A("file-braces",V);function P(){const[t,m]=c.useState(null),[u,d]=c.useState(!1),[a,S]=c.useState("json"),[x,b]=c.useState(!1),[j,h]=c.useState([]);function n(o,p){const s=Date.now();h(r=>[...r,{id:s,type:o,text:p}]),setTimeout(()=>h(r=>r.filter(i=>i.id!==s)),5e3)}const w=c.useCallback(o=>{o.length>0&&m(o[0])},[]),{getRootProps:y,getInputProps:D,isDragActive:k}=U({onDrop:w,accept:{"application/json":[".json"],"text/csv":[".csv"]},maxFiles:1});async function W(){if(t){d(!0);try{const o=new FormData;o.append("file",t);const p=await fetch("/api/import",{method:"POST",body:o});if(!p.ok){const r=await p.json();throw new Error(r.detail||"Import failed")}const s=await p.json();n("success",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges`),E("import",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges from ${t.name}`,{file:t.name}),m(null)}catch(o){n("error",o instanceof Error?o.message:"Import failed")}finally{d(!1)}}}async function v(){b(!0);try{const o=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:a})});if(!o.ok){const i=await o.json();throw new Error(i.detail||"Export failed")}const p=await o.blob(),s=URL.createObjectURL(p),r=document.createElement("a");r.href=s,r.download=`alphasemantichub_export.${a}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s),n("success",`Export ready — alphasemantichub_export.${a}`),E("export",`Exported graph as ${a.toUpperCase()}`,{format:a})}catch(o){n("error",o instanceof Error?o.message:"Export failed")}finally{b(!1)}}return e.jsxDEV("div",{className:"ws-page ws-scroll",children:[e.jsxDEV("div",{className:"ws-padded",style:{display:"flex",flexDirection:"column",gap:24,maxWidth:980,margin:"0 auto",width:"100%"},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:14},children:[e.jsxDEV("div",{style:{width:42,height:42,borderRadius:13,background:"var(--ws-accent-soft)",border:"1px solid var(--ws-border-strong)",display:"grid",placeItems:"center",color:"var(--ws-accent)",flexShrink:0},children:e.jsxDEV(l,{size:20},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:127,columnNumber:13},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:116,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("h2",{className:"ws-title",style:{fontSize:18},children:"Import & Export"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:130,columnNumber:13},this),e.jsxDEV("div",{className:"ws-body",style:{marginTop:2},children:"Ingest new graph datasets or extract the current knowledge base."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:133,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:129,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:111,columnNumber:9},this),e.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:18},children:[e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(l,{size:16,color:"var(--ws-accent)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:156,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Import Entities & Relations"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:157,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:151,columnNumber:13},this),e.jsxDEV("div",{...y(),style:{border:`2px dashed ${k?"var(--ws-accent)":"var(--ws-border)"}`,borderRadius:"var(--ws-radius)",background:k?"var(--ws-accent-soft)":"rgba(0,0,0,0.18)",padding:32,textAlign:"center",cursor:"pointer",transition:"all 200ms ease",display:"flex",flexDirection:"column",alignItems:"center",gap:10},children:[e.jsxDEV("input",{...D()},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:178,columnNumber:15},this),t?e.jsxDEV(e.Fragment,{children:[t.name.endsWith(".json")?e.jsxDEV(g,{size:40,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:50},this):e.jsxDEV(I,{size:40,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:91},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700},children:t.name},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:181,columnNumber:19},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:11},children:[(t.size/1024).toFixed(1)," KB — click to replace"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:185,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:179,columnNumber:23},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:36,color:"var(--ws-accent)",style:{opacity:.7}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:189,columnNumber:19},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:600},children:"Drag & drop or click to browse"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:192,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".json"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:196,columnNumber:19},this),e.jsxDEV("span",{style:{color:"var(--ws-text-dim)",fontSize:11},children:"or"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:197,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".csv"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:201,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:188,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:165,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn ws-btn--primary",onClick:W,disabled:!t||u,style:{width:"100%",justifyContent:"center"},children:u?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:32},this),"Uploading…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:91},this),"Upload to Graph"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:205,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:145,columnNumber:11},this),e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(f,{size:16,color:"var(--ws-purple)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:225,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Export Graph Snapshot"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:226,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:220,columnNumber:13},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:"ws-label",children:"Format"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:234,columnNumber:15},this),e.jsxDEV("div",{style:{display:"flex",gap:8},children:["json","csv"].map(o=>e.jsxDEV("button",{className:`ws-btn ${a===o?"ws-btn--primary":"ws-btn--ghost"}`,style:{flex:1,justifyContent:"center",textTransform:"uppercase",fontSize:12},onClick:()=>S(o),children:[o==="json"?e.jsxDEV(g,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:39},this):e.jsxDEV(I,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:64},this),o]},o,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:239,columnNumber:56},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:235,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:233,columnNumber:13},this),e.jsxDEV("div",{style:{flex:1,padding:"14px 16px",borderRadius:"var(--ws-radius-sm)",background:"rgba(0,0,0,0.22)",border:"1px solid var(--ws-border)"},children:[e.jsxDEV("div",{style:{color:"var(--ws-text-muted)",fontWeight:700,fontSize:12,marginBottom:6},children:"What's included"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:258,columnNumber:15},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:a==="json"?"Full graph snapshot: all node properties, edge weights, entity metadata and semantic groups in a standardized JSON payload.":"Flattened CSV: nodes and edges as rows. Complex nested properties are stringified. Best for spreadsheet analysis."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:264,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:251,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn",onClick:v,disabled:x,style:{width:"100%",justifyContent:"center",background:"var(--ws-purple-soft)",borderColor:"rgba(192,132,252,0.3)",color:"#d8b4fe"},children:x?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:32},this),"Preparing…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(f,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:91},this),"Download Export"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:271,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:214,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:139,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:102,columnNumber:7},this),e.jsxDEV("div",{style:{position:"fixed",bottom:28,right:28,display:"flex",flexDirection:"column",gap:10,zIndex:1e3},children:j.map(o=>e.jsxDEV("div",{className:"ws-animate-in",style:{display:"flex",alignItems:"center",gap:10,padding:"13px 18px",borderRadius:"var(--ws-radius-sm)",background:o.type==="success"?"rgba(16,36,22,0.96)":"rgba(40,10,10,0.96)",border:`1px solid ${o.type==="success"?"rgba(76,195,138,0.4)":"rgba(255,123,114,0.4)"}`,boxShadow:"0 8px 24px rgba(0,0,0,0.5)",backdropFilter:"blur(12px)"},children:[o.type==="success"?e.jsxDEV(L,{size:16,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:39},this):e.jsxDEV(H,{size:16,color:"#ff7b72"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:84},this),e.jsxDEV("span",{style:{color:"var(--ws-text)",fontSize:13,fontWeight:500},children:o.text},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:306,columnNumber:13},this)]},o.id,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:294,columnNumber:28},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:285,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:101,columnNumber:10},this)}export{P as ImportExportWorkspace};
@@ -0,0 +1 @@
1
+ import{j as s,N as G,c as K}from"./index-DHWWI-uw.js";import{a as j}from"./query-vendor-BqVbYexz.js";import{L as U}from"./loader-circle-C8NUmtFx.js";import{R as V}from"./refresh-cw-CL9OXZ89.js";function O(f){const e=K.c(28);if(e[0]!=="66f5da5a29229e9f82f2a0275714ce774bf73894883b619916e728ac9babcb29"){for(let b=0;b<28;b+=1)e[b]=Symbol.for("react.memo_cache_sentinel");e[0]="66f5da5a29229e9f82f2a0275714ce774bf73894883b619916e728ac9babcb29"}const{label:i,count:l,total:d,color:c}=f;let N;e[1]!==l||e[2]!==d?(N=d>0?Math.round(l/d*100):0,e[1]=l,e[2]=d,e[3]=N):N=e[3];const y=N;let A,S;e[4]===Symbol.for("react.memo_cache_sentinel")?(A={display:"flex",alignItems:"center",gap:10,padding:"5px 0"},S={width:120,flexShrink:0,color:"#f0cdd3",fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e[4]=A,e[5]=S):(A=e[4],S=e[5]);let v;e[6]!==i?(v=s.jsxDEV("div",{style:S,title:i,children:i},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:77,columnNumber:10},this),e[6]=i,e[7]=v):v=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={flex:1,height:6,borderRadius:999,background:"rgba(255,255,255,0.06)",overflow:"hidden"},e[8]=x):x=e[8];const k=`${y}%`;let m;e[9]!==c||e[10]!==k?(m=s.jsxDEV("div",{style:x,children:s.jsxDEV("div",{style:{width:k,height:"100%",borderRadius:999,background:c,transition:"width 400ms ease"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:99,columnNumber:26},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:99,columnNumber:10},this),e[9]=c,e[10]=k,e[11]=m):m=e[11];let w,H;e[12]===Symbol.for("react.memo_cache_sentinel")?(w={width:52,textAlign:"right",flexShrink:0,display:"flex",gap:6,justifyContent:"flex-end"},H={color:"#b08b93",fontSize:11},e[12]=w,e[13]=H):(w=e[12],H=e[13]);let a;e[14]!==l?(a=l.toLocaleString(),e[14]=l,e[15]=a):a=e[15];let o;e[16]!==a?(o=s.jsxDEV("span",{style:H,children:a},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:143,columnNumber:11},this),e[16]=a,e[17]=o):o=e[17];let r;e[18]===Symbol.for("react.memo_cache_sentinel")?(r={color:"#9c7a82",fontSize:11},e[18]=r):r=e[18];let t;e[19]!==y?(t=s.jsxDEV("span",{style:r,children:[y,"%"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:161,columnNumber:11},this),e[19]=y,e[20]=t):t=e[20];let p;e[21]!==o||e[22]!==t?(p=s.jsxDEV("div",{style:w,children:[o,t]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:169,columnNumber:11},this),e[21]=o,e[22]=t,e[23]=p):p=e[23];let u;return e[24]!==p||e[25]!==v||e[26]!==m?(u=s.jsxDEV("div",{style:A,children:[v,m,p]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:178,columnNumber:11},this),e[24]=p,e[25]=v,e[26]=m,e[27]=u):u=e[27],u}const W=["#3E79F2","#149287","#2F9F61","#555FD6","#8A56D8","#B65473","#C9922E","#ff2d4b","#ff7a45"],L=["#4cc38a","#ff8fa0","#d2a8ff","#ff7a45","#ff7b72","#ff2d4b","#ff2d4b","#8A56D8"];function M(f,e){const i={};for(const l of f){const d=String(l[e]??"unknown");i[d]=(i[d]??0)+1}return i}function z(){const[f,e]=j.useState(null),[i,l]=j.useState(!1),[d,c]=j.useState(""),[N,y]=j.useState([]),[A,S]=j.useState({}),v=j.useCallback(async()=>{l(!0),c("");try{const[a,o]=await Promise.all([fetch("/api/graph/stats"),fetch("/api/graph/nodes?limit=500")]);if(!a.ok)throw new Error(`Stats fetch failed (${a.status})`);if(!o.ok)throw new Error(`Nodes fetch failed (${o.status})`);const r=await a.json();e(r),a.status===207&&c(r.message||"Warning: Partial success loading stats.");const t=await o.json(),p=t.nodes??[];if(S(M(p,"type")),o.status===207){const b=t.message||"Warning: Partial success loading nodes.";c(D=>D?`${D} ${b}`:b)}const u=await fetch("/api/graph/edges?limit=2000");if(u.ok){const D=(await u.json()).edges??[],h={};for(const n of D)h[n.source]=(h[n.source]??0)+1,h[n.target]=(h[n.target]??0)+1;const E=p.map(n=>({node:n,neighborCount:h[n.id]??0})).sort((n,T)=>T.neighborCount-n.neighborCount).slice(0,10);y(E)}}catch(a){c(a instanceof Error?a.message:"Failed to load graph overview. Ensure the server is running.")}finally{l(!1)}},[]);j.useEffect(()=>{let a=!1;async function o(){a||(l(!0),c(""));try{const[r,t]=await Promise.all([fetch("/api/graph/stats"),fetch("/api/graph/nodes?limit=500")]);if(!r.ok)throw new Error(`Stats fetch failed (${r.status})`);if(!t.ok)throw new Error(`Nodes fetch failed (${t.status})`);const p=await r.json();a||(e(p),r.status===207&&c(p.message||"Warning: Partial success loading stats."));const u=await t.json(),b=u.nodes??[];if(!a&&(S(M(b,"type")),t.status===207)){const h=u.message||"Warning: Partial success loading nodes.";c(E=>E?`${E} ${h}`:h)}const D=await fetch("/api/graph/edges?limit=2000");if(D.ok){const E=(await D.json()).edges??[],n={};for(const g of E)n[g.source]=(n[g.source]??0)+1,n[g.target]=(n[g.target]??0)+1;const T=b.map(g=>({node:g,neighborCount:n[g.id]??0})).sort((g,I)=>I.neighborCount-g.neighborCount).slice(0,10);a||y(T)}}catch(r){a||c(r instanceof Error?r.message:"Failed to load graph overview. Ensure the server is running.")}finally{a||l(!1)}}return o(),()=>{a=!0}},[]);const x=Object.entries(A).sort((a,o)=>o[1]-a[1]),k=f?.edge_types?Object.entries(f.edge_types).sort((a,o)=>o[1]-a[1]):[],m=f?.node_count??0,w=f?.edge_count??0,H=[{label:"Nodes",value:m.toLocaleString(),color:"var(--ws-accent)",sub:`${x.length} types`},{label:"Edges",value:w.toLocaleString(),color:"var(--ws-green)",sub:`${k.length} rel. types`},{label:"Density",value:m>1?(w/(m*(m-1))*100).toFixed(3)+"%":"—",color:"var(--ws-purple)",sub:"graph density"}];return s.jsxDEV("div",{className:"ws-page",children:[d?s.jsxDEV("div",{style:{margin:"16px 22px 0 22px",padding:12,borderRadius:14,color:"#ffb4c2",background:"rgba(255,157,175,0.1)",border:"1px solid rgba(255,157,175,0.18)"},children:d},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:335,columnNumber:16},this):null,s.jsxDEV("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 22px",borderBottom:"1px solid var(--ws-border)",flexShrink:0},children:[s.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:10},children:[s.jsxDEV("div",{style:{width:32,height:32,borderRadius:9,background:"var(--ws-accent-soft)",border:"1px solid var(--ws-border-strong)",display:"grid",placeItems:"center",color:"var(--ws-accent)"},children:s.jsxDEV(G,{size:16},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:370,columnNumber:13},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:360,columnNumber:11},this),s.jsxDEV("div",{children:[s.jsxDEV("div",{style:{color:"var(--ws-text)",fontSize:15,fontWeight:700,lineHeight:1},children:"KG Overview"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:373,columnNumber:13},this),s.jsxDEV("div",{className:"ws-body",style:{fontSize:11,marginTop:2},children:"Node/edge counts, type distributions, and top connected nodes"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:379,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:372,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:355,columnNumber:9},this),s.jsxDEV("button",{className:"ws-btn ws-btn--ghost",onClick:()=>{v()},disabled:i,style:{padding:"6px 12px"},children:[i?s.jsxDEV(U,{size:13,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:388,columnNumber:22},this):s.jsxDEV(V,{size:13},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:388,columnNumber:66},this),"Refresh"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:385,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:347,columnNumber:7},this),s.jsxDEV("div",{className:"ws-scroll",style:{flex:1,padding:"18px 22px",display:"flex",flexDirection:"column",gap:16},children:[s.jsxDEV("div",{className:"ws-stat-grid ws-stat-grid--3",children:H.map(({label:a,value:o,color:r,sub:t})=>s.jsxDEV("div",{className:"ws-stat-card",children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:6},children:a},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:410,columnNumber:15},this),s.jsxDEV("div",{className:"ws-stat-value",style:{color:r},children:i?"—":o},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:413,columnNumber:15},this),s.jsxDEV("div",{className:"ws-stat-label",children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:416,columnNumber:15},this)]},a,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:409,columnNumber:15},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:403,columnNumber:9},this),s.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:14},children:[s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px",gap:8,display:"flex",flexDirection:"column"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:4},children:"Node Type Breakdown"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:432,columnNumber:13},this),i?s.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[80,65,45,35,25].map((a,o)=>s.jsxDEV("div",{className:"ws-skeleton",style:{height:10,width:`${a}%`}},o,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:440,columnNumber:53},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:435,columnNumber:24},this):x.length===0?s.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:"No data — load the graph first."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:444,columnNumber:55},this):x.slice(0,8).map(([a,o],r)=>s.jsxDEV(O,{label:a,count:o,total:m||1,color:W[r%W.length]},a,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:446,columnNumber:110},this))]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:426,columnNumber:11},this),s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px",gap:8,display:"flex",flexDirection:"column"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:4},children:"Edge Type Breakdown"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:455,columnNumber:13},this),i?s.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[70,55,48,30,20].map((a,o)=>s.jsxDEV("div",{className:"ws-skeleton",style:{height:10,width:`${a}%`}},o,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:463,columnNumber:57},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:458,columnNumber:24},this):k.length===0?s.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:"Edge type breakdown requires the stats endpoint to return edge_types."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:467,columnNumber:55},this):k.slice(0,8).map(([a,o],r)=>s.jsxDEV(O,{label:a,count:o,total:w||1,color:L[r%L.length]},a,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:469,columnNumber:152},this))]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:449,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:421,columnNumber:9},this),N.length>0&&s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:12},children:"Top Connected Nodes (by degree)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:477,columnNumber:13},this),s.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:8},children:N.map(({node:a,neighborCount:o},r)=>s.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",borderRadius:"var(--ws-radius-sm)",background:"rgba(0,0,0,0.18)",border:"1px solid var(--ws-border)"},children:[s.jsxDEV("div",{style:{color:"var(--ws-text-dim)",fontSize:11,fontWeight:700,minWidth:22},children:["#",r+1]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:497,columnNumber:19},this),s.jsxDEV("div",{style:{flex:1,minWidth:0},children:[s.jsxDEV("div",{style:{color:"var(--ws-text)",fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.content||a.id},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:507,columnNumber:21},this),s.jsxDEV("div",{className:"ws-eyebrow",style:{marginTop:2,fontSize:9},children:a.type},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:515,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:503,columnNumber:19},this),s.jsxDEV("span",{className:"ws-pill ws-pill--accent",style:{fontSize:10},children:o},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:520,columnNumber:19},this)]},a.id,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:488,columnNumber:23},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:480,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:474,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:395,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:334,columnNumber:10},this)}export{z as KGOverviewTab};
@@ -0,0 +1,27 @@
1
+ import{b as S,j as e}from"./index-DHWWI-uw.js";import{a as t}from"./query-vendor-BqVbYexz.js";import{i as j,B as A,C as H}from"./style-D8TqSrGs.js";import"./index-C00aFykz.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const E=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],I=S("link-2",E),_=`
7
+ .react-flow { background: var(--ws-bg, #080407); }
8
+ .react-flow__node-group {
9
+ background: rgba(255,45,75,0.04);
10
+ border: 1px dashed rgba(255,45,75,0.18);
11
+ border-radius: 10px;
12
+ }
13
+ .react-flow__node-default {
14
+ background: rgba(6,13,26,0.92);
15
+ color: var(--ws-text, #ffe9ec);
16
+ border: 1px solid rgba(255,45,75,0.22);
17
+ border-radius: 8px;
18
+ padding: 10px 12px;
19
+ white-space: pre-wrap;
20
+ font-size: 12px;
21
+ box-shadow: 0 4px 16px rgba(0,0,0,0.4);
22
+ }
23
+ .react-flow__controls { background: rgba(6,13,26,0.9); border: 1px solid rgba(255,45,75,0.18); border-radius: 10px; }
24
+ .react-flow__controls-button { background: transparent; border-color: rgba(255,45,75,0.15); color: var(--ws-text-muted, #8f6d75); }
25
+ .react-flow__controls-button:hover { background: rgba(255,45,75,0.1); color: var(--ws-text, #ffe9ec); }
26
+ `;function C(){const[w,d]=t.useState([]),[y,m]=t.useState([]),[l,N]=t.useState(""),[o,u]=t.useState(""),[g,i]=t.useState(""),b=async s=>{if(!o)return;const c=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(o)}&format=${s}`);if(!c.ok)return;const h=await c.blob(),r=window.URL.createObjectURL(h),n=document.createElement("a");n.href=r,n.download=`${o}_provenance.${s==="markdown"?"md":"json"}`,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)},[k,L]=t.useState(o);return o!==k&&(L(o),i(""),d([]),m([])),t.useEffect(()=>{let s=!1;if(!o)return;const c=[{id:"group_agent",type:"group",position:{x:50,y:50},style:{width:800,height:120}},{id:"group_activity",type:"group",position:{x:50,y:200},style:{width:800,height:120}},{id:"group_entity",type:"group",position:{x:50,y:350},style:{width:800,height:120}}];return(async()=>{i("");try{const r=await fetch("/api/provenance?node_id="+encodeURIComponent(o));if(!r.ok){const a=await r.text();throw new Error(`HTTP ${r.status}: API Route missing or failed. ${a.substring(0,100)}`)}const n=r.headers.get("content-type");if(!n||!n.includes("application/json"))throw new Error("Backend returned non-JSON response (likely an HTML fallback).");const p=await r.json();r.status===207&&i(p.message||"Warning: Partial success loading lineage.");const x={group_agent:0,group_activity:0,group_entity:0},D=p.nodes.map(a=>{const f=x[a.parent_id]||0;return x[a.parent_id]=f+1,{id:a.id,data:{label:a.label+`
27
+ (`+a.prov_type+")"},position:{x:50+f*180,y:30},parentId:a.parent_id,extent:"parent",type:"default"}}),v=p.edges.map(a=>({id:a.id,source:a.source,target:a.target,label:a.label,animated:!0,style:{stroke:"#ff2d4b"}}));s||(d([...c,...D]),m(v))}catch(r){i(r instanceof Error?r.message:"Failed to load lineage.")}})(),()=>{s=!0}},[o]),e.jsxDEV("div",{style:{width:"100%",height:"100%",position:"relative",background:"var(--ws-bg, #080407)"},children:[e.jsxDEV("style",{children:_},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:162,columnNumber:7},this),e.jsxDEV("div",{style:{position:"absolute",top:14,left:14,right:14,zIndex:10,display:"flex",gap:8,alignItems:"center",background:"rgba(4,10,18,0.88)",backdropFilter:"blur(14px)",padding:"8px 12px",borderRadius:12,border:"1px solid rgba(255,45,75,0.16)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)"},children:[e.jsxDEV("span",{className:"ws-eyebrow",style:{color:"var(--ws-accent, #ff2d4b)",marginRight:4},children:"PROV-O Lineage"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:181,columnNumber:9},this),e.jsxDEV("input",{className:"ws-input",type:"text",placeholder:"Enter Node ID…",value:l,onChange:s=>N(s.target.value),onKeyDown:s=>{s.key==="Enter"&&u(l)},style:{width:200,padding:"6px 10px",fontSize:12}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:185,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--primary",style:{padding:"6px 12px"},onClick:()=>u(l),children:"Trace"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:192,columnNumber:9},this),e.jsxDEV("div",{style:{flex:1}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:197,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--ghost",style:{padding:"6px 12px",fontSize:11},disabled:!o,onClick:()=>{b("json")},children:"Export JSON"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:200,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--ghost",style:{padding:"6px 12px",fontSize:11},disabled:!o,onClick:()=>{b("markdown")},children:"Export MD"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:206,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:165,columnNumber:7},this),g?e.jsxDEV("div",{style:{position:"absolute",top:60,left:14,right:14,zIndex:10,padding:12,borderRadius:14,color:"#ffb4c2",background:"rgba(255,157,175,0.1)",border:"1px solid rgba(255,157,175,0.18)"},children:g},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:214,columnNumber:16},this):null,o?e.jsxDEV(j,{nodes:w,edges:y,fitView:!0,children:[e.jsxDEV(A,{color:"rgba(255,45,75,0.08)",gap:24},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:230,columnNumber:11},this),e.jsxDEV(H,{},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:231,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:229,columnNumber:19},this):e.jsxDEV("div",{className:"ws-empty",style:{height:"100%",paddingTop:72},children:[e.jsxDEV("div",{className:"ws-empty-icon",children:e.jsxDEV(I,{size:36,color:"var(--ws-accent)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:236,columnNumber:42},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:236,columnNumber:11},this),e.jsxDEV("div",{className:"ws-empty-title",children:"PROV-O Lineage Viewer"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:237,columnNumber:11},this),e.jsxDEV("div",{className:"ws-empty-body",children:"Enter a Node ID in the toolbar above and click Trace to view its W3C PROV-O lineage diagram."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:238,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:232,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:156,columnNumber:10},this)}export{C as LineageDiagram};