aiex-cli 0.0.6-beta.2 → 0.0.6-beta.3

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.
@@ -16,7 +16,7 @@
16
16
  if (dark) document.documentElement.classList.add("jscb-dark")
17
17
  })()
18
18
  </script>
19
- <script type="module" crossorigin src="/assets/index-CdQgz6dJ.js"></script>
19
+ <script type="module" crossorigin src="/assets/index-D7eI2nAX.js"></script>
20
20
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-DWTEM3RW.js">
21
21
  <link rel="modulepreload" crossorigin href="/assets/chunk-DtRyYLXJ.js">
22
22
  <link rel="modulepreload" crossorigin href="/assets/vue-i18n-Du42D0vb.js">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aiex-cli",
3
3
  "type": "module",
4
- "version": "0.0.6-beta.2",
4
+ "version": "0.0.6-beta.3",
5
5
  "description": "JSON Schema → SQLite with AI-powered data extraction",
6
6
  "author": "OSpoon <zxin088@gmail.com>",
7
7
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{A as e,H as t,O as n,S as r,T as i,W as a,gt as o,ht as s,lt as c,n as l,r as u,tt as d,w as f,x as p,yt as m}from"./vue-i18n-Du42D0vb.js";import{_ as h,p as g,r as _}from"./api-client-b4ZBXpNH.js";var v={class:`flex h-full min-w-0 overflow-hidden`},y={key:0,class:`flex-1 flex flex-col items-center justify-center text-muted-foreground`},b={class:`text-sm`},x={key:1,class:`flex-1 flex items-center justify-center text-muted-foreground`},S={key:2,class:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden p-4`},C={class:`mb-4 flex shrink-0 flex-wrap items-center justify-between gap-2`},w={class:`m-0 text-lg font-semibold text-foreground`},T={class:`flex shrink-0 flex-wrap items-center justify-end gap-2`},E={key:0,class:`rounded bg-secondary px-2 py-1 text-xs font-medium text-muted-foreground`},D={class:`flex-1 min-h-0 overflow-auto`},O={class:`text-sm font-mono whitespace-pre-wrap text-foreground bg-secondary border border-border rounded-lg p-4`},k=e({__name:`ExtractionViewer`,props:{extractionName:{},record:{}},emits:[`notionSynced`],setup(e,{emit:k}){let A=e,j=k,{t:M}=l(),N=c(``),P=c(!1),F=c(!1),I=p(()=>A.record?.notionStatus===`synced`?M(`app.notionSynced`):A.record?.notionStatus===`failed`?M(`app.retryNotion`):M(`app.syncNotion`)),L=p(()=>U(A.record?.inputProcessing));async function R(){if(A.extractionName){P.value=!0,N.value=``;try{let e=await _(A.extractionName);e.success&&e.content?N.value=e.content:h.error(e.error||M(`app.failedToLoadExtraction`))}catch{h.error(M(`app.failedToLoadExtraction`))}P.value=!1}}function z(){if(!A.extractionName||!N.value)return;let e=new Blob([N.value],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=A.extractionName,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async function B(){if(A.extractionName){F.value=!0;try{let e=await g(A.extractionName);h.success(M(`app.notionSyncedToNotionDetail`,{count:e.notionPages?.length??0})),j(`notionSynced`)}catch(e){h.error(e instanceof Error?e.message:M(`app.notionSyncFailed`))}F.value=!1}}function V(e){return M(e===`synced`?`app.notionStatusSynced`:e===`failed`?`app.notionStatusFailed`:`app.notionStatusNotSynced`)}function H(e){return e.handler===`image_vision`?`Vision`:e.handler===`image_local_ocr`?`Local OCR`:e.handler===`pdf_converter`?e.converter?`PDF ${e.converter}`:`PDF converter`:`Text`}function U(e){return e?`${e.mime??e.kind} -> ${H(e)}`:``}function W(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}return d(()=>A.extractionName,R),t(R),(t,c)=>(a(),i(`div`,v,[e.extractionName?P.value?(a(),i(`div`,x,m(t.$t(`app.loading`)),1)):(a(),i(`div`,S,[r(`div`,C,[r(`h2`,w,m(e.extractionName),1),r(`div`,T,[L.value?(a(),i(`span`,E,m(L.value),1)):f(``,!0),e.record?(a(),i(`span`,{key:1,class:o([`rounded px-2 py-1 text-xs font-medium`,[e.record.notionStatus===`synced`?`bg-green-500/10 text-green-700`:e.record.notionStatus===`failed`?`bg-red-500/10 text-red-700`:`bg-secondary text-muted-foreground`]])},m(V(e.record.notionStatus)),3)):f(``,!0),n(s(u),{icon:`pi pi-refresh`,label:I.value,severity:`secondary`,size:`small`,loading:F.value,disabled:e.record?.notionStatus===`synced`,onClick:B},null,8,[`label`,`loading`,`disabled`]),n(s(u),{icon:`pi pi-download`,label:t.$t(`app.download`),severity:`secondary`,size:`small`,onClick:z},null,8,[`label`])])]),r(`div`,D,[r(`pre`,O,m(W(N.value)),1)])])):(a(),i(`div`,y,[c[0]||=r(`i`,{class:`pi pi-file text-4xl mb-3 opacity-50`},null,-1),r(`p`,b,m(t.$t(`app.selectExtraction`)),1)]))]))}});export{k as default};