aiex-cli 0.0.2-beta.9 → 0.0.3-beta.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.
- package/dist/cli.mjs +188 -25
- package/dist/{doctor-collector-Cb9X2mxU.mjs → doctor-collector-CjFTz8p4.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/web/assets/DataBrowser-Dzdc0ESt.js +6 -0
- package/dist/web/assets/ExtractionViewer-DNcRCmNK.js +1 -0
- package/dist/web/assets/{index-CO2xaEs7.js → index-BpxCXucL.js} +6 -6
- package/dist/web/assets/index-Lx807is2.css +2 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/DataBrowser-CwcTG80-.js +0 -6
- package/dist/web/assets/ExtractionViewer-DLV8CPf1.js +0 -1
- package/dist/web/assets/index-C9N8oWt4.css +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,L as t,Lt as n,Pt as r,S as i,_ as a,et as o,h as s,ht as c,lt as l,m as u,t as d,v as f,w as p}from"./button-Cdgr9Igy.js";import{_ as m,p as h,r as g}from"./api-client-CG1VV5gz.js";var _={class:`flex h-full`},v={key:0,class:`flex-1 flex flex-col items-center justify-center text-muted-foreground`},y={key:1,class:`flex-1 flex items-center justify-center text-muted-foreground`},b={key:2,class:`flex-1 min-h-0 p-3 flex flex-col overflow-x-auto`},x={class:`flex items-center justify-between mb-3 shrink-0`},S={class:`m-0 text-lg font-semibold text-foreground`},C={class:`flex items-center gap-2`},w={class:`flex-1 min-h-0 overflow-auto`},T={class:`text-sm font-mono whitespace-pre-wrap text-foreground bg-secondary border border-border rounded-lg p-4`},E=p({__name:`ExtractionViewer`,props:{extractionName:{},record:{}},emits:[`notionSynced`],setup(p,{emit:E}){let D=p,O=E,k=l(``),A=l(!1),j=l(!1),M=u(()=>D.record?.notionStatus===`synced`?`Synced`:D.record?.notionStatus===`failed`?`Retry Notion`:`Sync Notion`);async function N(){if(D.extractionName){A.value=!0,k.value=``;try{let e=await g(D.extractionName);e.success&&e.content?k.value=e.content:m.error(e.error||`Failed to load extraction`)}catch{m.error(`Failed to load extraction`)}A.value=!1}}function P(){if(!D.extractionName||!k.value)return;let e=new Blob([k.value],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=D.extractionName,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async function F(){if(D.extractionName){j.value=!0;try{let e=await h(D.extractionName);m.success(`Synced to Notion (${e.notionPages?.length??0} page)`),O(`notionSynced`)}catch(e){m.error(e instanceof Error?e.message:`Notion sync failed`)}j.value=!1}}function I(e){return e===`synced`?`Synced to Notion`:e===`failed`?`Notion sync failed`:`Notion not synced`}function L(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}return o(()=>D.extractionName,N),t(N),(t,o)=>(e(),f(`div`,_,[p.extractionName?A.value?(e(),f(`div`,y,` Loading... `)):(e(),f(`div`,b,[s(`div`,x,[s(`h2`,S,n(p.extractionName),1),s(`div`,C,[p.record?(e(),f(`span`,{key:0,class:r([`rounded px-2 py-1 text-xs font-medium`,[p.record.notionStatus===`synced`?`bg-green-500/10 text-green-700`:p.record.notionStatus===`failed`?`bg-red-500/10 text-red-700`:`bg-secondary text-muted-foreground`]])},n(I(p.record.notionStatus)),3)):a(``,!0),i(c(d),{icon:`pi pi-refresh`,label:M.value,severity:`secondary`,size:`small`,loading:j.value,disabled:p.record?.notionStatus===`synced`,onClick:F},null,8,[`label`,`loading`,`disabled`]),i(c(d),{icon:`pi pi-download`,label:`Download`,severity:`secondary`,size:`small`,onClick:P})])]),s(`div`,w,[s(`pre`,T,n(L(k.value)),1)])])):(e(),f(`div`,v,[...o[0]||=[s(`i`,{class:`pi pi-file text-4xl mb-3 opacity-50`},null,-1),s(`p`,{class:`text-sm`},` Select an extraction record from the sidebar `,-1)]]))]))}});export{E as default};
|