@lunora/studio 1.0.0-alpha.79 → 1.0.0-alpha.80
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/index.d.ts +28 -14
- package/dist/index.js +1 -1
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/ApiTab.js +1 -1
- package/dist/packem_chunks/AuditPanel.js +1 -1
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
- package/dist/packem_chunks/ExportImportPanel.js +3 -3
- package/dist/packem_chunks/FileBrowser.js +4 -4
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
- package/dist/packem_chunks/HealthPanel.js +1 -1
- package/dist/packem_chunks/InsightsPanel.js +1 -1
- package/dist/packem_chunks/LogsPanel.js +1 -1
- package/dist/packem_chunks/MailPanel.js +2 -2
- package/dist/packem_chunks/MetricsPanel.js +1 -1
- package/dist/packem_chunks/NotificationsPanel.js +1 -1
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +1 -2
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
- package/dist/packem_chunks/SettingsPanel.js +1 -1
- package/dist/packem_chunks/SqlEditorPanel.js +6 -4
- package/dist/packem_chunks/TableEditor.js +1 -1
- package/dist/packem_chunks/agents-panel.js +1 -1
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-audit-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +1 -1
- package/dist/packem_chunks/auth-sessions-panel.js +1 -1
- package/dist/packem_chunks/containers-panel.js +1 -1
- package/dist/packem_chunks/dashboards-panel.js +1 -1
- package/dist/packem_chunks/fanout-panel.js +1 -1
- package/dist/packem_chunks/flags-panel.js +1 -1
- package/dist/packem_chunks/issues-panel.js +1 -1
- package/dist/packem_chunks/kv-browser.js +1 -1
- package/dist/packem_chunks/log-drains-panel.js +4 -4
- package/dist/packem_chunks/migrations-route.js +1 -0
- package/dist/packem_chunks/organizations-panel.js +1 -1
- package/dist/packem_chunks/payments-panel.js +1 -1
- package/dist/packem_chunks/permissions-panel.js +1 -1
- package/dist/packem_chunks/queues-panel.js +1 -1
- package/dist/packem_chunks/rls-panel.js +1 -1
- package/dist/packem_chunks/schedule-panel.js +1 -1
- package/dist/packem_chunks/sparkline.js +1 -1
- package/dist/packem_chunks/storage-rules-panel.js +1 -1
- package/dist/packem_chunks/subscriptions-panel.js +1 -1
- package/dist/packem_chunks/sync-client-panel.js +1 -1
- package/dist/packem_chunks/traces-panel.js +1 -1
- package/dist/packem_chunks/users-panel.js +1 -1
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +1 -1
- package/dist/packem_shared/ADMIN_FUNCTIONS-BnD4aovm.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-DfUQ1ZAF.js +2 -0
- package/dist/packem_shared/{ApiReferencePanel-C42v1jr6.js → ApiReferencePanel-9q8BbJl-.js} +1 -1
- package/dist/packem_shared/CommandPalette--SQwfTW1.js +1 -0
- package/dist/packem_shared/DataBrowser-CuRlztBz.js +1 -0
- package/dist/packem_shared/DataFilters-B26ZeqBZ.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-DB-vQ2_H.js +1 -0
- package/dist/packem_shared/HomePanel-Dcs4a3Ax.js +1 -0
- package/dist/packem_shared/MigrationsPanel-C2OnsqRb.js +1 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-sGsIgYWj.js → OpenRpcReferencePanel-qOZcWXMs.js} +1 -1
- package/dist/packem_shared/ScheduledJobs-D8kBZWBu.js +1 -0
- package/dist/packem_shared/Studio-B26_pT8J.js +1 -0
- package/dist/packem_shared/StudioApp-bXhJeLlZ.js +1 -0
- package/dist/packem_shared/advisor-view-Pa8HLtBv.js +1 -0
- package/dist/packem_shared/{app.d-bRPJhby-.d.ts → app.d-DW7yZsfu.d.ts} +1 -3
- package/dist/packem_shared/bar-chart-DraN_srt.js +9 -0
- package/dist/packem_shared/data-grid-DcxyIXwG.js +1 -0
- package/dist/packem_shared/data-view-params-ClrV7XgF.js +1 -0
- package/dist/packem_shared/error-alert-t6cpEi0z.js +1 -0
- package/dist/packem_shared/grid-features-jnrD0SpX.js +6 -0
- package/dist/packem_shared/{home-panel-Cm88Nvqh.js → home-panel-CU6MWLHG.js} +2 -2
- package/dist/packem_shared/{internal-AtZ4bTal.js → internal-BSIsQVC6.js} +1 -1
- package/dist/packem_shared/live-status-CmuRLFKf.js +1 -0
- package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +1 -0
- package/dist/packem_shared/recording-client-DRAZEmzE.js +1 -0
- package/dist/packem_shared/reference-view-DnYYWr7I.js +12 -0
- package/dist/packem_shared/result-chart-DzJOVsaw.js +1 -0
- package/dist/packem_shared/schema-diagram-cg-bz_VL.js +2 -0
- package/dist/packem_shared/{sparkline-DtcZoU48.js → sparkline-CgjeUU2I.js} +1 -1
- package/dist/packem_shared/studio-q-C-acL7.js +2 -0
- package/dist/packem_shared/table-list-sidebar-BFkSQwlB.js +1 -0
- package/dist/packem_shared/use-admin-query-QJ-ibl5u.js +1 -0
- package/dist/packem_shared/use-async-submit-q3ymBJkD.js +1 -0
- package/dist/packem_shared/{use-auth-config-9S_K_W-G.js → use-auth-config-BObBpdsi.js} +1 -1
- package/dist/packem_shared/use-sql-assistant-CHEu2-Rk.js +1 -0
- package/dist/standalone/chunk-2GA4SHO7.js +1 -0
- package/dist/standalone/{chunk-NG6LYBPJ.js → chunk-2VDFV5TD.js} +1 -1
- package/dist/standalone/chunk-2WOIRKEI.js +1 -0
- package/dist/standalone/chunk-33CL6OHR.js +1 -0
- package/dist/standalone/{chunk-EIT7ERYE.js → chunk-34D36UCW.js} +1 -1
- package/dist/standalone/chunk-3C3CG7ZK.js +1 -0
- package/dist/standalone/{chunk-6CULAILE.js → chunk-3O3HAXW7.js} +1 -1
- package/dist/standalone/{chunk-LSEZN2ZL.js → chunk-3STOIE7Q.js} +1 -1
- package/dist/standalone/chunk-53WEPGUD.js +1 -0
- package/dist/standalone/chunk-5CVJS7ON.js +1 -0
- package/dist/standalone/chunk-6IKEW5LG.js +1 -0
- package/dist/standalone/chunk-6LNCYDZO.js +1 -0
- package/dist/standalone/chunk-6NY7SPDL.js +1 -0
- package/dist/standalone/chunk-6PNPIW6I.js +2 -0
- package/dist/standalone/{chunk-AVZGVZZ7.js → chunk-6VAKZALJ.js} +1 -1
- package/dist/standalone/chunk-6YI4WJO4.js +1 -0
- package/dist/standalone/{chunk-HYT2ZUNP.js → chunk-6YTSSIEJ.js} +2 -2
- package/dist/standalone/{chunk-KYF2E5CJ.js → chunk-7LWMHTJ3.js} +1 -1
- package/dist/standalone/chunk-A74VSSA2.js +4 -0
- package/dist/standalone/chunk-CCVXYYPJ.js +1 -0
- package/dist/standalone/chunk-CT5MMH4O.js +1 -0
- package/dist/standalone/chunk-CTNB2KIA.js +1 -0
- package/dist/standalone/chunk-CU55Y5TV.js +62 -0
- package/dist/standalone/chunk-D2RKH6JK.js +1 -0
- package/dist/standalone/chunk-E3NMX2VU.js +4 -0
- package/dist/standalone/chunk-FNPJ7GJZ.js +1 -0
- package/dist/standalone/chunk-FOBRNWBG.js +3 -0
- package/dist/standalone/chunk-G6PSMGLD.js +1 -0
- package/dist/standalone/chunk-GAX5IZYG.js +8 -0
- package/dist/standalone/chunk-GB6U2BPU.js +1 -0
- package/dist/standalone/chunk-GEDMLM4A.js +6 -0
- package/dist/standalone/chunk-GXSZH7VJ.js +13 -0
- package/dist/standalone/chunk-GYKVBKT5.js +1 -0
- package/dist/standalone/chunk-H6YOWRFB.js +1 -0
- package/dist/standalone/chunk-HJ3E4YF5.js +1 -0
- package/dist/standalone/chunk-HJD2YUQS.js +1 -0
- package/dist/standalone/chunk-IHQC7J35.js +1 -0
- package/dist/standalone/chunk-JLOWAJRR.js +1 -0
- package/dist/standalone/chunk-JRMMYIAF.js +1 -0
- package/dist/standalone/{chunk-W6TE2I2D.js → chunk-KC44QCN6.js} +1 -1
- package/dist/standalone/chunk-KJB7YAKB.js +1 -0
- package/dist/standalone/chunk-KLQYC6CC.js +1 -0
- package/dist/standalone/{chunk-XQGANNLS.js → chunk-KZ3ALMMP.js} +1 -1
- package/dist/standalone/chunk-L7R74G63.js +1 -0
- package/dist/standalone/{chunk-3RTTXLMU.js → chunk-OY2RVUZL.js} +1 -1
- package/dist/standalone/chunk-P4YLIBCN.js +1 -0
- package/dist/standalone/chunk-PZVU2QMX.js +1 -0
- package/dist/standalone/{chunk-PRJ4RJDU.js → chunk-Q7O6B7WC.js} +1 -1
- package/dist/standalone/chunk-QLQADHFE.js +1 -0
- package/dist/standalone/{chunk-7LQWFOEU.js → chunk-QXXIJAD5.js} +1 -1
- package/dist/standalone/chunk-QZGTH6WH.js +1 -0
- package/dist/standalone/chunk-RJP3WBZ4.js +1 -0
- package/dist/standalone/chunk-RNL6BSFM.js +1 -0
- package/dist/standalone/chunk-RNRJKBY3.js +4 -0
- package/dist/standalone/{chunk-7YEFOSPH.js → chunk-RQ7AFLIV.js} +1 -1
- package/dist/standalone/chunk-S252DAFP.js +1 -0
- package/dist/standalone/chunk-S2VVR7HI.js +1 -0
- package/dist/standalone/chunk-SKW6J4VW.js +1 -0
- package/dist/standalone/chunk-T7IUZIF4.js +1 -0
- package/dist/standalone/chunk-TTGOOYLF.js +1 -0
- package/dist/standalone/chunk-U6TNNM5U.js +1 -0
- package/dist/standalone/chunk-VHWOCPRK.js +1 -0
- package/dist/standalone/chunk-W6SAOXGH.js +6 -0
- package/dist/standalone/{chunk-YCRMVBPW.js → chunk-WBYSSCV2.js} +1 -1
- package/dist/standalone/{chunk-LFXFP4IF.js → chunk-X665E2HU.js} +1 -1
- package/dist/standalone/chunk-XDAT7LHC.js +1 -0
- package/dist/standalone/chunk-XS5LDR52.js +1 -0
- package/dist/standalone/chunk-Y5Y7DHFW.js +1 -0
- package/dist/standalone/chunk-YJYTMQJI.js +1 -0
- package/dist/standalone/chunk-Z2V42P7J.js +1 -0
- package/dist/standalone/studio.js +5 -5
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/packem_chunks/MigrationsPanel.js +0 -1
- package/dist/packem_shared/ADMIN_FUNCTIONS-CpgIo9pj.js +0 -1
- package/dist/packem_shared/ApiDocsPanel-CjdsxN1t.js +0 -2
- package/dist/packem_shared/CommandPalette-CVIaY3j8.js +0 -1
- package/dist/packem_shared/DataBrowser-Bfstz_au.js +0 -1
- package/dist/packem_shared/DataFilters-Csb30F0C.js +0 -1
- package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +0 -1
- package/dist/packem_shared/HomePanel-B8EFM4u3.js +0 -1
- package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +0 -1
- package/dist/packem_shared/Studio-BDtS9C5g.js +0 -1
- package/dist/packem_shared/StudioApp-DjLzIO9E.js +0 -1
- package/dist/packem_shared/advisor-view-DaCX9Jy5.js +0 -1
- package/dist/packem_shared/bar-chart-AryFCeoa.js +0 -9
- package/dist/packem_shared/data-grid-BMBKzMEJ.js +0 -1
- package/dist/packem_shared/data-view-params-C8T3bW1z.js +0 -1
- package/dist/packem_shared/error-alert-B59DnrDI.js +0 -1
- package/dist/packem_shared/grid-features-uZCUj955.js +0 -6
- package/dist/packem_shared/live-status-CGW2JHf_.js +0 -1
- package/dist/packem_shared/reference-view-KvhektwF.js +0 -12
- package/dist/packem_shared/result-chart-CwKhhKM0.js +0 -1
- package/dist/packem_shared/studio-BmWFd-Rz.js +0 -2
- package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +0 -1
- package/dist/packem_shared/use-admin-query-Di3fLE8H.js +0 -1
- package/dist/packem_shared/use-async-submit-DLNCqLFq.js +0 -1
- package/dist/standalone/chunk-2SHUN7KF.js +0 -1
- package/dist/standalone/chunk-2Y36BVVM.js +0 -4
- package/dist/standalone/chunk-3EXLKL6V.js +0 -1
- package/dist/standalone/chunk-3KAERFMC.js +0 -1
- package/dist/standalone/chunk-4XDMVUS5.js +0 -1
- package/dist/standalone/chunk-5RF4QDDA.js +0 -6
- package/dist/standalone/chunk-5YWJNF5X.js +0 -1
- package/dist/standalone/chunk-66YJ3IOZ.js +0 -1
- package/dist/standalone/chunk-6KHEBRBB.js +0 -1
- package/dist/standalone/chunk-6WCIFGDW.js +0 -1
- package/dist/standalone/chunk-7RG3AKPY.js +0 -1
- package/dist/standalone/chunk-A2FPLOMJ.js +0 -1
- package/dist/standalone/chunk-AADXUXZO.js +0 -1
- package/dist/standalone/chunk-ARI4JTIH.js +0 -1
- package/dist/standalone/chunk-BDO4J5AP.js +0 -1
- package/dist/standalone/chunk-BMQJ4CAO.js +0 -1
- package/dist/standalone/chunk-CMUP7HPS.js +0 -1
- package/dist/standalone/chunk-CP7AUUOU.js +0 -1
- package/dist/standalone/chunk-DX3RMFQU.js +0 -8
- package/dist/standalone/chunk-E2CJUP53.js +0 -13
- package/dist/standalone/chunk-FLYO3XY5.js +0 -1
- package/dist/standalone/chunk-FWCKM2CU.js +0 -1
- package/dist/standalone/chunk-GITJXQOS.js +0 -4
- package/dist/standalone/chunk-GP6IRITM.js +0 -1
- package/dist/standalone/chunk-GXU3ATKS.js +0 -1
- package/dist/standalone/chunk-H5Y5NQPL.js +0 -1
- package/dist/standalone/chunk-HALNNKTC.js +0 -1
- package/dist/standalone/chunk-HK4OVYG3.js +0 -1
- package/dist/standalone/chunk-HQEMYD2K.js +0 -1
- package/dist/standalone/chunk-I4WGRDL2.js +0 -1
- package/dist/standalone/chunk-ISZSYNTI.js +0 -4
- package/dist/standalone/chunk-JWG3VRGB.js +0 -1
- package/dist/standalone/chunk-KDYNM3GV.js +0 -1
- package/dist/standalone/chunk-KP6JQSH2.js +0 -4
- package/dist/standalone/chunk-LLXFYRGQ.js +0 -1
- package/dist/standalone/chunk-LU3GW7HI.js +0 -1
- package/dist/standalone/chunk-M536Y2KX.js +0 -1
- package/dist/standalone/chunk-MVGE3JJN.js +0 -1
- package/dist/standalone/chunk-MXSHWB3M.js +0 -1
- package/dist/standalone/chunk-NL2DZKFI.js +0 -1
- package/dist/standalone/chunk-OGVCXKRL.js +0 -2
- package/dist/standalone/chunk-OPC233PZ.js +0 -1
- package/dist/standalone/chunk-P4CWOYFL.js +0 -1
- package/dist/standalone/chunk-PUY3YDXI.js +0 -1
- package/dist/standalone/chunk-QZMR6MUG.js +0 -1
- package/dist/standalone/chunk-WCWYSOCN.js +0 -62
- package/dist/standalone/chunk-WEO3YVP6.js +0 -3
- package/dist/standalone/chunk-X2FQ6B5V.js +0 -1
- package/dist/standalone/chunk-XIZNYKOD.js +0 -1
- package/dist/standalone/chunk-XS6Q6GGV.js +0 -1
- package/dist/standalone/chunk-Y3CQDULJ.js +0 -1
- package/dist/standalone/chunk-Z2JPEI2V.js +0 -1
- /package/dist/standalone/{chunk-4CGALXS3.js → chunk-OG4N2XHD.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A}from"react/compiler-runtime";import{useLunora as H}from"@lunora/react";import{useState as h,useEffect as Q}from"react";import{u as R}from"../packem_shared/button-BkCrNcAs.js";import{c as V,u as j}from"../packem_shared/card-CIDGUN6K.js";import{E as W}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as D}from"../packem_shared/input-JHu63lTv.js";import{n as q,d as E,m as N,p as o,f as L,u as i}from"../packem_shared/table-DdJBrClo.js";import{useT as G}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{f as M,
|
|
1
|
+
import{c as A}from"react/compiler-runtime";import{useLunora as H}from"@lunora/react";import{useState as h,useEffect as Q}from"react";import{u as R}from"../packem_shared/button-BkCrNcAs.js";import{c as V,u as j}from"../packem_shared/card-CIDGUN6K.js";import{E as W}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as D}from"../packem_shared/input-JHu63lTv.js";import{n as q,d as E,m as N,p as o,f as L,u as i}from"../packem_shared/table-DdJBrClo.js";import{useT as G}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{f as M,b as B,h as J}from"../packem_shared/internal-BSIsQVC6.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";const O=10,g=x=>{const r=A(7),{label:m,value:a}=x;let l;r[0]!==m?(l=e("span",{className:"font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:m}),r[0]=m,r[1]=l):l=r[1];const f=a??"—";let c;r[2]!==f?(c=e("span",{className:"font-mono text-sm",children:f}),r[2]=f,r[3]=c):c=r[3];let u;return r[4]!==l||r[5]!==c?(u=n("div",{className:"flex flex-col gap-0.5",children:[l,c]}),r[4]=l,r[5]=c,r[6]=u):u=r[6],u},ce=({loadIndexes:x,runQuery:r}={})=>{const m=H(),a=G(),[l,f]=h(null),[c,u]=h(null),[v,C]=h(null),[b,F]=h(""),[p,y]=h(null),[k,w]=h(null),[I,S]=h(!1);Q(()=>{const t={cancelled:!1};return M((async()=>{try{const d=await(x??(()=>m.listVectorIndexes()))();t.cancelled||(f(d),u(null),C($=>$??d[0]?.name??null))}catch(d){t.cancelled||(f(null),u(B(d)))}})()),()=>{t.cancelled=!0}},[m,x]);const s=l?.find(t=>t.name===v)??null,K=t=>{C(t.currentTarget.dataset.index??null),y(null),w(null)},T=t=>{F(t.target.value)},Z=async()=>{const t=b.trim();if(!(v===null||t==="")){S(!0),w(null);try{const d=await(r??($=>m.queryVectorIndex($)))({name:v,text:t,topK:O});y(d)}catch(d){y(null),w(B(d))}S(!1)}},z=()=>{M(Z())};return n("div",{className:"flex flex-col gap-4","data-testid":"lunora-vector-browser",children:[c!==null&&e("p",{className:"text-sm text-destructive","data-testid":"vector-error",role:"alert",children:c}),l!==null&&l.length===0&&e(W,{description:a("Indexes declared with .vectorize() or defineVectorIndex() appear here."),icon:e("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:e("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"})}),testId:"vector-empty",title:a("No vector indexes.")}),l!==null&&l.length>0&&e(V,{className:"overflow-hidden py-0",children:e(j,{className:"px-0",children:n(q,{"data-testid":"vector-table",children:[e(E,{children:n(N,{children:[e(o,{children:a("name")}),e(o,{children:a("table")}),e(o,{children:a("dimensions")}),e(o,{children:a("metric")}),e(o,{children:a("vectors")})]})}),e(L,{children:l.map(t=>n(N,{className:t.name===v?"border-l-2 border-l-royal-amethyst bg-muted/50":"cursor-pointer","data-index":t.name,"data-testid":`vector-row-${t.name}`,onClick:K,children:[e(i,{className:"font-mono text-xs",children:t.name}),e(i,{className:"font-mono text-xs",children:t.table}),e(i,{className:"tabular-nums",children:t.dimensions??"—"}),e(i,{children:t.metric??"—"}),e(i,{className:"tabular-nums",children:t.vectorsCount??"—"})]},t.name))})]})})}),s!==null&&n("section",{className:"border border-border bg-card p-3","data-testid":"vector-detail",children:[n("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[e(g,{label:a("field"),value:s.field}),e(g,{label:a("dimensions"),value:s.dimensions}),e(g,{label:a("metric"),value:s.metric}),e(g,{label:a("vectors"),value:s.vectorsCount})]}),s.metadata!==void 0&&s.metadata.length>0&&n("p",{className:"mt-3 text-xs text-muted-foreground","data-testid":"vector-metadata",children:[a("metadata"),": ",e("span",{className:"font-mono",children:s.metadata.join(", ")})]}),n("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e(D,{className:"min-w-[18rem] flex-1","data-testid":"vector-query-input",onChange:T,placeholder:a("Search by similarity…"),value:b}),e(R,{"data-testid":"vector-search",disabled:I||b.trim()==="",onClick:z,children:a(I?"Searching…":"Search")})]}),k!==null&&e("p",{className:"mt-2 text-sm text-destructive","data-testid":"vector-query-error",role:"alert",children:k}),p!==null&&p.length===0&&e("p",{className:"mt-2 text-sm text-muted-foreground","data-testid":"vector-no-matches",children:a("No matches.")}),p!==null&&p.length>0&&e(V,{className:"mt-3 overflow-hidden py-0",children:e(j,{className:"px-0",children:n(q,{"data-testid":"vector-matches",children:[e(E,{children:n(N,{children:[e(o,{children:a("id")}),e(o,{children:a("score")}),e(o,{children:a("metadata")})]})}),e(L,{children:p.map(t=>n(N,{"data-testid":`vector-match-${t.id}`,children:[e(i,{className:"font-mono text-xs",children:t.id}),e(i,{className:"tabular-nums",children:t.score.toFixed(4)}),e(i,{className:"max-w-md truncate font-mono text-xs",children:t.metadata===void 0?"—":J(t.metadata)})]},t.id))})]})})})]})]})};export{ce as VectorBrowser};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLunora as V}from"@lunora/react";import{useState as m,useEffect as ae,useMemo as P}from"react";import{u as W}from"../packem_shared/button-BkCrNcAs.js";import{c as J,u as L}from"../packem_shared/card-CIDGUN6K.js";import{E as G}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as re}from"../packem_shared/input-JHu63lTv.js";import{n as U,d as _,m as N,p as o,f as K,u as i}from"../packem_shared/table-DdJBrClo.js";import{l as ne}from"../packem_shared/textarea-Bu2-jKAs.js";import{K as se}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{useT as X}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as H}from"../packem_shared/ADMIN_FUNCTIONS-CpgIo9pj.js";import{f as A,e as E,c as B,a as Y}from"../packem_shared/internal-AtZ4bTal.js";import{jsxs as s,jsx as e}from"react/jsx-runtime";const le=["queued","running","paused","waiting","complete","errored","terminated"],oe=["pause","resume","terminate"],ie="WORKFLOWS_NOT_CONFIGURED",de=d=>typeof d=="object"&&d!==null&&d.code===ie,ce=d=>{const r=d.error??d.output;if(r===void 0)return"—";try{return JSON.stringify(r)}catch{return"(unserializable)"}},me=({loadDetail:d,loadInstances:r,readOnly:b,runAction:R,workflowName:h})=>{const I=V(),n=X(),[w,g]=m(null),[S,$]=m(null),[k,T]=m(""),[v,p]=m(null),[F,C]=m(!1),[j,z]=m(null),f=d??(a=>I.getWorkflowInstance(a)),x=b?void 0:R??(r===void 0?a=>I.setWorkflowInstanceStatus(a):void 0),O=async()=>{p(null),C(!1);const a=k===""?void 0:k;try{if(r===void 0){const l=await I.listWorkflowInstances({name:h,status:a});if(l.configured===!1){g(null),C(!0);return}g(l.instances);return}g(await r({name:h,status:a}))}catch(l){g(null),de(l)?C(!0):p(E(l))}};ae(()=>{$(null),A(O())},[h,k]);const D=async a=>{p(null);try{$(await f({id:a,name:h}))}catch(l){p(E(l))}},q=async(a,l)=>{if(x!==void 0){z(a),p(null);try{await x({action:l,id:a,name:h}),await O()}catch(M){p(E(M))}finally{z(null)}}};return s("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[s("div",{className:"flex items-center justify-between gap-2",children:[e("h3",{className:"text-sm font-medium",children:n("Instance history")}),s("select",{"aria-label":n("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:a=>{T(a.target.value)},value:k,children:[e("option",{value:"",children:n("All statuses")}),le.map(a=>e("option",{value:a,children:a},a))]})]}),v!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:v}),F&&e(G,{description:n("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:n("Workflow inspection not configured")}),!F&&w!==null&&w.length===0&&e(G,{description:n("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:n("No instances")}),w!==null&&w.length>0&&e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflow-instances-table",children:[e(_,{children:s(N,{children:[e(o,{children:n("Instance id")}),e(o,{children:n("Status")}),e(o,{children:n("Created")}),e(o,{children:n("Ended")}),e(o,{"aria-label":n("Actions")})]})}),e(K,{children:w.map(a=>s(N,{"data-testid":`workflow-instance-${a.id}`,children:[e(i,{className:"font-mono text-xs",children:a.id}),e(i,{className:"font-mono text-xs",children:a.status}),e(i,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"—"}),e(i,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"—"}),e(i,{className:"text-right",children:s("div",{className:"flex justify-end gap-1.5",children:[e(W,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:()=>{A(D(a.id))},size:"sm",type:"button",variant:"outline",children:n("Steps")}),x!==void 0&&oe.map(l=>e(W,{"data-testid":`workflow-instance-${l}-${a.id}`,disabled:j===a.id,onClick:()=>{A(q(a.id,l))},size:"sm",type:"button",variant:"ghost",children:n(l)},l))]})})]},a.id))})]})})}),S!==null&&e(J,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:s(L,{className:"flex flex-col gap-2 px-4 py-3",children:[s("div",{className:"flex items-center justify-between",children:[s("span",{className:"font-mono text-xs",children:[n("Steps")," · ",S.id]}),e(W,{"data-testid":"workflow-instance-detail-close",onClick:()=>{$(null)},size:"xs",type:"button",variant:"ghost",children:n("Close")})]}),S.steps.length===0?e("p",{className:"text-xs text-muted-foreground",children:n("This instance has no recorded steps yet.")}):s(U,{"data-testid":"workflow-instance-steps",children:[e(_,{children:s(N,{children:[e(o,{children:n("Step")}),e(o,{children:n("Type")}),e(o,{children:n("Attempts")}),e(o,{children:n("Started")}),e(o,{children:n("Output")})]})}),e(K,{children:S.steps.map((a,l)=>s(N,{"data-testid":`workflow-step-${String(l)}`,children:[e(i,{className:"font-mono text-xs",children:a.name}),e(i,{className:"text-xs text-muted-foreground",children:a.type??"—"}),e(i,{className:"tabular-nums",children:a.attempts??"—"}),e(i,{className:"text-muted-foreground tabular-nums",children:a.start??"—"}),e(i,{className:"font-mono text-xs text-muted-foreground",children:ce(a)})]},`${a.name}:${String(l)}`))})]})]})})]})},ue=Y(H.createWorkflowInstance),fe=Y(H.getWorkflowInstanceStatus),he=d=>{if(d.error)return`${d.error.name}: ${d.error.message}`;if(d.output===void 0)return"—";try{return JSON.stringify(d.output)}catch{return"(unserializable)"}},Oe=()=>{const d=V(),r=X(),{data:b,error:R}=se(H.listWorkflows,{}),[h,I]=m(""),[n,w]=m(""),[g,S]=m(""),[$,k]=m(!1),[T,v]=m(null),[p,F]=m([]),[C,j]=m(null),z=b!==void 0,f=P(()=>Array.isArray(b?.workflows)?[...b.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],[b]),x=P(()=>f.some(t=>t.exportName===h)?h:f[0]?.exportName??"",[f,h]),O=P(()=>f.find(t=>t.exportName===x),[f,x]),D=t=>{F(u=>{const c=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...c]})},q=async()=>{const t=x;if(t==="")return;let u;const c=g.trim();if(c!=="")try{u=JSON.parse(c)}catch{v(r("Params must be valid JSON"));return}k(!0),v(null);try{const y=n.trim(),Q=await d.query(ue,{exportName:t,id:y===""?void 0:y,params:u},B(""));D({exportName:t,id:Q.id,status:Q.status}),w("")}catch(y){v(E(y))}finally{k(!1)}},a=()=>{A(q())},l=async(t,u)=>{j(u);try{const c=await d.query(fe,{exportName:t,id:u},B(""));D({error:c.error,exportName:t,id:c.id,output:c.output,status:c.status})}catch(c){v(E(c))}finally{j(null)}},M=t=>{I(t.target.value)},Z=t=>{w(t.target.value)},ee=t=>{S(t.target.value)},te=t=>{const{export:u,id:c}=t.currentTarget.dataset;u!==void 0&&c!==void 0&&A(l(u,c))};return s("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[R!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:R}),e("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),z&&f.length===0?e(G,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflows-table",children:[e(_,{children:s(N,{children:[e(o,{children:r("Export")}),e(o,{children:r("Name")}),e(o,{children:r("Class")}),e(o,{children:r("Binding")})]})}),e(K,{children:f.map(t=>s(N,{"data-testid":`workflows-row-${t.exportName}`,children:[e(i,{className:"font-mono text-xs",children:t.exportName}),e(i,{className:"font-mono text-xs text-muted-foreground",children:t.name}),e(i,{className:"font-mono text-xs text-muted-foreground",children:t.className}),e(i,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),f.length>0&&s("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[e("h3",{className:"text-sm font-medium",children:r("Start instance")}),T!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:T}),s("div",{className:"flex flex-wrap items-center gap-2",children:[e("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:M,value:x,children:f.map(t=>e("option",{value:t.exportName,children:t.exportName},t.exportName))}),e(re,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:Z,placeholder:r("Instance id (optional)"),value:n}),e(W,{"data-testid":"workflows-start-button",disabled:$||x==="",onClick:a,children:r($?"Starting…":"Start instance")})]}),e(ne,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:ee,placeholder:r("Params (JSON, optional)"),value:g})]}),p.length>0&&s("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[e("h3",{className:"text-sm font-medium",children:r("Instances")}),e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflows-instances-table",children:[e(_,{children:s(N,{children:[e(o,{children:r("Workflow")}),e(o,{children:r("Instance id")}),e(o,{children:r("Status")}),e(o,{children:r("Output")}),e(o,{})]})}),e(K,{children:p.map(t=>s(N,{"data-testid":`workflows-instance-${t.id}`,children:[e(i,{className:"font-mono text-xs",children:t.exportName}),e(i,{className:"font-mono text-xs text-muted-foreground",children:t.id}),e(i,{className:"font-mono text-xs",children:t.status}),e(i,{className:"font-mono text-xs text-muted-foreground",children:he(t)}),e(i,{children:e(W,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:C===t.id,onClick:te,size:"xs",variant:"outline",children:C===t.id?r("Refreshing…"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),O!==void 0&&e(me,{workflowName:O.name})]})};export{Oe as default};
|
|
1
|
+
import{useLunora as Q}from"@lunora/react";import{useState as m,useEffect as te}from"react";import{u as W}from"../packem_shared/button-BkCrNcAs.js";import{c as J,u as L}from"../packem_shared/card-CIDGUN6K.js";import{E as M}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as ae}from"../packem_shared/input-JHu63lTv.js";import{n as U,d as _,m as x,p as i,f as q,u as d}from"../packem_shared/table-DdJBrClo.js";import{l as re}from"../packem_shared/textarea-Bu2-jKAs.js";import{N as ne}from"../packem_shared/use-admin-query-QJ-ibl5u.js";import{useT as V}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as B}from"../packem_shared/ADMIN_FUNCTIONS-BnD4aovm.js";import{f as A,b as E,d as H,g as X}from"../packem_shared/internal-BSIsQVC6.js";import{jsxs as s,jsx as e}from"react/jsx-runtime";const se=["queued","running","paused","waiting","complete","errored","terminated"],oe=["pause","resume","terminate"],le="WORKFLOWS_NOT_CONFIGURED",ie=o=>typeof o=="object"&&o!==null&&o.code===le,de=o=>{const r=o.error??o.output;if(r===void 0)return"—";try{return JSON.stringify(r)}catch{return"(unserializable)"}},ce=({loadDetail:o,loadInstances:r,readOnly:N,runAction:T,workflowName:g})=>{const I=Q(),n=V(),[h,k]=m(null),[S,$]=m(null),[v,j]=m(""),[b,f]=m(null),[F,C]=m(!1),[R,z]=m(null),p=o??(a=>I.getWorkflowInstance(a)),w=N?void 0:T??(r===void 0?a=>I.setWorkflowInstanceStatus(a):void 0),O=async()=>{f(null),C(!1);const a=v===""?void 0:v;try{if(r===void 0){const l=await I.listWorkflowInstances({name:g,status:a});if(l.configured===!1){k(null),C(!0);return}k(l.instances);return}k(await r({name:g,status:a}))}catch(l){k(null),ie(l)?C(!0):f(E(l))}};te(()=>{$(null),A(O())},[g,v]);const D=async a=>{f(null);try{$(await p({id:a,name:g}))}catch(l){f(E(l))}},K=async(a,l)=>{if(w!==void 0){z(a),f(null);try{await w({action:l,id:a,name:g}),await O()}catch(P){f(E(P))}z(null)}};return s("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[s("div",{className:"flex items-center justify-between gap-2",children:[e("h3",{className:"text-sm font-medium",children:n("Instance history")}),s("select",{"aria-label":n("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:a=>{j(a.target.value)},value:v,children:[e("option",{value:"",children:n("All statuses")}),se.map(a=>e("option",{value:a,children:a},a))]})]}),b!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:b}),F&&e(M,{description:n("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:n("Workflow inspection not configured")}),!F&&h!==null&&h.length===0&&e(M,{description:n("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:n("No instances")}),h!==null&&h.length>0&&e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflow-instances-table",children:[e(_,{children:s(x,{children:[e(i,{children:n("Instance id")}),e(i,{children:n("Status")}),e(i,{children:n("Created")}),e(i,{children:n("Ended")}),e(i,{"aria-label":n("Actions")})]})}),e(q,{children:h.map(a=>s(x,{"data-testid":`workflow-instance-${a.id}`,children:[e(d,{className:"font-mono text-xs",children:a.id}),e(d,{className:"font-mono text-xs",children:a.status}),e(d,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"—"}),e(d,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"—"}),e(d,{className:"text-right",children:s("div",{className:"flex justify-end gap-1.5",children:[e(W,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:()=>{A(D(a.id))},size:"sm",type:"button",variant:"outline",children:n("Steps")}),w!==void 0&&oe.map(l=>e(W,{"data-testid":`workflow-instance-${l}-${a.id}`,disabled:R===a.id,onClick:()=>{A(K(a.id,l))},size:"sm",type:"button",variant:"ghost",children:n(l)},l))]})})]},a.id))})]})})}),S!==null&&e(J,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:s(L,{className:"flex flex-col gap-2 px-4 py-3",children:[s("div",{className:"flex items-center justify-between",children:[s("span",{className:"font-mono text-xs",children:[n("Steps")," · ",S.id]}),e(W,{"data-testid":"workflow-instance-detail-close",onClick:()=>{$(null)},size:"xs",type:"button",variant:"ghost",children:n("Close")})]}),S.steps.length===0?e("p",{className:"text-xs text-muted-foreground",children:n("This instance has no recorded steps yet.")}):s(U,{"data-testid":"workflow-instance-steps",children:[e(_,{children:s(x,{children:[e(i,{children:n("Step")}),e(i,{children:n("Type")}),e(i,{children:n("Attempts")}),e(i,{children:n("Started")}),e(i,{children:n("Output")})]})}),e(q,{children:S.steps.map((a,l)=>s(x,{"data-testid":`workflow-step-${String(l)}`,children:[e(d,{className:"font-mono text-xs",children:a.name}),e(d,{className:"text-xs text-muted-foreground",children:a.type??"—"}),e(d,{className:"tabular-nums",children:a.attempts??"—"}),e(d,{className:"text-muted-foreground tabular-nums",children:a.start??"—"}),e(d,{className:"font-mono text-xs text-muted-foreground",children:de(a)})]},`${a.name}:${String(l)}`))})]})]})})]})},me=X(B.createWorkflowInstance),ue=X(B.getWorkflowInstanceStatus),fe=o=>{if(o.error)return`${o.error.name}: ${o.error.message}`;if(o.output===void 0)return"—";try{return JSON.stringify(o.output)}catch{return"(unserializable)"}},he=(o,r)=>o.some(N=>N.exportName===r)?r:o[0]?.exportName??"",Oe=()=>{const o=Q(),r=V(),{data:N,error:T}=ne(B.listWorkflows,{}),[g,I]=m(""),[n,h]=m(""),[k,S]=m(""),[$,v]=m(!1),[j,b]=m(null),[f,F]=m([]),[C,R]=m(null),z=N!==void 0,p=Array.isArray(N?.workflows)?[...N.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],w=he(p,g),O=p.find(t=>t.exportName===w),D=t=>{F(u=>{const c=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...c]})},K=async()=>{const t=w;if(t==="")return;let u;const c=k.trim();if(c!=="")try{u=JSON.parse(c)}catch{b(r("Params must be valid JSON"));return}v(!0),b(null);try{const y=n.trim(),G=await o.query(me,{exportName:t,id:y===""?void 0:y,params:u},H(""));D({exportName:t,id:G.id,status:G.status}),h("")}catch(y){b(E(y))}v(!1)},a=()=>{A(K())},l=async(t,u)=>{R(u);try{const c=await o.query(ue,{exportName:t,id:u},H(""));D({error:c.error,exportName:t,id:c.id,output:c.output,status:c.status})}catch(c){b(E(c))}R(null)},P=t=>{I(t.target.value)},Y=t=>{h(t.target.value)},Z=t=>{S(t.target.value)},ee=t=>{const{export:u,id:c}=t.currentTarget.dataset;u!==void 0&&c!==void 0&&A(l(u,c))};return s("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[T!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:T}),e("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),z&&p.length===0?e(M,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflows-table",children:[e(_,{children:s(x,{children:[e(i,{children:r("Export")}),e(i,{children:r("Name")}),e(i,{children:r("Class")}),e(i,{children:r("Binding")})]})}),e(q,{children:p.map(t=>s(x,{"data-testid":`workflows-row-${t.exportName}`,children:[e(d,{className:"font-mono text-xs",children:t.exportName}),e(d,{className:"font-mono text-xs text-muted-foreground",children:t.name}),e(d,{className:"font-mono text-xs text-muted-foreground",children:t.className}),e(d,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),p.length>0&&s("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[e("h3",{className:"text-sm font-medium",children:r("Start instance")}),j!==null&&e("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:j}),s("div",{className:"flex flex-wrap items-center gap-2",children:[e("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:P,value:w,children:p.map(t=>e("option",{value:t.exportName,children:t.exportName},t.exportName))}),e(ae,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:Y,placeholder:r("Instance id (optional)"),value:n}),e(W,{"data-testid":"workflows-start-button",disabled:$||w==="",onClick:a,children:r($?"Starting…":"Start instance")})]}),e(re,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:Z,placeholder:r("Params (JSON, optional)"),value:k})]}),f.length>0&&s("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[e("h3",{className:"text-sm font-medium",children:r("Instances")}),e(J,{className:"overflow-hidden py-0",children:e(L,{className:"px-0",children:s(U,{"data-testid":"workflows-instances-table",children:[e(_,{children:s(x,{children:[e(i,{children:r("Workflow")}),e(i,{children:r("Instance id")}),e(i,{children:r("Status")}),e(i,{children:r("Output")}),e(i,{})]})}),e(q,{children:f.map(t=>s(x,{"data-testid":`workflows-instance-${t.id}`,children:[e(d,{className:"font-mono text-xs",children:t.exportName}),e(d,{className:"font-mono text-xs text-muted-foreground",children:t.id}),e(d,{className:"font-mono text-xs",children:t.status}),e(d,{className:"font-mono text-xs text-muted-foreground",children:fe(t)}),e(d,{children:e(W,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:C===t.id,onClick:ee,size:"xs",variant:"outline",children:C===t.id?r("Refreshing…"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),O!==void 0&&e(ce,{workflowName:O.name})]})};export{Oe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _="__lunora_admin__:",a={aiAvailable:"__lunora_admin__:aiAvailable",aiChartConfig:"__lunora_admin__:aiChartConfig",aiGenerateSql:"__lunora_admin__:aiGenerateSql",aiTableFilter:"__lunora_admin__:aiTableFilter",assignIssue:"__lunora_admin__:assignIssue",backRelationCounts:"__lunora_admin__:backRelationCounts",clearCapturedMail:"__lunora_admin__:clearCapturedMail",clearQueueMessages:"__lunora_admin__:clearQueueMessages",clearTable:"__lunora_admin__:clearTable",createWorkflowInstance:"__lunora_admin__:createWorkflowInstance",deleteRows:"__lunora_admin__:deleteRows",describeTable:"__lunora_admin__:describeTable",describeTables:"__lunora_admin__:describeTables",explainIssue:"__lunora_admin__:explainIssue",exportShard:"__lunora_admin__:exportShard",facetColumn:"__lunora_admin__:facetColumn",getAdvisories:"__lunora_admin__:getAdvisories",getAuditLog:"__lunora_admin__:getAuditLog",getAuthAuditLog:"__lunora_admin__:getAuthAuditLog",getAuthMetrics:"__lunora_admin__:getAuthMetrics",getCapturedMail:"__lunora_admin__:getCapturedMail",getFanoutMetrics:"__lunora_admin__:getFanoutMetrics",getFunctionStats:"__lunora_admin__:getFunctionStats",getIssues:"__lunora_admin__:getIssues",lintSql:"__lunora_admin__:lintSql",listFlags:"__lunora_admin__:listFlags",listPushSubscriptions:"__lunora_admin__:listPushSubscriptions",listQueues:"__lunora_admin__:listQueues",listSubscriptions:"__lunora_admin__:listSubscriptions",listTableIndexes:"__lunora_admin__:listTableIndexes",listWorkflows:"__lunora_admin__:listWorkflows",getLogs:"__lunora_admin__:getLogs",getMetricHistory:"__lunora_admin__:getMetricHistory",getMetricSeries:"__lunora_admin__:getMetricSeries",getMetrics:"__lunora_admin__:getMetrics",getPitrBookmark:"__lunora_admin__:getPitrBookmark",getQueryInsights:"__lunora_admin__:getQueryInsights",getQueueMessages:"__lunora_admin__:getQueueMessages",getRequestLog:"__lunora_admin__:getRequestLog",getSecurityAudit:"__lunora_admin__:getSecurityAudit",getSettings:"__lunora_admin__:getSettings",getTraces:"__lunora_admin__:getTraces",getWorkflowInstanceStatus:"__lunora_admin__:getWorkflowInstanceStatus",ignoreIssue:"__lunora_admin__:ignoreIssue",importShard:"__lunora_admin__:importShard",listTables:"__lunora_admin__:listTables",maskPolicies:"__lunora_admin__:maskPolicies",migrationStatus:"__lunora_admin__:migrationStatus",pitrRestore:"__lunora_admin__:pitrRestore",readTablePage:"__lunora_admin__:readTablePage",replayQueueMessage:"__lunora_admin__:replayQueueMessage",resolveIssue:"__lunora_admin__:resolveIssue",rlsPolicies:"__lunora_admin__:rlsPolicies",schemaHistory:"__lunora_admin__:schemaHistory",schemaVersion:"__lunora_admin__:schemaVersion",runAs:"__lunora_admin__:runAs",runMigration:"__lunora_admin__:runMigration",runSql:"__lunora_admin__:runSql",sendQueueMessage:"__lunora_admin__:sendQueueMessage",sendTestMail:"__lunora_admin__:sendTestMail",setIssueSeverity:"__lunora_admin__:setIssueSeverity",storageOrphans:"__lunora_admin__:storageOrphans",storageReferences:"__lunora_admin__:storageReferences",storageRules:"__lunora_admin__:storageRules",studioFeatures:"__lunora_admin__:studioFeatures",writeRow:"__lunora_admin__:writeRow"};export{a as ADMIN_FUNCTIONS,_ as ADMIN_FUNCTION_PREFIX};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as E}from"react/compiler-runtime";import{useLunora as Y}from"@lunora/react";import{useState as M,useEffect as Z}from"react";import{u as Q}from"./button-BkCrNcAs.js";import{E as z}from"./empty-state-Cg7t_8qu.js";import{useT as L}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as B}from"./ADMIN_FUNCTIONS-BnD4aovm.js";import{c as ee,d as te,g as ae}from"./internal-BSIsQVC6.js";import{jsxs as A,jsx as m}from"react/jsx-runtime";const ne=ae(B.listTables),ie=["react","client","cli"],le=!1,oe={action:"action",mutation:"mutation",query:"query"},J=i=>{const e=i.indexOf(":");return e===-1?{file:"",fn:i}:{file:i.slice(0,e),fn:i.slice(e+1)}},U=({file:i,fn:e,kind:l})=>`await client.${oe[l]}(api.${i}.${e}, { /* args */ });`,re=i=>{const e=`api.${i.file}.${i.fn}`;switch(i.kind){case"action":return U(i);case"mutation":return`const ${i.fn} = useMutation(${e});`;default:return`const data = useQuery(${e}, { /* args */ });`}},se=({file:i,fn:e})=>`lunora run ${i}:${e} --args '{ }'`,de=i=>["// Read rows",`const rows = await ctx.db.query("${i}").collect();`,"","// Insert a row",`const id = await ctx.db.insert("${i}", { /* fields */ });`,"","// Generated types",`type Row = Doc<"${i}">;`,`type RowId = Id<"${i}">;`].join(`
|
|
2
|
+
`),ce=(i,e)=>{switch(i){case"cli":return se(e);case"client":return U(e);default:return re(e)}},V=i=>{const e=E(19),{code:l,label:o,testId:a}=i,n=L();let s;e[0]!==l?(s=()=>{ee(l)},e[0]=l,e[1]=s):s=e[1];const u=s;let t;e[2]!==o?(t=m("span",{className:"text-xs font-medium text-muted-foreground",children:o}),e[2]=o,e[3]=t):t=e[3];const c=`${a}-copy`;let r;e[4]!==n?(r=n("Copy"),e[4]=n,e[5]=r):r=e[5];let p;e[6]!==u||e[7]!==c||e[8]!==r?(p=m(Q,{"data-testid":c,onClick:u,size:"xs",type:"button",variant:"ghost",children:r}),e[6]=u,e[7]=c,e[8]=r,e[9]=p):p=e[9];let f;e[10]!==t||e[11]!==p?(f=A("div",{className:"flex items-center justify-between gap-2",children:[t,p]}),e[10]=t,e[11]=p,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==a?(d=m("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":a,children:l}),e[13]=l,e[14]=a,e[15]=d):d=e[15];let h;return e[16]!==f||e[17]!==d?(h=A("div",{className:"flex flex-col gap-1.5",children:[f,d]}),e[16]=f,e[17]=d,e[18]=h):h=e[18],h},pe=i=>{const e=E(50),{file:l,fn:o,kind:a}=i,n=L(),[s,u]=M("react");let t,c,r;if(e[0]!==l||e[1]!==o||e[2]!==a||e[3]!==n||e[4]!==s){const x={file:l,fn:o,kind:a};let I;e[8]!==n?(I=n("CLI"),e[8]=n,e[9]=I):I=e[9];let C;e[10]!==n?(C=n("Client"),e[10]=n,e[11]=C):C=e[11];let T;e[12]!==n?(T=n("React"),e[12]=n,e[13]=T):T=e[13];let _;e[14]!==I||e[15]!==C||e[16]!==T?(_={cli:I,client:C,react:T},e[14]=I,e[15]=C,e[16]=T,e[17]=_):_=e[17],r=_;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=P=>{u(P.currentTarget.dataset.tab)},e[18]=D):D=e[18],t=D,c=ce(s,x),e[0]=l,e[1]=o,e[2]=a,e[3]=n,e[4]=s,e[5]=t,e[6]=c,e[7]=r}else t=e[5],c=e[6],r=e[7];const p=c,f=a==="action"&&s==="react"&&!le,d=`api.${l}.${o}`;let h;e[19]!==d?(h=m("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-fn-title",children:d}),e[19]=d,e[20]=h):h=e[20];let b;e[21]!==a||e[22]!==n?(b=n("Call this {kind} from your app.",{kind:a}),e[21]=a,e[22]=n,e[23]=b):b=e[23];let v;e[24]!==b?(v=m("p",{className:"text-xs text-muted-foreground",children:b}),e[24]=b,e[25]=v):v=e[25];let y;e[26]!==h||e[27]!==v?(y=A("div",{children:[h,v]}),e[26]=h,e[27]=v,e[28]=y):y=e[28];let k;e[29]!==n?(k=n("Snippet flavour"),e[29]=n,e[30]=k):k=e[30];let $;e[31]!==t||e[32]!==s||e[33]!==r?($=ie.map(x=>m(Q,{"aria-selected":s===x,"data-tab":x,"data-testid":`api-tab-${x}`,onClick:t,role:"tab",size:"xs",type:"button",variant:s===x?"default":"outline",children:r[x]},x)),e[31]=t,e[32]=s,e[33]=r,e[34]=$):$=e[34];let N;e[35]!==k||e[36]!==$?(N=m("div",{"aria-label":k,className:"flex gap-1.5","data-testid":"api-tabs",role:"tablist",children:$}),e[35]=k,e[36]=$,e[37]=N):N=e[37];const O=r[s],j=`api-snippet-${s}`;let w;e[38]!==p||e[39]!==O||e[40]!==j?(w=m(V,{code:p,label:O,testId:j}),e[38]=p,e[39]=O,e[40]=j,e[41]=w):w=e[41];let S;e[42]!==f||e[43]!==n?(S=f&&m("p",{className:"text-xs text-muted-foreground","data-testid":"api-action-note",children:n("Actions have no React hook — call them through the client.")}),e[42]=f,e[43]=n,e[44]=S):S=e[44];let R;return e[45]!==w||e[46]!==S||e[47]!==y||e[48]!==N?(R=A("div",{className:"flex flex-col gap-3","data-testid":"api-fn-doc",children:[y,N,w,S]}),e[45]=w,e[46]=S,e[47]=y,e[48]=N,e[49]=R):R=e[49],R},fe=i=>{const e=E(19),{name:l}=i,o=L();let a;e[0]!==l?(a=de(l),e[0]=l,e[1]=a):a=e[1];const n=a;let s;e[2]!==l?(s=m("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-table-title",children:l}),e[2]=l,e[3]=s):s=e[3];let u;e[4]!==o?(u=o("Read and write this table through the typed data model."),e[4]=o,e[5]=u):u=e[5];let t;e[6]!==u?(t=m("p",{className:"text-xs text-muted-foreground",children:u}),e[6]=u,e[7]=t):t=e[7];let c;e[8]!==s||e[9]!==t?(c=A("div",{children:[s,t]}),e[8]=s,e[9]=t,e[10]=c):c=e[10];let r;e[11]!==o?(r=o("Data model"),e[11]=o,e[12]=r):r=e[12];let p;e[13]!==n||e[14]!==r?(p=m(V,{code:n,label:r,testId:"api-snippet-table"}),e[13]=n,e[14]=r,e[15]=p):p=e[15];let f;return e[16]!==c||e[17]!==p?(f=A("div",{className:"flex flex-col gap-3","data-testid":"api-table-doc",children:[c,p]}),e[16]=c,e[17]=p,e[18]=f):f=e[18],f},G=i=>{const e=E(8),{active:l,label:o,onSelect:a,testId:n,value:s}=i;let u;e[0]!==a||e[1]!==s?(u=()=>{a(s)},e[0]=a,e[1]=s,e[2]=u):u=e[2];const t=u,c=l?"page":void 0;let r;return e[3]!==o||e[4]!==t||e[5]!==c||e[6]!==n?(r=m("button",{"aria-current":c,className:"w-full truncate rounded-md px-2 py-1 text-start font-mono text-xs text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-testid":n,onClick:t,type:"button",children:o}),e[3]=o,e[4]=t,e[5]=c,e[6]=n,e[7]=r):r=e[7],r},me=i=>{const e=new Map;for(const l of i){const{file:o,fn:a}=J(l.path),n=e.get(o)??[];n.push({fn:a,kind:l.kind,path:l.path}),e.set(o,n)}return[...e.entries()].map(([l,o])=>({file:l,items:o.toSorted((a,n)=>a.fn.localeCompare(n.fn))})).toSorted((l,o)=>l.file.localeCompare(o.file))},Se=i=>{const e=E(58),{functions:l,initialShardKey:o}=i,a=L(),n=Y(),[s,u]=M(null),[t,c]=M(null);let r,p;e[0]!==n||e[1]!==o?(r=()=>{let _=!1;return n.query(ne,{},te(o??"")).then(D=>(_||u(D),D)).catch(()=>{_||u([])}),()=>{_=!0}},p=[n,o],e[0]=n,e[1]=o,e[2]=r,e[3]=p):(r=e[2],p=e[3]),Z(r,p);let f,d,h,b,v,y,k,$,N,O;if(e[4]!==l||e[5]!==t||e[6]!==a||e[7]!==s){const _=l??[],D=me(_),P=(s??[]).map(ue).toSorted(he);let F;e[18]===Symbol.for("react.memo_cache_sentinel")?(F=g=>{c({kind:"fn",path:g})},e[18]=F):F=e[18];const W=F;let H;e[19]===Symbol.for("react.memo_cache_sentinel")?(H=g=>{c({kind:"table",name:g})},e[19]=H):H=e[19];const X=H;d=t?.kind==="fn"?_.find(g=>g.path===t.path):void 0,f=_.length>0||P.length>0,h=d===void 0?void 0:J(d.path),N="grid min-h-0 gap-6 md:grid-cols-[16rem_minmax(0,1fr)]",O="lunora-api-docs",e[20]!==a?(b=a("API resources"),e[20]=a,e[21]=b):b=e[21],v="flex flex-col gap-4 overflow-y-auto",y="api-rail";let K;e[22]!==t||e[23]!==a?(K=g=>A("div",{className:"flex flex-col gap-1",children:[m("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:g.file||a("(root)")}),g.items.map(q=>m(G,{active:t?.kind==="fn"&&t.path===q.path,label:q.fn,onSelect:W,testId:`api-rail-fn-${q.path}`,value:q.path},q.path))]},g.file),e[22]=t,e[23]=a,e[24]=K):K=e[24],k=D.map(K),$=P.length>0&&A("div",{className:"flex flex-col gap-1",children:[m("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Tables")}),P.map(g=>m(G,{active:t?.kind==="table"&&t.name===g,label:g,onSelect:X,testId:`api-rail-table-${g}`,value:g},g))]}),e[4]=l,e[5]=t,e[6]=a,e[7]=s,e[8]=f,e[9]=d,e[10]=h,e[11]=b,e[12]=v,e[13]=y,e[14]=k,e[15]=$,e[16]=N,e[17]=O}else f=e[8],d=e[9],h=e[10],b=e[11],v=e[12],y=e[13],k=e[14],$=e[15],N=e[16],O=e[17];let j;e[25]!==f||e[26]!==a?(j=!f&&m("p",{className:"px-2 text-xs text-muted-foreground","data-testid":"api-rail-empty",children:a("No functions or tables to document yet.")}),e[25]=f,e[26]=a,e[27]=j):j=e[27];let w;e[28]!==j||e[29]!==b||e[30]!==v||e[31]!==y||e[32]!==k||e[33]!==$?(w=A("nav",{"aria-label":b,className:v,"data-testid":y,children:[k,$,j]}),e[28]=j,e[29]=b,e[30]=v,e[31]=y,e[32]=k,e[33]=$,e[34]=w):w=e[34];let S;e[35]!==t||e[36]!==a?(S=t===null&&m(z,{description:a("Select a function or table to see how to call it from your app."),testId:"api-empty",title:a("API usage snippets")}),e[35]=t,e[36]=a,e[37]=S):S=e[37];let R;e[38]!==t?.kind||e[39]!==d||e[40]!==h?(R=t?.kind==="fn"&&d!==void 0&&h!==void 0&&m(pe,{file:h.file,fn:h.fn,kind:d.kind},d.path),e[38]=t?.kind,e[39]=d,e[40]=h,e[41]=R):R=e[41];let x;e[42]!==t?.kind||e[43]!==d||e[44]!==a?(x=t?.kind==="fn"&&d===void 0&&m(z,{testId:"api-empty",title:a("API usage snippets")}),e[42]=t?.kind,e[43]=d,e[44]=a,e[45]=x):x=e[45];let I;e[46]!==t?(I=t?.kind==="table"&&m(fe,{name:t.name}),e[46]=t,e[47]=I):I=e[47];let C;e[48]!==S||e[49]!==R||e[50]!==x||e[51]!==I?(C=A("div",{className:"min-w-0",children:[S,R,x,I]}),e[48]=S,e[49]=R,e[50]=x,e[51]=I,e[52]=C):C=e[52];let T;return e[53]!==w||e[54]!==C||e[55]!==N||e[56]!==O?(T=A("div",{className:N,"data-testid":O,children:[w,C]}),e[53]=w,e[54]=C,e[55]=N,e[56]=O,e[57]=T):T=e[57],T};function ue(i){return i.name}function he(i,e){return i.localeCompare(e)}export{le as REACT_HAS_ACTION_HOOK,se as buildCliSnippet,U as buildClientSnippet,re as buildReactSnippet,de as buildTableSnippet,Se as default,J as splitPath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y}from"react/compiler-runtime";import{useLunora as k}from"@lunora/react";import{E as u}from"./empty-state-Cg7t_8qu.js";import{n as h}from"./skeleton-C1wQ9M5t.js";import{u as v,U as j}from"./reference-view-
|
|
1
|
+
import{c as y}from"react/compiler-runtime";import{useLunora as k}from"@lunora/react";import{E as u}from"./empty-state-Cg7t_8qu.js";import{n as h}from"./skeleton-C1wQ9M5t.js";import{u as v,U as j}from"./reference-view-DnYYWr7I.js";import{useT as I}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{jsxs as w,jsx as f}from"react/jsx-runtime";const x=["get","post","put","patch","delete","head","options","trace"],g=i=>i?.content?.["application/json"]?.schema,P=(i,e)=>Object.entries(i.responses??{}).map(([a,t])=>{const c=t.$ref?.replace("#/components/responses/",""),n=c===void 0?t:e.components?.responses?.[c]??t;return{description:n.description,schema:g(n),status:a}}),A=(i,e,a,t,c)=>{const n=g(t.requestBody),r=n?.properties?.functionPath?.const,s=typeof r=="string"?r:void 0,m=s===void 0?n:n?.properties?.args,d=t.operationId??`${a} ${e}`;return{argsSchema:m,description:t.description,functionPath:s,httpPath:e,key:i,kind:t["x-lunora-function-kind"],method:a.toUpperCase(),operationId:d,requestSchema:n,responses:P(t,c),summary:t.summary??d,tags:t.tags??[],title:t.summary??d}},O=i=>{const e=[];for(const[a,t]of Object.entries(i.paths??{})){const c=a.includes("#")?a.slice(0,a.indexOf("#")):a;for(const n of x){const r=t[n];r!==void 0&&e.push(A(a,c,n,r,i))}}return e},b=i=>{const e=i??{},a=O(e),t=new Map((e.tags??[]).map(s=>[s.name,s.description])),c=new Set,n=[],r=s=>{if(c.has(s))return;c.add(s);const m=a.filter(d=>(d.tags[0]??"")===s);m.length>0&&n.push({description:t.get(s),name:s,operations:m})};for(const s of e.tags??[])r(s.name);for(const s of a)r(s.tags[0]??"");return{groups:n,operationByKey:new Map(a.map(s=>[s.key,s])),server:e.servers?.[0]?.url,title:e.info?.title??"API reference",version:e.info?.version}},S=i=>{const{paths:e}=i;return e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0},$=i=>{const e=i;return S(e)?{kind:"empty"}:{kind:"ready",spec:e}},U=i=>{const e=y(23),{spec:a}=i,t=I(),c=k();let n;e[0]!==c?(n=()=>c.fetchOpenApi(),e[0]=c,e[1]=n):n=e[1];const r=v(a,n,$);let s;e[2]!==r.kind||e[3]!==r.spec?(s=r.kind==="ready"?b(r.spec):void 0,e[2]=r.kind,e[3]=r.spec,e[4]=s):s=e[4];const m=s;if(r.kind==="loading"){let o;return e[5]===Symbol.for("react.memo_cache_sentinel")?(o=w("div",{className:"flex flex-col gap-4","data-testid":"api-reference-loading",children:[f(h,{className:"h-8 w-48"}),f(h,{className:"h-64 w-full"})]}),e[5]=o):o=e[5],o}if(r.kind==="error"){let o;e[6]!==r.message||e[7]!==t?(o=t("Couldn't load the OpenAPI spec: {message}",{message:r.message}),e[6]=r.message,e[7]=t,e[8]=o):o=e[8];let p;e[9]!==t?(p=t("API reference unavailable"),e[9]=t,e[10]=p):p=e[10];let l;return e[11]!==o||e[12]!==p?(l=f(u,{description:o,testId:"api-reference-error",title:p}),e[11]=o,e[12]=p,e[13]=l):l=e[13],l}if(r.kind==="empty"||m===void 0){let o;e[14]!==t?(o=t("Run `lunora codegen` and wire `_generated/openapi.json` to the worker to render the API reference here."),e[14]=t,e[15]=o):o=e[15];let p;e[16]!==t?(p=t("No OpenAPI spec configured"),e[16]=t,e[17]=p):p=e[17];let l;return e[18]!==o||e[19]!==p?(l=f(u,{description:o,testId:"api-reference-empty",title:p}),e[18]=o,e[19]=p,e[20]=l):l=e[20],l}let d;return e[21]!==m?(d=f(j,{model:m}),e[21]=m,e[22]=d):d=e[22],d};export{U as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I}from"react/compiler-runtime";import{Dialog as L}from"@base-ui/react/dialog";import{useNavigate as M}from"@tanstack/react-router";import{useState as R,useRef as O,useEffect as U}from"react";import{useT as W}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{f as X}from"./internal-BSIsQVC6.js";import{c as Y}from"./utils-bhneXptQ.js";import{jsx as l,jsxs as S}from"react/jsx-runtime";const z="lunora:command-palette",re=()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(z))},q=g=>{const e=I(18),{active:u,index:a,item:n,onActivate:f,onSelect:h}=g;let s;e[0]!==n||e[1]!==h?(s=()=>{h(n)},e[0]=n,e[1]=h,e[2]=s):s=e[2];const b=s;let c;e[3]!==a||e[4]!==f?(c=()=>{f(a)},e[3]=a,e[4]=f,e[5]=c):c=e[5];const p=c,x=u?"bg-accent text-accent-foreground":"text-foreground";let i;e[6]!==x?(i=Y("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",x),e[6]=x,e[7]=i):i=e[7];let d;e[8]!==n.label?(d=l("span",{children:n.label}),e[8]=n.label,e[9]=d):d=e[9];let m;e[10]!==n.group?(m=l("span",{className:"text-xs text-muted-foreground",children:n.group}),e[10]=n.group,e[11]=m):m=e[11];let t;return e[12]!==b||e[13]!==p||e[14]!==i||e[15]!==d||e[16]!==m?(t=l("li",{children:S("button",{className:i,onClick:b,onMouseEnter:p,type:"button",children:[d,m]})}),e[12]=b,e[13]=p,e[14]=i,e[15]=d,e[16]=m,e[17]=t):t=e[17],t},G=(g,e)=>{const u=e.trim().toLowerCase();return u===""?g:g.filter(a=>a.label.toLowerCase().includes(u)||a.group.toLowerCase().includes(u))},le=g=>{const e=I(39),{items:u}=g,a=W(),n=M(),[f,h]=R(!1),[s,b]=R(""),[c,p]=R(0),x=O(null);let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const o=B=>{(B.metaKey||B.ctrlKey)&&B.key.toLowerCase()==="k"&&(B.preventDefault(),h(!0))},r=()=>{h(!0)};return globalThis.addEventListener("keydown",o),globalThis.addEventListener(z,r),()=>{globalThis.removeEventListener("keydown",o),globalThis.removeEventListener(z,r)}},d=[],e[0]=i,e[1]=d):(i=e[0],d=e[1]),U(i,d);let m;e[2]!==u||e[3]!==s?(m=G(u,s),e[2]=u,e[3]=s,e[4]=m):m=e[4];const t=m;let T;e[5]===Symbol.for("react.memo_cache_sentinel")?(T=o=>{h(o),o||(b(""),p(0))},e[5]=T):T=e[5];const H=T;let D;e[6]!==n?(D=o=>{H(!1),X(n({to:o.to}))},e[6]=n,e[7]=D):D=e[7];const v=D;let A;e[8]===Symbol.for("react.memo_cache_sentinel")?(A=o=>{b(o.target.value),p(0)},e[8]=A):A=e[8];const J=A;let j;e[9]!==c||e[10]!==t||e[11]!==v?(j=o=>{e:switch(o.key){case"ArrowDown":{o.preventDefault(),p(r=>t.length===0?0:(r+1)%t.length);break e}case"ArrowUp":{o.preventDefault(),p(r=>t.length===0?0:(r-1+t.length)%t.length);break e}case"Enter":{o.preventDefault();const r=t[c];r!==void 0&&v(r);break e}}},e[9]=c,e[10]=t,e[11]=v,e[12]=j):j=e[12];const F=j;let K;e[13]===Symbol.for("react.memo_cache_sentinel")?(K=l(L.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),e[13]=K):K=e[13];let w;e[14]!==a?(w=a("Command palette"),e[14]=a,e[15]=w):w=e[15];let y;e[16]!==w?(y=l(L.Title,{className:"sr-only",children:w}),e[16]=w,e[17]=y):y=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=S("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[l("circle",{cx:"11",cy:"11",r:"7"}),l("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[18]=P):P=e[18];let k;e[19]!==a?(k=a("Search…"),e[19]=a,e[20]=k):k=e[20];let N;e[21]!==F||e[22]!==s||e[23]!==k?(N=S("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[P,l("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:J,onKeyDown:F,placeholder:k,ref:x,type:"text",value:s})]}),e[21]=F,e[22]=s,e[23]=k,e[24]=N):N=e[24];let C;e[25]!==c||e[26]!==t||e[27]!==v||e[28]!==a?(C=t.length===0?l("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:a("No results.")}):t.map((o,r)=>l(q,{active:r===c,index:r,item:o,onActivate:p,onSelect:v},o.to)),e[25]=c,e[26]=t,e[27]=v,e[28]=a,e[29]=C):C=e[29];let _;e[30]!==C?(_=l("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:C}),e[30]=C,e[31]=_):_=e[31];let E;e[32]!==y||e[33]!==N||e[34]!==_?(E=S(L.Portal,{children:[K,S(L.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:x,children:[y,N,_]})]}),e[32]=y,e[33]=N,e[34]=_,e[35]=E):E=e[35];let $;return e[36]!==f||e[37]!==E?($=l(L.Root,{onOpenChange:H,open:f,children:E}),e[36]=f,e[37]=E,e[38]=$):$=e[38],$};export{le as CommandPalette,re as openCommandPalette};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B}from"react/compiler-runtime";import{useLunora as lt}from"@lunora/react";import{useState as T,useRef as Oe,useEffect as Te,useMemo as Pt,useCallback as Dt}from"react";import{ConfirmButton as Mt}from"./ConfirmButton-CTL3f3kr.js";import{ShardInput as pn}from"./ShardInput-BVn2iCU0.js";import{E as xn}from"./empty-state-Cg7t_8qu.js";import{N as qe}from"./use-admin-query-QJ-ibl5u.js";import{useT as ue}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as Y}from"./ADMIN_FUNCTIONS-BnD4aovm.js";import{b as Kt}from"./browser-storage-xjTyMKY0.js";import{h as Ie,f as oe,d as ce,g as ye,i as vn}from"./internal-BSIsQVC6.js";import{k as yn}from"./use-sql-assistant-CHEu2-Rk.js";import{useReactTable as wn,getSortedRowModel as Nn,getCoreRowModel as Sn,flexRender as Cn}from"@tanstack/react-table";import{useVirtualizer as kn}from"@tanstack/react-virtual";import{f as zt}from"./checkbox-StT4Gob6.js";import{c as nt}from"./utils-bhneXptQ.js";import{l as $n}from"./virtual-rect-1o1veP7R.js";import{g as Tt,k as _n,v as Tn}from"./data-grid-DcxyIXwG.js";import{jsx as c,jsxs as $,Fragment as rt}from"react/jsx-runtime";import{i as _e,u as Rn,_ as En,a as Pn,$ as Dn}from"./table-list-sidebar-BFkSQwlB.js";import{toFilterClauses as Me,DataFilters as Mn}from"./DataFilters-B26ZeqBZ.js";import{M as tn}from"./modal-shell-CUwwWC2o.js";import{r as In,i as On}from"./grid-features-jnrD0SpX.js";import Vt from"./useDebounced-Ihdiid_k.js";import{r as Fn,l as zn}from"./shard-history-DMEW5VBE.js";const jn=/([a-z\d])([A-Z])/gu,An=/[\s_-]+/u,Ln=new Set(["access_token","api_key","apikey","card_number","client_secret","credit_card","cvv","passwd","password","private_key","pwd","refresh_token","secret","ssn","token"]),Bn=r=>{const e=r.replaceAll(jn,"$1 $2").split(An).map(n=>n.toLowerCase()).filter(n=>n.length>0),t=new Set(e);for(let n=0;n<e.length-1;n+=1){const l=e[n],o=e[n+1];l===void 0||o===void 0||(t.add(`${l}${o}`),t.add(`${l}_${o}`))}return[...t]},Ht="•••",qn=r=>{let e=2166136261;for(let t=0;t<r.length;t+=1)e^=r.codePointAt(t)??0,e=Math.imul(e,16777619);return(e>>>0).toString(16).padStart(8,"0")},nn=(r,e)=>{try{return e==="redact"?null:e==="hash"?r==null?r:qn(typeof r=="string"?r:JSON.stringify(r)):Ht}catch{return Ht}},Jn=(r,e)=>{const t=new Map;for(const n of r)n.table===e&&t.set(n.column,n.strategy);return t},Kn=r=>{for(const e of Bn(r))if(Ln.has(e))return!0;return!1},Vn=(r,e)=>{const t=e.filter(l=>!r.has(l)&&Kn(l));if(t.length===0)return r;const n=new Map(r);for(const l of t)n.set(l,"redact");return n},Hn=(r,e,t)=>{if(!t.enabled)return r;const n=t.columns.get(e);return n===void 0?r:nn(r,n)},Wt=(r,e)=>!e.enabled||e.columns.size===0?r:r.map(t=>{const n={...t};for(const[l,o]of e.columns)l in n&&(n[l]=nn(n[l],o));return n}),Gt=(r,e)=>{const t=[];for(const[n,l]of Object.entries(e))for(const o of l)o.ref===r&&t.push({column:o.name,table:n});return t.sort((n,l)=>n.table.localeCompare(l.table)||n.column.localeCompare(l.column)),t},jt=r=>`${r.table}.${r.column}`,Wn=(r,e,t,n,l=300)=>{if(n<=0)return{ids:new Set(r.map(m=>m.id)),leadPx:0,tailPx:0};const o=t-l,i=t+n+l,a=new Set;let d=0,s=0,u=0;for(const m of r){const b=m.getSize(),f=e.has(m.id),g=d+b>o&&d<i;f||g?a.add(m.id):d<o?s+=b:u+=b,d+=b}return{ids:a,leadPx:s,tailPx:u}},Gn=(r,e)=>{const t=new Map;let n=0;for(const l of r)e.has(l.id)&&(t.set(l.id,n),n+=l.getSize());return t},Qn=()=>{const r=B(11);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={},r[0]=e):e=r[0];const[t,n]=T(e);let l;r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(f,g,h)=>{n(p=>({...p,[f]:{...p[f],[g]:h}}))},r[1]=l):l=r[1];const o=l;let i;r[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{n({})},r[2]=i):i=r[2];const a=i;let d;r[3]!==t?(d=(f,g)=>{const h=t[f];return h!==void 0&&g in h?{value:h[g]}:void 0},r[3]=t,r[4]=d):d=r[4];const s=d;let u;r[5]!==t?(u=Object.values(t).reduce(Xn,0),r[5]=t,r[6]=u):u=r[6];const m=u;let b;return r[7]!==m||r[8]!==t||r[9]!==s?(b={clear:a,count:m,stage:o,staged:t,stagedValue:s},r[7]=m,r[8]=t,r[9]=s,r[10]=b):b=r[10],b},Un=(r,e)=>{if(typeof e=="number"){const t=Number(r);return r.trim()===""||Number.isNaN(t)?r:t}if(typeof e=="boolean"){if(r==="true")return!0;if(r==="false")return!1}return r},Zn=r=>{const e=B(29),{changes:t,committing:n,onCommit:l,onDiscard:o}=r,i=ue();let a;e[0]!==t.length||e[1]!==i?(a=i("{count} pending changes",{count:t.length}),e[0]=t.length,e[1]=i,e[2]=a):a=e[2];let d;e[3]!==a?(d=c("span",{className:"font-mono text-[11px] tracking-wide uppercase text-warning","data-testid":"db-staged-count",children:a}),e[3]=a,e[4]=d):d=e[4];let s;e[5]!==n||e[6]!==i?(s=i(n?"Committing…":"Commit"),e[5]=n,e[6]=i,e[7]=s):s=e[7];let u;e[8]!==n||e[9]!==l||e[10]!==s?(u=c("button",{className:"ms-auto rounded-md bg-primary px-2.5 py-1 text-xs font-medium text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:bg-primary/90 disabled:pointer-events-none disabled:opacity-50","data-testid":"db-staged-commit",disabled:n,onClick:l,type:"button",children:s}),e[8]=n,e[9]=l,e[10]=s,e[11]=u):u=e[11];let m;e[12]!==i?(m=i("Discard"),e[12]=i,e[13]=m):m=e[13];let b;e[14]!==n||e[15]!==o||e[16]!==m?(b=c("button",{className:"rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50","data-testid":"db-staged-discard",disabled:n,onClick:o,type:"button",children:m}),e[14]=n,e[15]=o,e[16]=m,e[17]=b):b=e[17];let f;e[18]!==d||e[19]!==u||e[20]!==b?(f=$("div",{className:"flex flex-wrap items-center gap-2",children:[d,u,b]}),e[18]=d,e[19]=u,e[20]=b,e[21]=f):f=e[21];let g;e[22]!==t?(g=t.map(Yn),e[22]=t,e[23]=g):g=e[23];let h;e[24]!==g?(h=c("ul",{className:"flex flex-col gap-1","data-testid":"db-staged-list",children:g}),e[24]=g,e[25]=h):h=e[25];let p;return e[26]!==f||e[27]!==h?(p=$("div",{className:"flex flex-col gap-2 border border-warning/40 bg-warning/5 p-3","data-testid":"db-staged",children:[f,h]}),e[26]=f,e[27]=h,e[28]=p):p=e[28],p};function Xn(r,e){return r+Object.keys(e).length}function Yn(r){return $("li",{className:"flex flex-wrap items-center gap-2 font-mono text-xs",children:[$("span",{className:"text-muted-foreground",children:[r.rowId,".",r.column]}),c("span",{className:"text-destructive line-through",children:Ie(r.oldValue)}),c("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"→"}),c("span",{className:"text-foreground",children:Ie(r.newValue)})]},`${r.rowId}:${r.column}`)}const Qt=400,er=36,tr={flex:"1 1 0%",minHeight:0,overflow:"auto",position:"relative"},nr={width:"100%"},rr={alignItems:"center",display:"flex",left:0,position:"absolute",top:0,width:"100%"},lr={display:"flex",width:"100%"},Ut={flex:"0 0 8.5rem",padding:"0.375rem 0.75rem"},or="2.5rem",rn={alignItems:"center",display:"flex",flex:"0 0 2.5rem",justifyContent:"center",left:0,padding:"0.375rem 0",position:"sticky",zIndex:2},At=r=>({flex:"0 0 auto",overflow:"hidden",padding:"0.375rem 0.75rem",position:"relative",textOverflow:"ellipsis",whiteSpace:"nowrap",width:`${r.toString()}px`}),ln=(r,e)=>({...At(r),left:`calc(${or} + ${e.toString()}px)`,position:"sticky",zIndex:2}),Zt="rounded-md px-2 py-0.5 text-xs font-medium text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",ar=(r,e,t)=>e.enabled&&e.columns.has(t)?void 0:r,It="__back__:",sr=r=>`${It}${r.table}.${r.column}`,ir=r=>{const e=B(3),{counts:t,rowId:n}=r;if(t===void 0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=c("span",{className:"text-muted-foreground/50",children:"—"}),e[0]=i):i=e[0],i}const l=t[n]??0;let o;return e[1]!==l?(o=c("span",{className:"tabular-nums",children:l}),e[1]=l,e[2]=o):o=e[2],o},Ne=r=>{for(const e of["id","__id__","_id"]){const t=r[e];if(typeof t=="string"||typeof t=="number")return String(t)}return null},on=(r,e)=>Ne(r)??`row-${e.toString()}`,dr=8,cr=r=>{const e=B(16),{anchor:t,state:n}=r,l=ue();let o;e[0]!==t.left||e[1]!==t.top?(o={left:t.left,position:"fixed",top:t.top,zIndex:50},e[0]=t.left,e[1]=t.top,e[2]=o):o=e[2];const i=o;let a;if(n==="loading"){let s;e[3]!==l?(s=l("Loading…"),e[3]=l,e[4]=s):s=e[4];let u;e[5]!==s?(u=c("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:s}),e[5]=s,e[6]=u):u=e[6],a=u}else if(n.row===null){let s;e[7]!==l?(s=l("No matching row."),e[7]=l,e[8]=s):s=e[8];let u;e[9]!==s?(u=c("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:s}),e[9]=s,e[10]=u):u=e[10],a=u}else{let s;if(e[11]!==n.row){const u=Object.entries(n.row).slice(0,dr);s=c("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 px-3 py-2",children:u.map(Nr)}),e[11]=n.row,e[12]=s}else s=e[12];a=s}let d;return e[13]!==a||e[14]!==i?(d=c("div",{className:"pointer-events-none w-72 overflow-hidden rounded-md border border-border bg-popover text-popover-foreground","data-testid":"db-ref-preview",role:"tooltip",style:i,children:a}),e[13]=a,e[14]=i,e[15]=d):d=e[15],d},ur=r=>{const e=B(22),{column:t,id:n,onNavigate:l,onPreview:o,target:i}=r,[a,d]=T(null),[s,u]=T("idle");let m;e[0]!==n||e[1]!==l||e[2]!==i?(m=()=>{l(i,n)},e[0]=n,e[1]=l,e[2]=i,e[3]=m):m=e[3];const b=m;let f;e[4]!==n||e[5]!==o||e[6]!==s||e[7]!==i?(f=_=>{const y=_.currentTarget.getBoundingClientRect();d({left:y.left,top:y.bottom+4}),s==="idle"&&(u("loading"),oe((async()=>{try{u({row:await o(i,n)})}catch{u({row:null})}})()))},e[4]=n,e[5]=o,e[6]=s,e[7]=i,e[8]=f):f=e[8];const g=f;let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{d(null)},e[9]=h):h=e[9];const p=h,v=`db-ref-${t}`,x=`Open ${i} ${n}`;let w;e[10]!==n||e[11]!==b||e[12]!==g||e[13]!==v||e[14]!==x?(w=$("button",{"data-testid":v,onBlur:p,onClick:b,onFocus:g,onMouseEnter:g,onMouseLeave:p,title:x,type:"button",children:[n," ↗"]}),e[10]=n,e[11]=b,e[12]=g,e[13]=v,e[14]=x,e[15]=w):w=e[15];let k;e[16]!==a||e[17]!==s?(k=a!==null&&s!=="idle"&&c(cr,{anchor:a,state:s}),e[16]=a,e[17]=s,e[18]=k):k=e[18];let C;return e[19]!==w||e[20]!==k?(C=$(rt,{children:[w,k]}),e[19]=w,e[20]=k,e[21]=C):C=e[21],C},mr=r=>r==="asc"?" ▲":r==="desc"?" ▼":"",gr="absolute end-1 top-1/2 hidden -translate-y-1/2 items-center justify-center rounded text-muted-foreground outline-none group-hover/cell:flex hover:text-foreground focus-visible:flex",Xt=r=>{const e=B(8),{column:t,onExpand:n,value:l}=r;let o;e[0]!==t||e[1]!==n||e[2]!==l?(o=()=>{n(t,l)},e[0]=t,e[1]=n,e[2]=l,e[3]=o):o=e[3];const i=o,a=`db-expand-${t}`;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=c("svg",{"aria-hidden":"true",className:"size-3",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:c("path",{d:"M9 21H5a2 2 0 0 1-2-2v-4m18 0v4a2 2 0 0 1-2 2h-4M3 9V5a2 2 0 0 1 2-2h4m6 0h4a2 2 0 0 1 2 2v4"})}),e[4]=d):d=e[4];let s;return e[5]!==i||e[6]!==a?(s=c("button",{"aria-label":"Expand cell",className:gr,"data-testid":a,onClick:i,type:"button",children:d}),e[5]=i,e[6]=a,e[7]=s):s=e[7],s},br=r=>{const e=B(15),{column:t,initial:n,onCancel:l,onCommit:o,recordId:i}=r,a=Oe(null);let d,s;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{a.current?.select()},s=[],e[0]=d,e[1]=s):(d=e[0],s=e[1]),Te(d,s);let u;e[2]!==l||e[3]!==o?(u=v=>{v.key==="Enter"?(v.preventDefault(),o(v.currentTarget.value)):v.key==="Escape"&&(v.preventDefault(),l())},e[2]=l,e[3]=o,e[4]=u):u=e[4];const m=u;let b;e[5]!==o?(b=v=>{o(v.currentTarget.value)},e[5]=o,e[6]=b):b=e[6];const f=b,g=`db-cell-input-${i}-${t}`;let h;e[7]!==n?(h=Ie(n),e[7]=n,e[8]=h):h=e[8];let p;return e[9]!==t||e[10]!==f||e[11]!==m||e[12]!==g||e[13]!==h?(p=c("input",{"aria-label":t,className:"w-full rounded border border-ring bg-background px-1 py-0.5 font-mono text-xs outline-none","data-testid":g,defaultValue:h,onBlur:f,onKeyDown:m,ref:a}),e[9]=t,e[10]=f,e[11]=m,e[12]=g,e[13]=h,e[14]=p):p=e[14],p},fr=r=>{const e=B(68),{cell:t,edit:n,highlight:l,mask:o,refs:i}=r,a=t.column.id;let d,s,u,m;if(e[0]!==t||e[1]!==a||e[2]!==n||e[3]!==o||e[4]!==i.columns||e[5]!==i.onNavigate||e[6]!==i.onPreview){m=Symbol.for("react.early_return_sentinel");e:{s=t.getValue(),d=Ne(t.row.original);const R=i.columns?.[a];if(o.enabled&&o.columns.has(a)){const P=`db-masked-${a}`,D=c(Tt,{value:Hn(s,a,o)});let M;e[11]!==P||e[12]!==D?(M=c("span",{className:"text-muted-foreground italic","data-testid":P,title:"Masked (preview)",children:D}),e[11]=P,e[12]=D,e[13]=M):M=e[13],m=M;break e}if(R!==void 0&&(typeof s=="string"||typeof s=="number")&&String(s)!==""){const P=String(s),D=`${R}:${String(s)}`;let M;e[14]!==a||e[15]!==i.onNavigate||e[16]!==i.onPreview||e[17]!==P||e[18]!==D||e[19]!==R?(M=c(ur,{column:a,id:P,onNavigate:i.onNavigate,onPreview:i.onPreview,target:R},D),e[14]=a,e[15]=i.onNavigate,e[16]=i.onPreview,e[17]=P,e[18]=D,e[19]=R,e[20]=M):M=e[20],m=M;break e}if(d===null){let P;e[21]!==s?(P=c(Tt,{value:s}),e[21]=s,e[22]=P):P=e[22];let D;e[23]!==a||e[24]!==n.onExpandCell||e[25]!==s?(D=c(Xt,{column:a,onExpand:n.onExpandCell,value:s}),e[23]=a,e[24]=n.onExpandCell,e[25]=s,e[26]=D):D=e[26];let M;e[27]!==P||e[28]!==D?(M=$(rt,{children:[P,D]}),e[27]=P,e[28]=D,e[29]=M):M=e[29],m=M;break e}u=n.stagedValue(d,a)}e[0]=t,e[1]=a,e[2]=n,e[3]=o,e[4]=i.columns,e[5]=i.onNavigate,e[6]=i.onPreview,e[7]=d,e[8]=s,e[9]=u,e[10]=m}else d=e[7],s=e[8],u=e[9],m=e[10];if(m!==Symbol.for("react.early_return_sentinel"))return m;const b=u,f=b===void 0?s:b.value;let g;e[30]!==a||e[31]!==n?(g=n.editable&&n.editableColumn(a),e[30]=a,e[31]=n,e[32]=g):g=e[32];const h=g;if(n.editingCell!==null&&n.editingCell.rowId===d&&n.editingCell.column===a){let R;e[33]!==a||e[34]!==n||e[35]!==d||e[36]!==s?(R=D=>{n.stage(d,a,Un(D,s)),n.cancelEdit()},e[33]=a,e[34]=n,e[35]=d,e[36]=s,e[37]=R):R=e[37];let P;return e[38]!==a||e[39]!==f||e[40]!==n.cancelEdit||e[41]!==d||e[42]!==R?(P=c(br,{column:a,initial:f,onCancel:n.cancelEdit,onCommit:R,recordId:d}),e[38]=a,e[39]=f,e[40]=n.cancelEdit,e[41]=d,e[42]=R,e[43]=P):P=e[43],P}let p;b!==void 0?p="rounded bg-warning/15 px-1":h&&(p="cursor-text");let v;e[44]!==h||e[45]!==a||e[46]!==n||e[47]!==d?(v=h?()=>{n.startEdit(d,a)}:void 0,e[44]=h,e[45]=a,e[46]=n,e[47]=d,e[48]=v):v=e[48];const x=v,w=p,k=`db-cell-${d}-${a}`;let C;e[49]!==a||e[50]!==l||e[51]!==o?(C=ar(l,o,a),e[49]=a,e[50]=l,e[51]=o,e[52]=C):C=e[52];let _;e[53]!==f||e[54]!==C?(_=c(Tt,{highlight:C,value:f}),e[53]=f,e[54]=C,e[55]=_):_=e[55];let y;e[56]!==p||e[57]!==x||e[58]!==k||e[59]!==_?(y=c("span",{className:w,"data-testid":k,onDoubleClick:x,children:_}),e[56]=p,e[57]=x,e[58]=k,e[59]=_,e[60]=y):y=e[60];let N;e[61]!==a||e[62]!==f||e[63]!==n.onExpandCell?(N=c(Xt,{column:a,onExpand:n.onExpandCell,value:f}),e[61]=a,e[62]=f,e[63]=n.onExpandCell,e[64]=N):N=e[64];let E;return e[65]!==N||e[66]!==y?(E=$(rt,{children:[y,N]}),e[65]=N,e[66]=y,e[67]=E):E=e[67],E},hr=r=>{r.preventDefault()},pr=({draggedRef:r,header:e,masked:t=!1,onTogglePin:n,pinnedOffset:l,table:o})=>{const i=()=>{r.current=e.column.id},a=()=>{const d=r.current,s=e.column.id;if(r.current=null,d===null||d===s)return;const u=o.getState().columnOrder,m=(u.length>0?u:o.getAllLeafColumns().map(f=>f.id)).filter(f=>f!==d),b=m.indexOf(s);m.splice(b===-1?m.length:b,0,d),o.setColumnOrder(m)};return $("th",{className:nt("group/head text-start text-xs font-medium text-muted-foreground",l!==void 0&&"border-e border-border bg-muted"),draggable:!0,onDragOver:hr,onDragStart:i,onDrop:a,style:l===void 0?At(e.getSize()):ln(e.getSize(),l),children:[$("button",{className:"inline-flex max-w-full cursor-grab items-center gap-1 truncate outline-none hover:text-foreground","data-testid":`db-sort-${e.column.id}`,onClick:e.column.getToggleSortingHandler(),type:"button",children:[Cn(e.column.columnDef.header,e.getContext()),mr(e.column.getIsSorted())]}),t&&c("span",{className:"ms-1 inline-flex items-center rounded-sm bg-warning/15 px-1 text-[0.625rem] font-medium uppercase text-warning","data-testid":`db-mask-chip-${e.column.id}`,title:"This column is masked by a mask() policy",children:"masked"}),c("button",{"aria-label":l===void 0?`Pin ${e.column.id}`:`Unpin ${e.column.id}`,"aria-pressed":l!==void 0,className:nt("ms-1 rounded-sm px-1 text-[0.625rem] outline-none transition-opacity hover:bg-accent focus-visible:bg-accent",l===void 0?"opacity-0 group-hover/head:opacity-100 focus-visible:opacity-100":"opacity-100 text-foreground"),"data-testid":`db-pin-${e.column.id}`,onClick:()=>{n(e.column.id)},type:"button",children:"📌"}),c("span",{"aria-hidden":"true",className:"absolute inset-y-0 end-0 w-1 cursor-col-resize touch-none select-none hover:bg-ring/60 data-[resizing=true]:bg-ring","data-resizing":e.column.getIsResizing(),"data-testid":`db-resize-${e.column.id}`,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler()})]})},xr=r=>{const e=B(13),{table:t}=r,n=ue();let l;e[0]!==t?(l=u=>{t.toggleAllRowsSelected(u)},e[0]=t,e[1]=l):l=e[1];const o=l;let i;e[2]!==n?(i=n("Select all rows"),e[2]=n,e[3]=i):i=e[3];let a;e[4]!==t?(a=t.getIsAllRowsSelected(),e[4]=t,e[5]=a):a=e[5];let d;e[6]!==t?(d=t.getIsSomeRowsSelected()&&!t.getIsAllRowsSelected(),e[6]=t,e[7]=d):d=e[7];let s;return e[8]!==o||e[9]!==i||e[10]!==a||e[11]!==d?(s=c("th",{className:"bg-muted",style:rn,children:c(zt,{"aria-label":i,checked:a,"data-testid":"db-select-all",indeterminate:d,onCheckedChange:o})}),e[8]=o,e[9]=i,e[10]=a,e[11]=d,e[12]=s):s=e[12],s},vr=r=>{const e=B(17),{row:t}=r,n=ue();let l;e[0]!==t.original?(l=Ne(t.original),e[0]=t.original,e[1]=l):l=e[1];const o=l;let i;e[2]!==t?(i=g=>{t.toggleSelected(g)},e[2]=t,e[3]=i):i=e[3];const a=i;let d;e[4]!==n?(d=n("Select row"),e[4]=n,e[5]=d):d=e[5];let s;e[6]!==t?(s=t.getIsSelected(),e[6]=t,e[7]=s):s=e[7];let u;e[8]!==t.index||e[9]!==t.original?(u=on(t.original,t.index),e[8]=t.index,e[9]=t.original,e[10]=u):u=e[10];const m=`db-select-${u}`,b=o===null;let f;return e[11]!==a||e[12]!==d||e[13]!==s||e[14]!==m||e[15]!==b?(f=c("td",{className:"bg-background",style:rn,children:c(zt,{"aria-label":d,checked:s,"data-testid":m,disabled:b,onCheckedChange:a})}),e[11]=a,e[12]=d,e[13]=s,e[14]=m,e[15]=b,e[16]=f):f=e[16],f},yr=r=>{const e=B(70),{edit:t,editable:n,mask:l,onDelete:o,onEdit:i,onInspect:a,highlight:d,backRelationCounts:s,attachScroll:u,onTogglePin:m,pinnedColumns:b,refs:f,scrollLeft:g,scrollToIndex:h,table:p,tableRows:v,tbodyStyle:x,viewportWidth:w,virtualRows:k}=r,C=Oe(null),[_,y]=T(null);let N;e[0]!==p?(N=p.getVisibleLeafColumns(),e[0]=p,e[1]=N):N=e[1];const E=N.length;let R;e[2]!==_||e[3]!==E||e[4]!==t||e[5]!==p||e[6]!==v?(R=pe=>{if(!["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Enter"].includes(pe.key))return;pe.preventDefault();const I=_??{col:0,row:0};if(pe.key==="Enter"){const ie=v[I.row],re=p.getVisibleLeafColumns()[I.col];if(ie!==void 0&&re!==void 0){const H=Ne(ie.original);H!==null&&t.editableColumn(re.id)&&t.startEdit(H,re.id)}y(I);return}let{col:te,row:se}=I;e:switch(pe.key){case"ArrowDown":{se=Math.min(se+1,v.length-1);break e}case"ArrowRight":{te=Math.min(te+1,E-1);break e}case"ArrowUp":{se=Math.max(se-1,0);break e}default:te=Math.max(te-1,0)}y({col:te,row:se})},e[2]=_,e[3]=E,e[4]=t,e[5]=p,e[6]=v,e[7]=R):R=e[7];const P=R;let D,M;e[8]!==_||e[9]!==h?(D=()=>{_!==null&&h(_.row)},M=[_,h],e[8]=_,e[9]=h,e[10]=D,e[11]=M):(D=e[10],M=e[11]),Te(D,M);let q,J,j,A,K,O,L,G,Q,me,ae,ee,ge,be;if(e[12]!==_||e[13]!==u||e[14]!==s||e[15]!==t||e[16]!==n||e[17]!==d||e[18]!==l||e[19]!==o||e[20]!==i||e[21]!==P||e[22]!==a||e[23]!==m||e[24]!==b||e[25]!==f||e[26]!==g||e[27]!==p||e[28]!==v||e[29]!==x||e[30]!==w||e[31]!==k){const pe=p.getVisibleLeafColumns().map(Sr),I=Wn(pe,b,g,w),te=Gn(p.getVisibleLeafColumns().map(Cr),b),se=H=>{const Se=v[H.index],{original:Ce}=Se,V=Ne(Ce),we=on(Ce,H.index),Pe={...rr,height:`${H.size.toString()}px`,transform:`translateY(${H.start.toString()}px)`};return $("tr",{className:"border-b border-border text-xs transition-colors hover:bg-muted/50","data-testid":"db-row",style:Pe,children:[c(vr,{row:Se}),I.leadPx>0&&c("td",{"aria-hidden":"true",style:{flex:`0 0 ${I.leadPx.toString()}px`}}),Se.getVisibleCells().map((ne,Re)=>{if(!I.ids.has(ne.column.id))return null;const Ee=te.get(ne.column.id),Fe=_!==null&&_.row===H.index&&_.col===Re?" ring-1 ring-ring ring-inset":"";return c("td",{className:nt("group/cell truncate font-mono text-muted-foreground",Ee!==void 0&&"border-e border-border bg-background",Fe),style:Ee===void 0?At(ne.column.getSize()):ln(ne.column.getSize(),Ee),children:ne.column.id.startsWith(It)?c(ir,{counts:s[ne.column.id.slice(It.length)],rowId:we}):c(fr,{cell:ne,edit:t,highlight:d,mask:l,refs:f})},ne.id)}),I.tailPx>0&&c("td",{"aria-hidden":"true",style:{flex:`0 0 ${I.tailPx.toString()}px`}}),$("td",{className:"flex items-center gap-1",style:Ut,children:[c("button",{className:Zt,"data-testid":`db-inspect-${we}`,onClick:()=>{a(Ce)},type:"button",children:"Details"}),n&&$(rt,{children:[c("button",{className:Zt,"data-testid":`db-edit-${we}`,disabled:V===null,onClick:()=>{i(V,Ce)},type:"button",children:"Edit"}),c(Mt,{confirmLabel:"Delete?",disabled:V===null,onConfirm:()=>{o(V)},testId:`db-delete-${we}`,children:"Delete"})]})]})]},Se.id)};q=_n,Q="fill",j="db-scroll",A=P,K=u,O="grid",L=tr,G=0,ee="w-full text-xs",ge="db-rows",be=nr;let ie;e[46]!==p?(ie=c(xr,{table:p}),e[46]=p,e[47]=ie):ie=e[47];let re;e[48]===Symbol.for("react.memo_cache_sentinel")?(re=c("th",{"aria-label":"Row actions",style:Ut}),e[48]=re):re=e[48],J=c("thead",{className:"bg-muted/50",children:$("tr",{className:"border-b border-border",style:lr,children:[ie,I.leadPx>0&&c("th",{"aria-hidden":"true",style:{flex:`0 0 ${I.leadPx.toString()}px`}}),p.getFlatHeaders().map(H=>I.ids.has(H.column.id)?c(pr,{draggedRef:C,header:H,masked:l.columns.has(H.column.id),onTogglePin:m,pinnedOffset:te.get(H.column.id),table:p},H.id):null),I.tailPx>0&&c("th",{"aria-hidden":"true",style:{flex:`0 0 ${I.tailPx.toString()}px`}}),re]})}),me=x,ae=k.map(H=>se(H)),e[12]=_,e[13]=u,e[14]=s,e[15]=t,e[16]=n,e[17]=d,e[18]=l,e[19]=o,e[20]=i,e[21]=P,e[22]=a,e[23]=m,e[24]=b,e[25]=f,e[26]=g,e[27]=p,e[28]=v,e[29]=x,e[30]=w,e[31]=k,e[32]=q,e[33]=J,e[34]=j,e[35]=A,e[36]=K,e[37]=O,e[38]=L,e[39]=G,e[40]=Q,e[41]=me,e[42]=ae,e[43]=ee,e[44]=ge,e[45]=be}else q=e[32],J=e[33],j=e[34],A=e[35],K=e[36],O=e[37],L=e[38],G=e[39],Q=e[40],me=e[41],ae=e[42],ee=e[43],ge=e[44],be=e[45];let fe;e[49]!==me||e[50]!==ae?(fe=c("tbody",{style:me,children:ae}),e[49]=me,e[50]=ae,e[51]=fe):fe=e[51];let he;e[52]!==J||e[53]!==fe||e[54]!==ee||e[55]!==ge||e[56]!==be?(he=$("table",{className:ee,"data-testid":ge,style:be,children:[J,fe]}),e[52]=J,e[53]=fe,e[54]=ee,e[55]=ge,e[56]=be,e[57]=he):he=e[57];let Z;e[58]!==j||e[59]!==A||e[60]!==K||e[61]!==O||e[62]!==L||e[63]!==G||e[64]!==he?(Z=c("div",{"data-testid":j,onKeyDown:A,ref:K,role:O,style:L,tabIndex:G,children:he}),e[58]=j,e[59]=A,e[60]=K,e[61]=O,e[62]=L,e[63]=G,e[64]=he,e[65]=Z):Z=e[65];let W;return e[66]!==q||e[67]!==Q||e[68]!==Z?(W=c(q,{layout:Q,children:Z}),e[66]=q,e[67]=Q,e[68]=Z,e[69]=W):W=e[69],W},wr=(r,e,t,n=[])=>{const l=r?.columns,o=r?.rows,i=r?.refs,a=Pt(()=>{if(l===void 0)return[];const y=l.map(N=>({accessorFn:E=>E[N],header:i?.[N]===void 0?N:`${N} →`,id:N}));for(const N of n)y.push({accessorFn:()=>{},enableSorting:!1,header:`← ${N.table}`,id:sr(N)});return y},[n,l,i]),d=Pt(()=>o??[],[o]),[s,u]=T({}),[m,b]=T({}),f=wn({columnResizeMode:"onChange",columns:a,data:d,defaultColumn:{minSize:80,size:200},enableColumnResizing:!0,enableRowSelection:y=>Ne(y.original)!==null,getCoreRowModel:Sn(),getRowId:(y,N)=>Ne(y)??`row-${N.toString()}`,getSortedRowModel:Nn(),manualSorting:!0,onColumnVisibilityChange:b,onRowSelectionChange:u,onSortingChange:t,state:{columnVisibility:m,rowSelection:s,sorting:e}}),g=f.getRowModel().rows,h=Oe(null),p=kn({count:g.length,estimateSize:()=>er,getScrollElement:()=>h.current,initialRect:{height:Qt,width:0},observeElementRect:(y,N)=>$n(y,N,Qt),overscan:8}),v=Dt(y=>{p.scrollToIndex(y)},[p]),[x,w]=T({left:0,width:0}),k=Dt(y=>{if(h.current=y,y===null)return;const N=()=>{w(R=>R.left===y.scrollLeft&&R.width===y.clientWidth?R:{left:y.scrollLeft,width:y.clientWidth})};y.addEventListener("scroll",N,{passive:!0});const E=new ResizeObserver(N);return E.observe(y),()=>{y.removeEventListener("scroll",N),E.disconnect(),h.current=null}},[]),C=p.getVirtualItems(),_={display:"block",height:`${p.getTotalSize().toString()}px`,position:"relative"};return{attachScroll:k,scrollLeft:x.left,scrollToIndex:v,table:f,tableRows:g,tbodyStyle:_,viewportWidth:x.width,virtualRows:C}};function Nr(r){const[e,t]=r;return $("div",{className:"contents",children:[c("dt",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e}),c("dd",{className:"truncate font-mono text-[11px] text-foreground",title:Ie(t),children:Ie(t)})]},e)}function Sr(r){return{getSize:()=>r.getSize(),id:r.id}}function Cr(r){return{getSize:()=>r.getSize(),id:r.id}}const Ot="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",kr=r=>{const e=B(22),{onCommit:t}=r,n=ue(),[l,o]=T(""),i=Oe(null);let a,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{i.current?.focus()},d=[],e[0]=a,e[1]=d):(a=e[0],d=e[1]),Te(a,d);let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=w=>{o(w.target.value)},e[2]=s):s=e[2];const u=s;let m;e[3]!==l||e[4]!==t?(m=()=>{const w=l.trim();w!==""&&t(w)},e[3]=l,e[4]=t,e[5]=m):m=e[5];const b=m;let f;e[6]!==n?(f=n("Query name"),e[6]=n,e[7]=f):f=e[7];let g;e[8]!==n?(g=n("Query name"),e[8]=n,e[9]=g):g=e[9];let h;e[10]!==l||e[11]!==f||e[12]!==g?(h=c("input",{"aria-label":f,className:"h-7 rounded-md border border-border bg-background px-2 text-xs outline-none focus-visible:border-ring","data-testid":"db-save-query-name",onChange:u,placeholder:g,ref:i,value:l}),e[10]=l,e[11]=f,e[12]=g,e[13]=h):h=e[13];let p;e[14]!==n?(p=n("Save"),e[14]=n,e[15]=p):p=e[15];let v;e[16]!==b||e[17]!==p?(v=c("button",{className:Ot,"data-testid":"db-save-query-confirm",onClick:b,type:"button",children:p}),e[16]=b,e[17]=p,e[18]=v):v=e[18];let x;return e[19]!==h||e[20]!==v?(x=$("span",{className:"inline-flex items-center gap-1",children:[h,v]}),e[19]=h,e[20]=v,e[21]=x):x=e[21],x},$r=r=>{const e=B(27),{onApply:t,onCopyLink:n,onDelete:l,onSave:o,saved:i}=r,a=ue(),[d,s]=T(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{s(!0)},e[0]=u):u=e[0];const m=u;let b;e[1]!==o?(b=y=>{o(y),s(!1)},e[1]=o,e[2]=b):b=e[2];const f=b;let g;e[3]!==t||e[4]!==i?(g=y=>{const N=i[Number(y.currentTarget.dataset.index)];N!==void 0&&t(N)},e[3]=t,e[4]=i,e[5]=g):g=e[5];const h=g;let p;e[6]!==l||e[7]!==i?(p=y=>{const N=i[Number(y.currentTarget.dataset.index)];N!==void 0&&l(N.name)},e[6]=l,e[7]=i,e[8]=p):p=e[8];const v=p;let x;e[9]!==a?(x=a("Copy link"),e[9]=a,e[10]=x):x=e[10];let w;e[11]!==n||e[12]!==x?(w=c("button",{className:Ot,"data-testid":"db-copy-link",onClick:n,type:"button",children:x}),e[11]=n,e[12]=x,e[13]=w):w=e[13];let k;e[14]!==f||e[15]!==d||e[16]!==a?(k=d?c(kr,{onCommit:f}):c("button",{className:Ot,"data-testid":"db-save-query",onClick:m,type:"button",children:a("Save query")}),e[14]=f,e[15]=d,e[16]=a,e[17]=k):k=e[17];let C;e[18]!==h||e[19]!==v||e[20]!==i||e[21]!==a?(C=i.length>0&&$("div",{className:"flex flex-wrap items-center gap-1","data-testid":"db-saved-queries",children:[c("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:a("Saved")}),i.map((y,N)=>$("span",{className:"inline-flex items-center overflow-hidden rounded-md border border-border",children:[c("button",{className:"px-2 py-0.5 text-xs text-foreground transition-colors hover:bg-accent","data-index":N,"data-testid":`db-saved-query-${y.name}`,onClick:h,type:"button",children:y.name}),c("button",{"aria-label":a("Delete saved query {name}",{name:y.name}),className:"border-l border-border px-1 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive","data-index":N,"data-testid":`db-saved-query-delete-${y.name}`,onClick:v,type:"button",children:"✕"})]},y.name))]}),e[18]=h,e[19]=v,e[20]=i,e[21]=a,e[22]=C):C=e[22];let _;return e[23]!==w||e[24]!==k||e[25]!==C?(_=$("div",{className:"flex flex-wrap items-center gap-1.5","data-testid":"db-query-bar",children:[w,k,C]}),e[23]=w,e[24]=k,e[25]=C,e[26]=_):_=e[26],_},_r="/__lunora/seed",Rt=200,Tr=50,Rr=(r,e)=>{const t=[];for(const n of r)n.pk!==!0&&n.ref!==void 0&&n.type==="id"&&(e[n.ref]??[]).length===0&&t.push(n.name);return t},Er=async r=>{const e=await fetch(_r,{body:JSON.stringify(r),headers:{"Content-Type":"application/json"},method:"POST"}),t=await e.json();return e.ok&&t.rows!==void 0?{kind:"ok",rows:t.rows}:{kind:"error",message:t.error??`seed request failed (${String(e.status)})`}},Pr="rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",Dr="rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:bg-primary/90 disabled:pointer-events-none disabled:opacity-50",Mr=({columns:r,fkPools:e,onClose:t,onInsertRows:n,table:l})=>{const o=ue(),[i,a]=T(10),[d,s]=T(!1),[u,m]=T(void 0),[b,f]=T(void 0),g=x=>{const w=Number(x.target.value);!Number.isNaN(w)&&w>=1&&a(Math.min(w,Rt))},h=async()=>{m(void 0),f(void 0),s(!0);try{const x=await Er({count:i,existingIds:e,seed:Date.now(),table:l});if(x.kind==="error"){m(x.message);return}const{rows:w}=x;if(w.length===0){m(o("No rows generated — all columns were skipped."));return}const k=await n(w);if(k!==void 0){m(k);return}f(w.length);const C=Rr(r,e);C.length>0&&m(o("Inserted {count} rows. Skipped FK columns: {cols}",{cols:C.join(", "),count:w.length.toString()}))}finally{s(!1)}},p=()=>{oe(h())},v=r.filter(x=>x.pk!==!0);return $(tn,{label:o("Generate dummy rows"),onClose:t,panelTestId:"gen-rows-panel",testId:"gen-rows-overlay",variant:"dialog",children:[$("div",{className:"flex items-start justify-between",children:[$("div",{className:"flex flex-col gap-0.5",children:[c("h3",{className:"text-base text-foreground","data-testid":"gen-rows-title",children:o("Generate dummy rows")}),c("p",{className:"text-xs text-muted-foreground","data-testid":"gen-rows-desc",children:o("Seed {table} with Faker-generated rows. Existing rows are not affected.",{table:l})})]}),c("button",{className:"text-xs text-muted-foreground hover:text-foreground","data-testid":"gen-rows-close",onClick:t,type:"button",children:o("Close")})]}),$("div",{className:"flex items-center gap-2",children:[c("label",{className:"text-xs font-medium text-foreground",htmlFor:"gen-rows-count",children:o("Row count")}),c("input",{className:"w-20 rounded-md border border-border bg-background px-2 py-1 text-xs outline-none focus-visible:border-ring","data-testid":"gen-rows-count",id:"gen-rows-count",max:Rt,min:1,onChange:g,type:"number",value:i}),c("span",{className:"text-xs text-muted-foreground",children:o("(max {max})",{max:Rt.toString()})})]}),v.length>0&&$("div",{className:"flex flex-col gap-1",children:[c("p",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:o("Columns to seed")}),c("ul",{className:"flex flex-col gap-0.5","data-testid":"gen-rows-columns",children:v.map(x=>{const w=x.ref!==void 0&&x.type==="id",k=w&&(e[x.ref??""]??[]).length===0,C=k?"rounded bg-destructive/10 px-1 text-destructive":"rounded bg-muted px-1 text-muted-foreground",_=k?`gen-rows-fk-empty-${x.name}`:`gen-rows-fk-ok-${x.name}`,y=k?o("FK: no rows in {ref} — will skip",{ref:x.ref??""}):o("→ {ref}",{ref:x.ref??""});return $("li",{className:"flex items-center gap-1.5 font-mono text-xs",children:[c("span",{className:"text-foreground",children:x.name}),$("span",{className:"text-muted-foreground",children:["(",x.type,")"]}),x.optional&&c("span",{className:"rounded bg-muted px-1 font-mono text-[10px] tracking-wide uppercase",children:"optional"}),w&&c("span",{className:C,"data-testid":_,children:y})]},x.name)})})]}),u!==void 0&&c("p",{className:"text-xs text-destructive","data-testid":"gen-rows-error",role:"alert",children:u}),b!==void 0&&u===void 0&&c("p",{className:"text-xs text-success","data-testid":"gen-rows-success",children:o("Inserted {count} rows successfully.",{count:b.toString()})}),$("div",{className:"flex justify-end gap-2",children:[c("button",{className:Pr,"data-testid":"gen-rows-cancel",onClick:t,type:"button",children:o("Cancel")}),c("button",{className:Dr,"data-testid":"gen-rows-generate",disabled:d,onClick:p,type:"button",children:o(d?"Inserting…":"Generate & insert")})]})]})},Ir=ye(Y.backRelationCounts),Or=(r,e,t,n)=>{const l=B(16),o=lt();let i;l[0]===Symbol.for("react.memo_cache_sentinel")?(i={},l[0]=i):i=l[0];const[a,d]=T(i);let s;if(l[1]!==r||l[2]!==e){let v;l[4]!==r?(v=x=>r.has(jt(x)),l[4]=r,l[5]=v):v=l[5],s=e.filter(v),l[1]=r,l[2]=e,l[3]=s}else s=l[3];const u=s;let m;l[6]!==t||l[7]!==u?(m=JSON.stringify([u,t]),l[6]=t,l[7]=u,l[8]=m):m=l[8];const b=m;let f;l[9]!==o||l[10]!==n||l[11]!==b?(f=async v=>{const[x,w]=JSON.parse(b);if(x.length===0||w.length===0){v.cancelled||d({});return}try{const k=await o.query(Ir,{ids:w,relations:x},ce(n));v.cancelled||d(Object.fromEntries(k.relations.map(Fr)))}catch{}},l[9]=o,l[10]=n,l[11]=b,l[12]=f):f=l[12];const g=f;let h,p;return l[13]!==g?(h=()=>{const v={cancelled:!1};return oe(g(v)),()=>{v.cancelled=!0}},p=[g],l[13]=g,l[14]=h,l[15]=p):(h=l[14],p=l[15]),Te(h,p),a};function Fr(r){return[jt(r),r.counts]}const Ft=r=>{const e=r[0];return e===void 0?void 0:{column:e.id,direction:e.desc?"desc":"asc"}},an=r=>r==null?"":typeof r=="object"?JSON.stringify(r):String(r),Yt=r=>r.map(e=>({column:e.column,operator:e.operator,value:e.value===void 0?"":an(e.value)})),en=r=>r===void 0?[]:[{desc:r.direction==="desc",id:r.column}],zr=200,jr=20,Ar=ye(Y.readTablePage),Lr=ye(Y.facetColumn),Et=ye(Y.writeRow),Br=ye(Y.deleteRows),qr=ye(Y.clearTable),Jr={},Lt=new Set(["__doc__","__id__","_creationTime","_id","id"]),Kr=r=>{const e=r.__doc__;if(typeof e=="string")try{const n=JSON.parse(e);if(n!==null&&typeof n=="object"&&!Array.isArray(n))return n}catch{}const t={};for(const[n,l]of Object.entries(r))Lt.has(n)||(t[n]=l);return t},Vr=({filters:r,offset:e,pageSize:t,search:n,sorting:l,table:o})=>({filters:Me(r),limit:t,offset:e,orderBy:Ft(l),search:n,skipCount:!0,table:o}),Hr=({filters:r,search:e,table:t})=>({filters:Me(r),limit:1,search:e,table:t}),Wr=(r,e)=>{const t=new Map;for(const l of r?.rows??[]){const o=Ne(l);o!==null&&t.set(o,l)}const n=[];for(const[l,o]of Object.entries(e))for(const[i,a]of Object.entries(o))n.push({column:i,newValue:a,oldValue:t.get(l)?.[i],rowId:l});return n},Gr=r=>!Lt.has(r),Qr=({initialFilters:r,initialOrderBy:e,initialSearch:t,initialShardKey:n,onSelectTable:l,onViewChange:o,pageSize:i,resolveBackRelations:a,tableParam:d})=>{const s=lt(),[u,m]=T(i),[b,f]=T(n??""),g=d===void 0||d===""?null:d,[h,p]=T(0),[v,x]=T("table"),[w,k]=T(()=>en(e)),[C,_]=T(t??""),y=Vt(C.trim(),300),N=Vt(b.trim(),400),[E,R]=T(()=>Yt(r??[])),P=_e(E),{clearFacets:D,facets:M,refetchFacets:q,toggleFacet:J}=Rn(),[j,A]=T(null),[K,O]=T(null),L=Qn(),[G,Q]=T(null),[me,ae]=T(!1),ee=qe(Y.listTables,Jr,{live:!0,shardKey:N}),ge=ee.data??null,be=ee.error,fe=Vr({filters:E,offset:h,pageSize:u,search:y,sorting:w,table:g??""}),he=Hr({filters:E,search:y,table:g??""}),Z=qe(Y.readTablePage,fe,{enabled:g!==null,keepPreviousData:!1,live:!0,shardKey:N}),W=Z.data??null,pe=Z.error,{liveError:I}=Z,te=qe(Y.readTablePage,he,{enabled:g!==null,live:!0,shardKey:N});Te(()=>{ee.data!==void 0&&Fn(N)},[ee.data,N]);const se=S=>{l?.(S)},ie=(S,z)=>{l?.(S,{search:z})},re=async(S,z)=>{try{return(await s.query(Ar,{filters:[],limit:jr,offset:0,search:z,table:S},ce(N))).rows.find(X=>Ne(X)===z)??null}catch{return null}},H=(S,z,X,$e)=>xe=>s.query(Lr,{column:xe,filters:Me(X),search:$e,table:z},ce(S)),Se=S=>{J(S,g===null?null:H(N,g,P.current,y))},Ce=(S,z)=>{const X=an(z);R($e=>[...$e.filter(xe=>xe.column!==S),{column:S,operator:"eq",value:X}]),p(0)},V=_e(H),we=_e(q),Pe=_e(o);Te(()=>{g!==null&&we.current(V.current(N,g,E,y))},[N,g,E,y]);const ne=Oe(d);Te(()=>{g===null||Pe.current===void 0||ne.current!==d||Pe.current({filters:Me(E),orderBy:Ft(w),search:y,shard:N})},[g,d,E,w,y,N]);const Re=_e(r),Ee=_e(e),Fe=_e(t),at=_e(n);Te(()=>{ne.current!==d&&(ne.current=d,queueMicrotask(()=>{const S=Yt(Re.current??[]);k(en(Ee.current)),_(Fe.current??""),R(S),P.current=S,f(at.current??""),D(),L.clear(),Q(null),p(0)}))},[d]);const De=S=>{g!==null&&p(Math.max(0,S))},st=(S,z)=>{Q({column:z,rowId:S})},it=()=>{Q(null)},de=async()=>{if(g!==null){O(null),ae(!0);try{for(const[S,z]of Object.entries(L.staged))await s.query(Et,{doc:z,id:S,op:"patch",table:g},ce(N));L.clear(),Q(null),Z.refetch()}catch(S){O(S.message)}ae(!1)}},dt=()=>{L.clear(),Q(null)},Je=Wr(W,L.staged),Ke=async(S,z,X)=>{if(g===null)return;O(null);let $e;if(S!=="delete")try{$e=X===void 0||X.trim()===""?{}:JSON.parse(X)}catch(xe){O(`Invalid JSON: ${xe.message}`);return}try{await s.query(Et,{doc:$e,id:z??void 0,op:S,table:g},ce(N)),A(null),Z.refetch()}catch(xe){O(xe.message)}},ze=async(S,z)=>{if(g!==null){O(null);try{for(let X=0;X<zr&&(await s.query(S,z,ce(N))).hasMore;X+=1);p(0),Z.refetch()}catch(X){O(X.message)}}},ke=S=>{k(S),p(0)},Ve=Pt(()=>g===null?[]:a?.(g)??[],[a,g]),He=wr(W,w,ke,Ve),ct={filters:Me(E),orderBy:Ft(w),search:y,shard:b,table:g??void 0},je=te.data?.total??(W===null?0:h+W.rows.length),We=h>0,Ge=W!==null&&h+W.rows.length<je,ut=W===null||W.rows.length===0?0:h+1,mt=W===null?0:h+W.rows.length,gt=()=>{ee.refetch()},bt=()=>{x("table")},Ae=()=>{x("json")},Qe=()=>{oe(ze(Br,{filters:Me(P.current),search:y,table:g}))},Ue=()=>{oe(ze(qr,{table:g}))},ft=S=>{_(S.target.value),p(0)},ht=S=>{R(S),p(0)},pt=()=>{O(null);const S={};for(const z of W?.columns??[])Lt.has(z)||(S[z]="");A({docText:JSON.stringify(S,null,2),id:""})},xt=S=>{A(z=>z===null?z:{docText:S,id:z.id})},Ze=()=>{j!==null&&oe(Ke(j.id===""?"insert":"patch",j.id===""?null:j.id,j.docText))},Xe=()=>{A(null),O(null)},vt=()=>{De(h-u)},yt=()=>{De(h+u)},wt=S=>{De(Math.max(0,(S-1)*u))},Nt=S=>{m(S),p(0)},St=(S,z)=>{O(null),A({docText:JSON.stringify(Kr(z),null,2),id:S})},Ct=S=>{oe(Ke("delete",S))},Ye=async S=>{if(!(g===null||S.length===0)){O(null);try{for(const z of S)await s.query(Et,{id:z,op:"delete",table:g},ce(N));Z.refetch()}catch(z){O(z.message)}}},et=S=>{oe(Ye(S))},kt=()=>{oe(de())};return{addRow:pt,bulkDelete:Qe,cancelCellEdit:it,cancelEdit:Xe,changePageSize:Nt,clearTable:Ue,columns:W?.columns??[],committing:me,currentView:ct,discardStaged:dt,editableColumn:Gr,editing:j,editingCell:G,facetFilter:Ce,facets:M,filter:C,filters:E,goNext:yt,goPrevious:vt,hasNext:Ge,hasPrevious:We,jumpToPage:wt,liveError:I,loadTables:gt,navigateToRef:ie,onBulkDeleteSelected:et,onCommitStaged:kt,onFilterChange:ft,onFiltersChange:ht,onRowDelete:Ct,onRowEdit:St,page:W,previewRef:re,pageError:pe,pageSize:u,rangeEnd:mt,rangeStart:ut,queryShardKey:N,saveEdit:Ze,selectedTable:g,selectTable:se,setEditorDocumentText:xt,setShardKey:f,shardKey:b,showJson:Ae,showTable:bt,stage:L.stage,stagedChanges:Je,stagedValue:L.stagedValue,startCellEdit:st,table:He,tables:ge,tablesError:be,toggleFacet:Se,total:je,viewMode:v,writeError:K}},Ur=ye(Y.describeTable),Zr=ye(Y.readTablePage),Xr=ye(Y.writeRow),Yr=r=>{const e=r._id??r.id??r.__id__??"";return typeof e=="string"?e:typeof e=="number"?String(e):""},el=r=>{const e=lt(),[t,n]=T(!1),[l,o]=T(void 0),[i,a]=T(void 0),[d,s]=T(void 0),[u,m]=T({}),[b,f]=T(!1),[g,h]=T(void 0),p=async(v,x)=>{n(!0),o(v),a(x),s(void 0),m({}),h(void 0),f(!0);try{const w=await e.query(Ur,{table:v},ce(x)),{columns:k}=w;s(k);const C={},_=k.filter(y=>y.ref!==void 0&&y.type==="id"&&y.pk!==!0);for(const y of _){if(y.ref===void 0)continue;const{ref:N}=y;if(C[N]===void 0)try{const E=await e.query(Zr,{filters:[],limit:Tr,offset:0,search:"",table:N},ce(x));C[N]=E.rows.flatMap(R=>Yr(R)||[])}catch{C[N]=[]}}m(C)}catch(w){h(w.message)}f(!1)};return{closeDialog:()=>{n(!1),o(void 0),a(void 0),s(void 0),m({}),h(void 0)},columnMeta:d,error:g,fkPools:u,insertBatch:async(v,x)=>{if(l===void 0||i===void 0)return"No table selected.";try{for(const w of v)await e.query(Xr,{doc:w,op:"insert",table:l},ce(i));x(),r();return}catch(w){return w.message}},loading:b,open:t,openDialog:(v,x)=>{oe(p(v,x))},shardKey:i,table:l}},tl=[],nl=()=>{const r=B(1);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={},r[0]=e):e=r[0];const{data:t}=qe(Y.maskPolicies,e);return Array.isArray(t?.columns)?t.columns:tl},rl=/(?:_creationtime|(?:^|[a-z])(?:time|at))$/iu,ll=(r,e)=>typeof e=="number"&&rl.test(r),ol=r=>{const e=B(26),{column:t,onNavigate:n,target:l,value:o}=r;let i;e[0]!==n||e[1]!==l||e[2]!==o?(i=()=>{l!==void 0&&n(l,String(o))},e[0]=n,e[1]=l,e[2]=o,e[3]=i):i=e[3];const a=i;if(o==null){let u;return e[4]===Symbol.for("react.memo_cache_sentinel")?(u=c("span",{className:"italic text-muted-foreground",children:"null"}),e[4]=u):u=e[4],u}if(l!==void 0&&(typeof o=="string"||typeof o=="number")&&String(o)!==""){const u=`rd-ref-${t}`,m=`Open ${l} ${String(o)}`,b=String(o);let f;return e[5]!==a||e[6]!==u||e[7]!==m||e[8]!==b?(f=$("button",{"data-testid":u,onClick:a,title:m,type:"button",children:[b," ↗"]}),e[5]=a,e[6]=u,e[7]=m,e[8]=b,e[9]=f):f=e[9],f}if(ll(t,o)){const u=`rd-ts-${t}`;let m;e[10]!==o?(m=o.toString(),e[10]=o,e[11]=m):m=e[11];let b;e[12]!==o?(b=vn(o),e[12]=o,e[13]=b):b=e[13];let f;return e[14]!==u||e[15]!==m||e[16]!==b?(f=c("span",{"data-testid":u,title:m,children:b}),e[14]=u,e[15]=m,e[16]=b,e[17]=f):f=e[17],f}if(typeof o=="object"){let u;e[18]!==o?(u=JSON.stringify(o,null,2),e[18]=o,e[19]=u):u=e[19];let m;return e[20]!==u?(m=c("pre",{className:"m-0 overflow-auto rounded-md bg-muted/50 p-2 text-xs",children:u}),e[20]=u,e[21]=m):m=e[21],m}let d;e[22]!==o?(d=Ie(o),e[22]=o,e[23]=d):d=e[23];let s;return e[24]!==d?(s=c("span",{children:d}),e[24]=d,e[25]=s):s=e[25],s},al=r=>{const e=B(21),{columns:t,onClose:n,onNavigate:l,refs:o,row:i}=r;let a;e[0]!==n||e[1]!==l?(a=(g,h)=>{l(g,h),n()},e[0]=n,e[1]=l,e[2]=a):a=e[2];const d=a;let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=c("h3",{className:"m-0 text-base text-foreground",children:"Row detail"}),e[3]=s):s=e[3];let u;e[4]!==n?(u=$("div",{className:"mb-3 flex items-center justify-between",children:[s,c("button",{"data-testid":"rd-close",onClick:n,type:"button",children:"Close"})]}),e[4]=n,e[5]=u):u=e[5];let m;if(e[6]!==t||e[7]!==d||e[8]!==o||e[9]!==i){let g;e[11]!==d||e[12]!==o||e[13]!==i?(g=h=>$("div",{className:"border-t border-border py-2 first:border-t-0","data-testid":`rd-field-${h}`,children:[c("dt",{className:"mb-0.5 text-xs font-semibold text-muted-foreground",children:h}),c("dd",{className:"m-0",children:c(ol,{column:h,onNavigate:d,target:o?.[h],value:i[h]})})]},h),e[11]=d,e[12]=o,e[13]=i,e[14]=g):g=e[14],m=t.map(g),e[6]=t,e[7]=d,e[8]=o,e[9]=i,e[10]=m}else m=e[10];let b;e[15]!==m?(b=c("dl",{"data-testid":"rd-fields",children:m}),e[15]=m,e[16]=b):b=e[16];let f;return e[17]!==n||e[18]!==u||e[19]!==b?(f=$(tn,{label:"Row detail",onClose:n,panelTestId:"rd-panel",testId:"rd-overlay",variant:"drawer",children:[u,b]}),e[17]=n,e[18]=u,e[19]=b,e[20]=f):f=e[20],f},tt="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",ot="w-full rounded-md border border-border bg-background px-2 py-1 font-mono text-xs outline-none focus-visible:border-ring",sl=/(?:_creationtime|(?:^|[a-z])(?:time|at))$/iu,il=(r,e)=>typeof e=="boolean"?"boolean":typeof e=="number"?sl.test(r)?"date":"number":e!==null&&typeof e=="object"?"json":"text",dl=r=>{try{const e=JSON.parse(r);return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}},cl=r=>{const e=new Date(r),t=n=>String(n).padStart(2,"0");return`${e.getFullYear().toString()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`},ul=r=>{const e=B(8),{column:t,onChange:n,value:l}=r;let o;e[0]!==t||e[1]!==n?(o=u=>{n(t,u)},e[0]=t,e[1]=n,e[2]=o):o=e[2];const i=o,a=l===!0,d=`db-field-${t}`;let s;return e[3]!==t||e[4]!==i||e[5]!==a||e[6]!==d?(s=c(zt,{"aria-label":t,checked:a,"data-testid":d,onCheckedChange:i}),e[3]=t,e[4]=i,e[5]=a,e[6]=d,e[7]=s):s=e[7],s},ml=r=>{const e=B(8),{column:t,onChange:n,value:l}=r;let o;e[0]!==t||e[1]!==n?(o=u=>{const m=Number(u.target.value);u.target.value!==""&&!Number.isNaN(m)&&n(t,m)},e[0]=t,e[1]=n,e[2]=o):o=e[2];const i=o,a=`db-field-${t}`,d=typeof l=="number"?l:"";let s;return e[3]!==t||e[4]!==i||e[5]!==a||e[6]!==d?(s=c("input",{"aria-label":t,className:ot,"data-testid":a,onChange:i,type:"number",value:d}),e[3]=t,e[4]=i,e[5]=a,e[6]=d,e[7]=s):s=e[7],s},gl=r=>{const e=B(10),{column:t,onChange:n,value:l}=r;let o;e[0]!==t||e[1]!==n?(o=u=>{const m=new Date(u.target.value).getTime();Number.isNaN(m)||n(t,m)},e[0]=t,e[1]=n,e[2]=o):o=e[2];const i=o,a=`db-field-${t}`;let d;e[3]!==l?(d=typeof l=="number"?cl(l):"",e[3]=l,e[4]=d):d=e[4];let s;return e[5]!==t||e[6]!==i||e[7]!==a||e[8]!==d?(s=c("input",{"aria-label":t,className:ot,"data-testid":a,onChange:i,type:"datetime-local",value:d}),e[5]=t,e[6]=i,e[7]=a,e[8]=d,e[9]=s):s=e[9],s},bl=r=>{const e=B(8),{column:t,onChange:n,value:l}=r;let o;e[0]!==t||e[1]!==n?(o=u=>{n(t,u.target.value)},e[0]=t,e[1]=n,e[2]=o):o=e[2];const i=o,a=`db-field-${t}`,d=typeof l=="string"?l:"";let s;return e[3]!==t||e[4]!==i||e[5]!==a||e[6]!==d?(s=c("input",{"aria-label":t,className:ot,"data-testid":a,onChange:i,type:"text",value:d}),e[3]=t,e[4]=i,e[5]=a,e[6]=d,e[7]=s):s=e[7],s},fl=r=>{const e=B(20),{column:t,onChange:n,value:l}=r,o=ue();let i;e[0]!==l?(i=()=>JSON.stringify(l,null,2),e[0]=l,e[1]=i):i=e[1];const[a,d]=T(i),[s,u]=T(!1);let m;e[2]!==t||e[3]!==n?(m=w=>{const k=w.target.value;d(k);try{n(t,JSON.parse(k)),u(!1)}catch{u(!0)}},e[2]=t,e[3]=n,e[4]=m):m=e[4];const b=m,f=s&&"border-destructive";let g;e[5]!==f?(g=nt(ot,"min-h-16",f),e[5]=f,e[6]=g):g=e[6];const h=`db-field-${t}`;let p;e[7]!==t||e[8]!==b||e[9]!==g||e[10]!==h||e[11]!==a?(p=c("textarea",{"aria-label":t,className:g,"data-testid":h,onChange:b,value:a}),e[7]=t,e[8]=b,e[9]=g,e[10]=h,e[11]=a,e[12]=p):p=e[12];let v;e[13]!==t||e[14]!==s||e[15]!==o?(v=s&&c("span",{className:"text-xs text-destructive","data-testid":`db-field-error-${t}`,children:o("Invalid JSON")}),e[13]=t,e[14]=s,e[15]=o,e[16]=v):v=e[16];let x;return e[17]!==p||e[18]!==v?(x=$("div",{className:"flex flex-col gap-1",children:[p,v]}),e[17]=p,e[18]=v,e[19]=x):x=e[19],x},hl=r=>{const e=B(43),{column:t,onChange:n,target:l,value:o}=r;let i;e[0]!==t||e[1]!==o?(i=il(t,o),e[0]=t,e[1]=o,e[2]=i):i=e[2];const a=i,d=`db-field-${t}`;let s;e[3]!==t?(s=c("span",{className:"font-mono",children:t}),e[3]=t,e[4]=s):s=e[4];let u;e[5]!==l?(u=l!==void 0&&$("span",{className:"rounded bg-muted px-1 font-mono text-[10px] tracking-wide uppercase",children:["→ ",l]}),e[5]=l,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==u?(m=$("span",{className:"flex items-center gap-1.5 font-medium text-muted-foreground",children:[s,u]}),e[7]=s,e[8]=u,e[9]=m):m=e[9];let b;e[10]!==t||e[11]!==a||e[12]!==n||e[13]!==o?(b=a==="boolean"&&c(ul,{column:t,onChange:n,value:o}),e[10]=t,e[11]=a,e[12]=n,e[13]=o,e[14]=b):b=e[14];let f;e[15]!==t||e[16]!==a||e[17]!==n||e[18]!==o?(f=a==="number"&&c(ml,{column:t,onChange:n,value:o}),e[15]=t,e[16]=a,e[17]=n,e[18]=o,e[19]=f):f=e[19];let g;e[20]!==t||e[21]!==a||e[22]!==n||e[23]!==o?(g=a==="date"&&c(gl,{column:t,onChange:n,value:o}),e[20]=t,e[21]=a,e[22]=n,e[23]=o,e[24]=g):g=e[24];let h;e[25]!==t||e[26]!==a||e[27]!==n||e[28]!==o?(h=a==="json"&&c(fl,{column:t,onChange:n,value:o}),e[25]=t,e[26]=a,e[27]=n,e[28]=o,e[29]=h):h=e[29];let p;e[30]!==t||e[31]!==a||e[32]!==n||e[33]!==o?(p=a==="text"&&c(bl,{column:t,onChange:n,value:o}),e[30]=t,e[31]=a,e[32]=n,e[33]=o,e[34]=p):p=e[34];let v;return e[35]!==p||e[36]!==d||e[37]!==m||e[38]!==b||e[39]!==f||e[40]!==g||e[41]!==h?(v=$("label",{className:"flex flex-col gap-1 text-xs",htmlFor:d,children:[m,b,f,g,h,p]}),e[35]=p,e[36]=d,e[37]=m,e[38]=b,e[39]=f,e[40]=g,e[41]=h,e[42]=v):v=e[42],v},pl=r=>{const e=B(48),{documentText:t,onCancel:n,onDocumentTextChange:l,onSave:o,refs:i}=r,a=ue();let d;e[0]!==t?(d=dl(t),e[0]=t,e[1]=d):d=e[1];const s=d,[u,m]=T(!1),b=!u&&s!==null;let f;e[2]!==s||e[3]!==l?(f=(O,L)=>{l(JSON.stringify({...s,[O]:L},null,2))},e[2]=s,e[3]=l,e[4]=f):f=e[4];const g=f;let h;e[5]!==l?(h=O=>{l(O.target.value)},e[5]=l,e[6]=h):h=e[6];const p=h;let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{m(!1)},e[7]=v):v=e[7];const x=v;let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{m(!0)},e[8]=w):w=e[8];const k=w,C=s===null;let _;e[9]!==a?(_=a("Form"),e[9]=a,e[10]=_):_=e[10];let y;e[11]!==b||e[12]!==C||e[13]!==_?(y=c("button",{"aria-pressed":b,className:tt,"data-testid":"db-editor-form",disabled:C,onClick:x,type:"button",children:_}),e[11]=b,e[12]=C,e[13]=_,e[14]=y):y=e[14];const N=!b;let E;e[15]!==a?(E=a("JSON"),e[15]=a,e[16]=E):E=e[16];let R;e[17]!==E||e[18]!==N?(R=c("button",{"aria-pressed":N,className:tt,"data-testid":"db-editor-json",onClick:k,type:"button",children:E}),e[17]=E,e[18]=N,e[19]=R):R=e[19];let P;e[20]!==R||e[21]!==y?(P=$("div",{className:"flex items-center gap-1.5",children:[y,R]}),e[20]=R,e[21]=y,e[22]=P):P=e[22];let D;e[23]!==t||e[24]!==s||e[25]!==g||e[26]!==p||e[27]!==i||e[28]!==b||e[29]!==a?(D=b?c("div",{className:"flex flex-col gap-3","data-testid":"db-editor-fields",children:Object.entries(s).map(O=>{const[L,G]=O;return c(hl,{column:L,onChange:g,target:i?.[L],value:G},L)})}):c("textarea",{"aria-label":a("Row document JSON"),className:"min-h-28 w-full rounded-md border border-border bg-background px-2 py-1.5 font-mono text-xs outline-none focus-visible:border-ring","data-testid":"db-editor-doc",onChange:p,value:t}),e[23]=t,e[24]=s,e[25]=g,e[26]=p,e[27]=i,e[28]=b,e[29]=a,e[30]=D):D=e[30];let M;e[31]!==a?(M=a("Save"),e[31]=a,e[32]=M):M=e[32];let q;e[33]!==o||e[34]!==M?(q=c("button",{className:tt,"data-testid":"db-editor-save",onClick:o,type:"button",children:M}),e[33]=o,e[34]=M,e[35]=q):q=e[35];let J;e[36]!==a?(J=a("Cancel"),e[36]=a,e[37]=J):J=e[37];let j;e[38]!==n||e[39]!==J?(j=c("button",{className:tt,"data-testid":"db-editor-cancel",onClick:n,type:"button",children:J}),e[38]=n,e[39]=J,e[40]=j):j=e[40];let A;e[41]!==q||e[42]!==j?(A=$("div",{className:"flex items-center gap-1.5",children:[q,j]}),e[41]=q,e[42]=j,e[43]=A):A=e[43];let K;return e[44]!==P||e[45]!==D||e[46]!==A?(K=$("div",{className:"flex flex-col gap-2 border border-border bg-card p-3","data-testid":"db-editor",children:[P,D,A]}),e[44]=P,e[45]=D,e[46]=A,e[47]=K):K=e[47],K},xl=50,vl=r=>{const e=B(8),{active:t,onPick:n,shard:l}=r;let o;e[0]!==n||e[1]!==l?(o=()=>{n(l)},e[0]=n,e[1]=l,e[2]=o):o=e[2];const i=o,a=`w-full rounded px-2 py-0.5 text-left text-xs transition-colors hover:bg-accent ${t?"bg-accent font-medium":""}`,d=`shard-explorer-item-${l}`;let s;return e[3]!==i||e[4]!==l||e[5]!==a||e[6]!==d?(s=c("button",{className:a,"data-testid":d,onClick:i,type:"button",children:l}),e[3]=i,e[4]=l,e[5]=a,e[6]=d,e[7]=s):s=e[7],s},yl=({onFetchTables:r,onSelect:e})=>{const t=ue(),[n]=T(()=>zn()),[l,o]=T(!1),[i,a]=T(void 0),[d,s]=T(void 0),[u,m]=T(!1),[b,f]=T(void 0),g=Oe(0),h=()=>{o(x=>!x)},p=async x=>{e(x),a(x),s(void 0),f(void 0),m(!0),g.current+=1;const w=g.current;try{const k=await r(x);g.current===w&&s(k?.slice(0,xl))}catch(k){g.current===w&&f(k.message)}g.current===w&&m(!1)},v=x=>{oe(p(x))};return n.length===0?null:$("div",{"data-testid":"shard-explorer",children:[$("button",{"aria-controls":"shard-explorer-panel","aria-expanded":l,className:"inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"shard-explorer-toggle",onClick:h,type:"button",children:[t("Shards seen"),c("span",{"aria-hidden":"true",className:`ml-0.5 transition-transform ${l?"rotate-180":""}`,children:"▾"})]}),l&&$("div",{className:"mt-1 flex flex-col gap-1 rounded-md border border-border bg-popover p-2","data-testid":"shard-explorer-panel",id:"shard-explorer-panel",children:[c("p",{className:"text-xs text-muted-foreground","data-testid":"shard-explorer-hint",children:t("Recently visited shards — click to switch")}),c("ul",{className:"flex flex-col gap-0.5","data-testid":"shard-explorer-list",children:n.map(x=>c("li",{children:c(vl,{active:i===x,onPick:v,shard:x})},x))}),i!==void 0&&$("div",{className:"mt-1 border-t border-border pt-1","data-testid":"shard-explorer-summary",children:[c("p",{className:"mb-1 text-xs font-medium text-foreground","data-testid":"shard-explorer-summary-title",children:t("{shard} tables",{shard:i})}),u&&c("p",{className:"text-xs text-muted-foreground","data-testid":"shard-explorer-loading",children:t("Loading…")}),b!==void 0&&c("p",{className:"text-xs text-destructive","data-testid":"shard-explorer-error",role:"alert",children:b}),!u&&b===void 0&&d?.length===0&&c("p",{className:"text-xs text-muted-foreground","data-testid":"shard-explorer-empty",children:t("No tables in this shard.")}),!u&&b===void 0&&d!==void 0&&d.length>0&&c("ul",{className:"flex flex-col gap-0.5","data-testid":"shard-explorer-tables",children:d.map(x=>$("li",{className:"flex items-center justify-between text-xs",children:[c("span",{"data-testid":`shard-explorer-table-${x.name}`,children:x.name}),c("span",{className:"text-muted-foreground","data-testid":`shard-explorer-rowcount-${x.name}`,children:x.rowCount})]},x.name))})]})]})]})},wl="lunora-studio-pinned-columns",Nl="lunora-studio-back-relations",Sl={},Cl=50,kl=[],Be="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50 aria-pressed:bg-accent aria-pressed:text-accent-foreground",$l=ye(Y.listTables),_l=r=>{const e=B(10),{onFetchShardTables:t,onShardChange:n,schemaSwitch:l,shardKey:o}=r;let i;e[0]!==n||e[1]!==o?(i=c(pn,{onChange:n,testId:"db-shard-input",value:o}),e[0]=n,e[1]=o,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==n?(a=c(yl,{onFetchTables:t,onSelect:n}),e[3]=t,e[4]=n,e[5]=a):a=e[5];let d;return e[6]!==l||e[7]!==i||e[8]!==a?(d=$("div",{className:"flex shrink-0 flex-col items-stretch gap-2 border-b border-border p-3",children:[l,i,a]}),e[6]=l,e[7]=i,e[8]=a,e[9]=d):d=e[9],d},Tl=r=>{const e=B(61),{columns:t,editable:n,filter:l,filters:o,hasMaskedColumns:i,liveError:a,maskOn:d,onAddRow:s,onBulkDelete:u,onAskAiFilter:m,onClearTable:b,onFilterChange:f,onFiltersChange:g,onGenerateRows:h,onShowJson:p,onShowTable:v,onToggleMask:x,total:w,viewMode:k}=r,C=ue(),_=k==="table";let y;e[0]!==v||e[1]!==_?(y=c("button",{"aria-pressed":_,className:Be,"data-testid":"db-view-table",onClick:v,type:"button",children:"Table"}),e[0]=v,e[1]=_,e[2]=y):y=e[2];const N=k==="json";let E;e[3]!==p||e[4]!==N?(E=c("button",{"aria-pressed":N,className:Be,"data-testid":"db-view-json",onClick:p,type:"button",children:"JSON"}),e[3]=p,e[4]=N,e[5]=E):E=e[5];let R;e[6]!==a||e[7]!==C?(R=a===void 0?C("Live — changes stream in automatically"):C("Live unavailable: {liveError}",{liveError:a}),e[6]=a,e[7]=C,e[8]=R):R=e[8];const P=`size-1.5 rounded-full ${a===void 0?"bg-success":"bg-muted-foreground/50"}`;let D;e[9]!==P?(D=c("span",{"aria-hidden":"true",className:P}),e[9]=P,e[10]=D):D=e[10];let M;e[11]!==a||e[12]!==C?(M=C(a===void 0?"Live":"Live unavailable"),e[11]=a,e[12]=C,e[13]=M):M=e[13];let q;e[14]!==R||e[15]!==D||e[16]!==M?(q=$("span",{className:"inline-flex items-center gap-1.5 px-1 text-xs font-medium text-muted-foreground","data-testid":"db-live-indicator",role:"status",title:R,children:[D,M]}),e[14]=R,e[15]=D,e[16]=M,e[17]=q):q=e[17];let J;e[18]!==i||e[19]!==d||e[20]!==x||e[21]!==C?(J=i&&c("button",{"aria-pressed":d,className:Be,"data-testid":"db-mask-toggle",onClick:x,type:"button",children:C("Mask sensitive columns")}),e[18]=i,e[19]=d,e[20]=x,e[21]=C,e[22]=J):J=e[22];let j;e[23]!==n||e[24]!==s?(j=n&&c("button",{className:Be,"data-testid":"db-add-row",onClick:s,type:"button",children:"Add row"}),e[23]=n,e[24]=s,e[25]=j):j=e[25];let A;e[26]!==n||e[27]!==h||e[28]!==C?(A=n&&c("button",{className:Be,"data-testid":"db-generate-rows",onClick:h,type:"button",children:C("Generate rows")}),e[26]=n,e[27]=h,e[28]=C,e[29]=A):A=e[29];let K;e[30]!==n||e[31]!==l||e[32]!==o||e[33]!==u||e[34]!==w?(K=n&&w>0&&(l!==""||o.length>0)&&c(Mt,{confirmLabel:`Delete ${w.toString()} matching?`,onConfirm:u,testId:"db-bulk-delete",children:`Delete ${w.toString()} matching`}),e[30]=n,e[31]=l,e[32]=o,e[33]=u,e[34]=w,e[35]=K):K=e[35];let O;e[36]!==n||e[37]!==l||e[38]!==o||e[39]!==b||e[40]!==w?(O=n&&w>0&&l===""&&o.length===0&&c(Mt,{confirmLabel:`Clear all ${w.toString()} rows?`,onConfirm:b,testId:"db-clear-table",children:`Clear table (${w.toString()})`}),e[36]=n,e[37]=l,e[38]=o,e[39]=b,e[40]=w,e[41]=O):O=e[41];let L;e[42]!==J||e[43]!==j||e[44]!==A||e[45]!==K||e[46]!==O||e[47]!==y||e[48]!==E||e[49]!==q?(L=$("div",{className:"flex flex-wrap items-center gap-1.5",children:[y,E,q,J,j,A,K,O]}),e[42]=J,e[43]=j,e[44]=A,e[45]=K,e[46]=O,e[47]=y,e[48]=E,e[49]=q,e[50]=L):L=e[50];let G;e[51]!==t||e[52]!==l||e[53]!==o||e[54]!==m||e[55]!==f||e[56]!==g?(G=c(Mn,{columns:t,filters:o,onAskAi:m,onFiltersChange:g,onSearchChange:f,search:l}),e[51]=t,e[52]=l,e[53]=o,e[54]=m,e[55]=f,e[56]=g,e[57]=G):G=e[57];let Q;return e[58]!==L||e[59]!==G?(Q=$("div",{className:"flex flex-col gap-2","data-testid":"db-view-toggle",children:[L,G]}),e[58]=L,e[59]=G,e[60]=Q):Q=e[60],Q},eo=({editable:r=!1,globalTableNames:e,initialFilters:t,initialOrderBy:n,initialPins:l,initialSearch:o,initialShardKey:i,onNavigateToGlobal:a,onSelectTable:d,onViewChange:s,pageSize:u=Cl,queryBar:m,schemaSwitch:b,tableParam:f})=>{const g=qe(Y.describeTables,{},{shardKey:i??""}).data?.columnsByTable??Sl,[h,p]=Kt(Nl,{}),v=Dt(F=>{const U=new Set(h[F]);return Gt(F,g).filter(le=>U.has(jt(le)))},[h,g]),{addRow:x,bulkDelete:w,cancelCellEdit:k,cancelEdit:C,changePageSize:_,clearTable:y,columns:N,committing:E,currentView:R,discardStaged:P,editableColumn:D,editing:M,editingCell:q,facetFilter:J,facets:j,filter:A,filters:K,goNext:O,goPrevious:L,hasNext:G,hasPrevious:Q,jumpToPage:me,liveError:ae,loadTables:ee,navigateToRef:ge,onBulkDeleteSelected:be,onCommitStaged:fe,onFilterChange:he,onFiltersChange:Z,onRowDelete:W,onRowEdit:pe,page:I,pageError:te,previewRef:se,pageSize:ie,queryShardKey:re,rangeEnd:H,rangeStart:Se,saveEdit:Ce,selectedTable:V,selectTable:we,setEditorDocumentText:Pe,setShardKey:ne,shardKey:Re,showJson:Ee,showTable:Fe,stage:at,stagedChanges:De,stagedValue:st,startCellEdit:it,table:de,tables:dt,tablesError:Je,toggleFacet:Ke,total:ze,viewMode:ke,writeError:Ve}=Qr({initialFilters:t,initialOrderBy:n,initialSearch:o,initialShardKey:i,onSelectTable:d,onViewChange:s,pageSize:u,resolveBackRelations:v,tableParam:f}),He=yn(Re),ct=F=>{oe((async()=>{const U=await He.suggestFilter(F,V??"");U!==void 0&&Z(U.map(le=>{const ve=le.value,Le=typeof ve=="string"||typeof ve=="number"||typeof ve=="boolean"?String(ve):"";return{column:le.column,operator:le.operator,value:Le}}))})())},je=V===null?[]:Gt(V,g),We=new Set(h[V??""]),Ge=[];for(const F of I?.rows??[]){const U=F._id??F.id;typeof U=="string"&&U!==""&&Ge.push(U)}const ut=Or(We,je,Ge,re),mt=F=>{p(U=>{const le=V??"",ve=U[le]??[];return{...U,[le]:ve.includes(F)?ve.filter(Le=>Le!==F):[...ve,F]}})},[gt,bt]=Kt(wl,{}),Ae=V??"",Qe=gt[Ae],Ue=Qe===void 0?new Set((l??"").split(",").filter(F=>F!=="")):new Set(Qe),ft=F=>{bt(U=>{const le=U[Ae]??[...Ue],ve=le.includes(F)?le.filter(Le=>Le!==F):[...le,F];return{...U,[Ae]:ve}})},ht=lt(),pt=async F=>await ht.query($l,{},ce(F)),xt=()=>{V!==null&&we(V)},{closeDialog:Ze,columnMeta:Xe,fkPools:vt,insertBatch:yt,open:wt,openDialog:Nt}=el(xt),St=()=>{V!==null&&Nt(V,Re)},Ct=F=>yt(F,Ze),[Ye,et]=T(null),kt=()=>{et(null)},[S,z]=T(!1),X=()=>{z(F=>!F)},$e=nl(),[xe,sn]=T(!0),dn=()=>{sn(F=>!F)},cn=Jn($e,V??""),Bt=Vn(cn,N),$t={columns:Bt,enabled:xe},[_t,qt]=T(null),un=(F,U)=>{qt({column:F,value:U})},mn=()=>{qt(null)},Jt=(F,U)=>{if(a!==void 0&&e?.has(F)===!0){a(F,U);return}ge(F,U)},gn=m?.onSaveQuery,bn=F=>{gn?.(F,R)},fn={cancelEdit:k,editable:r,editableColumn:D,editingCell:q,onExpandCell:un,stage:at,stagedValue:st,startEdit:it},hn={columns:I?.refs,onNavigate:Jt,onPreview:se};return $("div",{className:"flex h-full min-w-0","data-testid":"lunora-data-browser",children:[c(En,{header:c(_l,{onFetchShardTables:pt,onShardChange:ne,schemaSwitch:b,shardKey:Re}),onReload:ee,onSelect:we,prefix:"db",selected:V,tables:dt??kl}),$("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[Je!==null&&c("p",{className:"shrink-0 border-b border-border px-4 py-2 text-sm text-destructive","data-testid":"db-tables-error",role:"alert",children:Je}),I===null&&te===null&&c("div",{className:"flex flex-1 items-center justify-center p-6",children:c("p",{className:"text-sm text-muted-foreground",children:"Select a table to browse its rows."})}),te!==null&&c("p",{className:"shrink-0 border-b border-border px-4 py-2 text-sm text-destructive","data-testid":"db-page-error",role:"alert",children:te}),I!==null&&$("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"db-page",children:[$("div",{className:"flex shrink-0 flex-col gap-2 border-b border-border px-4 py-3",children:[c(Tl,{columns:N,editable:r,filter:A,filters:K,hasMaskedColumns:Bt.size>0,liveError:ae,maskOn:xe,onAddRow:x,onAskAiFilter:He.unavailable?void 0:ct,onBulkDelete:w,onClearTable:y,onFilterChange:he,onFiltersChange:Z,onGenerateRows:St,onShowJson:Ee,onShowTable:Fe,onToggleMask:dn,total:ze,viewMode:ke}),m!==void 0&&c($r,{onApply:m.onApplyQuery,onCopyLink:m.onCopyLink,onDelete:m.onDeleteQuery,onSave:bn,saved:m.saved}),ke==="table"&&I.rows.length>0&&c(In,{backRelations:je,columns:I.columns,editable:r,enabledBackRelations:We,name:V??"export",onBulkDelete:be,onToggleBackRelation:mt,onToggleTranspose:X,rows:I.rows,table:de.table,transposed:S}),r&&M!==null&&c(pl,{documentText:M.docText,onCancel:C,onDocumentTextChange:Pe,onSave:Ce,refs:I.refs}),r&&De.length>0&&c(Zn,{changes:De,committing:E,onCommit:fe,onDiscard:P}),Ve!==null&&c("p",{className:"text-sm text-destructive","data-testid":"db-write-error",role:"alert",children:Ve})]}),ke==="table"&&I.rows.length===0&&c("div",{className:"flex flex-1 items-center justify-center p-6",children:c(xn,{description:"Rows you insert into this table will show up here.",icon:c("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:c("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"})}),testId:"db-empty-rows",title:"This table is empty."})}),ke==="table"&&I.rows.length>0&&S&&c(Tn,{columns:I.columns,rows:Wt(I.rows,$t)}),ke==="table"&&I.rows.length>0&&!S&&c(yr,{attachScroll:de.attachScroll,backRelationCounts:ut,edit:fn,editable:r,highlight:A,mask:$t,onDelete:W,onEdit:pe,onInspect:et,onTogglePin:ft,pinnedColumns:Ue,refs:hn,scrollLeft:de.scrollLeft,scrollToIndex:de.scrollToIndex,table:de.table,tableRows:de.tableRows,tbodyStyle:de.tbodyStyle,viewportWidth:de.viewportWidth,virtualRows:de.virtualRows}),ke==="json"&&c("pre",{className:"min-h-0 flex-1 overflow-auto border-t border-border bg-muted/30 p-3 text-xs","data-testid":"db-json",children:JSON.stringify(Wt(I.rows,$t),null,2)}),c("div",{className:"flex shrink-0 items-center border-t border-border px-4 py-2",children:c(Pn,{hasNext:G,hasPrevious:Q,onJumpToPage:me,onNext:O,onPageSizeChange:_,onPrevious:L,pageSize:ie,prefix:"db",rangeEnd:H,rangeStart:Se,total:ze})})]})]}),I!==null&&c(Dn,{columns:N,facets:j,onFacetFilter:J,onToggleFacet:Ke}),Ye!==null&&I!==null&&c(al,{columns:I.columns,onClose:kt,onNavigate:Jt,refs:I.refs,row:Ye}),_t!==null&&c(On,{column:_t.column,onClose:mn,value:_t.value}),wt&&V!==null&&Xe!==void 0&&c(Mr,{columns:Xe,fkPools:vt,onClose:Ze,onInsertRows:Ct,table:V})]})};export{eo as DataBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as K}from"react/compiler-runtime";import{useState as z}from"react";import{jsx as u,jsxs as A,Fragment as B}from"react/jsx-runtime";const M=[{label:"=",value:"eq"},{label:"≠",value:"ne"},{label:"<",value:"lt"},{label:"≤",value:"lte"},{label:">",value:"gt"},{label:"≥",value:"gte"},{label:"contains",value:"contains"}],O=r=>{const e=r.trim(),n=Number(e);return e!==""&&Number.isFinite(n)&&String(n)===e?n:r},I=r=>r.filter(e=>e.column!=="").map(e=>({column:e.column,operator:e.operator,value:e.operator==="contains"?e.value:O(e.value)})),J=r=>{const e=K(44),{columns:n,filters:a,onAskAi:f,onFiltersChange:l,onSearchChange:D,search:j}=r,[c,E]=z("");let F;e[0]!==n[0]||e[1]!==a||e[2]!==l?(F=()=>{l([...a,{column:n[0]??"",operator:"eq",value:""}])},e[0]=n[0],e[1]=a,e[2]=l,e[3]=F):F=e[3];const q=F;let T;e[4]!==a||e[5]!==l?(T=t=>{const o=Number(t.currentTarget.dataset.index);l(a.filter((i,d)=>d!==o))},e[4]=a,e[5]=l,e[6]=T):T=e[6];const h=T;let k;e[7]!==a||e[8]!==l?(k=t=>{const o=Number(t.currentTarget.dataset.index),i=t.currentTarget.value;l(a.map((d,N)=>N===o?{...d,column:i}:d))},e[7]=a,e[8]=l,e[9]=k):k=e[9];const g=k;let w;e[10]!==a||e[11]!==l?(w=t=>{const o=Number(t.currentTarget.dataset.index),i=t.currentTarget.value;l(a.map((d,N)=>N===o?{...d,operator:i}:d))},e[10]=a,e[11]=l,e[12]=w):w=e[12];const x=w;let y;e[13]!==a||e[14]!==l?(y=t=>{const o=Number(t.currentTarget.dataset.index),i=t.currentTarget.value;l(a.map((d,N)=>N===o?{...d,value:i}:d))},e[13]=a,e[14]=l,e[15]=y):y=e[15];const C=y;let s;e[16]!==D||e[17]!==j?(s=u("input",{"aria-label":"Search rows","data-testid":"db-filter",onChange:D,placeholder:"search table…",value:j}),e[16]=D,e[17]=j,e[18]=s):s=e[18];let m;e[19]!==q?(m=u("button",{"data-testid":"db-add-filter",onClick:q,type:"button",children:"Add filter"}),e[19]=q,e[20]=m):m=e[20];let b;e[21]!==c||e[22]!==f?(b=f!==void 0&&A(B,{children:[u("input",{"aria-label":"Describe a filter","data-testid":"db-ai-prompt",onChange:t=>{E(t.target.value)},onKeyDown:t=>{t.key==="Enter"&&c.trim()!==""&&(t.preventDefault(),f(c.trim()))},placeholder:"describe a filter…",value:c}),u("button",{"data-testid":"db-ai-filter",disabled:c.trim()==="",onClick:()=>{f(c.trim())},type:"button",children:"Suggest"})]}),e[21]=c,e[22]=f,e[23]=b):b=e[23];let p;e[24]!==s||e[25]!==m||e[26]!==b?(p=A("div",{className:"flex flex-wrap items-center gap-1.5",children:[s,m,b]}),e[24]=s,e[25]=m,e[26]=b,e[27]=p):p=e[27];let v;if(e[28]!==g||e[29]!==x||e[30]!==C||e[31]!==n||e[32]!==a||e[33]!==h){let t;e[35]!==g||e[36]!==x||e[37]!==C||e[38]!==n||e[39]!==h?(t=(o,i)=>A("div",{className:"flex flex-wrap items-center gap-1.5","data-testid":"db-filter-row",children:[u("select",{"aria-label":"Filter column","data-index":i,"data-testid":"db-filter-column",onChange:g,value:o.column,children:n.map(R)}),u("select",{"aria-label":"Filter operator","data-index":i,"data-testid":"db-filter-operator",onChange:x,value:o.operator,children:M.map(V)}),u("input",{"aria-label":"Filter value","data-index":i,"data-testid":"db-filter-value",onChange:C,placeholder:"value",value:o.value}),u("button",{"aria-label":"Remove filter","data-index":i,"data-testid":"db-filter-remove",onClick:h,type:"button",children:"✕"})]},i),e[35]=g,e[36]=x,e[37]=C,e[38]=n,e[39]=h,e[40]=t):t=e[40],v=a.map(t),e[28]=g,e[29]=x,e[30]=C,e[31]=n,e[32]=a,e[33]=h,e[34]=v}else v=e[34];let S;return e[41]!==v||e[42]!==p?(S=A("div",{className:"flex flex-col gap-1.5","data-testid":"db-filters",children:[p,v]}),e[41]=v,e[42]=p,e[43]=S):S=e[43],S};function R(r){return u("option",{value:r,children:r},r)}function V(r){return u("option",{value:r.value,children:r.label},r.value)}export{J as DataFilters,I as toFilterClauses};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLunora as le}from"@lunora/react";import{useState as g,useRef as j,useEffect as E}from"react";import{E as ae}from"./empty-state-Cg7t_8qu.js";import{n as ne,d as oe,m as L,p as se,f as ie,u as de}from"./table-DdJBrClo.js";import{O as D}from"./use-admin-query-QJ-ibl5u.js";import{useAutoRefresh as ce}from"./DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js";import{i as ue,u as me,_ as fe,a as be,$ as pe}from"./table-list-sidebar-BFkSQwlB.js";import{useT as he}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{C as ge}from"./cf-links-gbDy51nR.js";import{k as xe,g as ve}from"./data-grid-DcxyIXwG.js";import{jsxs as i,jsx as r}from"react/jsx-runtime";const Ne=50,we=[],ye=[],ke=(t,x)=>{const u=t._id;return typeof u=="string"||typeof u=="number"?String(u):`row-${x.toString()}`},G=t=>t==null?"∅":t===""?"(empty)":typeof t=="object"?JSON.stringify(t):String(t),De=({initialTable:t,onSelectTable:x,pageSize:u=Ne,schemaSwitch:M}={})=>{const v=le(),m=he(),[a,O]=g(t??null),[o,p]=g(0),[d,z]=g(u),[f,$]=g([]),c=ue(f),{clearFacets:J,facets:A,refetchFacets:B,toggleFacet:U}=me(),h=D(["lunora-global-tables"],()=>v.listGlobalTables()),b=h.data??null,T=h.error,N=D(["lunora-global-page",a??"",o,d,JSON.stringify(f)],()=>v.readGlobalTablePage({filters:f,limit:d,offset:o,table:a??""}),{enabled:a!==null,keepPreviousData:!1}),l=N.data??null,w=N.error,F=(e,n)=>s=>v.facetGlobalColumn({column:s,filters:n,table:e}),C=(e,n)=>{B(F(e,n))};ce(()=>{h.refetch(),a!==null&&(N.refetch(),C(a,c.current))},!0);const y=j(void 0),k=e=>{O(e),y.current=e,$([]),c.current=[],J(),p(0),x?.(e)},q=e=>{U(e,a===null?null:F(a,c.current))},P=e=>{$(e),c.current=e,p(0),a!==null&&C(a,e)},I=(e,n)=>{P([...c.current.filter(s=>s.column!==e),{column:e,value:n}])},W=e=>{const n=Number(e.currentTarget.dataset.index);P(c.current.filter((s,te)=>te!==n))},R=j(k);E(()=>{R.current=k}),E(()=>{if(t===void 0||t===""||y.current===t)return;y.current=t;const e=t;queueMicrotask(()=>{R.current(e)})},[t]);const S=e=>{a!==null&&p(Math.max(0,e))},_=l?.total??0,Z=o>0,H=l!==null&&o+l.rows.length<_,K=l===null||l.rows.length===0?0:o+1,Q=l===null?0:o+l.rows.length,V=()=>{h.refetch()},X=()=>{S(o-d)},Y=()=>{S(o+d)},ee=e=>{S(Math.max(0,(e-1)*d))},re=e=>{z(e),p(0)};return i("div",{className:"flex h-full min-w-0","data-testid":"lunora-global-data-browser",children:[r(fe,{header:i("div",{className:"flex shrink-0 flex-col items-stretch gap-2 border-b border-border p-3",children:[M,r("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"gdb-cf-link",href:ge,rel:"noreferrer",target:"_blank",children:m("Open in Cloudflare")})]}),onReload:V,onSelect:k,prefix:"gdb",selected:a,tables:b??we}),i("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[T!==null&&r("p",{className:"shrink-0 border-b border-border px-4 py-2 text-sm text-destructive","data-testid":"gdb-tables-error",role:"alert",children:T}),b!==null&&b.length===0&&r("div",{className:"flex flex-1 items-center justify-center p-6",children:r(ae,{description:m("Tables marked .global() (D1-backed, region-replicated) will appear here."),icon:i("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M3 12h18M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18Z"})]}),testId:"gdb-empty",title:m("No global tables.")})}),w!==null&&r("p",{className:"shrink-0 border-b border-border px-4 py-2 text-sm text-destructive","data-testid":"gdb-page-error",role:"alert",children:w}),b!==null&&b.length>0&&l===null&&w===null&&r("div",{className:"flex flex-1 items-center justify-center p-6",children:r("p",{className:"text-sm text-muted-foreground",children:m("Select a table to browse its rows.")})}),l!==null&&i("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"gdb-page",children:[f.length>0&&r("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5 border-b border-border px-4 py-2 text-xs","data-testid":"gdb-filters",children:f.map((e,n)=>i("span",{className:"inline-flex items-center gap-1 rounded border border-border bg-muted px-1.5 py-0.5","data-testid":"gdb-filter-chip",children:[r("span",{className:"font-medium text-foreground",children:e.column}),r("span",{className:"text-muted-foreground",children:"="}),r("span",{className:"font-mono text-foreground",children:G(e.value)}),r("button",{"aria-label":m("Remove filter"),className:"ml-0.5 text-muted-foreground hover:text-foreground","data-index":n,"data-testid":"gdb-filter-remove",onClick:W,type:"button",children:"✕"})]},`${e.column}:${G(e.value)}`))}),r(xe,{layout:"fill",children:r("div",{className:"min-h-0 flex-1 overflow-auto",children:i(ne,{"data-testid":"gdb-rows",children:[r(oe,{children:r(L,{children:l.columns.map(e=>r(se,{children:e},e))})}),r(ie,{children:l.rows.map((e,n)=>r(L,{"data-testid":"gdb-row",children:l.columns.map(s=>r(de,{className:"max-w-xs truncate font-mono text-xs",children:r(ve,{value:e[s]})},s))},ke(e,n)))})]})})}),r("div",{className:"flex shrink-0 items-center border-t border-border px-4 py-2",children:r(be,{hasNext:H,hasPrevious:Z,onJumpToPage:ee,onNext:Y,onPageSizeChange:re,onPrevious:X,pageSize:d,prefix:"gdb",rangeEnd:Q,rangeStart:K,total:_})})]})]}),r(pe,{columns:l?.columns??ye,facets:A,onFacetFilter:I,onToggleFacet:q})]})};export{De as GlobalDataBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"react/compiler-runtime";import"@tanstack/react-router";import"react";import"./badge-BbuuAio7.js";import"./card-CIDGUN6K.js";import"./empty-state-Cg7t_8qu.js";import"./use-admin-query-QJ-ibl5u.js";import"./DEFAULT_LOCALE-BZ4NojpD.js";import"./ADMIN_FUNCTIONS-BnD4aovm.js";import"./internal-BSIsQVC6.js";import"./utils-bhneXptQ.js";import"./DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js";import{H as b}from"./home-panel-CU6MWLHG.js";import"react/jsx-runtime";export{b as HomePanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $e}from"react/compiler-runtime";import{useLunora as ke}from"@lunora/react";import{useState as u,useEffect as Re}from"react";import{ConfirmButton as Ce}from"./ConfirmButton-CTL3f3kr.js";import{E as _e}from"./error-alert-t6cpEi0z.js";import{L as Ee}from"./live-status-CmuRLFKf.js";import{ShardInput as Le}from"./ShardInput-BVn2iCU0.js";import{g as Me}from"./badge-BbuuAio7.js";import{u as Ie}from"./button-BkCrNcAs.js";import{c as De,u as Ae}from"./card-CIDGUN6K.js";import{E as je}from"./empty-state-Cg7t_8qu.js";import{u as Fe}from"./input-JHu63lTv.js";import{p as ue}from"./label-6uP1obNF.js";import{n as Te,d as Be,m as he,p as h,f as Ke,u as p}from"./table-DdJBrClo.js";import{N as Oe}from"./use-admin-query-QJ-ibl5u.js";import qe from"./useDebounced-Ihdiid_k.js";import{useT as ze}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as pe}from"./ADMIN_FUNCTIONS-BnD4aovm.js";import{i as Je,f as Pe,d as Ue,b as Ve,g as We}from"./internal-BSIsQVC6.js";import{r as Ge}from"./shard-history-DMEW5VBE.js";import{jsx as t,jsxs as o}from"react/jsx-runtime";const He=We(pe.runMigration),vr=a=>{const e=$e(99),{initialShardKey:ge}=a,ie=ke(),r=ze(),[i,fe]=u(ge??""),[g,be]=u(""),[f,ve]=u("up"),[l,xe]=u(!0),[b,ce]=u(!1),[c,ae]=u(null),[J,ne]=u(null);let P;e[0]!==i?(P=i.trim(),e[0]=i,e[1]=P):P=e[1];const s=qe(P,400);let U;e[2]!==i?(U=i.trim(),e[2]=i,e[3]=U):U=e[3];const V=U===s;let W;e[4]===Symbol.for("react.memo_cache_sentinel")?(W={},e[4]=W):W=e[4];let G;e[5]!==s?(G={live:!0,shardKey:s},e[5]=s,e[6]=G):G=e[6];const n=Oe(pe.migrationStatus,W,G),d=n.data?.migrations??null,oe=n.error,{errorSource:le,liveError:de}=n;let H,Q;e[7]!==s||e[8]!==n.data?(H=()=>{n.data!==void 0&&Ge(s)},Q=[n.data,s],e[7]=s,e[8]=n.data,e[9]=H,e[10]=Q):(H=e[9],Q=e[10]),Re(H,Q);let X;if(e[11]!==ie||e[12]!==f||e[13]!==l||e[14]!==g||e[15]!==i||e[16]!==n||e[17]!==r){const m=async()=>{const me=g.trim();if(me===""){ne(r("Enter a migration id")),ae(null);return}ce(!0),ne(null);try{const se=await ie.query(He,{direction:f,dryRun:l,id:me},Ue(i));ae(se),n.refetch()}catch(se){const Se=se;ae(null),ne(Ve(Se))}ce(!1)};X=()=>{Pe(m())},e[11]=ie,e[12]=f,e[13]=l,e[14]=g,e[15]=i,e[16]=n,e[17]=r,e[18]=X}else X=e[18];const Y=X;let Z;e[19]===Symbol.for("react.memo_cache_sentinel")?(Z=m=>{be(m.target.value)},e[19]=Z):Z=e[19];const ye=Z;let ee;e[20]===Symbol.for("react.memo_cache_sentinel")?(ee=m=>{ve(m.target.value==="down"?"down":"up")},e[20]=ee):ee=e[20];const Ne=ee;let re;e[21]===Symbol.for("react.memo_cache_sentinel")?(re=m=>{xe(m.target.checked)},e[21]=re):re=e[21];const we=re;let v;e[22]!==i?(v=t(Le,{onChange:fe,testId:"mg-shard-input",value:i}),e[22]=i,e[23]=v):v=e[23];let x;e[24]!==de?(x=t(Ee,{message:de,prefix:"mg"}),e[24]=de,e[25]=x):x=e[25];let y;e[26]!==v||e[27]!==x?(y=o("div",{className:"flex flex-wrap items-center gap-2",children:[v,x]}),e[26]=v,e[27]=x,e[28]=y):y=e[28];let N;e[29]!==oe||e[30]!==le?(N=oe!==null&&t(_e,{error:le,testId:"mg-status-error"}),e[29]=oe,e[30]=le,e[31]=N):N=e[31];let w;e[32]!==d||e[33]!==r?(w=d!==null&&d.length===0&&t(je,{description:r("Data migrations you run against this shard will be tracked here."),icon:t("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:t("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"})}),testId:"mg-empty",title:r("No migrations have run on this shard.")}),e[32]=d,e[33]=r,e[34]=w):w=e[34];let S;e[35]!==d||e[36]!==r?(S=d!==null&&d.length>0&&t(De,{className:"overflow-hidden py-0",children:t(Ae,{className:"px-0",children:o(Te,{"data-testid":"mg-table",children:[t(Be,{children:o(he,{children:[t(h,{children:r("id")}),t(h,{children:r("direction")}),t(h,{children:r("status")}),t(h,{children:r("processed")}),t(h,{children:r("changed")}),t(h,{children:r("updated")}),t(h,{children:r("error")})]})}),t(Ke,{children:d.map(Qe)})]})})}),e[35]=d,e[36]=r,e[37]=S):S=e[37];let $;e[38]!==r?($=r("Run migration"),e[38]=r,e[39]=$):$=e[39];let k;e[40]!==$?(k=t(ue,{children:$}),e[40]=$,e[41]=k):k=e[41];let R;e[42]!==r?(R=r("Migration id"),e[42]=r,e[43]=R):R=e[43];let C;e[44]!==r?(C=r("migration id"),e[44]=r,e[45]=C):C=e[45];let _;e[46]!==g||e[47]!==R||e[48]!==C?(_=t(Fe,{"aria-label":R,className:"w-auto","data-testid":"mg-id-input",onChange:ye,placeholder:C,value:g}),e[46]=g,e[47]=R,e[48]=C,e[49]=_):_=e[49];let E;e[50]!==r?(E=r("Direction"),e[50]=r,e[51]=E):E=e[51];let L;e[52]!==r?(L=r("up"),e[52]=r,e[53]=L):L=e[53];let M;e[54]!==L?(M=t("option",{value:"up",children:L}),e[54]=L,e[55]=M):M=e[55];let I;e[56]!==r?(I=r("down"),e[56]=r,e[57]=I):I=e[57];let D;e[58]!==I?(D=t("option",{value:"down",children:I}),e[58]=I,e[59]=D):D=e[59];let A;e[60]!==f||e[61]!==E||e[62]!==M||e[63]!==D?(A=o("select",{"aria-label":E,className:"flex h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 dark:bg-input/30","data-testid":"mg-direction",onChange:Ne,value:f,children:[M,D]}),e[60]=f,e[61]=E,e[62]=M,e[63]=D,e[64]=A):A=e[64];let j;e[65]!==l?(j=t("input",{checked:l,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:we,type:"checkbox"}),e[65]=l,e[66]=j):j=e[66];let F;e[67]!==r?(F=r("Dry run"),e[67]=r,e[68]=F):F=e[68];let T;e[69]!==j||e[70]!==F?(T=o(ue,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[j,F]}),e[69]=j,e[70]=F,e[71]=T):T=e[71];let B;e[72]!==l||e[73]!==Y||e[74]!==b||e[75]!==V||e[76]!==r?(B=l?t(Ie,{"data-testid":"mg-run",disabled:b||!V,onClick:Y,type:"button",children:r(b?"Running…":"Run")}):t(Ce,{confirmLabel:r(b?"Running…":"Run migration?"),disabled:b||!V,onConfirm:Y,testId:"mg-run",children:r("Run")}),e[72]=l,e[73]=Y,e[74]=b,e[75]=V,e[76]=r,e[77]=B):B=e[77];let K;e[78]!==_||e[79]!==A||e[80]!==T||e[81]!==B?(K=o("div",{className:"flex flex-wrap items-center gap-2",children:[_,A,T,B]}),e[78]=_,e[79]=A,e[80]=T,e[81]=B,e[82]=K):K=e[82];let O;e[83]!==k||e[84]!==K?(O=o("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[k,K]}),e[83]=k,e[84]=K,e[85]=O):O=e[85];let q;e[86]!==J?(q=J!==null&&t("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:J}),e[86]=J,e[87]=q):q=e[87];let z;e[88]!==c||e[89]!==r?(z=c!==null&&o("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[c.dryRun?r("Dry run: "):"",r("{status} — processed",{status:c.status}),c.processed,r(", changed"),c.changed]}),e[88]=c,e[89]=r,e[90]=z):z=e[90];let te;return e[91]!==y||e[92]!==N||e[93]!==w||e[94]!==S||e[95]!==O||e[96]!==q||e[97]!==z?(te=o("div",{className:"flex flex-col gap-3 pt-4","data-testid":"lunora-migrations",children:[y,N,w,S,O,q,z]}),e[91]=y,e[92]=N,e[93]=w,e[94]=S,e[95]=O,e[96]=q,e[97]=z,e[98]=te):te=e[98],te};function Qe(a){return o(he,{"data-testid":`mg-row-${a.id}`,children:[t(p,{children:a.id}),t(p,{children:a.direction}),t(p,{children:t(Me,{variant:"secondary",children:a.status})}),t(p,{children:a.processed}),t(p,{children:a.changed}),t(p,{children:Je(a.updatedAt)}),t(p,{children:a.error??""})]},a.id)}export{vr as MigrationsPanel};
|
package/dist/packem_shared/{OpenRpcReferencePanel-sGsIgYWj.js → OpenRpcReferencePanel-qOZcWXMs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g}from"react/compiler-runtime";import{useLunora as y}from"@lunora/react";import{E as f}from"./empty-state-Cg7t_8qu.js";import{n as h}from"./skeleton-C1wQ9M5t.js";import{u as k,U as x}from"./reference-view-
|
|
1
|
+
import{c as g}from"react/compiler-runtime";import{useLunora as y}from"@lunora/react";import{E as f}from"./empty-state-Cg7t_8qu.js";import{n as h}from"./skeleton-C1wQ9M5t.js";import{u as k,U as x}from"./reference-view-DnYYWr7I.js";import{useT as P}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{jsxs as S,jsx as p}from"react/jsx-runtime";const v=t=>(t.params??[]).find(e=>e.name==="args")??(t.params??[])[0],w=t=>t["x-tags"]?.[0]?.name??(t.name.includes(":")?t.name.slice(0,t.name.indexOf(":")):""),I=t=>{const e=v(t)?.schema;return{argsSchema:e,description:t.description,functionPath:t.name,httpPath:"/_lunora/rpc",key:t.name,kind:t["x-lunora-function-kind"],method:"POST",operationId:t.name,requestSchema:e,responses:[{description:t.result?.name,schema:t.result?.schema,status:"200"}],summary:t.summary??t.name,tags:[w(t)],title:t.summary??t.name}},C=t=>{const e=t??{},d=(e.methods??[]).map(a=>I(a)),o=new Map;for(const a of d){const m=a.tags[0]??"",r=o.get(m)??[];r.push(a),o.set(m,r)}return{groups:[...o.entries()].map(([a,m])=>({name:a,operations:m.toSorted((r,c)=>r.operationId.localeCompare(c.operationId))})).toSorted((a,m)=>a.name.localeCompare(m.name)),operationByKey:new Map(d.map(a=>[a.key,a])),title:e.info?.title??"API reference",version:e.info?.version}},O=t=>t.methods===void 0||t.methods.length===0,R=t=>{const e=t;return O(e)?{kind:"empty"}:{kind:"ready",spec:e}},T=t=>{const e=g(23),{spec:d}=t,o=P(),a=y();let m;e[0]!==a?(m=()=>a.fetchOpenRpc(),e[0]=a,e[1]=m):m=e[1];const r=k(d,m,R);let c;e[2]!==r.kind||e[3]!==r.spec?(c=r.kind==="ready"?C(r.spec):void 0,e[2]=r.kind,e[3]=r.spec,e[4]=c):c=e[4];const l=c;if(r.kind==="loading"){let n;return e[5]===Symbol.for("react.memo_cache_sentinel")?(n=S("div",{className:"flex flex-col gap-4","data-testid":"openrpc-reference-loading",children:[p(h,{className:"h-8 w-48"}),p(h,{className:"h-64 w-full"})]}),e[5]=n):n=e[5],n}if(r.kind==="error"){let n;e[6]!==r.message||e[7]!==o?(n=o("Couldn't load the OpenRPC spec: {message}",{message:r.message}),e[6]=r.message,e[7]=o,e[8]=n):n=e[8];let s;e[9]!==o?(s=o("API reference unavailable"),e[9]=o,e[10]=s):s=e[10];let i;return e[11]!==n||e[12]!==s?(i=p(f,{description:n,testId:"openrpc-reference-error",title:s}),e[11]=n,e[12]=s,e[13]=i):i=e[13],i}if(r.kind==="empty"||l===void 0){let n;e[14]!==o?(n=o("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here."),e[14]=o,e[15]=n):n=e[15];let s;e[16]!==o?(s=o("No OpenRPC spec configured"),e[16]=o,e[17]=s):s=e[17];let i;return e[18]!==n||e[19]!==s?(i=p(f,{description:n,testId:"openrpc-reference-empty",title:s}),e[18]=n,e[19]=s,e[20]=i):i=e[20],i}let u;return e[21]!==l?(u=p(x,{model:l}),e[21]=l,e[22]=u):u=e[22],u};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I}from"react/compiler-runtime";import{useLunora as M}from"@lunora/react";import{useState as J,useEffect as R}from"react";import{ConfirmButton as T}from"./ConfirmButton-CTL3f3kr.js";import{c as q,u as K}from"./card-CIDGUN6K.js";import{E as O}from"./empty-state-Cg7t_8qu.js";import{n as P,d as V,m as $,p as s,f as W,u as d}from"./table-DdJBrClo.js";import{O as X}from"./use-admin-query-QJ-ibl5u.js";import{useAutoRefresh as Y}from"./DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js";import{useT as z}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{f as D,i as G,b as H}from"./internal-BSIsQVC6.js";import{jsx as o,jsxs as p}from"react/jsx-runtime";const Q=i=>Number.isFinite(i)?G(i,"—"):"—",A=i=>i.toSorted((e,u)=>e.scheduledFor-u.scheduledFor),U=(i,e,u)=>e!==void 0?e:u===void 0?f=>i.cancelScheduledJob(f):void 0,me=i=>{const e=I(16),{cancelJob:u,loadJobs:f}=i===void 0?{}:i,l=M(),t=z(),c=f===void 0;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=["lunora-scheduled-jobs"],e[0]=b):b=e[0];const a=X(b,async()=>{const r=await(f??(()=>l.listScheduledJobs()))();return A(r)}),[C,F]=J(void 0),[L,S]=J(void 0);let v,x;e[1]!==l||e[2]!==c?(v=()=>{if(c)return l.subscribeScheduledJobs(r=>{S(void 0),F(A(r))})},x=[c,l],e[1]=l,e[2]=c,e[3]=v,e[4]=x):(v=e[3],x=e[4]),R(v,x);let j;e[5]!==a?(j=()=>{a.refetch()},e[5]=a,e[6]=j):j=e[6],Y(j,!c);const N=U(l,u,f),n=C??a.data,g=L??a.error,k=async r=>{if(N!==void 0){S(void 0);try{await N(r),c||a.refetch()}catch(B){S(H(B))}}},E="flex flex-col gap-3",_="lunora-scheduled-jobs";let m;e[7]!==g?(m=g!==null&&o("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:g}),e[7]=g,e[8]=m):m=e[8];let h;e[9]!==n?.length||e[10]!==t?(h=n?.length===0&&o(O,{description:t("Jobs queued with runAfter / runAt will appear here."),icon:p("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[o("circle",{cx:"12",cy:"12",r:"9"}),o("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:t("No scheduled jobs.")}),e[9]=n?.length,e[10]=t,e[11]=h):h=e[11];const w=n!==void 0&&n.length>0&&o(q,{className:"overflow-hidden py-0",children:o(K,{className:"px-0",children:p(P,{"data-testid":"sj-table",children:[o(V,{children:p($,{children:[o(s,{children:t("function")}),o(s,{children:t("scheduled for")}),o(s,{children:t("pool")}),o(s,{children:t("attempts")}),o(s,{children:t("shard")}),o(s,{children:t("id")}),N!==void 0&&o(s,{"aria-label":t("Actions")})]})}),o(W,{children:n.map(r=>p($,{"data-testid":`sj-row-${r.id}`,children:[o(d,{className:"font-mono text-xs",children:r.functionPath}),o(d,{className:"text-muted-foreground tabular-nums",children:Q(r.scheduledFor)}),o(d,{className:"font-mono text-xs",children:r.pool??""}),o(d,{className:"tabular-nums",children:r.attempts??0}),o(d,{children:r.shardKey??""}),o(d,{className:"font-mono text-xs",children:r.id}),N!==void 0&&o(d,{className:"text-right",children:o(T,{confirmLabel:t("Cancel job?"),onConfirm:()=>{D(k(r.id))},testId:`sj-cancel-${r.id}`,children:t("Cancel")})})]},r.id))})]})})});let y;return e[12]!==w||e[13]!==m||e[14]!==h?(y=p("div",{className:E,"data-testid":_,children:[m,h,w]}),e[12]=w,e[13]=m,e[14]=h,e[15]=y):y=e[15],y};export{me as ScheduledJobs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"react/compiler-runtime";import"@tanstack/react-router";import"react";import{S as j}from"./studio-q-C-acL7.js";import"./ErrorBoundary-DvzYskH7.js";import"./operation-console-provider-BMJNtiyB.js";import"./badge-BbuuAio7.js";import"./input-JHu63lTv.js";import"./skeleton-C1wQ9M5t.js";import"./home-panel-CU6MWLHG.js";import"./DEFAULT_LOCALE-BZ4NojpD.js";import"./StudioI18nProvider-CZ5h4nrV.js";import"./data-view-params-ClrV7XgF.js";import"./internal-BSIsQVC6.js";import"./utils-bhneXptQ.js";import"./CommandPalette--SQwfTW1.js";import"react/jsx-runtime";export{j as Studio};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E}from"react/compiler-runtime";import{LunoraClient as z}from"@lunora/client";import{LunoraProvider as q}from"@lunora/react";import{useState as K,useEffect as U}from"react";import{ErrorBoundary as G}from"./ErrorBoundary-DvzYskH7.js";import{b as D,f as H,a as J,m as Q,S as V}from"./studio-q-C-acL7.js";import X from"./useDebounced-Ihdiid_k.js";import{useT as M,createStudioI18n as Y}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{StudioI18nProvider as R}from"./StudioI18nProvider-CZ5h4nrV.js";import{r as Z}from"./internal-BSIsQVC6.js";import{h as j}from"./recording-client-DRAZEmzE.js";import F from"./STUDIO_ROOT_CLASS-C6MccdVk.js";import{a as B}from"./browser-storage-xjTyMKY0.js";import{c as W}from"./utils-bhneXptQ.js";import{u as ee}from"./button-BkCrNcAs.js";import{u as te}from"./input-JHu63lTv.js";import{jsx as b,jsxs as C}from"react/jsx-runtime";const O="lunora-studio-admin-token",oe=()=>{try{return B("session")?.getItem(O)??""}catch{return""}},ne=k=>{const e=B("session");if(e!==void 0)try{k===""?e.removeItem(O):e.setItem(O,k)}catch{}},re="/_lunora/admin/ws-token",le=k=>{const e=k;return typeof e?.token=="string"&&e.token.length>0&&typeof e.expiresAtMs=="number"},ae=k=>{const{adminToken:e,baseUrl:c}=k,o=k.fetchImpl??fetch;let n=c;for(;n.endsWith("/");)n=n.slice(0,-1);const s=`${n}${re}`;let t,r=!1,l;const m=async()=>{const f=await o(s,{headers:{authorization:`Bearer ${e}`},method:"POST"});if(f.status===404||f.status===405)return r=!0,e;if(!f.ok)throw new Error(`ws-token mint failed: ${String(f.status)}`);const a=await f.json().catch(()=>{});if(!le(a))throw new Error("ws-token mint failed: malformed response body");return t=a,a.token};return{getToken:async()=>r?e:t!==void 0&&t.expiresAtMs-1e4>Date.now()?t.token:(l??=m().finally(()=>{l=void 0}),l),invalidate:()=>{t=void 0}}},se=k=>{const e=E(42),{onSubmit:c}=k,o=M(),[n,s]=K("");let t;e[0]!==n?(t=n.trim(),e[0]=n,e[1]=t):t=e[1];const r=t;let l;e[2]!==c||e[3]!==r?(l=$=>{$.preventDefault(),r!==""&&c(r)},e[2]=c,e[3]=r,e[4]=l):l=e[4];const m=l;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=b("div",{className:"h-10 w-10 text-foreground",children:b(H,{})}),e[5]=f):f=e[5];let a;e[6]!==o?(a=o("Connect to Lunora Studio"),e[6]=o,e[7]=a):a=e[7];let v;e[8]!==a?(v=b("h1",{className:"text-base font-semibold text-foreground",children:a}),e[8]=a,e[9]=v):v=e[9];let g;e[10]!==o?(g=o("Enter your admin token to access the studio."),e[10]=o,e[11]=g):g=e[11];let u;e[12]!==g?(u=b("p",{className:"text-[13px] text-muted-foreground",children:g}),e[12]=g,e[13]=u):u=e[13];let d;e[14]!==v||e[15]!==u?(d=C("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,C("div",{className:"flex flex-col gap-1",children:[v,u]})]}),e[14]=v,e[15]=u,e[16]=d):d=e[16];let h;e[17]!==o?(h=o("admin token"),e[17]=o,e[18]=h):h=e[18];let i;e[19]!==h?(i=b("label",{className:"text-xs font-medium text-foreground",htmlFor:"lunora-studio-login-token",children:h}),e[19]=h,e[20]=i):i=e[20];let p;e[21]===Symbol.for("react.memo_cache_sentinel")?(p=$=>{s($.target.value)},e[21]=p):p=e[21];let x;e[22]!==n?(x=b(te,{autoComplete:"off",autoFocus:!0,"data-testid":"lunora-studio-login-token",id:"lunora-studio-login-token",onChange:p,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:n}),e[22]=n,e[23]=x):x=e[23];let y;e[24]!==o?(y=o("From your worker's LUNORA_ADMIN_TOKEN — your project's .dev.vars in dev, or a deployment secret in production."),e[24]=o,e[25]=y):y=e[25];let I;e[26]!==y?(I=b("p",{className:"text-[11px] text-muted-foreground",children:y}),e[26]=y,e[27]=I):I=e[27];let S;e[28]!==i||e[29]!==x||e[30]!==I?(S=C("div",{className:"flex flex-col gap-1.5",children:[i,x,I]}),e[28]=i,e[29]=x,e[30]=I,e[31]=S):S=e[31];const _=r==="";let T;e[32]!==o?(T=o("Connect"),e[32]=o,e[33]=T):T=e[33];let w;e[34]!==_||e[35]!==T?(w=b(ee,{"data-testid":"lunora-studio-login-submit",disabled:_,type:"submit",children:T}),e[34]=_,e[35]=T,e[36]=w):w=e[36];let N;return e[37]!==m||e[38]!==S||e[39]!==w||e[40]!==d?(N=C("form",{className:"flex w-full max-w-sm flex-col gap-5 rounded-xl border border-border bg-card p-7 shadow-lg","data-testid":"lunora-studio-login",onSubmit:m,children:[d,S,w]}),e[37]=m,e[38]=S,e[39]=w,e[40]=d,e[41]=N):N=e[41],N},ie=k=>{const e=E(10),{i18n:c,onSubmit:o}=k,{resolvedTheme:n}=D(),s=n==="dark"&&"dark";let t;e[0]!==s?(t=W(F,s,"flex h-dvh items-center justify-center bg-sidebar p-6 text-sm text-foreground"),e[0]=s,e[1]=t):t=e[1];let r;e[2]!==o?(r=b(se,{onSubmit:o}),e[2]=o,e[3]=r):r=e[3];let l;e[4]!==c||e[5]!==r?(l=b(R,{i18n:c,children:r}),e[4]=c,e[5]=r,e[6]=l):l=e[6];let m;return e[7]!==t||e[8]!==l?(m=b("div",{className:t,"data-testid":"lunora-studio-login-root",children:l}),e[7]=t,e[8]=l,e[9]=m):m=e[9],m},de=k=>{const e=E(23),{basePath:c,chrome:o,studio:n}=k,s=M();let t;e[0]!==s?(t=s("Studio failed"),e[0]=s,e[1]=t):t=e[1];let r;e[2]!==s?(r=s("Studio"),e[2]=s,e[3]=r):r=e[3];let l;e[4]!==s?(l=s("Try again"),e[4]=s,e[5]=l):l=e[5];const m=n?.dataEditable,f=n?.functions,a=n?.initialShardKey,v=n?.openApiSpec,g=n?.openRpcSpec,u=n?.runAsIdentity,d=n?.scheduledCancel,h=n?.scheduledLoad,i=n?.schemaEditable;let p;e[6]!==c||e[7]!==o||e[8]!==d||e[9]!==h||e[10]!==i||e[11]!==m||e[12]!==f||e[13]!==a||e[14]!==v||e[15]!==g||e[16]!==u?(p=b(V,{basePath:c,chrome:o,dataEditable:m,functions:f,initialShardKey:a,openApiSpec:v,openRpcSpec:g,runAsIdentity:u,scheduledCancel:d,scheduledLoad:h,schemaEditable:i}),e[6]=c,e[7]=o,e[8]=d,e[9]=h,e[10]=i,e[11]=m,e[12]=f,e[13]=a,e[14]=v,e[15]=g,e[16]=u,e[17]=p):p=e[17];let x;return e[18]!==t||e[19]!==p||e[20]!==r||e[21]!==l?(x=b(G,{fallbackTitle:t,label:r,retryLabel:l,children:p}),e[18]=t,e[19]=p,e[20]=r,e[21]=l,e[22]=x):x=e[22],x},ce=k=>{const e=E(20),{basePath:c,clearToken:o,client:n,i18n:s,onTokenChange:t,rulesInstalled:r,studio:l,token:m}=k,{resolvedTheme:f}=D();let a;e[0]!==o||e[1]!==t||e[2]!==r||e[3]!==m?(a={clearToken:o,onTokenChange:t,rulesInstalled:r,token:m},e[0]=o,e[1]=t,e[2]=r,e[3]=m,e[4]=a):a=e[4];const v=a,g=f==="dark"&&"dark";let u;e[5]!==g?(u=W(F,g,"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground"),e[5]=g,e[6]=u):u=e[6];let d;e[7]!==c||e[8]!==v||e[9]!==l?(d=b(Q,{children:b(de,{basePath:c,chrome:v,studio:l})}),e[7]=c,e[8]=v,e[9]=l,e[10]=d):d=e[10];let h;e[11]!==s||e[12]!==d?(h=b(R,{i18n:s,children:d}),e[11]=s,e[12]=d,e[13]=h):h=e[13];let i;e[14]!==n||e[15]!==h?(i=b(q,{client:n,children:h}),e[14]=n,e[15]=h,e[16]=i):i=e[16];let p;return e[17]!==u||e[18]!==i?(p=b("div",{className:u,"data-testid":"lunora-studio-app",children:i}),e[17]=u,e[18]=i,e[19]=p):p=e[19],p},Ae=k=>{const e=E(27);let c;e[0]!==k?(c=k===void 0?{}:k,e[0]=k,e[1]=c):c=e[1];const{adminToken:o,basePath:n,baseUrl:s,client:t,rulesInstalled:r,studio:l,locale:m}=c;let f;e[2]!==o?(f=()=>o??oe(),e[2]=o,e[3]=f):f=e[3];const[a,v]=K(f);let g,u;e[4]!==a?(g=()=>{ne(a)},u=[a],e[4]=a,e[5]=g,e[6]=u):(g=e[5],u=e[6]),U(g,u);const d=X(a,300);let h;e:{if(t!==void 0){let A;e[7]!==t?(A=j(t),e[7]=t,e[8]=A):A=e[8],h=A;break e}let $;if(e[9]!==s||e[10]!==d){const A=Z(s),P=d===""?void 0:ae({adminToken:d,baseUrl:A}),L=new z({url:A,...P===void 0?{}:{wsToken:P.getToken}});P!==void 0&&(L.setAuthToken(d),L.onTokenExpired(P.invalidate)),$=j(L),e[9]=s,e[10]=d,e[11]=$}else $=e[11];h=$}const i=h;let p,x;e[12]!==i||e[13]!==t?(p=()=>()=>{t===void 0&&i.close()},x=[i,t],e[12]=i,e[13]=t,e[14]=p,e[15]=x):(p=e[14],x=e[15]),U(p,x);let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=$=>{v($.target.value)},e[16]=y):y=e[16];const I=y;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{v("")},e[17]=S):S=e[17];const _=S;let T;e[18]!==m?(T=Y(m),e[18]=m,e[19]=T):T=e[19];const w=T;let N;return e[20]!==n||e[21]!==i||e[22]!==w||e[23]!==r||e[24]!==l||e[25]!==a?(N=b(J,{children:a===""?b(ie,{i18n:w,onSubmit:v}):b(ce,{basePath:n,clearToken:_,client:i,i18n:w,onTokenChange:I,rulesInstalled:r,studio:l,token:a})}),e[20]=n,e[21]=i,e[22]=w,e[23]=r,e[24]=l,e[25]=a,e[26]=N):N=e[26],N};export{Ae as StudioApp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as x}from"react";import{E as b}from"./error-alert-t6cpEi0z.js";import{c as N,u as v}from"./card-CIDGUN6K.js";import{n as w,d as y,m as c,p as m,f as $,u as l}from"./table-DdJBrClo.js";import{useT as k}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{c as E}from"./utils-bhneXptQ.js";import{jsxs as i,jsx as t}from"react/jsx-runtime";const I={ERROR:"error",INFO:"info",WARN:"warning"},q=e=>{const n=typeof e.metadata.table=="string"?e.metadata.table:void 0;return{description:`${e.detail} ${e.remediation}`,entity:n,issueType:e.title,key:e.cacheKey,level:I[e.level]}},T=["error","warning","info"],A={error:"bg-destructive",info:"bg-info",warning:"bg-warning"},R=(e,n)=>({error:e("Errors"),info:e("Info"),warning:e("Warnings")})[n],O=(e,n,o)=>({error:e("{count} errors",{count:o}),info:e("{count} suggestions",{count:o}),warning:e("{count} warnings",{count:o})})[n],S=(e,n)=>({error:e("No errors detected"),info:e("No suggestions"),warning:e("No warnings detected")})[n],j=e=>{const n={error:0,info:0,warning:0};for(const o of e??[])n[o.level]+=1;return n},B=({error:e=null,errorSource:n,rows:o,testId:a,toolbar:f})=>{const s=k(),[d,p]=x("error"),g=j(o),u=(o??[]).filter(r=>r.level===d),h=r=>{p(r.currentTarget.dataset.level)};return i("div",{className:"flex flex-col gap-3","data-testid":a,children:[t("div",{className:"flex border-b border-border",role:"tablist",children:T.map(r=>i("button",{"aria-selected":d===r,className:"flex min-w-32 flex-col gap-0.5 border-b-2 border-transparent px-4 py-2 text-start outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 aria-selected:border-foreground","data-level":r,"data-testid":`${a}-tab-${r}`,onClick:h,role:"tab",type:"button",children:[i("span",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[t("span",{"aria-hidden":"true",className:E("size-2 rounded-sm",A[r])}),R(s,r)]}),t("span",{className:"ps-4 text-xs text-muted-foreground",children:O(s,r,g[r])})]},r))}),f!==void 0&&t("div",{className:"flex flex-wrap items-center gap-2",children:f}),e!==null&&t(b,{error:n??e,testId:`${a}-error`}),t(N,{className:"overflow-hidden py-0",children:t(v,{className:"px-0",children:i(w,{children:[t(y,{children:i(c,{children:[t(m,{children:s("Issue type")}),t(m,{children:s("Entity/item")}),t(m,{children:s("Description")})]})}),t($,{children:u.length===0?t(c,{children:i(l,{className:"h-40 text-center align-middle text-muted-foreground",colSpan:3,"data-testid":`${a}-empty`,children:[t("span",{className:"block text-sm font-medium text-foreground",children:S(s,d)}),t("span",{className:"block text-sm",children:s("Nothing to report for this deployment.")})]})}):u.map(r=>i(c,{children:[t(l,{className:"font-medium text-foreground",children:r.issueType}),t(l,{className:"font-mono text-xs text-muted-foreground",children:r.entity??"—"}),i(l,{className:"text-muted-foreground",children:[t("span",{children:r.description}),r.action!==void 0&&t("span",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:r.action})]})]},r.key))})]})})})]})};export{B as A,q as E};
|
|
@@ -91,8 +91,6 @@ interface FunctionDescriptor {
|
|
|
91
91
|
}
|
|
92
92
|
/** Outcome of a single `FunctionRunner` invocation. */
|
|
93
93
|
type RunStatus = "error" | "idle" | "running" | "success";
|
|
94
|
-
/** Identifier for each built-in studio tab. */
|
|
95
|
-
type StudioTab = "agents" | "analytics" | "api" | "audit" | "authAudit" | "authConfig" | "authSessions" | "containers" | "dashboards" | "data" | "deploymentHealth" | "drains" | "export" | "fanout" | "files" | "flags" | "functions" | "health" | "home" | "insights" | "issues" | "kv" | "logs" | "mail" | "metrics" | "migrations" | "notifications" | "organizations" | "payments" | "permissions" | "pitr" | "queues" | "realtime" | "rls" | "schedule" | "schema" | "security" | "settings" | "sql" | "storageRules" | "traces" | "users" | "vectors" | "workflows";
|
|
96
94
|
interface StudioProps {
|
|
97
95
|
/**
|
|
98
96
|
* URL path prefix the studio is mounted under, passed to the router as its
|
|
@@ -251,4 +249,4 @@ interface StudioAppProps {
|
|
|
251
249
|
* or `<Studio>` under your own provider instead.
|
|
252
250
|
*/
|
|
253
251
|
declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
|
|
254
|
-
export { FunctionDescriptor as F, RunStatus as R, StudioAppProps as S, FunctionKind as a, ScheduledJobs as b, ScheduledJobsProps as c, Studio as d, StudioApp as e, StudioProps as f
|
|
252
|
+
export { FunctionDescriptor as F, RunStatus as R, StudioAppProps as S, FunctionKind as a, ScheduledJobs as b, ScheduledJobsProps as c, Studio as d, StudioApp as e, StudioProps as f };
|