@lunora/studio 1.0.0-alpha.136 → 1.0.0-alpha.138
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.mts +1515 -0
- package/dist/index.d.ts +20 -7
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +21 -0
- package/dist/mount.mjs +1 -0
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ApiTab.mjs +1 -0
- package/dist/packem_chunks/AuditPanel.mjs +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
- package/dist/packem_chunks/{ExportImportPanel.js → ExportImportPanel.mjs} +1 -1
- package/dist/packem_chunks/{FileBrowser.js → FileBrowser.mjs} +1 -1
- package/dist/packem_chunks/FunctionRunner.mjs +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
- package/dist/packem_chunks/HealthPanel.mjs +1 -0
- package/dist/packem_chunks/InsightsPanel.mjs +1 -0
- package/dist/packem_chunks/LogsPanel.mjs +1 -0
- package/dist/packem_chunks/MailPanel.mjs +2 -0
- package/dist/packem_chunks/MetricsPanel.mjs +1 -0
- package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
- package/dist/packem_chunks/PitrPanel.mjs +1 -0
- package/dist/packem_chunks/SchemaViewer.mjs +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
- package/dist/packem_chunks/SettingsPanel.mjs +1 -0
- package/dist/packem_chunks/{SqlEditorPanel.js → SqlEditorPanel.mjs} +1 -1
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/analytics-panel.mjs +1 -0
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
- package/dist/packem_chunks/auth-config-panel.mjs +1 -0
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
- package/dist/packem_chunks/containers-panel.mjs +1 -0
- package/dist/packem_chunks/dashboards-panel.mjs +1 -0
- package/dist/packem_chunks/evals-panel.mjs +1 -0
- package/dist/packem_chunks/fanout-panel.mjs +1 -0
- package/dist/packem_chunks/flags-panel.mjs +1 -0
- package/dist/packem_chunks/issues-panel.mjs +1 -0
- package/dist/packem_chunks/kv-browser.mjs +1 -0
- package/dist/packem_chunks/{log-drains-panel.js → log-drains-panel.mjs} +1 -1
- package/dist/packem_chunks/migrations-route.mjs +1 -0
- package/dist/packem_chunks/organizations-panel.mjs +1 -0
- package/dist/packem_chunks/payments-panel.mjs +1 -0
- package/dist/packem_chunks/permissions-panel.mjs +1 -0
- package/dist/packem_chunks/queues-panel.mjs +1 -0
- package/dist/packem_chunks/reactors-panel.mjs +1 -0
- package/dist/packem_chunks/rls-panel.mjs +1 -0
- package/dist/packem_chunks/schedule-panel.mjs +1 -0
- package/dist/packem_chunks/sparkline.mjs +1 -0
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
- package/dist/packem_chunks/sync-client-panel.mjs +1 -0
- package/dist/packem_chunks/traces-panel.mjs +1 -0
- package/dist/packem_chunks/users-panel.mjs +1 -0
- package/dist/packem_chunks/vector-browser.mjs +1 -0
- package/dist/packem_chunks/workflows-panel.mjs +1 -0
- package/dist/packem_shared/{ApiDocsPanel-Du1L7Ysj.js → ApiDocsPanel-BOxViKDM.mjs} +1 -1
- package/dist/packem_shared/ApiReferencePanel--YThTzHb.mjs +1 -0
- package/dist/packem_shared/CommandPalette-C4UrhLxv.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-B_8fcft2.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/{DataBrowser-W5TxvLB8.js → DataBrowser-CDzwqq4b.mjs} +1 -1
- package/dist/packem_shared/GlobalDataBrowser-BKm77TNC.mjs +1 -0
- package/dist/packem_shared/HomePanel-T_fBZTEM.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-CYe0ygT8.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-Bn5UVD7s.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-DN0yQoo6.mjs +1 -0
- package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
- package/dist/packem_shared/Studio-CHCAslfi.mjs +1 -0
- package/dist/packem_shared/StudioApp-DVl_E-VZ.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
- package/dist/packem_shared/advisor-view-5mZH6453.mjs +1 -0
- package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.mts +252 -0
- package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
- package/dist/packem_shared/{bar-chart-B6gzp_f9.js → bar-chart-BCsEIQoQ.mjs} +1 -1
- package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
- package/dist/packem_shared/card--2hKx4L2.mjs +1 -0
- package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
- package/dist/packem_shared/data-grid-BqNXJ9PF.mjs +1 -0
- package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
- package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
- package/dist/packem_shared/error-alert-CczbAfst.mjs +1 -0
- package/dist/packem_shared/{grid-features-jBzZGauv.js → grid-features-D8w5isjt.mjs} +1 -1
- package/dist/packem_shared/home-panel-CSENDmoB.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
- package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
- package/dist/packem_shared/log-line-Dzg4YZ-K.mjs +1 -0
- package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
- package/dist/packem_shared/recording-client-BEZ6tVgo.mjs +1 -0
- package/dist/packem_shared/{reference-view-BU2dNK9Z.js → reference-view-CZxBZSRo.mjs} +1 -1
- package/dist/packem_shared/schema-diagram-DU83ObYH.mjs +2 -0
- package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
- package/dist/packem_shared/select-Cx8-CokP.mjs +2 -0
- package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
- package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
- package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
- package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
- package/dist/packem_shared/sql-result-table-DysT8h5P.mjs +1 -0
- package/dist/packem_shared/stat-card-D0Fe04cX.mjs +1 -0
- package/dist/packem_shared/studio-DRHuKwbt.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-BxZm3sBJ.mjs +1 -0
- package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
- package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
- package/dist/packem_shared/use-admin-query-Cbj2GuHu.mjs +1 -0
- package/dist/packem_shared/use-async-submit-DAKymxcP.mjs +1 -0
- package/dist/packem_shared/use-auth-config-gxJL0E1r.mjs +1 -0
- package/dist/packem_shared/use-open-trace-B5LJ96_0.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-CFRzdA9E.mjs +1 -0
- package/dist/standalone/{chunk-7PIHTTND.js → chunk-25NFR6EB.js} +1 -1
- package/dist/standalone/{chunk-R7S3ICRW.js → chunk-2AFIMJPZ.js} +1 -1
- package/dist/standalone/{chunk-ENLQ6CZE.js → chunk-2DO5EQCU.js} +1 -1
- package/dist/standalone/{chunk-XZBLPJZN.js → chunk-2QSOSRNW.js} +1 -1
- package/dist/standalone/{chunk-F7JOSNAT.js → chunk-35DM4JJG.js} +1 -1
- package/dist/standalone/{chunk-EHQU74ST.js → chunk-3FFEVZUV.js} +1 -1
- package/dist/standalone/{chunk-OE4KGVJW.js → chunk-3ILVYCWG.js} +1 -1
- package/dist/standalone/{chunk-TRS5ABTX.js → chunk-3PKWDMXA.js} +1 -1
- package/dist/standalone/{chunk-2KR32476.js → chunk-3ZKYTFKY.js} +1 -1
- package/dist/standalone/{chunk-XLU6W4LI.js → chunk-43Y54D7O.js} +1 -1
- package/dist/standalone/{chunk-AOAJGSYZ.js → chunk-46ZJ3TM4.js} +1 -1
- package/dist/standalone/{chunk-2SFSTQS4.js → chunk-4GTO7FL5.js} +1 -1
- package/dist/standalone/{chunk-TFMQSCGC.js → chunk-4L4WTGN5.js} +1 -1
- package/dist/standalone/{chunk-HOQ2PFO6.js → chunk-56AFJWER.js} +1 -1
- package/dist/standalone/chunk-5AUOM7FK.js +1 -0
- package/dist/standalone/{chunk-XQS7KSHL.js → chunk-5GFSKIB2.js} +1 -1
- package/dist/standalone/{chunk-JV7KTJPY.js → chunk-5JDWLCSH.js} +1 -1
- package/dist/standalone/{chunk-WSNONR2E.js → chunk-5PCGB55O.js} +1 -1
- package/dist/standalone/{chunk-MCLM2QJI.js → chunk-5WJXVZMZ.js} +1 -1
- package/dist/standalone/{chunk-WUW4ZHRL.js → chunk-66UGPQVC.js} +1 -1
- package/dist/standalone/{chunk-QHQTOESO.js → chunk-7EYQVAUQ.js} +1 -1
- package/dist/standalone/{chunk-AVBOVXQK.js → chunk-7QMV55PO.js} +1 -1
- package/dist/standalone/{chunk-JURAVSE7.js → chunk-7QRRR3K6.js} +1 -1
- package/dist/standalone/{chunk-EDHW2EEG.js → chunk-7RIRJD2P.js} +1 -1
- package/dist/standalone/{chunk-ITNXWR5K.js → chunk-B5FXTB7H.js} +1 -1
- package/dist/standalone/{chunk-NNJW6LZK.js → chunk-BFXBBUU6.js} +1 -1
- package/dist/standalone/{chunk-DBMUPDVJ.js → chunk-BX3F7MXP.js} +1 -1
- package/dist/standalone/{chunk-ZSOLGJFC.js → chunk-C3TOZ4LG.js} +1 -1
- package/dist/standalone/{chunk-54TELYX4.js → chunk-C5L4BSYY.js} +1 -1
- package/dist/standalone/{chunk-U5D3ABAW.js → chunk-CKZQXAZE.js} +1 -1
- package/dist/standalone/{chunk-7SROZWKL.js → chunk-CSUROWL2.js} +1 -1
- package/dist/standalone/{chunk-DUDQV6XJ.js → chunk-D27D4UUI.js} +1 -1
- package/dist/standalone/chunk-DEJLINCJ.js +1 -0
- package/dist/standalone/{chunk-KZ5V7F4W.js → chunk-DQHYNFE4.js} +1 -1
- package/dist/standalone/{chunk-METRMDIQ.js → chunk-EA2JKR5D.js} +1 -1
- package/dist/standalone/{chunk-BWEXJENB.js → chunk-EBWXFG4H.js} +1 -1
- package/dist/standalone/{chunk-4U5PYZLE.js → chunk-ECQTVV2J.js} +1 -1
- package/dist/standalone/{chunk-JUWOEHDD.js → chunk-EG6XHY7N.js} +1 -1
- package/dist/standalone/{chunk-MOVUB3HI.js → chunk-EIKBBMM4.js} +1 -1
- package/dist/standalone/{chunk-5BEXGGHV.js → chunk-EILTQDXX.js} +1 -1
- package/dist/standalone/{chunk-XYD65F6K.js → chunk-ERWZGAOA.js} +1 -1
- package/dist/standalone/{chunk-ZPGNTTQ3.js → chunk-F7UC63UN.js} +1 -1
- package/dist/standalone/{chunk-UANVABQG.js → chunk-FKVZRPV5.js} +1 -1
- package/dist/standalone/{chunk-DKSLOJDQ.js → chunk-FO26ZU7E.js} +1 -1
- package/dist/standalone/{chunk-RCZTUWG3.js → chunk-FSRSK4LY.js} +1 -1
- package/dist/standalone/{chunk-IS2BTYON.js → chunk-GD3ZRVZH.js} +1 -1
- package/dist/standalone/{chunk-L4EZAHCD.js → chunk-HEAQVSNS.js} +1 -1
- package/dist/standalone/{chunk-GD4GUF75.js → chunk-HODZXHVK.js} +1 -1
- package/dist/standalone/chunk-HPUOZHDA.js +1 -0
- package/dist/standalone/{chunk-AFKLFS74.js → chunk-I52I2DJG.js} +1 -1
- package/dist/standalone/{chunk-OG57FC7W.js → chunk-I5OKDKON.js} +1 -1
- package/dist/standalone/{chunk-TB5N24CM.js → chunk-IFLTA2OD.js} +1 -1
- package/dist/standalone/{chunk-NXXGISFB.js → chunk-IMOHEGMV.js} +1 -1
- package/dist/standalone/{chunk-5U6757U7.js → chunk-JAZCU2PP.js} +1 -1
- package/dist/standalone/{chunk-CG5OTGTR.js → chunk-JBIN7W2B.js} +1 -1
- package/dist/standalone/{chunk-BA6TK2PS.js → chunk-JHEUUNXM.js} +1 -1
- package/dist/standalone/chunk-JJA7KHJK.js +1 -0
- package/dist/standalone/{chunk-4YTSKL4R.js → chunk-JVUZEYKQ.js} +1 -1
- package/dist/standalone/{chunk-INFALEU6.js → chunk-JYMXJUJ2.js} +1 -1
- package/dist/standalone/chunk-K7AJEMKE.js +1 -0
- package/dist/standalone/{chunk-ZZBE7O77.js → chunk-KDWJAKFX.js} +1 -1
- package/dist/standalone/{chunk-EQFBG7TB.js → chunk-KEZZGUYY.js} +1 -1
- package/dist/standalone/{chunk-6DAH3SMG.js → chunk-KTTYWH6A.js} +1 -1
- package/dist/standalone/{chunk-LVZKEWNM.js → chunk-LC3XGRNU.js} +1 -1
- package/dist/standalone/{chunk-LJFIXPDF.js → chunk-LJC5BM3X.js} +1 -1
- package/dist/standalone/{chunk-6XME7G3Q.js → chunk-LWYAZ2H7.js} +1 -1
- package/dist/standalone/{chunk-B3QSXX4O.js → chunk-M6MCQSPI.js} +1 -1
- package/dist/standalone/{chunk-AFH3KSFW.js → chunk-MIVYBFY3.js} +1 -1
- package/dist/standalone/{chunk-BQK2C2Z4.js → chunk-MNAASONZ.js} +1 -1
- package/dist/standalone/{chunk-BGOEMFLU.js → chunk-MRJNT4OH.js} +1 -1
- package/dist/standalone/{chunk-OQOBY6X3.js → chunk-N6KHKQJH.js} +1 -1
- package/dist/standalone/{chunk-V6QPVFDL.js → chunk-NBC6NJFJ.js} +1 -1
- package/dist/standalone/{chunk-SPDZUX4P.js → chunk-NCCAMFB6.js} +1 -1
- package/dist/standalone/{chunk-NGQTRDBQ.js → chunk-NE7AR3N3.js} +1 -1
- package/dist/standalone/chunk-NPERN4YF.js +1 -0
- package/dist/standalone/{chunk-YNZQSHFG.js → chunk-O2FV34ZD.js} +1 -1
- package/dist/standalone/{chunk-KVSQKUWD.js → chunk-OGUKYRFM.js} +1 -1
- package/dist/standalone/{chunk-ZHPDAJBM.js → chunk-OKG3HWSJ.js} +1 -1
- package/dist/standalone/{chunk-FUVCG23X.js → chunk-OOESPRIZ.js} +1 -1
- package/dist/standalone/{chunk-443UDYWL.js → chunk-OOKV3V3X.js} +1 -1
- package/dist/standalone/{chunk-ATES7QMQ.js → chunk-PAUQAU23.js} +1 -1
- package/dist/standalone/{chunk-Q7ZPWO67.js → chunk-PKCC4J5W.js} +1 -1
- package/dist/standalone/{chunk-DPNEFSEC.js → chunk-PYT4RZJH.js} +1 -1
- package/dist/standalone/{chunk-W7ETXRN4.js → chunk-Q3HF6P2M.js} +1 -1
- package/dist/standalone/{chunk-TPAZM36C.js → chunk-Q4CAKBWN.js} +1 -1
- package/dist/standalone/{chunk-M3NNNOD5.js → chunk-QKEJLVC5.js} +1 -1
- package/dist/standalone/{chunk-U6RNLNVU.js → chunk-QSOJFV42.js} +1 -1
- package/dist/standalone/{chunk-K6O3UDLX.js → chunk-RK3WWWTT.js} +1 -1
- package/dist/standalone/{chunk-XJSWM47N.js → chunk-RLLKECZT.js} +1 -1
- package/dist/standalone/{chunk-CAOUXOL7.js → chunk-RPQL45FL.js} +1 -1
- package/dist/standalone/{chunk-CKTKI4IY.js → chunk-S3CRZLGS.js} +1 -1
- package/dist/standalone/{chunk-L6DNHL3L.js → chunk-S63ID2FC.js} +1 -1
- package/dist/standalone/{chunk-VZCS5GXZ.js → chunk-SB35BJ7A.js} +1 -1
- package/dist/standalone/{chunk-26VREVWU.js → chunk-SSNHCN4D.js} +1 -1
- package/dist/standalone/{chunk-3KLX63D7.js → chunk-T2IE5GKA.js} +1 -1
- package/dist/standalone/{chunk-74ASA4WU.js → chunk-TGHH7ZFA.js} +1 -1
- package/dist/standalone/{chunk-FJ6G6FNE.js → chunk-TJRQUJFS.js} +1 -1
- package/dist/standalone/{chunk-EYGF6TQS.js → chunk-TQCXJX4I.js} +1 -1
- package/dist/standalone/{chunk-EYENA7HZ.js → chunk-TRL7AHZK.js} +1 -1
- package/dist/standalone/{chunk-CP4ZFBVW.js → chunk-TWTNWOJU.js} +1 -1
- package/dist/standalone/{chunk-UUO257GV.js → chunk-TZI3JW3Q.js} +1 -1
- package/dist/standalone/{chunk-M3PFFLSD.js → chunk-UBVWMMQG.js} +1 -1
- package/dist/standalone/{chunk-CYX3OHJ3.js → chunk-UDCVU3Z5.js} +1 -1
- package/dist/standalone/{chunk-BNNRPK47.js → chunk-UKL4FSKP.js} +1 -1
- package/dist/standalone/{chunk-PZ4QDWTI.js → chunk-ULIQFBZU.js} +1 -1
- package/dist/standalone/{chunk-XVJIEJ5R.js → chunk-USC5APTS.js} +1 -1
- package/dist/standalone/{chunk-QO645HJU.js → chunk-UWDFH35E.js} +1 -1
- package/dist/standalone/{chunk-YN4VXWMW.js → chunk-VPPKG2IW.js} +1 -1
- package/dist/standalone/{chunk-NIX2QSSN.js → chunk-VVOVVU53.js} +1 -1
- package/dist/standalone/{chunk-BSACLUQK.js → chunk-WLGZOFKE.js} +2 -2
- package/dist/standalone/{chunk-CN2AINNY.js → chunk-WQYWA7U6.js} +1 -1
- package/dist/standalone/{chunk-ZJK2XCP3.js → chunk-WR675JUF.js} +1 -1
- package/dist/standalone/{chunk-IYWVSMAY.js → chunk-WUWBZPUK.js} +1 -1
- package/dist/standalone/{chunk-K76OQSTQ.js → chunk-X43AA6RX.js} +1 -1
- package/dist/standalone/{chunk-EGSG64TS.js → chunk-XSLMHPP2.js} +1 -1
- package/dist/standalone/{chunk-5JLIP2HH.js → chunk-XZMOZFE6.js} +1 -1
- package/dist/standalone/{chunk-6ZPTNC34.js → chunk-Y4Q25F6X.js} +1 -1
- package/dist/standalone/{chunk-INQICZYC.js → chunk-Y6CXU7T4.js} +1 -1
- package/dist/standalone/{chunk-VR3UJA7B.js → chunk-YEBHHIAY.js} +1 -1
- package/dist/standalone/{chunk-MSXT3KG5.js → chunk-YFLOZILV.js} +1 -1
- package/dist/standalone/{chunk-MIGH67EO.js → chunk-YFPU55K4.js} +1 -1
- package/dist/standalone/{chunk-2I2F6IEF.js → chunk-ZE2Q22OK.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +11 -9
- package/dist/index.js +0 -1
- package/dist/mount.js +0 -1
- package/dist/packem_chunks/AdvisorHealthPanel.js +0 -1
- package/dist/packem_chunks/ApiTab.js +0 -1
- package/dist/packem_chunks/AuditPanel.js +0 -1
- package/dist/packem_chunks/DeploymentHealthPanel.js +0 -1
- package/dist/packem_chunks/FunctionRunner.js +0 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +0 -1
- package/dist/packem_chunks/HealthPanel.js +0 -1
- package/dist/packem_chunks/InsightsPanel.js +0 -1
- package/dist/packem_chunks/LogsPanel.js +0 -1
- package/dist/packem_chunks/MailPanel.js +0 -2
- package/dist/packem_chunks/MetricsPanel.js +0 -1
- package/dist/packem_chunks/NotificationsPanel.js +0 -1
- package/dist/packem_chunks/PitrPanel.js +0 -1
- package/dist/packem_chunks/SchemaViewer.js +0 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -1
- package/dist/packem_chunks/SettingsPanel.js +0 -1
- package/dist/packem_chunks/TableEditor.js +0 -1
- package/dist/packem_chunks/agents-panel.js +0 -1
- package/dist/packem_chunks/analytics-panel.js +0 -1
- package/dist/packem_chunks/auth-audit-panel.js +0 -1
- package/dist/packem_chunks/auth-config-panel.js +0 -1
- package/dist/packem_chunks/auth-sessions-panel.js +0 -1
- package/dist/packem_chunks/containers-panel.js +0 -1
- package/dist/packem_chunks/dashboards-panel.js +0 -1
- package/dist/packem_chunks/evals-panel.js +0 -1
- package/dist/packem_chunks/fanout-panel.js +0 -1
- package/dist/packem_chunks/flags-panel.js +0 -1
- package/dist/packem_chunks/issues-panel.js +0 -1
- package/dist/packem_chunks/kv-browser.js +0 -1
- package/dist/packem_chunks/migrations-route.js +0 -1
- package/dist/packem_chunks/organizations-panel.js +0 -1
- package/dist/packem_chunks/payments-panel.js +0 -1
- package/dist/packem_chunks/permissions-panel.js +0 -1
- package/dist/packem_chunks/queues-panel.js +0 -1
- package/dist/packem_chunks/reactors-panel.js +0 -1
- package/dist/packem_chunks/rls-panel.js +0 -1
- package/dist/packem_chunks/schedule-panel.js +0 -1
- package/dist/packem_chunks/sparkline.js +0 -1
- package/dist/packem_chunks/storage-rules-panel.js +0 -1
- package/dist/packem_chunks/subscriptions-panel.js +0 -1
- package/dist/packem_chunks/sync-client-panel.js +0 -1
- package/dist/packem_chunks/traces-panel.js +0 -1
- package/dist/packem_chunks/users-panel.js +0 -1
- package/dist/packem_chunks/vector-browser.js +0 -1
- package/dist/packem_chunks/workflows-panel.js +0 -1
- package/dist/packem_shared/ApiReferencePanel-uGgGOBYj.js +0 -1
- package/dist/packem_shared/CommandPalette-HqiXrWIm.js +0 -1
- package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +0 -1
- package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +0 -1
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +0 -1
- package/dist/packem_shared/GlobalDataBrowser-LFznuyGe.js +0 -1
- package/dist/packem_shared/HomePanel-DmB0EKjl.js +0 -1
- package/dist/packem_shared/MigrationsPanel-BDNt136v.js +0 -1
- package/dist/packem_shared/OpenRpcReferencePanel-DgrpASYD.js +0 -1
- package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +0 -1
- package/dist/packem_shared/ShardInput-CdawpUiS.js +0 -1
- package/dist/packem_shared/Studio-CkNE_tEy.js +0 -1
- package/dist/packem_shared/StudioApp-BZP_0E2n.js +0 -1
- package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +0 -1
- package/dist/packem_shared/advisor-view-C1KFTXSH.js +0 -1
- package/dist/packem_shared/alert-C2SEhYS9.js +0 -1
- package/dist/packem_shared/badge-cAk9Di1Q.js +0 -1
- package/dist/packem_shared/button-BOPLD1un.js +0 -1
- package/dist/packem_shared/card-BGlQzQY-.js +0 -1
- package/dist/packem_shared/checkbox-C5w53W-E.js +0 -1
- package/dist/packem_shared/data-grid-BFTQnkXq.js +0 -1
- package/dist/packem_shared/dropdown-menu-U7Tjg1Nb.js +0 -2
- package/dist/packem_shared/empty-state-B939z6K2.js +0 -1
- package/dist/packem_shared/error-alert-TYdKetJd.js +0 -1
- package/dist/packem_shared/home-panel-DHOa3sxt.js +0 -3
- package/dist/packem_shared/input-CY5W3wzv.js +0 -1
- package/dist/packem_shared/label-BOUo-DP0.js +0 -1
- package/dist/packem_shared/live-status-Bf7rR8o8.js +0 -1
- package/dist/packem_shared/log-line-UnE93Ovi.js +0 -1
- package/dist/packem_shared/modal-shell-wGW4CKEW.js +0 -1
- package/dist/packem_shared/recording-client-CKn4-vUx.js +0 -1
- package/dist/packem_shared/schema-diagram-DOaIh1y6.js +0 -2
- package/dist/packem_shared/scroll-area-DSJftwu_.js +0 -2
- package/dist/packem_shared/select-BPISLTcv.js +0 -2
- package/dist/packem_shared/shard-history-DU5b3QDI.js +0 -1
- package/dist/packem_shared/shortcuts-lH4Vaqjc.js +0 -1
- package/dist/packem_shared/skeleton-DFBBaJU6.js +0 -1
- package/dist/packem_shared/sparkline-CYbJzfA1.js +0 -1
- package/dist/packem_shared/sql-result-table-CqlZo2QN.js +0 -1
- package/dist/packem_shared/stat-card-B9uIvAHg.js +0 -1
- package/dist/packem_shared/studio-CXai1O2K.js +0 -2
- package/dist/packem_shared/table-BMsuYFhk.js +0 -2
- package/dist/packem_shared/table-list-sidebar-BWq_-gtu.js +0 -1
- package/dist/packem_shared/textarea-DpO3i-Qo.js +0 -1
- package/dist/packem_shared/trace-handoff-z9sy89Ci.js +0 -1
- package/dist/packem_shared/use-admin-query-P0RJrjsD.js +0 -1
- package/dist/packem_shared/use-async-submit-DdLd0MdK.js +0 -1
- package/dist/packem_shared/use-auth-config-z3KRWAqD.js +0 -1
- package/dist/packem_shared/use-open-trace-4mqqFWrn.js +0 -1
- package/dist/packem_shared/use-sql-assistant-D1K2LqpO.js +0 -1
- package/dist/standalone/chunk-35O3VETX.js +0 -1
- package/dist/standalone/chunk-57VX76PR.js +0 -1
- package/dist/standalone/chunk-76YLMHR3.js +0 -1
- package/dist/standalone/chunk-N5OS5NUG.js +0 -1
- package/dist/standalone/chunk-O5MAFDY2.js +0 -1
- package/dist/standalone/chunk-TNKECJW4.js +0 -1
- /package/dist/packem_shared/{ADMIN_FUNCTIONS-B6z7VLYt.js → ADMIN_FUNCTIONS-B6z7VLYt.mjs} +0 -0
- /package/dist/packem_shared/{DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js → DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs} +0 -0
- /package/dist/packem_shared/{DEFAULT_LOCALE-A1Yg5ORA.js → DEFAULT_LOCALE-A1Yg5ORA.mjs} +0 -0
- /package/dist/packem_shared/{DataFilters-3nbW0uax.js → DataFilters-3nbW0uax.mjs} +0 -0
- /package/dist/packem_shared/{ErrorBoundary-BWNF98VF.js → ErrorBoundary-BWNF98VF.mjs} +0 -0
- /package/dist/packem_shared/{STUDIO_ROOT_CLASS-C6MccdVk.js → STUDIO_ROOT_CLASS-C6MccdVk.mjs} +0 -0
- /package/dist/packem_shared/{aggregateMetrics-A-Y7OH6R.js → aggregateMetrics-A-Y7OH6R.mjs} +0 -0
- /package/dist/packem_shared/{browser-storage-BH1MxLZs.js → browser-storage-BH1MxLZs.mjs} +0 -0
- /package/dist/packem_shared/{cf-links-CBJ5SywP.js → cf-links-CBJ5SywP.mjs} +0 -0
- /package/dist/packem_shared/{control-button-BOZ5K-FC.js → control-button-BOZ5K-FC.mjs} +0 -0
- /package/dist/packem_shared/{data-view-params-qoSTqjAj.js → data-view-params-qoSTqjAj.mjs} +0 -0
- /package/dist/packem_shared/{internal-CwaF9YNk.js → internal-CwaF9YNk.mjs} +0 -0
- /package/dist/packem_shared/{log-fields-SBxKyBug.js → log-fields-SBxKyBug.mjs} +0 -0
- /package/dist/packem_shared/{operation-console-provider-DoloEvon.js → operation-console-provider-DoloEvon.mjs} +0 -0
- /package/dist/packem_shared/{quote-identifier-CGiYFBvY.js → quote-identifier-CGiYFBvY.mjs} +0 -0
- /package/dist/packem_shared/{storage-tier-C2mKwYRj.js → storage-tier-C2mKwYRj.mjs} +0 -0
- /package/dist/packem_shared/{use-shard-key-BsP3o5wT.js → use-shard-key-BsP3o5wT.mjs} +0 -0
- /package/dist/packem_shared/{useDebounced-DVeQ5-oW.js → useDebounced-DVeQ5-oW.mjs} +0 -0
- /package/dist/packem_shared/{utils-bhneXptQ.js → utils-bhneXptQ.mjs} +0 -0
- /package/dist/packem_shared/{virtual-rect-D_j7aLxX.js → virtual-rect-D_j7aLxX.mjs} +0 -0
- /package/dist/packem_shared/{wire-codec-Dl3VeNrd.js → wire-codec-Dl3VeNrd.mjs} +0 -0
- /package/dist/standalone/{chunk-DZGOHOOE.js → chunk-CXNZVJ3S.js} +0 -0
- /package/dist/standalone/{chunk-W2JBKQNU.js → chunk-UYEZR3BI.js} +0 -0
- /package/dist/standalone/{chunk-R5ZTCHCE.js → chunk-YKXDMIHQ.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useLunora as de}from"@lunora/react";import{useState as A,useRef as U,useEffect as H}from"react";import{b as I}from"./use-admin-query-P0RJrjsD.js";import{useAutoRefresh as me}from"./DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js";import{m as Q,G as ue,u as fe,a as ge,b as pe,T as be,D as he}from"./table-list-sidebar-BWq_-gtu.js";import{useT as V}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{b as xe}from"./cf-links-CBJ5SywP.js";import{c as W}from"react/compiler-runtime";import{c as ke,a as Ne,b as Z,e as ve,d as ye,T as we}from"./table-BMsuYFhk.js";import{a as Te}from"./control-button-BOZ5K-FC.js";import{C as q,G as Se}from"./data-grid-BFTQnkXq.js";import{jsx as r,jsxs as F}from"react/jsx-runtime";import{E as Ce}from"./empty-state-B939z6K2.js";const Pe=(t,e)=>{const o=t._id;return typeof o=="string"||typeof o=="number"?String(o):`row-${e.toString()}`},Fe=t=>t==null?"∅":t===""?"(empty)":typeof t=="object"?JSON.stringify(t):String(t),Ee=t=>{const e=W(45),{filters:o,hasMaskedColumns:f,mask:s,maskOn:u,onChangePageSize:i,onJumpToPage:R,onNext:d,onPrevious:T,onRemoveFilter:g,onToggleMask:L,page:c,pageSize:E,pagination:S}=t,C=V(),{hasNext:z,hasPrevious:D,rangeEnd:j,rangeStart:P,total:k}=S;let N;e[0]!==f||e[1]!==u||e[2]!==L||e[3]!==C?(N=f&&r("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5 border-b border-border px-4 py-2",children:r("button",{"aria-pressed":u,className:Te,"data-testid":"gdb-mask-toggle",onClick:L,type:"button",children:C("Mask sensitive columns")})}),e[0]=f,e[1]=u,e[2]=L,e[3]=C,e[4]=N):N=e[4];let p;e[5]!==o||e[6]!==s||e[7]!==g||e[8]!==C?(p=o.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:o.map((n,m)=>{const G=Fe(Q(n.value,n.column,s));return F("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:n.column}),r("span",{className:"text-muted-foreground",children:"="}),r("span",{className:"font-mono text-foreground",children:G}),r("button",{"aria-label":C("Remove filter"),className:"ml-0.5 text-muted-foreground hover:text-foreground","data-testid":"gdb-filter-remove",onClick:()=>{g(m)},type:"button",children:"✕"})]},`${n.column}:${G}`)})}),e[5]=o,e[6]=s,e[7]=g,e[8]=C,e[9]=p):p=e[9];let a;if(e[10]!==s||e[11]!==c.columns){let n;e[13]!==s?(n=m=>F(ke,{children:[m,s.columns.has(m)&&r("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":`gdb-mask-chip-${m}`,title:"This column is masked by a mask() policy",children:"masked"})]},m),e[13]=s,e[14]=n):n=e[14],a=c.columns.map(n),e[10]=s,e[11]=c.columns,e[12]=a}else a=e[12];let b;e[15]!==a?(b=r(Ne,{children:r(Z,{children:a})}),e[15]=a,e[16]=b):b=e[16];let v;if(e[17]!==s||e[18]!==c.columns||e[19]!==c.rows){let n;e[21]!==s||e[22]!==c.columns?(n=(m,G)=>r(Z,{"data-testid":"gdb-row",children:c.columns.map(w=>r(ve,{className:"max-w-xs truncate font-mono text-xs",children:s.enabled&&s.columns.has(w)?r("span",{className:"text-muted-foreground italic","data-testid":`gdb-masked-${w}`,title:"Masked (preview)",children:r(q,{value:Q(m[w],w,s)})}):r(q,{value:m[w]})},w))},Pe(m,G)),e[21]=s,e[22]=c.columns,e[23]=n):n=e[23],v=c.rows.map(n),e[17]=s,e[18]=c.columns,e[19]=c.rows,e[20]=v}else v=e[20];let y;e[24]!==v?(y=r(ye,{children:v}),e[24]=v,e[25]=y):y=e[25];let h;e[26]!==b||e[27]!==y?(h=r(Se,{layout:"fill",children:r("div",{className:"min-h-0 flex-1 overflow-auto",children:F(we,{"data-testid":"gdb-rows",children:[b,y]})})}),e[26]=b,e[27]=y,e[28]=h):h=e[28];let x;e[29]!==z||e[30]!==D||e[31]!==i||e[32]!==R||e[33]!==d||e[34]!==T||e[35]!==E||e[36]!==j||e[37]!==P||e[38]!==k?(x=r("div",{className:"flex shrink-0 items-center border-t border-border px-4 py-2",children:r(ue,{hasNext:z,hasPrevious:D,onJumpToPage:R,onNext:d,onPageSizeChange:i,onPrevious:T,pageSize:E,prefix:"gdb",rangeEnd:j,rangeStart:P,total:k})}),e[29]=z,e[30]=D,e[31]=i,e[32]=R,e[33]=d,e[34]=T,e[35]=E,e[36]=j,e[37]=P,e[38]=k,e[39]=x):x=e[39];let M;return e[40]!==N||e[41]!==p||e[42]!==h||e[43]!==x?(M=F("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"gdb-page",children:[N,p,h,x]}),e[40]=N,e[41]=p,e[42]=h,e[43]=x,e[44]=M):M=e[44],M},Me=()=>{const t=W(8),e=V();let o;t[0]!==e?(o=e("Tables marked .global() (D1-backed, region-replicated) will appear here."),t[0]=e,t[1]=o):o=t[1];let f;t[2]===Symbol.for("react.memo_cache_sentinel")?(f=F("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"})]}),t[2]=f):f=t[2];let s;t[3]!==e?(s=e("No global tables."),t[3]=e,t[4]=s):s=t[4];let u;return t[5]!==o||t[6]!==s?(u=r("div",{className:"flex flex-1 items-center justify-center p-6",children:r(Ce,{description:o,icon:f,testId:"gdb-empty",title:s})}),t[5]=o,t[6]=s,t[7]=u):u=t[7],u},Ge=50,Oe=[],K=[],Ie=({initialTable:t,onSelectTable:e,pageSize:o=Ge,schemaSwitch:f}={})=>{const s=de(),u=V(),[i,R]=A(t??null),[d,T]=A(0),[g,L]=A(o),[c,E]=A([]),S=fe(c),{clearFacets:C,facets:z,refetchFacets:D,toggleFacet:j}=ge(),P=I(["lunora-global-tables"],()=>s.listGlobalTables()),k=P.data??null,N=P.error,p=I(["lunora-global-page",i??"",d,g,JSON.stringify(c)],()=>s.readGlobalTablePage({filters:c,limit:g,offset:d,table:i??""}),{enabled:i!==null,keepPreviousData:!1}),a=p.data??null,b=p.error,v=(l,O)=>$=>s.facetGlobalColumn({column:$,filters:O,table:l}),y=(l,O)=>{D(v(l,O))};me(()=>{P.refetch(),i!==null&&(p.refetch(),y(i,S.current))},!0);const h=U(void 0),x=l=>{R(l),h.current=l,E([]),S.current=[],C(),T(0),e?.(l)},M=l=>{j(l,i===null?null:v(i,S.current))},n=l=>{E(l),S.current=l,T(0),i!==null&&y(i,l)},m=(l,O)=>{n([...S.current.filter($=>$.column!==l),{column:l,value:O}])},G=l=>{n(S.current.filter((O,$)=>$!==l))},w=U(x);H(()=>{w.current=x}),H(()=>{if(t===void 0||t===""||h.current===t)return;h.current=t;const l=t;queueMicrotask(()=>{w.current(l)})},[t]);const B=l=>{i!==null&&T(Math.max(0,l))},{maskColumns:X,maskOn:Y,maskView:_,onToggleMask:ee}=pe({columns:a?.columns??K,selectedTable:i}),J=a?.total??0,te=d>0,re=a!==null&&d+a.rows.length<J,se=a===null||a.rows.length===0?0:d+1,le=a===null?0:d+a.rows.length,ae=()=>{P.refetch()},oe=()=>{B(d-g)},ne=()=>{B(d+g)},ie=l=>{B(Math.max(0,(l-1)*g))},ce=l=>{L(l),T(0)};return F("div",{className:"flex h-full min-w-0","data-testid":"lunora-global-data-browser",children:[r(be,{header:F("div",{className:"flex shrink-0 flex-col items-stretch gap-2 border-b border-border p-3",children:[f,r("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"gdb-cf-link",href:xe,rel:"noreferrer",target:"_blank",children:u("Open in Cloudflare")})]}),onReload:ae,onSelect:x,prefix:"gdb",selected:i,tables:k??Oe}),F("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[N!==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:N}),k!==null&&k.length===0&&r(Me,{}),b!==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:b}),k!==null&&k.length>0&&a===null&&b===null&&r("div",{className:"flex flex-1 items-center justify-center p-6",children:r("p",{className:"text-sm text-muted-foreground",children:u("Select a table to browse its rows.")})}),a!==null&&r(Ee,{filters:c,hasMaskedColumns:X.size>0,mask:_,maskOn:Y,onChangePageSize:ce,onJumpToPage:ie,onNext:ne,onPrevious:oe,onRemoveFilter:G,onToggleMask:ee,page:a,pageSize:g,pagination:{hasNext:re,hasPrevious:te,rangeEnd:le,rangeStart:se,total:J}})]}),r(he,{columns:a?.columns??K,facets:z,mask:_,onFacetFilter:m,onToggleFacet:M})]})};export{Ie as GlobalDataBrowser};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./badge-cAk9Di1Q.js";import"./card-BGlQzQY-.js";import"./empty-state-B939z6K2.js";import"./use-admin-query-P0RJrjsD.js";import"./DEFAULT_LOCALE-A1Yg5ORA.js";import"./ADMIN_FUNCTIONS-B6z7VLYt.js";import"./internal-CwaF9YNk.js";import"./utils-bhneXptQ.js";import"./DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js";import{H as n}from"./home-panel-DHOa3sxt.js";export{n as HomePanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Ce}from"react/compiler-runtime";import{useLunora as Se}from"@lunora/react";import{useState as Q,useEffect as Ie}from"react";import{ConfirmButton as Ee}from"./ConfirmButton-Cj2SOapE.js";import{E as Me}from"./error-alert-TYdKetJd.js";import{L as Te}from"./live-status-Bf7rR8o8.js";import{ShardInput as _e}from"./ShardInput-CdawpUiS.js";import{B as ke}from"./badge-cAk9Di1Q.js";import{B as Le}from"./button-BOPLD1un.js";import{C as we,a as De}from"./card-BGlQzQY-.js";import{E as Be}from"./empty-state-B939z6K2.js";import{I as Ae}from"./input-CY5W3wzv.js";import{L as ue}from"./label-BOUo-DP0.js";import{T as Ke,a as je,b as fe,c as u,d as Fe,e as f}from"./table-BMsuYFhk.js";import{u as Oe}from"./use-admin-query-P0RJrjsD.js";import{u as qe}from"./use-shard-key-BsP3o5wT.js";import{useT as He}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{ADMIN_FUNCTIONS as he}from"./ADMIN_FUNCTIONS-B6z7VLYt.js";import{i as Qe,c as Ue,f as $e,d as ze,b as Ge}from"./internal-CwaF9YNk.js";import{r as Pe}from"./shard-history-DU5b3QDI.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";const We=Ue(he.runMigration),yt=i=>{const e=Ce(98),{initialShardKey:pe}=i,re=Se(),t=He(),{queryShardKey:d,setShardKey:ie,shardKey:a}=qe(pe),[h,ge]=Q(""),[p,ye]=Q("up"),[l,be]=Q(!0),[g,ce]=Q(!1),[c,ne]=Q(null),[U,se]=Q(null);let $;e[0]!==a?($=a.trim(),e[0]=a,e[1]=$):$=e[1];const z=$===d;let G;e[2]===Symbol.for("react.memo_cache_sentinel")?(G={},e[2]=G):G=e[2];let P;e[3]!==d?(P={live:!0,shardKey:d},e[3]=d,e[4]=P):P=e[4];const n=Oe(he.migrationStatus,G,P),o=n.data?.migrations??null,ae=n.error,{errorSource:le,liveError:oe}=n;let W,J;e[5]!==d||e[6]!==n.data?(W=()=>{n.data!==void 0&&Pe(d)},J=[n.data,d],e[5]=d,e[6]=n.data,e[7]=W,e[8]=J):(W=e[7],J=e[8]),Ie(W,J);let V;if(e[9]!==re||e[10]!==p||e[11]!==l||e[12]!==h||e[13]!==a||e[14]!==n||e[15]!==t){const m=async()=>{const me=h.trim();if(me===""){se(t("Enter a migration id")),ne(null);return}ce(!0),se(null);try{const de=await re.query(We,{direction:p,dryRun:l,id:me},ze(a));ne(de),n.refetch()}catch(de){const Ne=de;ne(null),se(Ge(Ne))}ce(!1)};V=()=>{$e(m())},e[9]=re,e[10]=p,e[11]=l,e[12]=h,e[13]=a,e[14]=n,e[15]=t,e[16]=V}else V=e[16];const X=V;let Y;e[17]===Symbol.for("react.memo_cache_sentinel")?(Y=m=>{ge(m.target.value)},e[17]=Y):Y=e[17];const ve=Y;let Z;e[18]===Symbol.for("react.memo_cache_sentinel")?(Z=m=>{ye(m.target.value==="down"?"down":"up")},e[18]=Z):Z=e[18];const xe=Z;let ee;e[19]===Symbol.for("react.memo_cache_sentinel")?(ee=m=>{be(m.target.checked)},e[19]=ee):ee=e[19];const Re=ee;let y;e[20]!==ie||e[21]!==a?(y=r(_e,{onChange:ie,testId:"mg-shard-input",value:a}),e[20]=ie,e[21]=a,e[22]=y):y=e[22];let b;e[23]!==oe?(b=r(Te,{message:oe,prefix:"mg"}),e[23]=oe,e[24]=b):b=e[24];let v;e[25]!==y||e[26]!==b?(v=s("div",{className:"flex flex-wrap items-center gap-2",children:[y,b]}),e[25]=y,e[26]=b,e[27]=v):v=e[27];let x;e[28]!==ae||e[29]!==le?(x=ae!==null&&r(Me,{error:le,testId:"mg-status-error"}),e[28]=ae,e[29]=le,e[30]=x):x=e[30];let R;e[31]!==o||e[32]!==t?(R=o!==null&&o.length===0&&r(Be,{description:t("Data migrations you run against this shard will be tracked here."),icon:r("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:r("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:t("No migrations have run on this shard.")}),e[31]=o,e[32]=t,e[33]=R):R=e[33];let N;e[34]!==o||e[35]!==t?(N=o!==null&&o.length>0&&r(we,{className:"overflow-hidden py-0",children:r(De,{className:"px-0",children:s(Ke,{"data-testid":"mg-table",children:[r(je,{children:s(fe,{children:[r(u,{children:t("id")}),r(u,{children:t("direction")}),r(u,{children:t("status")}),r(u,{children:t("processed")}),r(u,{children:t("changed")}),r(u,{children:t("updated")}),r(u,{children:t("error")})]})}),r(Fe,{children:o.map(Je)})]})})}),e[34]=o,e[35]=t,e[36]=N):N=e[36];let C;e[37]!==t?(C=t("Run migration"),e[37]=t,e[38]=C):C=e[38];let S;e[39]!==C?(S=r(ue,{children:C}),e[39]=C,e[40]=S):S=e[40];let I;e[41]!==t?(I=t("Migration id"),e[41]=t,e[42]=I):I=e[42];let E;e[43]!==t?(E=t("migration id"),e[43]=t,e[44]=E):E=e[44];let M;e[45]!==h||e[46]!==I||e[47]!==E?(M=r(Ae,{"aria-label":I,className:"w-auto","data-testid":"mg-id-input",onChange:ve,placeholder:E,value:h}),e[45]=h,e[46]=I,e[47]=E,e[48]=M):M=e[48];let T;e[49]!==t?(T=t("Direction"),e[49]=t,e[50]=T):T=e[50];let _;e[51]!==t?(_=t("up"),e[51]=t,e[52]=_):_=e[52];let k;e[53]!==_?(k=r("option",{value:"up",children:_}),e[53]=_,e[54]=k):k=e[54];let L;e[55]!==t?(L=t("down"),e[55]=t,e[56]=L):L=e[56];let w;e[57]!==L?(w=r("option",{value:"down",children:L}),e[57]=L,e[58]=w):w=e[58];let D;e[59]!==p||e[60]!==T||e[61]!==k||e[62]!==w?(D=s("select",{"aria-label":T,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:xe,value:p,children:[k,w]}),e[59]=p,e[60]=T,e[61]=k,e[62]=w,e[63]=D):D=e[63];let B;e[64]!==l?(B=r("input",{checked:l,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:Re,type:"checkbox"}),e[64]=l,e[65]=B):B=e[65];let A;e[66]!==t?(A=t("Dry run"),e[66]=t,e[67]=A):A=e[67];let K;e[68]!==B||e[69]!==A?(K=s(ue,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[B,A]}),e[68]=B,e[69]=A,e[70]=K):K=e[70];let j;e[71]!==l||e[72]!==X||e[73]!==g||e[74]!==z||e[75]!==t?(j=l?r(Le,{"data-testid":"mg-run",disabled:g||!z,onClick:X,type:"button",children:t(g?"Running…":"Run")}):r(Ee,{confirmLabel:t(g?"Running…":"Run migration?"),disabled:g||!z,onConfirm:X,testId:"mg-run",children:t("Run")}),e[71]=l,e[72]=X,e[73]=g,e[74]=z,e[75]=t,e[76]=j):j=e[76];let F;e[77]!==M||e[78]!==D||e[79]!==K||e[80]!==j?(F=s("div",{className:"flex flex-wrap items-center gap-2",children:[M,D,K,j]}),e[77]=M,e[78]=D,e[79]=K,e[80]=j,e[81]=F):F=e[81];let O;e[82]!==S||e[83]!==F?(O=s("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[S,F]}),e[82]=S,e[83]=F,e[84]=O):O=e[84];let q;e[85]!==U?(q=U!==null&&r("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:U}),e[85]=U,e[86]=q):q=e[86];let H;e[87]!==c||e[88]!==t?(H=c!==null&&s("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[c.dryRun?t("Dry run: "):"",t("{status} — processed",{status:c.status}),c.processed,t(", changed"),c.changed]}),e[87]=c,e[88]=t,e[89]=H):H=e[89];let te;return e[90]!==v||e[91]!==x||e[92]!==R||e[93]!==N||e[94]!==O||e[95]!==q||e[96]!==H?(te=s("div",{className:"flex flex-col gap-3 pt-4","data-testid":"lunora-migrations",children:[v,x,R,N,O,q,H]}),e[90]=v,e[91]=x,e[92]=R,e[93]=N,e[94]=O,e[95]=q,e[96]=H,e[97]=te):te=e[97],te};function Je(i){return s(fe,{"data-testid":`mg-row-${i.id}`,children:[r(f,{children:i.id}),r(f,{children:i.direction}),r(f,{children:r(ke,{variant:"secondary",children:i.status})}),r(f,{children:i.processed}),r(f,{children:i.changed}),r(f,{children:Qe(i.updatedAt)}),r(f,{children:i.error??""})]},i.id)}export{yt as MigrationsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k}from"react/compiler-runtime";import{useLunora as O}from"@lunora/react";import{E as g}from"./empty-state-B939z6K2.js";import{S as y}from"./skeleton-DFBBaJU6.js";import{u as R,R as S}from"./reference-view-BU2dNK9Z.js";import{useT as P}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{jsxs as h,jsx as l}from"react/jsx-runtime";const x=n=>(n.params??[]).find(e=>e.name==="args")??(n.params??[])[0],v=n=>n["x-tags"]?.[0]?.name??(n.name.includes(":")?n.name.slice(0,n.name.indexOf(":")):""),w=n=>{const e=x(n)?.schema;return{argsSchema:e,description:n.description,functionPath:n.name,httpPath:"/_lunora/rpc",key:n.name,kind:n["x-lunora-function-kind"],method:"POST",operationId:n.name,requestSchema:e,responses:[{description:n.result?.name,schema:n.result?.schema,status:"200"}],summary:n.summary??n.name,tags:[v(n)],title:n.summary??n.name}},I=n=>{const e=n??{},m=(e.methods??[]).map(a=>w(a)),r=new Map;for(const a of m){const i=a.tags[0]??"",s=r.get(i)??[];s.push(a),r.set(i,s)}return{groups:[...r.entries()].map(([a,i])=>({name:a,operations:i.toSorted((s,p)=>s.operationId.localeCompare(p.operationId))})).toSorted((a,i)=>a.name.localeCompare(i.name)),operationByKey:new Map(m.map(a=>[a.key,a])),title:e.info?.title??"API reference",version:e.info?.version}},C=n=>n.methods===void 0||n.methods.length===0,N=n=>{const e=n;return C(e)?{kind:"empty"}:{kind:"ready",spec:e}},T=n=>{const e=k(23),{spec:m}=n,r=P(),f=O();let a;e[0]!==f?(a=()=>f.fetchOpenRpc(),e[0]=f,e[1]=a):a=e[1];const s=R(m,a,N);let p;e[2]!==s.kind||e[3]!==s.spec?(p=s.kind==="ready"?I(s.spec):void 0,e[2]=s.kind,e[3]=s.spec,e[4]=p):p=e[4];const u=p;if(s.kind==="loading"){let t;return e[5]===Symbol.for("react.memo_cache_sentinel")?(t=h("div",{className:"flex flex-col gap-4","data-testid":"openrpc-reference-loading",children:[l(y,{className:"h-8 w-48"}),l(y,{className:"h-64 w-full"})]}),e[5]=t):t=e[5],t}if(s.kind==="error"){let t;e[6]!==s.message||e[7]!==r?(t=r("Couldn't load the OpenRPC spec: {message}",{message:s.message}),e[6]=s.message,e[7]=r,e[8]=t):t=e[8];let o;e[9]!==r?(o=r("API reference unavailable"),e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==t||e[12]!==o?(c=l(g,{description:t,testId:"openrpc-reference-error",title:o}),e[11]=t,e[12]=o,e[13]=c):c=e[13],c}if(s.kind==="empty"||u===void 0){let t;e[14]!==r?(t=r("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here."),e[14]=r,e[15]=t):t=e[15];let o;e[16]!==r?(o=r("No OpenRPC spec configured"),e[16]=r,e[17]=o):o=e[17];let c;return e[18]!==t||e[19]!==o?(c=l(g,{description:t,testId:"openrpc-reference-empty",title:o}),e[18]=t,e[19]=o,e[20]=c):c=e[20],c}let d;return e[21]!==u?(d=l(S,{model:u}),e[21]=u,e[22]=d):d=e[22],d};export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as I}from"react/compiler-runtime";import{useLunora as $}from"@lunora/react";import{useState as w,useEffect as H}from"react";import{ConfirmButton as M}from"./ConfirmButton-Cj2SOapE.js";import{C as P,a as Q}from"./card-BGlQzQY-.js";import{E as R}from"./empty-state-B939z6K2.js";import{T as q,a as D,b as J,c as l,d as K,e as i}from"./table-BMsuYFhk.js";import{b as V}from"./use-admin-query-P0RJrjsD.js";import{useAutoRefresh as W}from"./DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js";import{useT as z}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{f as G,i as O,b as U}from"./internal-CwaF9YNk.js";import{jsx as t,jsxs as p}from"react/jsx-runtime";const X=s=>Number.isFinite(s)?O(s,"—"):"—",j=s=>s.toSorted((e,u)=>e.scheduledFor-u.scheduledFor),Y=(s,e,u)=>e!==void 0?e:u===void 0?f=>s.cancelScheduledJob(f):void 0,he=s=>{const e=I(16),{cancelJob:u,loadJobs:f}=s===void 0?{}:s,n=$(),o=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 d=V(b,async()=>{const r=await(f??(()=>n.listScheduledJobs()))();return j(r)}),[F,L]=w(void 0),[A,S]=w(void 0);let v,x;e[1]!==n||e[2]!==c?(v=()=>{if(c)return n.subscribeScheduledJobs(r=>{S(void 0),L(j(r))})},x=[c,n],e[1]=n,e[2]=c,e[3]=v,e[4]=x):(v=e[3],x=e[4]),H(v,x);let y;e[5]!==d?(y=()=>{d.refetch()},e[5]=d,e[6]=y):y=e[6],W(y,!c);const C=Y(n,u,f),a=F??d.data,N=A??d.error,E=async r=>{if(C!==void 0){S(void 0);try{await C(r),c||d.refetch()}catch(_){S(U(_))}}},k="flex flex-col gap-3",B="lunora-scheduled-jobs";let m;e[7]!==N?(m=N!==null&&t("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:N}),e[7]=N,e[8]=m):m=e[8];let h;e[9]!==a?.length||e[10]!==o?(h=a?.length===0&&t(R,{description:o("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:[t("circle",{cx:"12",cy:"12",r:"9"}),t("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:o("No scheduled jobs.")}),e[9]=a?.length,e[10]=o,e[11]=h):h=e[11];const T=a!==void 0&&a.length>0&&t(P,{className:"overflow-hidden py-0",children:t(Q,{className:"px-0",children:p(q,{"data-testid":"sj-table",children:[t(D,{children:p(J,{children:[t(l,{children:o("function")}),t(l,{children:o("scheduled for")}),t(l,{children:o("pool")}),t(l,{children:o("attempts")}),t(l,{children:o("shard")}),t(l,{children:o("id")}),C!==void 0&&t(l,{"aria-label":o("Actions")})]})}),t(K,{children:a.map(r=>p(J,{"data-testid":`sj-row-${r.id}`,children:[t(i,{className:"font-mono text-xs",children:r.functionPath}),t(i,{className:"text-muted-foreground tabular-nums",children:X(r.scheduledFor)}),t(i,{className:"font-mono text-xs",children:r.pool??""}),t(i,{className:"tabular-nums",children:r.attempts??0}),t(i,{children:r.shardKey??""}),t(i,{className:"font-mono text-xs",children:r.id}),C!==void 0&&t(i,{className:"text-right",children:t(M,{confirmLabel:o("Cancel job?"),onConfirm:()=>{G(E(r.id))},testId:`sj-cancel-${r.id}`,children:o("Cancel")})})]},r.id))})]})})});let g;return e[12]!==T||e[13]!==m||e[14]!==h?(g=p("div",{className:k,"data-testid":B,children:[m,h,T]}),e[12]=T,e[13]=m,e[14]=h,e[15]=g):g=e[15],g};export{he as ScheduledJobs};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S}from"react/compiler-runtime";import{useId as x,useState as C}from"react";import{useT as b}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{l as j}from"./shard-history-DU5b3QDI.js";import{I as k}from"./input-CY5W3wzv.js";import{jsx as I,jsxs as y,Fragment as _}from"react/jsx-runtime";const A=r=>{const t=S(21),{id:p,onChange:f,testId:e,value:u}=r,n=b(),c=x(),[i]=C($);let d;t[0]!==f?(d=v=>{f(v.target.value)},t[0]=f,t[1]=d):d=t[1];const h=d;let o;t[2]!==n?(o=n("Shard key"),t[2]=n,t[3]=o):o=t[3];const g=i.length>0?c:void 0;let l;t[4]!==n?(l=n("shard key (optional)"),t[4]=n,t[5]=l):l=t[5];let s;t[6]!==p||t[7]!==h||t[8]!==o||t[9]!==g||t[10]!==l||t[11]!==e||t[12]!==u?(s=I(k,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:p,list:g,onChange:h,placeholder:l,value:u}),t[6]=p,t[7]=h,t[8]=o,t[9]=g,t[10]=l,t[11]=e,t[12]=u,t[13]=s):s=t[13];let a;t[14]!==c||t[15]!==i||t[16]!==e?(a=i.length>0&&I("datalist",{"data-testid":`${e}-recents`,id:c,children:i.map(w)}),t[14]=c,t[15]=i,t[16]=e,t[17]=a):a=t[17];let m;return t[18]!==s||t[19]!==a?(m=y(_,{children:[s,a]}),t[18]=s,t[19]=a,t[20]=m):m=t[20],m};function $(){return j()}function w(r){return I("option",{"aria-label":r,value:r},r)}export{A as ShardInput};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as b}from"./studio-CXai1O2K.js";import"./ErrorBoundary-BWNF98VF.js";import"./operation-console-provider-DoloEvon.js";import"./badge-cAk9Di1Q.js";import"./input-CY5W3wzv.js";import"./skeleton-DFBBaJU6.js";import"./home-panel-DHOa3sxt.js";import"./DEFAULT_LOCALE-A1Yg5ORA.js";import"./StudioI18nProvider-Bl547evf.js";import"./data-view-params-qoSTqjAj.js";import"./internal-CwaF9YNk.js";import"./utils-bhneXptQ.js";import"./CommandPalette-HqiXrWIm.js";export{b as Studio};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as O}from"react/compiler-runtime";import{LunoraClient as G}from"@lunora/client";import{LunoraProvider as H}from"@lunora/react";import{useState as B,useEffect as R}from"react";import{ErrorBoundary as z}from"./ErrorBoundary-BWNF98VF.js";import{u as U,B as V,T as Y,a as q,S as J}from"./studio-CXai1O2K.js";import Q from"./useDebounced-DVeQ5-oW.js";import{useT as j,createStudioI18n as X}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{StudioI18nProvider as D}from"./StudioI18nProvider-Bl547evf.js";import{r as Z}from"./internal-CwaF9YNk.js";import{w as $}from"./recording-client-CKn4-vUx.js";import F from"./STUDIO_ROOT_CLASS-C6MccdVk.js";import{a as K}from"./browser-storage-BH1MxLZs.js";import{c as W}from"./utils-bhneXptQ.js";import{B as ee}from"./button-BOPLD1un.js";import{I as te}from"./input-CY5W3wzv.js";import{jsx as g,jsxs as L}from"react/jsx-runtime";const P="lunora-studio-admin-token",oe=()=>{try{return K("session")?.getItem(P)??""}catch{return""}},ne=b=>{const e=K("session");if(e!==void 0)try{b===""?e.removeItem(P):e.setItem(P,b)}catch{}},se="/_lunora/admin/ws-token",ie=1e4,le=b=>{const e=b;return typeof e?.token=="string"&&e.token.length>0&&typeof e.expiresAtMs=="number"},re=b=>{const{adminToken:e,baseUrl:d}=b,o=b.fetchImpl??fetch;let n=d;for(;n.endsWith("/");)n=n.slice(0,-1);const r=`${n}${se}`;let t,s=!1,i;const f=async()=>{const u=await o(r,{headers:{authorization:`Bearer ${e}`},method:"POST"});if(u.status===404||u.status===405)return s=!0,e;if(!u.ok)throw new Error(`ws-token mint failed: ${String(u.status)}`);const l=await u.json().catch(()=>{});if(!le(l))throw new Error("ws-token mint failed: malformed response body");return t=l,l.token};return{getToken:async()=>s?e:t!==void 0&&t.expiresAtMs-ie>Date.now()?t.token:(i??=f().finally(()=>{i=void 0}),i),invalidate:()=>{t=void 0}}},ae=b=>{const e=O(42),{onSubmit:d}=b,o=j(),[n,r]=B("");let t;e[0]!==n?(t=n.trim(),e[0]=n,e[1]=t):t=e[1];const s=t;let i;e[2]!==d||e[3]!==s?(i=_=>{_.preventDefault(),s!==""&&d(s)},e[2]=d,e[3]=s,e[4]=i):i=e[4];const f=i;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=g("div",{className:"h-10 w-10 text-foreground",children:g(V,{})}),e[5]=u):u=e[5];let l;e[6]!==o?(l=o("Connect to Lunora Studio"),e[6]=o,e[7]=l):l=e[7];let v;e[8]!==l?(v=g("h1",{className:"text-base font-semibold text-foreground",children:l}),e[8]=l,e[9]=v):v=e[9];let k;e[10]!==o?(k=o("Enter your admin token to access the studio."),e[10]=o,e[11]=k):k=e[11];let m;e[12]!==k?(m=g("p",{className:"text-[13px] text-muted-foreground",children:k}),e[12]=k,e[13]=m):m=e[13];let c;e[14]!==v||e[15]!==m?(c=L("div",{className:"flex flex-col items-center gap-3 text-center",children:[u,L("div",{className:"flex flex-col gap-1",children:[v,m]})]}),e[14]=v,e[15]=m,e[16]=c):c=e[16];let h;e[17]!==o?(h=o("admin token"),e[17]=o,e[18]=h):h=e[18];let a;e[19]!==h?(a=g("label",{className:"text-xs font-medium text-foreground",htmlFor:"lunora-studio-login-token",children:h}),e[19]=h,e[20]=a):a=e[20];let p;e[21]===Symbol.for("react.memo_cache_sentinel")?(p=_=>{r(_.target.value)},e[21]=p):p=e[21];let S;e[22]!==n?(S=g(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]=S):S=e[23];let x;e[24]!==o?(x=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]=x):x=e[25];let A;e[26]!==x?(A=g("p",{className:"text-[11px] text-muted-foreground",children:x}),e[26]=x,e[27]=A):A=e[27];let T;e[28]!==a||e[29]!==S||e[30]!==A?(T=L("div",{className:"flex flex-col gap-1.5",children:[a,S,A]}),e[28]=a,e[29]=S,e[30]=A,e[31]=T):T=e[31];const E=s==="";let y;e[32]!==o?(y=o("Connect"),e[32]=o,e[33]=y):y=e[33];let w;e[34]!==E||e[35]!==y?(w=g(ee,{"data-testid":"lunora-studio-login-submit",disabled:E,type:"submit",children:y}),e[34]=E,e[35]=y,e[36]=w):w=e[36];let N;return e[37]!==f||e[38]!==T||e[39]!==w||e[40]!==c?(N=L("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:f,children:[c,T,w]}),e[37]=f,e[38]=T,e[39]=w,e[40]=c,e[41]=N):N=e[41],N},ce=b=>{const e=O(10),{i18n:d,onSubmit:o}=b,{resolvedTheme:n}=U(),r=n==="dark"&&"dark";let t;e[0]!==r?(t=W(F,r,"flex h-dvh items-center justify-center bg-sidebar p-6 text-sm text-foreground"),e[0]=r,e[1]=t):t=e[1];let s;e[2]!==o?(s=g(ae,{onSubmit:o}),e[2]=o,e[3]=s):s=e[3];let i;e[4]!==d||e[5]!==s?(i=g(D,{i18n:d,children:s}),e[4]=d,e[5]=s,e[6]=i):i=e[6];let f;return e[7]!==t||e[8]!==i?(f=g("div",{className:t,"data-testid":"lunora-studio-login-root",children:i}),e[7]=t,e[8]=i,e[9]=f):f=e[9],f},de=b=>{const e=O(23),{basePath:d,chrome:o,studio:n}=b,r=j();let t;e[0]!==r?(t=r("Studio failed"),e[0]=r,e[1]=t):t=e[1];let s;e[2]!==r?(s=r("Studio"),e[2]=r,e[3]=s):s=e[3];let i;e[4]!==r?(i=r("Try again"),e[4]=r,e[5]=i):i=e[5];const f=n?.dataEditable,u=n?.functions,l=n?.initialShardKey,v=n?.openApiSpec,k=n?.openRpcSpec,m=n?.runAsIdentity,c=n?.scheduledCancel,h=n?.scheduledLoad,a=n?.schemaEditable;let p;e[6]!==d||e[7]!==o||e[8]!==c||e[9]!==h||e[10]!==a||e[11]!==f||e[12]!==u||e[13]!==l||e[14]!==v||e[15]!==k||e[16]!==m?(p=g(J,{basePath:d,chrome:o,dataEditable:f,functions:u,initialShardKey:l,openApiSpec:v,openRpcSpec:k,runAsIdentity:m,scheduledCancel:c,scheduledLoad:h,schemaEditable:a}),e[6]=d,e[7]=o,e[8]=c,e[9]=h,e[10]=a,e[11]=f,e[12]=u,e[13]=l,e[14]=v,e[15]=k,e[16]=m,e[17]=p):p=e[17];let S;return e[18]!==t||e[19]!==p||e[20]!==s||e[21]!==i?(S=g(z,{fallbackTitle:t,label:s,retryLabel:i,children:p}),e[18]=t,e[19]=p,e[20]=s,e[21]=i,e[22]=S):S=e[22],S},fe=b=>{const e=O(20),{basePath:d,clearToken:o,client:n,i18n:r,onTokenChange:t,rulesInstalled:s,studio:i,token:f}=b,{resolvedTheme:u}=U();let l;e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==f?(l={clearToken:o,onTokenChange:t,rulesInstalled:s,token:f},e[0]=o,e[1]=t,e[2]=s,e[3]=f,e[4]=l):l=e[4];const v=l,k=u==="dark"&&"dark";let m;e[5]!==k?(m=W(F,k,"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground"),e[5]=k,e[6]=m):m=e[6];let c;e[7]!==d||e[8]!==v||e[9]!==i?(c=g(q,{children:g(de,{basePath:d,chrome:v,studio:i})}),e[7]=d,e[8]=v,e[9]=i,e[10]=c):c=e[10];let h;e[11]!==r||e[12]!==c?(h=g(D,{i18n:r,children:c}),e[11]=r,e[12]=c,e[13]=h):h=e[13];let a;e[14]!==n||e[15]!==h?(a=g(H,{client:n,children:h}),e[14]=n,e[15]=h,e[16]=a):a=e[16];let p;return e[17]!==m||e[18]!==a?(p=g("div",{className:m,"data-testid":"lunora-studio-app",children:a}),e[17]=m,e[18]=a,e[19]=p):p=e[19],p},Ee=b=>{const e=O(27);let d;e[0]!==b?(d=b===void 0?{}:b,e[0]=b,e[1]=d):d=e[1];const{adminToken:o,basePath:n,baseUrl:r,client:t,rulesInstalled:s,studio:i,locale:f}=d;let u;e[2]!==o?(u=()=>o??oe(),e[2]=o,e[3]=u):u=e[3];const[l,v]=B(u);let k,m;e[4]!==l?(k=()=>{ne(l)},m=[l],e[4]=l,e[5]=k,e[6]=m):(k=e[5],m=e[6]),R(k,m);const c=Q(l,300);let h;e:{if(t!==void 0){let I;e[7]!==t?(I=$(t),e[7]=t,e[8]=I):I=e[8],h=I;break e}let _;if(e[9]!==r||e[10]!==c){const I=Z(r),C=c===""?void 0:re({adminToken:c,baseUrl:I}),M=new G({url:I,...C===void 0?{}:{wsToken:C.getToken}});C!==void 0&&(M.setAuthToken(c),M.onTokenExpired(C.invalidate)),_=$(M),e[9]=r,e[10]=c,e[11]=_}else _=e[11];h=_}const a=h;let p,S;e[12]!==a||e[13]!==t?(p=()=>()=>{t===void 0&&a.close()},S=[a,t],e[12]=a,e[13]=t,e[14]=p,e[15]=S):(p=e[14],S=e[15]),R(p,S);let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=_=>{v(_.target.value)},e[16]=x):x=e[16];const A=x;let T;e[17]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{v("")},e[17]=T):T=e[17];const E=T;let y;e[18]!==f?(y=X(f),e[18]=f,e[19]=y):y=e[19];const w=y;let N;return e[20]!==n||e[21]!==a||e[22]!==w||e[23]!==s||e[24]!==i||e[25]!==l?(N=g(Y,{children:l===""?g(ce,{i18n:w,onSubmit:v}):g(fe,{basePath:n,clearToken:E,client:a,i18n:w,onTokenChange:A,rulesInstalled:s,studio:i,token:l})}),e[20]=n,e[21]=a,e[22]=w,e[23]=s,e[24]=i,e[25]=l,e[26]=N):N=e[26],N};export{Ee as StudioApp};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u}from"react/compiler-runtime";import{studioI18n as f,createStudioI18n as l,StudioI18nContext as m}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{jsx as v}from"react/jsx-runtime";const I=(e,t,o)=>e!==void 0?e:t===void 0&&o===void 0?f:l(t,o),S=e=>{const t=u(7),{catalogs:o,children:i,i18n:s,locale:c}=e;let r;t[0]!==o||t[1]!==s||t[2]!==c?(r=I(s,c,o),t[0]=o,t[1]=s,t[2]=c,t[3]=r):r=t[3];const d=r;let n;return t[4]!==i||t[5]!==d?(n=v(m,{value:d,children:i}),t[4]=i,t[5]=d,t[6]=n):n=t[6],n};export{S as StudioI18nProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as g}from"react";import{E as x}from"./error-alert-TYdKetJd.js";import{C as N,a as y}from"./card-BGlQzQY-.js";import{T as v,a as T,b as d,c as m,d as w,e as l}from"./table-BMsuYFhk.js";import{useT as E}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{c as L}from"./utils-bhneXptQ.js";import{jsxs as o,jsx as t}from"react/jsx-runtime";const C={ERROR:"error",INFO:"info",WARN:"warning"},z=e=>{const a=typeof e.metadata.table=="string"?e.metadata.table:void 0;return{description:`${e.detail} ${e.remediation}`,entity:a,issueType:e.title,key:e.cacheKey,level:C[e.level]}},R=["error","warning","info"],A={error:"bg-destructive",info:"bg-info",warning:"bg-warning"},$=(e,a)=>({error:e("Errors"),info:e("Info"),warning:e("Warnings")})[a],k=(e,a,n)=>({error:e("{count} errors",{count:n}),info:e("{count} suggestions",{count:n}),warning:e("{count} warnings",{count:n})})[a],V=(e,a)=>({error:e("No errors detected"),info:e("No suggestions"),warning:e("No warnings detected")})[a],O=e=>{const a={error:0,info:0,warning:0};for(const n of e??[])a[n.level]+=1;return a},F=({error:e=null,errorSource:a,rows:n,testId:i,toolbar:p})=>{const s=E(),[c,f]=g("error"),b=O(n),u=(n??[]).filter(r=>r.level===c),h=r=>{f(r.currentTarget.dataset.level)};return o("div",{className:"flex flex-col gap-3","data-testid":i,children:[t("div",{className:"flex border-b border-border",role:"tablist",children:R.map(r=>o("button",{"aria-selected":c===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":`${i}-tab-${r}`,onClick:h,role:"tab",type:"button",children:[o("span",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[t("span",{"aria-hidden":"true",className:L("size-2 rounded-sm",A[r])}),$(s,r)]}),t("span",{className:"ps-4 text-xs text-muted-foreground",children:k(s,r,b[r])})]},r))}),p!==void 0&&t("div",{className:"flex flex-wrap items-center gap-2",children:p}),e!==null&&t(x,{error:a??e,testId:`${i}-error`}),t(N,{className:"overflow-hidden py-0",children:t(y,{className:"px-0",children:o(v,{children:[t(T,{children:o(d,{children:[t(m,{children:s("Issue type")}),t(m,{children:s("Entity/item")}),t(m,{children:s("Description")})]})}),t(w,{children:u.length===0?t(d,{children:o(l,{className:"h-40 text-center align-middle text-muted-foreground",colSpan:3,"data-testid":`${i}-empty`,children:[t("span",{className:"block text-sm font-medium text-foreground",children:V(s,c)}),t("span",{className:"block text-sm",children:s("Nothing to report for this deployment.")})]})}):u.map(r=>o(d,{children:[t(l,{className:"font-medium text-foreground",children:r.issueType}),t(l,{className:"font-mono text-xs text-muted-foreground",children:r.entity??"—"}),o(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{F as A,z as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l}from"react/compiler-runtime";import{cva as c}from"class-variance-authority";import{c as v}from"./utils-bhneXptQ.js";import{jsx as f,jsxs as b}from"react/jsx-runtime";const u=c("flex items-start gap-2 rounded-md border px-3 py-2 text-sm [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"border-border bg-muted/40 text-foreground",destructive:"border-destructive/40 bg-destructive/5 text-destructive",warning:"border-amber-500/40 bg-amber-500/5 text-amber-700 dark:text-amber-400"}}}),N=n=>{const t=l(10),{children:s,className:i,icon:d,testId:o,variant:m}=n;let e;t[0]!==i||t[1]!==m?(e=v(u({variant:m}),i),t[0]=i,t[1]=m,t[2]=e):e=t[2];let r;t[3]!==s?(r=f("div",{className:"min-w-0 flex-1",children:s}),t[3]=s,t[4]=r):r=t[4];let a;return t[5]!==d||t[6]!==e||t[7]!==r||t[8]!==o?(a=b("div",{className:e,"data-testid":o,role:"alert",children:[d,r]}),t[5]=d,t[6]=e,t[7]=r,t[8]=o,t[9]=a):a=t[9],a};export{N as A};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mergeProps as n}from"@base-ui/react/merge-props";import{useRender as a}from"@base-ui/react/use-render";import{cva as o}from"class-variance-authority";import{c as s}from"./utils-bhneXptQ.js";const d=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function f({className:r,variant:e="default",render:t,...i}){return a({defaultTagName:"span",props:n({className:s(d({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{f as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as a}from"@base-ui/react/button";import{cva as n}from"class-variance-authority";import{c as d}from"./utils-bhneXptQ.js";import{jsx as o}from"react/jsx-runtime";const s=n("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",xs:"h-6 gap-1 rounded-md px-2 text-xs has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-md px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-md","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function v({className:e,variant:r="default",size:i="default",...t}){return o(a,{"data-slot":"button",className:d(s({variant:r,size:i,className:e})),...t})}export{v as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as i}from"react/compiler-runtime";import{c as o}from"./utils-bhneXptQ.js";import{jsx as l}from"react/jsx-runtime";function p({className:d,size:e="default",...a}){return l("div",{"data-slot":"card","data-size":e,className:o("group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-border bg-card py-4 text-xs/relaxed text-card-foreground shadow-xs has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-md *:[img:last-child]:rounded-md",d),...a})}function f(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-md px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-header",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function u(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("font-heading text-sm font-medium group-data-[size=sm]/card:text-sm",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-title",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function x(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-description",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function g(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("px-4 group-data-[size=sm]/card:px-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-content",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}export{p as C,g as a,u as b,f as c,x as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as s}from"react/compiler-runtime";import{Checkbox as d}from"@base-ui/react/checkbox";import{c as l}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as b}from"@hugeicons/core-free-icons";import{jsx as n}from"react/jsx-runtime";function v(c){const e=s(9);let r,i;e[0]!==c?({className:r,...i}=c,e[0]=c,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=l("peer relative flex size-4 shrink-0 items-center justify-center rounded-md border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=n(d.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:n(m,{icon:b,strokeWidth:2})}),e[5]=t):t=e[5];let o;return e[6]!==i||e[7]!==a?(o=n(d.Root,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=o):o=e[8],o}export{v as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x}from"react/compiler-runtime";import{useT as w}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{h as y}from"./internal-CwaF9YNk.js";import{jsx as i,jsxs as u}from"react/jsx-runtime";const N=(l,e)=>{if(e==="")return[{match:!1,offset:0,text:l}];const a=[],s=l.toLowerCase(),o=e.toLowerCase();let t=0;for(let r=s.indexOf(o);r!==-1;r=s.indexOf(o,t))r>t&&a.push({match:!1,offset:t,text:l.slice(t,r)}),a.push({match:!0,offset:r,text:l.slice(r,r+e.length)}),t=r+e.length;return t<l.length&&a.push({match:!1,offset:t,text:l.slice(t)}),a},v=l=>{const e=x(9),{highlight:a,value:s}=l;if(s==null){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=n):n=e[0],n}let o,t,r;if(e[1]!==a||e[2]!==s){r=Symbol.for("react.early_return_sentinel");e:{const n=y(s);if(a===void 0||a===""){r=i("span",{title:n,children:n});break e}o=n,t=N(n,a).map(_)}e[1]=a,e[2]=s,e[3]=o,e[4]=t,e[5]=r}else o=e[3],t=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let d;return e[6]!==o||e[7]!==t?(d=i("span",{title:o,children:t}),e[6]=o,e[7]=t,e[8]=d):d=e[8],d},T=l=>{const e=x(22),{columns:a,rows:s}=l,o=w();let t;e[0]!==o?(t=o("Field"),e[0]=o,e[1]=t):t=e[1];let r;e[2]!==t?(r=i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:t}),e[2]=t,e[3]=r):r=e[3];let d;if(e[4]!==s||e[5]!==o){let c;e[7]!==o?(c=(b,p)=>i("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:o("Row {n}",{n:p+1})},p),e[7]=o,e[8]=c):c=e[8],d=s.map(c),e[4]=s,e[5]=o,e[6]=d}else d=e[6];let n;e[9]!==r||e[10]!==d?(n=i("thead",{className:"sticky top-0 z-10 bg-muted",children:u("tr",{children:[r,d]})}),e[9]=r,e[10]=d,e[11]=n):n=e[11];let f;if(e[12]!==a||e[13]!==s){let c;e[15]!==s?(c=b=>u("tr",{className:"hover:bg-muted/40",children:[i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:b}),s.map((p,g)=>i("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:i(v,{value:p[b]})},g))]},b),e[15]=s,e[16]=c):c=e[16],f=a.map(c),e[12]=a,e[13]=s,e[14]=f}else f=e[14];let m;e[17]!==f?(m=i("tbody",{children:f}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==n||e[20]!==m?(h=i("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:u("table",{className:"border-collapse text-xs",children:[n,m]})}),e[19]=n,e[20]=m,e[21]=h):h=e[21],h},j=({children:l,layout:e="card",testId:a})=>i("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":a,children:l});function _(l){return i("mark",{className:l.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:l.text},l.offset)}export{v as C,j as G,T};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c}from"react/compiler-runtime";import{Menu as i}from"@base-ui/react/menu";import{c as u}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as g}from"@hugeicons/core-free-icons";import{jsx as s,jsxs as v}from"react/jsx-runtime";function N(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Root,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function z(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Trigger,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function D({align:n="start",alignOffset:e=0,side:t="bottom",sideOffset:o=4,className:a,...r}){return s(i.Portal,{children:s(i.Positioner,{className:"isolate z-50 outline-none",align:n,alignOffset:e,side:t,sideOffset:o,children:s(i.Popup,{"data-slot":"dropdown-menu-content",className:u("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",a),...r})})})}function M(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Group,{"data-slot":"dropdown-menu-group",...t}),e[2]=t,e[3]=o):o=e[3],o}function y(n){const e=c(10);let t,o,a;e[0]!==n?({className:t,inset:o,...a}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==t?(r=u("px-2 py-2 text-xs text-muted-foreground data-inset:ps-7",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==a||e[8]!==r?(d=s(i.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:r,...a}),e[6]=o,e[7]=a,e[8]=r,e[9]=d):d=e[9],d}function I({className:n,inset:e,variant:t="default",...o}){return s(i.Item,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":t,className:u("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),...o})}function _(n){const e=c(15);let t,o,a,r,d;e[0]!==n?({className:a,children:o,checked:t,inset:r,...d}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=r,e[5]=d):(t=e[1],o=e[2],a=e[3],r=e[4],d=e[5]);let l;e[6]!==a?(l=u("relative flex cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[6]=a,e[7]=l):l=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:s(i.CheckboxItemIndicator,{children:s(m,{icon:g,strokeWidth:2})})}),e[8]=f):f=e[8];let p;return e[9]!==t||e[10]!==o||e[11]!==r||e[12]!==d||e[13]!==l?(p=v(i.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:l,checked:t,...d,children:[f,o]}),e[9]=t,e[10]=o,e[11]=r,e[12]=d,e[13]=l,e[14]=p):p=e[14],p}function C(n){const e=c(8);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("-mx-1 h-px bg-border",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=s(i.Separator,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}export{z as D,y as a,I as b,D as c,N as d,M as e,_ as f,C as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as h}from"react/compiler-runtime";import{c as v}from"./utils-bhneXptQ.js";import{jsx as a,jsxs as u}from"react/jsx-runtime";const y=g=>{const e=h(19),{action:o,className:f,description:c,icon:m,testId:x,title:p}=g;let t;e[0]!==f?(t=v("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border px-6 py-14 text-center",f),e[0]=f,e[1]=t):t=e[1];let s;e[2]!==m?(s=m!==void 0&&a("span",{className:"flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-5",children:m}),e[2]=m,e[3]=s):s=e[3];let l;e[4]!==p?(l=a("p",{className:"text-sm font-medium text-foreground",children:p}),e[4]=p,e[5]=l):l=e[5];let r;e[6]!==c?(r=c!==void 0&&a("p",{className:"max-w-sm text-sm text-muted-foreground",children:c}),e[6]=c,e[7]=r):r=e[7];let i;e[8]!==l||e[9]!==r?(i=u("div",{className:"flex flex-col gap-1",children:[l,r]}),e[8]=l,e[9]=r,e[10]=i):i=e[10];let d;e[11]!==o?(d=o!==void 0&&a("div",{className:"mt-1 flex items-center gap-2",children:o}),e[11]=o,e[12]=d):d=e[12];let n;return e[13]!==t||e[14]!==s||e[15]!==i||e[16]!==d||e[17]!==x?(n=u("div",{className:t,"data-testid":x,children:[s,i,d]}),e[13]=t,e[14]=s,e[15]=i,e[16]=d,e[17]=x,e[18]=n):n=e[18],n};export{y as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as A}from"react/compiler-runtime";import{flattenHint as I}from"@lunora/errors";import{useT as O}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{e as j,a as q,b as E}from"./internal-CwaF9YNk.js";import{o as H}from"./recording-client-CKn4-vUx.js";import{u as S}from"./operation-console-provider-DoloEvon.js";import{A as T}from"./alert-C2SEhYS9.js";import{jsx as v,jsxs as U}from"react/jsx-runtime";const G=y=>{const e=A(38),{className:w,error:t,testId:N}=y,g=O(),o=S();let s,l,i,n,a,c,r,m;if(e[0]!==w||e[1]!==t||e[2]!==o||e[3]!==N){const k=j(t);let h;e[12]!==t?(h=q(t),e[12]=t,e[13]=h):h=e[13],l=h;let b;e[14]!==t?(b=H(t),e[14]=t,e[15]=b):b=e[15];const C=b;let x;e[16]!==o||e[17]!==C?(x=()=>{o?.openConsole({errorsOnly:!0,seq:C})},e[16]=o,e[17]=C,e[18]=x):x=e[18],i=x,s=T,n=w,a=N,c="destructive";let u;e[19]!==t?(u=E(t),e[19]=t,e[20]=u):u=e[20],e[21]!==u?(r=v("p",{className:"font-medium",children:u}),e[21]=u,e[22]=r):r=e[22],m=k===void 0?null:v("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:I(k)}),e[0]=w,e[1]=t,e[2]=o,e[3]=N,e[4]=s,e[5]=l,e[6]=i,e[7]=n,e[8]=a,e[9]=c,e[10]=r,e[11]=m}else s=e[4],l=e[5],i=e[6],n=e[7],a=e[8],c=e[9],r=e[10],m=e[11];let f;e[23]!==l?(f=l===void 0?null:v("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:l,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=l,e[24]=f):f=e[24];let p;e[25]!==o||e[26]!==i||e[27]!==g?(p=o===void 0?null:v("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:i,type:"button",children:g("Show in console")}),e[25]=o,e[26]=i,e[27]=g,e[28]=p):p=e[28];let d;return e[29]!==s||e[30]!==n||e[31]!==a||e[32]!==c||e[33]!==r||e[34]!==m||e[35]!==f||e[36]!==p?(d=U(s,{className:n,testId:a,variant:c,children:[r,m,f,p]}),e[29]=s,e[30]=n,e[31]=a,e[32]=c,e[33]=r,e[34]=m,e[35]=f,e[36]=p,e[37]=d):d=e[37],d};export{G as E};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c as $}from"react/compiler-runtime";import{useNavigate as Je}from"@tanstack/react-router";import{useState as Ue,useEffect as Ke,Suspense as st,lazy as nt}from"react";import{B as Ye}from"./badge-cAk9Di1Q.js";import{C as B,a as Ze}from"./card-BGlQzQY-.js";import{E as lt}from"./empty-state-B939z6K2.js";import{u as _e}from"./use-admin-query-P0RJrjsD.js";import{useT as I}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{ADMIN_FUNCTIONS as Ne}from"./ADMIN_FUNCTIONS-B6z7VLYt.js";import{c as at,f as Se,d as rt,r as ot,g as it,l as ct}from"./internal-CwaF9YNk.js";import{c as Xe}from"./utils-bhneXptQ.js";import{deriveInsights as dt}from"./DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js";import{useLunora as et}from"@lunora/react";import{jsx as l,jsxs as h}from"react/jsx-runtime";import{B as Ve}from"./button-BOPLD1un.js";const ut=at(Ne.studioFeatures),tt={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,notifications:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},mt=t=>{if(t===null||typeof t!="object")return tt;const e=t,n=s=>typeof e[s]=="boolean"?e[s]:!0;return{analytics:n("analytics"),auth:n("auth"),containers:n("containers"),flags:n("flags"),kv:n("kv"),mail:n("mail"),notifications:n("notifications"),payments:n("payments"),queues:n("queues"),scheduler:n("scheduler"),storage:n("storage"),vectors:n("vectors"),workflows:n("workflows")}},ft=()=>{const t=$(3),e=et(),[n,s]=Ue(tt);let a,r;return t[0]!==e?(a=()=>{Se((async()=>{try{s(mt(await e.query(ut,{},rt(""))))}catch{}})())},r=[e],t[0]=e,t[1]=a,t[2]=r):(a=t[1],r=t[2]),Ke(a,r),n},pt=()=>{const t=$(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:l("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[0]=e):e=t[0],e},ht=t=>{const e=$(24),{group:n}=t,s=I(),a=Je();let r;e[0]!==n.tab||e[1]!==a?(r=()=>{Se(a({to:`/${n.tab}`}))},e[0]=n.tab,e[1]=a,e[2]=r):r=e[2];const o=r,i=n.bindings.length;let c;e[3]!==n.label?(c=l("span",{className:"text-sm font-medium text-foreground",children:n.label}),e[3]=n.label,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=l(pt,{}),e[5]=m):m=e[5];let d;e[6]!==c?(d=h("div",{className:"flex items-center justify-between",children:[c,m]}),e[6]=c,e[7]=d):d=e[7];let f;e[8]!==i||e[9]!==s?(f=i===1?s("1 binding"):s("{count} bindings",{count:i}),e[8]=i,e[9]=s,e[10]=f):f=e[10];let u;e[11]!==f?(u=l("span",{className:"text-xs text-muted-foreground",children:f}),e[11]=f,e[12]=u):u=e[12];let p;e[13]!==i||e[14]!==n.bindings?(p=i>0&&l("div",{className:"flex flex-wrap gap-1.5",children:n.bindings.map(bt)}),e[13]=i,e[14]=n.bindings,e[15]=p):p=e[15];let g;e[16]!==d||e[17]!==u||e[18]!==p?(g=h(Ze,{className:"flex flex-col gap-2 py-4",children:[d,u,p]}),e[16]=d,e[17]=u,e[18]=p,e[19]=g):g=e[19];let x;return e[20]!==n.testId||e[21]!==o||e[22]!==g?(x=l(B,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":n.testId,onClick:o,children:g}),e[20]=n.testId,e[21]=o,e[22]=g,e[23]=x):x=e[23],x},We=["kv","files","vectors"],gt=(t,e)=>[...t.filter(n=>n.tab!==e.tab),e].toSorted((n,s)=>We.indexOf(n.tab)-We.indexOf(s.tab)),xt=()=>{const t=$(19),e=et(),n=ft(),s=I();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],t[0]=a):a=t[0];const[r,o]=Ue(a);let i,c;if(t[1]!==e||t[2]!==n.kv||t[3]!==n.storage||t[4]!==n.vectors||t[5]!==s?(i=()=>{const g={cancelled:!1},x=[{enabled:n.kv,label:s("KV Namespaces"),load:async()=>(await e.listKvNamespaces()).map(yt),tab:"kv",testId:"home-binding-kv"},{enabled:n.storage,label:s("R2 Buckets"),load:()=>e.listStorageBuckets(),tab:"files",testId:"home-binding-r2"},{enabled:n.vectors,label:s("Vectorize Indexes"),load:async()=>(await e.listVectorIndexes()).map(vt),tab:"vectors",testId:"home-binding-vectors"}];for(const b of x)b.enabled&&Se((async()=>{try{const y=await b.load();if(!g.cancelled){const S={bindings:y,label:b.label,tab:b.tab,testId:b.testId};o(A=>gt(A,S))}}catch{}})());return()=>{g.cancelled=!0}},c=[e,n.kv,n.storage,n.vectors,s],t[1]=e,t[2]=n.kv,t[3]=n.storage,t[4]=n.vectors,t[5]=s,t[6]=i,t[7]=c):(i=t[6],c=t[7]),Ke(i,c),r.length===0)return null;let m;t[8]!==s?(m=s("Bindings"),t[8]=s,t[9]=m):m=t[9];let d;t[10]!==m?(d=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:m}),t[10]=m,t[11]=d):d=t[11];let f;t[12]!==r?(f=r.map(Nt),t[12]=r,t[13]=f):f=t[13];let u;t[14]!==f?(u=l("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:f}),t[14]=f,t[15]=u):u=t[15];let p;return t[16]!==d||t[17]!==u?(p=h("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[d,u]}),t[16]=d,t[17]=u,t[18]=p):p=t[18],p};function bt(t){return l(Ye,{variant:"secondary",children:t},t)}function yt(t){return t.binding}function vt(t){return t.name}function Nt(t){return l(ht,{group:t},t.tab)}const _t=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation — writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action — writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],St=t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),kt=t=>{const e=_t.map(n=>`- ${n.name} — ${n.summary}`).join(`
|
|
2
|
-
`);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
|
|
3
|
-
`)},Ct=1500,wt=()=>{const t=$(35),e=I();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=ot(),t[0]=n):n=t[0];const s=n,[a,r]=Ue(null);let o,i;t[1]!==a?(o=()=>{if(a===null)return;const L=globalThis.setTimeout(()=>{r(null)},Ct);return()=>{globalThis.clearTimeout(L)}},i=[a],t[1]=a,t[2]=o,t[3]=i):(o=t[2],i=t[3]),Ke(o,i);let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=(L,M)=>{it(M)&&r(L)},t[4]=c):c=t[4];const m=c;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{m("config",St(s))},t[5]=d):d=t[5];const f=d;let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{m("prompt",kt(s))},t[6]=u):u=t[6];const p=u;let g;t[7]!==e?(g=e("Connect an AI agent"),t[7]=e,t[8]=g):g=t[8];let x;t[9]!==g?(x=l("span",{className:"text-sm font-medium text-foreground",children:g}),t[9]=g,t[10]=x):x=t[10];let b;t[11]!==e?(b=e("Drive this deployment from an AI agent over the Model Context Protocol — it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=b):b=t[12];let y;t[13]!==b?(y=l("span",{className:"text-xs text-muted-foreground",children:b}),t[13]=b,t[14]=y):y=t[14];let S;t[15]!==x||t[16]!==y?(S=h("div",{className:"flex flex-col gap-1.5 p-4",children:[x,y]}),t[15]=x,t[16]=y,t[17]=S):S=t[17];let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=l("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"}),t[18]=A):A=t[18];let k;t[19]!==a||t[20]!==e?(k=e(a==="config"?"Copied":"Copy MCP config"),t[19]=a,t[20]=e,t[21]=k):k=t[21];let v;t[22]!==k?(v=l(Ve,{"data-testid":"home-connect-agent-copy-config",onClick:f,size:"xs",variant:"outline",children:k}),t[22]=k,t[23]=v):v=t[23];let C;t[24]!==a||t[25]!==e?(C=e(a==="prompt"?"Copied":"Copy agent prompt"),t[24]=a,t[25]=e,t[26]=C):C=t[26];let w;t[27]!==C?(w=l(Ve,{"data-testid":"home-connect-agent-copy-prompt",onClick:p,size:"xs",variant:"outline",children:C}),t[27]=C,t[28]=w):w=t[28];let N;t[29]!==v||t[30]!==w?(N=h("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[A,h("div",{className:"flex flex-wrap gap-2",children:[v,w]})]}),t[29]=v,t[30]=w,t[31]=N):N=t[31];let _;return t[32]!==S||t[33]!==N?(_=h(B,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[S,N]}),t[32]=S,t[33]=N,t[34]=_):_=t[34],_},$t=nt(()=>import("../packem_chunks/sparkline.js")),qe=t=>{if(t<1e3)return`${String(Math.round(t))}ms`;const e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},At=(t,e)=>{const n=Math.max(0,Math.round((e-t)/1e3));if(n<60)return`${String(n)}s ago`;const s=Math.round(n/60);if(s<60)return`${String(s)}m ago`;const a=Math.round(s/60);return a<24?`${String(a)}h ago`:`${String(Math.round(a/24))}d ago`},Qe=(t,e)=>{if(t===void 0||t.length===0)return[];const n=new Map;for(const s of t)n.set(s.bucketMs,(n.get(s.bucketMs)??0)+s[e]);return[...n.entries()].toSorted(([s],[a])=>s-a).map(([,s])=>s)},He=(t,e=!0)=>{if(t.length<4)return null;const n=Math.floor(t.length/2),s=t.slice(0,n).reduce((o,i)=>o+i,0),a=t.slice(n).reduce((o,i)=>o+i,0);if(s===0)return null;const r=(a-s)/s*100;return{positive:e?r>=0:r<=0,text:`${r>=0?"+":""}${r.toFixed(1)}%`}},Re=t=>{const e=$(24),{delta:n,footer:s,label:a,trend:r,unit:o,value:i}=t,c=I();let m;e[0]!==a?(m=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a}),e[0]=a,e[1]=m):m=e[1];let d;e[2]!==i?(d=l("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[2]=i,e[3]=d):d=e[3];let f;e[4]!==o?(f=o!==void 0&&l("span",{className:"text-xs text-muted-foreground",children:o}),e[4]=o,e[5]=f):f=e[5];let u;e[6]!==d||e[7]!==f?(u=h("span",{className:"flex items-baseline gap-1.5",children:[d,f]}),e[6]=d,e[7]=f,e[8]=u):u=e[8];let p;e[9]!==r?(p=r!==void 0&&l(st,{fallback:l("div",{"aria-hidden":"true",className:"h-8 w-28"}),children:l($t,{data:r})}),e[9]=r,e[10]=p):p=e[10];let g;e[11]!==u||e[12]!==p?(g=h("div",{className:"flex items-center justify-between gap-3",children:[u,p]}),e[11]=u,e[12]=p,e[13]=g):g=e[13];let x;e[14]!==m||e[15]!==g?(x=h("div",{className:"flex flex-col gap-2.5 p-4",children:[m,g]}),e[14]=m,e[15]=g,e[16]=x):x=e[16];let b;e[17]!==n||e[18]!==s||e[19]!==c?(b=n==null?s!=null&&l("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s}):h("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[l("span",{className:Xe("font-semibold",n.positive?"text-success":"text-destructive"),children:n.text})," ",l("span",{className:"text-muted-foreground",children:c("vs. prev.")})]}),e[17]=n,e[18]=s,e[19]=c,e[20]=b):b=e[20];let y;return e[21]!==x||e[22]!==b?(y=h(B,{className:"justify-between gap-0 py-0",children:[x,b]}),e[21]=x,e[22]=b,e[23]=y):y=e[23],y},Lt=()=>{const t=$(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:l("path",{d:"m9 6 6 6-6 6"})}),t[0]=e):e=t[0],e},Fe=t=>{const e=$(7),{command:n,label:s}=t;let a;e[0]!==s?(a=l("div",{className:"p-4",children:l("span",{className:"text-sm font-medium text-foreground",children:s})}),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==n?(r=l("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:l("code",{className:"font-mono text-xs text-muted-foreground",children:n})}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==r?(o=h(B,{className:"justify-between gap-0 py-0",children:[a,r]}),e[4]=a,e[5]=r,e[6]=o):o=e[6],o},Ge=t=>{const e=$(18),{count:n,onView:s,testId:a,title:r}=t,o=I();let i;e[0]!==r?(i=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r}),e[0]=r,e[1]=i):i=e[1];let c;e[2]!==n||e[3]!==o?(c=n===null?l("span",{className:"text-xs text-muted-foreground",children:o("No data yet")}):l(Ye,{variant:n>0?"destructive":"success",children:n>0?n:o("All clear")}),e[2]=n,e[3]=o,e[4]=c):c=e[4];let m;e[5]!==i||e[6]!==c?(m=h("div",{className:"flex items-start justify-between gap-2 p-4",children:[i,c]}),e[5]=i,e[6]=c,e[7]=m):m=e[7];let d;e[8]!==o?(d=o("View"),e[8]=o,e[9]=d):d=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=l(Lt,{}),e[10]=f):f=e[10];let u;e[11]!==s||e[12]!==d?(u=h("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[d,f]}),e[11]=s,e[12]=d,e[13]=u):u=e[13];let p;return e[14]!==m||e[15]!==u||e[16]!==a?(p=h(B,{className:"justify-between gap-0 py-0","data-testid":a,children:[m,u]}),e[14]=m,e[15]=u,e[16]=a,e[17]=p):p=e[17],p},Mt=t=>{const e=$(7),{functions:n}=t,s=I();let a;if(e[0]!==n||e[1]!==s){const r=[...n].toSorted(Rt).slice(0,5);let o;e[3]!==s?(o=s("Top functions"),e[3]=s,e[4]=o):o=e[4];let i;e[5]!==o?(i=l("div",{className:"border-b border-border px-4 py-3",children:l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],a=h(B,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[i,r.length===0?l("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")}):h("div",{className:"divide-y divide-border",children:[h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[l("span",{children:s("Function")}),l("span",{className:"text-end",children:s("Calls")}),l("span",{className:"w-12 text-end",children:s("Avg")}),l("span",{className:"w-8 text-end",children:s("Err")})]}),r.map(Et)]})]}),e[0]=n,e[1]=s,e[2]=a}else a=e[2];return a},It=t=>{const e=$(26),{subs:n}=t,s=I();let a;e[0]!==s?(a=s("Live connections"),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==a?(r=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a}),e[2]=a,e[3]=r):r=e[3];const o=n?.totalConnections??0;let i;e[4]!==o?(i=o.toLocaleString(),e[4]=o,e[5]=i):i=e[5];let c;e[6]!==i?(c=l("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let m;e[8]!==s?(m=s("sockets"),e[8]=s,e[9]=m):m=e[9];let d;e[10]!==m?(d=l("span",{className:"text-xs text-muted-foreground",children:m}),e[10]=m,e[11]=d):d=e[11];let f;e[12]!==c||e[13]!==d?(f=h("span",{className:"flex items-baseline gap-1.5",children:[c,d]}),e[12]=c,e[13]=d,e[14]=f):f=e[14];const u=n?.totalSubscriptions??0;let p;e[15]!==u?(p=u.toLocaleString(),e[15]=u,e[16]=p):p=e[16];let g;e[17]!==s?(g=s("active subscriptions"),e[17]=s,e[18]=g):g=e[18];let x;e[19]!==p||e[20]!==g?(x=h("span",{className:"text-[11px] text-muted-foreground",children:[p," ",g]}),e[19]=p,e[20]=g,e[21]=x):x=e[21];let b;return e[22]!==x||e[23]!==r||e[24]!==f?(b=l(B,{"data-testid":"home-live-connections",children:h(Ze,{className:"flex flex-col gap-2.5 py-4",children:[r,f,x]})}),e[22]=x,e[23]=r,e[24]=f,e[25]=b):b=e[25],b},Tt=t=>{const e=$(7),{entries:n}=t,s=I();let a;if(e[0]!==n||e[1]!==s){const r=Date.now();let o;e[3]!==s?(o=s("Recent activity"),e[3]=s,e[4]=o):o=e[4];let i;e[5]!==o?(i=l("div",{className:"border-b border-border px-4 py-3",children:l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],a=h(B,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[i,n.length===0?l("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")}):l("ul",{className:"divide-y divide-border",children:n.slice(0,5).map(c=>h("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[h("span",{className:"flex min-w-0 items-center gap-2",children:[l("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"}),h("span",{className:"truncate text-foreground",children:[c.op,c.table!==void 0&&h("span",{className:"text-muted-foreground",children:[" · ",c.table,c.id===void 0?"":`#${c.id}`]})]})]}),l("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:At(c.ts,r)})]},c.seq))})]}),e[0]=n,e[1]=s,e[2]=a}else a=e[2];return a},Ot=t=>{const e=t.reduce((n,s)=>n+s.calls,0);return e===0?null:t.reduce((n,s)=>n+s.totalDurationMs,0)/e},Zt=t=>{const e=$(151),{initialShardKey:n}=t,s=I(),a=Je(),r=n??"";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={},e[0]=o):o=e[0];let i;e[1]!==r?(i={shardKey:r},e[1]=r,e[2]=i):i=e[2];const c=_e(Ne.getMetrics,o,i);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={},e[3]=m):m=e[3];let d;e[4]!==r?(d={shardKey:r},e[4]=r,e[5]=d):d=e[5];const f=_e(Ne.getFunctionStats,m,d);let u,p;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={},p={shardKey:""},e[6]=u,e[7]=p):(u=e[6],p=e[7]);const g=_e(Ne.getSecurityAudit,u,p);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={},e[8]=x):x=e[8];let b;e[9]!==r?(b={shardKey:r},e[9]=r,e[10]=b):b=e[10];const y=_e(Ne.listSubscriptions,x,b);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S={},e[11]=S):S=e[11];let A;e[12]!==r?(A={shardKey:r},e[12]=r,e[13]=A):A=e[13];const k=_e(Ne.getAuditLog,S,A),v=c.data??null;let C,w,N,_,L,M,D,T,O,P,F,q,R,E,U,K,z,V;if(e[14]!==k.data||e[15]!==g.data||e[16]!==v||e[17]!==c.data||e[18]!==a||e[19]!==f.data||e[20]!==y.data||e[21]!==s){_=Array.isArray(f.data?.functions)?f.data.functions:[],D=y.data??null;let $e;e[40]!==k.data?($e=Array.isArray(k.data?.entries)?k.data.entries:[],e[40]=k.data,e[41]=$e):$e=e[41],w=$e,L=c.data===void 0||f.data===void 0?null:dt(v,_).length,M=Array.isArray(g.data?.findings)?g.data.findings.length:null;let Ae;e[42]!==a?(Ae=()=>{Se(a({to:"/security"}))},e[42]=a,e[43]=Ae):Ae=e[43],V=Ae;let Le;e[44]!==a?(Le=()=>{Se(a({to:"/insights"}))},e[44]=a,e[45]=Le):Le=e[45],z=Le;const Me=Qe(v?.history,"calls"),Ie=Qe(v?.history,"errors"),ze=Ot(_),Te=Math.max(0,..._.map(jt)),j=v?.cache;let Oe;e[46]!==j?(Oe=j!=null&&j.hits+j.misses>0?Math.round(j.hits/(j.hits+j.misses)*100):null,e[46]=j,e[47]=Oe):Oe=e[47],N=Oe,U="flex flex-col gap-6",K="lunora-home",F="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",q="home-health";const je=He(Me);let xe;e[48]!==s?(xe=s("Requests"),e[48]=s,e[49]=xe):xe=e[49];const Be=v?.requests??0;let be;e[50]!==Be?(be=Be.toLocaleString(),e[50]=Be,e[51]=be):be=e[51],e[52]!==Me||e[53]!==je||e[54]!==xe||e[55]!==be?(R=l(Re,{delta:je,label:xe,trend:Me,value:be}),e[52]=Me,e[53]=je,e[54]=xe,e[55]=be,e[56]=R):R=e[56];const De=He(Ie,!1);let ye;e[57]!==s?(ye=s("Errors"),e[57]=s,e[58]=ye):ye=e[58];const Pe=v?.errors??0;let ve;e[59]!==Pe?(ve=Pe.toLocaleString(),e[59]=Pe,e[60]=ve):ve=e[60],e[61]!==Ie||e[62]!==De||e[63]!==ye||e[64]!==ve?(E=l(Re,{delta:De,label:ye,trend:Ie,value:ve}),e[61]=Ie,e[62]=De,e[63]=ye,e[64]=ve,e[65]=E):E=e[65],C=Re,e[66]!==Te||e[67]!==s?(T=Te>0?`${s("max")} ${qe(Te)}`:void 0,e[66]=Te,e[67]=s,e[68]=T):T=e[68],e[69]!==s?(O=s("Avg latency"),e[69]=s,e[70]=O):O=e[70],P=ze===null?"—":qe(ze),e[14]=k.data,e[15]=g.data,e[16]=v,e[17]=c.data,e[18]=a,e[19]=f.data,e[20]=y.data,e[21]=s,e[22]=C,e[23]=w,e[24]=N,e[25]=_,e[26]=L,e[27]=M,e[28]=D,e[29]=T,e[30]=O,e[31]=P,e[32]=F,e[33]=q,e[34]=R,e[35]=E,e[36]=U,e[37]=K,e[38]=z,e[39]=V}else C=e[22],w=e[23],N=e[24],_=e[25],L=e[26],M=e[27],D=e[28],T=e[29],O=e[30],P=e[31],F=e[32],q=e[33],R=e[34],E=e[35],U=e[36],K=e[37],z=e[38],V=e[39];let W;e[71]!==C||e[72]!==T||e[73]!==O||e[74]!==P?(W=l(C,{footer:T,label:O,value:P}),e[71]=C,e[72]=T,e[73]=O,e[74]=P,e[75]=W):W=e[75];let Q;e[76]!==N||e[77]!==s?(Q=N===null?void 0:`${String(N)}% ${s("cache hit")}`,e[76]=N,e[77]=s,e[78]=Q):Q=e[78];let H;e[79]!==s?(H=s("Database size"),e[79]=s,e[80]=H):H=e[80];const Ee=v?.databaseSize??null;let G;e[81]!==Ee?(G=ct(Ee),e[81]=Ee,e[82]=G):G=e[82];let J;e[83]!==Q||e[84]!==H||e[85]!==G?(J=l(Re,{footer:Q,label:H,value:G}),e[83]=Q,e[84]=H,e[85]=G,e[86]=J):J=e[86];let Y;e[87]!==F||e[88]!==q||e[89]!==R||e[90]!==E||e[91]!==W||e[92]!==J?(Y=h("div",{className:F,"data-testid":q,children:[R,E,W,J]}),e[87]=F,e[88]=q,e[89]=R,e[90]=E,e[91]=W,e[92]=J,e[93]=Y):Y=e[93];let ke;e[94]===Symbol.for("react.memo_cache_sentinel")?(ke=l(xt,{}),e[94]=ke):ke=e[94];let Z;e[95]!==_?(Z=l("div",{className:"lg:col-span-2",children:l(Mt,{functions:_})}),e[95]=_,e[96]=Z):Z=e[96];let X;e[97]!==D?(X=l(It,{subs:D}),e[97]=D,e[98]=X):X=e[98];let ee;e[99]!==w?(ee=l(Tt,{entries:w}),e[99]=w,e[100]=ee):ee=e[100];let te;e[101]!==X||e[102]!==ee?(te=h("div",{className:"flex flex-col gap-3",children:[X,ee]}),e[101]=X,e[102]=ee,e[103]=te):te=e[103];let se;e[104]!==Z||e[105]!==te?(se=h("div",{className:"grid gap-3 lg:grid-cols-3",children:[Z,te]}),e[104]=Z,e[105]=te,e[106]=se):se=e[106];let ne;e[107]!==s?(ne=s("Advisors"),e[107]=s,e[108]=ne):ne=e[108];let le;e[109]!==ne?(le=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ne}),e[109]=ne,e[110]=le):le=e[110];let ae;e[111]!==L||e[112]!==M||e[113]!==s||e[114]!==z||e[115]!==V?(ae=M===0&&L===0?l(lt,{description:s("No security or performance issues detected."),icon:h("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[l("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"}),l("path",{d:"m9 12 2 2 4-4"})]}),testId:"home-advisors-clear",title:s("No issues found")}):h("div",{className:"grid gap-3 sm:grid-cols-2",children:[l(Ge,{count:M,onView:V,testId:"home-security",title:s("Security findings")}),l(Ge,{count:L,onView:z,testId:"home-performance",title:s("Performance issues")})]}),e[111]=L,e[112]=M,e[113]=s,e[114]=z,e[115]=V,e[116]=ae):ae=e[116];let re;e[117]!==le||e[118]!==ae?(re=h("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[le,ae]}),e[117]=le,e[118]=ae,e[119]=re):re=e[119];let oe;e[120]!==s?(oe=s("Get connected"),e[120]=s,e[121]=oe):oe=e[121];let ie;e[122]!==oe?(ie=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:oe}),e[122]=oe,e[123]=ie):ie=e[123];let ce;e[124]!==s?(ce=s("Client SDK"),e[124]=s,e[125]=ce):ce=e[125];let de;e[126]!==ce?(de=l(Fe,{command:"npm i @lunora/client",label:ce}),e[126]=ce,e[127]=de):de=e[127];let ue;e[128]!==s?(ue=s("React"),e[128]=s,e[129]=ue):ue=e[129];let me;e[130]!==ue?(me=l(Fe,{command:"npm i @lunora/react",label:ue}),e[130]=ue,e[131]=me):me=e[131];let fe;e[132]!==s?(fe=s("CLI"),e[132]=s,e[133]=fe):fe=e[133];let pe;e[134]!==fe?(pe=l(Fe,{command:"lunora dev",label:fe}),e[134]=fe,e[135]=pe):pe=e[135];let he;e[136]!==de||e[137]!==me||e[138]!==pe?(he=h("div",{className:"grid gap-3 sm:grid-cols-3",children:[de,me,pe]}),e[136]=de,e[137]=me,e[138]=pe,e[139]=he):he=e[139];let Ce;e[140]===Symbol.for("react.memo_cache_sentinel")?(Ce=l(wt,{}),e[140]=Ce):Ce=e[140];let ge;e[141]!==ie||e[142]!==he?(ge=h("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[ie,he,Ce]}),e[141]=ie,e[142]=he,e[143]=ge):ge=e[143];let we;return e[144]!==U||e[145]!==K||e[146]!==Y||e[147]!==se||e[148]!==re||e[149]!==ge?(we=h("div",{className:U,"data-testid":K,children:[Y,ke,se,re,ge]}),e[144]=U,e[145]=K,e[146]=Y,e[147]=se,e[148]=re,e[149]=ge,e[150]=we):we=e[150],we};function Rt(t,e){return e.calls-t.calls}function Et(t){return h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[l("span",{className:"truncate font-mono text-xs text-foreground",children:t.path}),l("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()}),l("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:qe(t.calls>0?t.totalDurationMs/t.calls:0)}),l("span",{className:Xe("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors})]},t.path)}function jt(t){return t.maxDurationMs}export{Zt as H,ft as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as d}from"react/compiler-runtime";import{Input as o}from"@base-ui/react/input";import{c as s}from"./utils-bhneXptQ.js";import{jsx as u}from"react/jsx-runtime";function m(l){const e=d(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=s("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),e[4]=i,e[5]=n):n=e[5];let a;return e[6]!==r||e[7]!==n||e[8]!==t?(a=u(o,{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=a):a=e[9],a}export{m as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"react/compiler-runtime";import{c as i}from"./utils-bhneXptQ.js";import{jsx as n}from"react/jsx-runtime";function m(s){const e=r(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=n("label",{"data-slot":"label",className:l,...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}export{m as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m}from"react/compiler-runtime";import{useT as p}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{u as v}from"./operation-console-provider-DoloEvon.js";import{jsx as d,jsxs as x}from"react/jsx-runtime";const E=f=>{const e=m(14),{message:n,prefix:i}=f,o=p(),t=v();let l;e[0]!==t?(l=()=>{t?.openConsole({errorsOnly:!0})},e[0]=t,e[1]=l):l=e[1];const c=l;if(n===void 0)return null;const u=`${i}-live-error`;let r;e[2]!==n||e[3]!==o?(r=o("Live unavailable: {liveError}",{liveError:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4];let s;e[5]!==t||e[6]!==i||e[7]!==c||e[8]!==o?(s=t===void 0?null:d("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${i}-live-error-console`,onClick:c,type:"button",children:o("Show in console")}),e[5]=t,e[6]=i,e[7]=c,e[8]=o,e[9]=s):s=e[9];let a;return e[10]!==u||e[11]!==r||e[12]!==s?(a=x("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":u,role:"status",children:[r,s]}),e[10]=u,e[11]=r,e[12]=s,e[13]=a):a=e[13],a};export{E as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as h}from"react/compiler-runtime";import{f as v}from"./log-fields-SBxKyBug.js";import{B as x}from"./badge-cAk9Di1Q.js";import{i as L}from"./internal-CwaF9YNk.js";import{jsx as o,jsxs as g,Fragment as N}from"react/jsx-runtime";const w={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},B=p=>{const e=h(21),{entry:t}=p;let m;e[0]!==t.fields?(m=v(t.fields),e[0]=t.fields,e[1]=m):m=e[1];const c=m;let l;e[2]!==t.timestamp?(l=L(t.timestamp),e[2]=t.timestamp,e[3]=l):l=e[3];let s;e[4]!==l?(s=o("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:l}),e[4]=l,e[5]=s):s=e[5];const f=w[t.level];let r;e[6]!==t.level||e[7]!==f?(r=o("span",{className:"w-20 shrink-0",role:"gridcell",children:o(x,{variant:f,children:t.level})}),e[6]=t.level,e[7]=f,e[8]=r):r=e[8];const u=t.functionPath??"—";let i;e[9]!==u?(i=o("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:u}),e[9]=u,e[10]=i):i=e[10];let a;e[11]!==c?(a=c===""?null:o("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:c}),e[11]=c,e[12]=a):a=e[12];let n;e[13]!==t.message||e[14]!==a?(n=g("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,a]}),e[13]=t.message,e[14]=a,e[15]=n):n=e[15];let d;return e[16]!==s||e[17]!==r||e[18]!==i||e[19]!==n?(d=g(N,{children:[s,r,i,n]}),e[16]=s,e[17]=r,e[18]=i,e[19]=n,e[20]=d):d=e[20],d};export{B as L,w as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v}from"react/compiler-runtime";import{c as k}from"./utils-bhneXptQ.js";import{jsx as u}from"react/jsx-runtime";const y={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},A={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},_=h=>{const e=v(18),{className:n,children:d,label:c,onClose:l,panelTestId:f,testId:b,variant:w}=h;let r;e[0]!==l?(r=i=>{i.target===i.currentTarget&&l()},e[0]=l,e[1]=r):r=e[1];const g=r;let a;e[2]!==l?(a=i=>{i.key==="Escape"&&l()},e[2]=l,e[3]=a):a=e[3];const m=a,p=y[w],x=A[w];let t;e[4]!==n||e[5]!==x?(t=k(x,n),e[4]=n,e[5]=x,e[6]=t):t=e[6];let o;e[7]!==d||e[8]!==c||e[9]!==f||e[10]!==t?(o=u("div",{"aria-label":c,className:t,"data-testid":f,role:"dialog",children:d}),e[7]=d,e[8]=c,e[9]=f,e[10]=t,e[11]=o):o=e[11];let s;return e[12]!==g||e[13]!==m||e[14]!==p||e[15]!==o||e[16]!==b?(s=u("div",{className:p,"data-testid":b,onClick:g,onKeyDown:m,role:"presentation",children:o}),e[12]=g,e[13]=m,e[14]=p,e[15]=o,e[16]=b,e[17]=s):s=e[17],s};export{_ as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as u}from"./use-admin-query-P0RJrjsD.js";const b="__lunora_admin__:",d=new Set(["action","mutation","query"]),r=Symbol("lunora.operationSeq"),g=t=>{if(typeof t!="object"||t===null)return;const n=t[r];return typeof n=="number"?n:void 0},h=(t,n)=>{if(!(typeof t!="object"||t===null||!Object.isExtensible(t)))try{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:n,writable:!0})}catch{}},p=t=>{if(typeof t!="object"||t===null)return;const n=t.__lunoraRef;return typeof n=="string"&&n.startsWith(b)?n:void 0},O=t=>{if(typeof t!="object"||t===null)return"";const{shardKey:n}=t;return typeof n=="string"?n:""},E=t=>new Proxy(t,{get(n,c,a){const i=Reflect.get(n,c,a);if(typeof i!="function"||typeof c!="string"||!d.has(c))return typeof i=="function"?i.bind(n):i;const f=i;return async(...e)=>{const l=p(e[0]);if(l===void 0)return f.apply(n,e);const y=typeof e[1]=="object"&&e[1]!==null?e[1]:{},s=u.start(l,y,O(e[2]));try{const o=await f.apply(n,e);return u.settle(s,{result:o}),o}catch(o){throw u.settle(s,{error:o instanceof Error?o.message:String(o)}),h(o,s),o}}}});export{g as o,E as w};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c as v}from"react/compiler-runtime";import{Download01Icon as ne}from"@hugeicons/core-free-icons";import{HugeiconsIcon as se}from"@hugeicons/react";import{Handle as B,Position as G,getNodesBounds as re,getViewportForBounds as ae,useNodesState as le,useEdgesState as ie,ReactFlow as ce,Background as de,Panel as M,Controls as me,MiniMap as pe,useNodes as ue,useReactFlow as U,useNodesInitialized as fe}from"@xyflow/react";import{useState as k,useMemo as _,useRef as ge,useEffect as D}from"react";import{S as he,T as N}from"./storage-tier-C2mKwYRj.js";import{B as S}from"./badge-cAk9Di1Q.js";import{B as j}from"./button-BOPLD1un.js";import{d as be,D as xe,c as Ne,b as C}from"./dropdown-menu-U7Tjg1Nb.js";import{I as ye}from"./input-CY5W3wzv.js";import{useT as T}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{f as L}from"./internal-CwaF9YNk.js";import{c as y}from"./utils-bhneXptQ.js";import{jsx as i,jsxs as f}from"react/jsx-runtime";import{LunoraError as ve}from"@lunora/errors";import{toBlob as we,toSvg as Se}from"html-to-image";function Ee(o){const e=v(10);let t,a,s;e[0]!==o?({className:t,selected:s,...a}=o,e[0]=o,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const r=s===!0?"":void 0;let n;e[4]!==t?(n=y("rounded-md border border-border bg-card text-card-foreground shadow-sm transition-colors","data-[selected]:border-ring data-[selected]:ring-[3px] data-[selected]:ring-ring/30",t),e[4]=t,e[5]=n):n=e[5];let l;return e[6]!==a||e[7]!==r||e[8]!==n?(l=i("div",{"data-slot":"base-node","data-selected":r,className:n,...a}),e[6]=a,e[7]=r,e[8]=n,e[9]=l):l=e[9],l}function Te(o){const e=v(8);let t,a;e[0]!==o?({className:t,...a}=o,e[0]=o,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=y("flex items-center gap-2 rounded-t-md bg-muted/50 px-3 py-1.5",t),e[3]=t,e[4]=s):s=e[4];let r;return e[5]!==a||e[6]!==s?(r=i("div",{"data-slot":"base-node-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=r):r=e[7],r}function $e(o){const e=v(8);let t,a;e[0]!==o?({className:t,...a}=o,e[0]=o,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=y("flex flex-col",t),e[3]=t,e[4]=s):s=e[4];let r;return e[5]!==a||e[6]!==s?(r=i("div",{"data-slot":"base-node-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=r):r=e[7],r}const F=o=>{const e=o.ref===void 0?o.type:`${o.type} → ${o.ref}`;return o.optional===!0?`${e}?`:e},_e=o=>{const e=v(22),{data:t,selected:a}=o,s=T();let r;e[0]!==t.label||e[1]!==t.loadError||e[2]!==s?(r=t.loadError===!0?i("span",{className:"px-3 py-1.5 text-xs text-destructive","data-testid":`sd-node-${t.label}-error`,children:s("Columns unavailable")}):i("span",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"—"}),e[0]=t.label,e[1]=t.loadError,e[2]=s,e[3]=r):r=e[3];const n=r,l=`sd-node-${t.label}`;let d;e[4]!==t.label?(d=i("span",{className:"truncate font-mono text-xs font-semibold",title:t.label,children:t.label}),e[4]=t.label,e[5]=d):d=e[5];let m;e[6]!==t.tier?(m=i("span",{className:"ms-auto",children:i(he,{tier:t.tier})}),e[6]=t.tier,e[7]=m):m=e[7];let c;e[8]!==d||e[9]!==m?(c=f(Te,{children:[d,m]}),e[8]=d,e[9]=m,e[10]=c):c=e[10];let p;e[11]!==t.columns||e[12]!==t.label||e[13]!==n?(p=t.columns.length===0?n:t.columns.map(g=>f("div",{className:y("relative flex items-center gap-2 border-t border-border px-3 py-1.5 text-xs first:border-t-0",g.pk===!0&&"bg-muted/30"),"data-testid":`sd-col-${t.label}-${g.name}`,children:[i(B,{className:"!h-2 !w-2 !-left-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:G.Left,type:"target"}),i("span",{className:"truncate font-mono",title:g.name,children:g.name}),g.pk===!0&&i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),g.ref!==void 0&&i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),i("span",{className:"ms-auto truncate text-muted-foreground",title:F(g),children:F(g)}),i(B,{className:"!h-2 !w-2 !-right-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:G.Right,type:"source"})]},g.name)),e[11]=t.columns,e[12]=t.label,e[13]=n,e[14]=p):p=e[14];let u;e[15]!==p?(u=i($e,{children:p}),e[15]=p,e[16]=u):u=e[16];let b;return e[17]!==a||e[18]!==l||e[19]!==c||e[20]!==u?(b=f(Ee,{className:"w-64 overflow-hidden","data-testid":l,selected:a,children:[c,u]}),e[17]=a,e[18]=l,e[19]=c,e[20]=u,e[21]=b):b=e[21],b},x=1920,E=1080,K=32,R=(o,e)=>{const t=globalThis.document.createElement("a");t.href=o,t.download=e,globalThis.document.body.append(t),t.click(),t.remove()},Ce=(o,e,t="schema-diagram.json")=>{const a={edges:e,exportedAt:new Date().toISOString(),nodes:o},s=JSON.stringify(a,void 0,2),r=globalThis.URL.createObjectURL(new globalThis.Blob([s],{type:"application/json"}));R(r,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(r)},0)},P=(o,e,t,a)=>{const s=re(o),{x:r,y:n,zoom:l}=ae(s,e,t,.1,2,a);return{transform:[r,n,l],zoom:l}},Me=async(o,e,t="schema-diagram.png")=>{const{transform:a}=P(e,x,E,K),[s,r,n]=a,l=await we(o,{backgroundColor:"#ffffff",height:E,style:{transform:`translate(${s.toString()}px, ${r.toString()}px) scale(${n.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});if(l===null)throw new ve("INTERNAL","html-to-image produced no blob");const d=globalThis.URL.createObjectURL(l);R(d,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(d)},0)},ke=async(o,e,t="schema-diagram.svg")=>{const{transform:a}=P(e,x,E,K),[s,r,n]=a,l=await Se(o,{backgroundColor:"#ffffff",height:E,style:{transform:`translate(${s.toString()}px, ${r.toString()}px) scale(${n.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});R(l,t)},W=256,q=112,I=36,w=24,De=480,Le=1.4,Re=o=>{const e=Math.max(1,Math.round(Math.sqrt(Le*o/(W+q))));return Math.max(De,o/e)},Ae=38,Oe=28,z=o=>Ae+Math.max(1,o)*Oe,He=(o,e)=>{const t=new Map;for(const n of o)t.set(n,[]);for(const n of e)n.to!==n.from&&t.has(n.from)&&t.has(n.to)&&t.get(n.from)?.push(n.to);const a=new Map,s=new Set,r=n=>{const l=a.get(n);if(l!==void 0)return l;if(s.has(n))return 0;s.add(n);let d=0;for(const m of t.get(n)??[])d=Math.max(d,r(m)+1);return s.delete(n),a.set(n,d),d};for(const n of o)r(n);return a},Be=(o,e,t)=>{const a=He(o,e),s=new Map;for(const m of o){const c=a.get(m)??0,p=s.get(c);p===void 0?s.set(c,[m]):p.push(m)}const r=o.reduce((m,c)=>m+z(t.get(c)??0)+I,0),n=Re(r),l=[];let d=0;for(const m of[...s.keys()].toSorted((c,p)=>c-p)){let c=0,p=w;for(const u of s.get(m)??[]){const b=z(t.get(u)??0);p>w&&p+b>n&&(c+=1,p=w),l.push({name:u,x:w+(d+c)*(W+q),y:p}),p+=b+I}d+=c+1}return l},Ge={databaseSchema:_e},J={backgroundColor:N.shard.color},V={backgroundColor:N.global.color},je={global:!0,shard:!0},Fe={},Ie=o=>{const e=o.find(t=>t.pk===!0)?.name;return e!==void 0?e:o.some(t=>t.name==="_id")?"_id":o.some(t=>t.name==="id")?"id":o[0]?.name??"_id"},Y=o=>o.flatMap(e=>e.columns.filter(t=>t.ref!==void 0).map(t=>({column:t.name,from:e.name,to:t.ref}))),ze=(o,e,t)=>{const a=o.map(l=>l.name),s=new Map(o.map(l=>[l.name,l.columns.length])),r=Be(a,Y(o),s),n=new Map(o.map(l=>[l.name,l]));return r.flatMap(({name:l,x:d,y:m})=>{const c=n.get(l);return c===void 0?[]:[{className:t[l],data:{columns:c.columns,label:l,loadError:e,tier:c.tier},id:l,position:{x:d,y:m},type:"databaseSchema"}]})},Ue=o=>{const e=new Map(o.map(t=>[t.name,t.columns]));return Y(o).flatMap(t=>{const a=e.get(t.to)??[],s=e.get(t.from)??[],r=Ie(a);return!a.some(n=>n.name===r)||!s.some(n=>n.name===t.column)?[]:[{id:`${t.from}.${t.column}->${t.to}`,source:t.to,sourceHandle:r,target:t.from,targetHandle:t.column}]})},Ke=()=>{const o=v(15),e=T();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=f("span",{className:"flex items-center gap-1",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:J}),N.shard.label]}),o[0]=t):t=o[0];let a;o[1]===Symbol.for("react.memo_cache_sentinel")?(a=f("span",{className:"flex items-center gap-1",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),N.global.label]}),o[1]=a):a=o[1];let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),o[2]=s):s=o[2];let r;o[3]!==e?(r=e("Primary key"),o[3]=e,o[4]=r):r=o[4];let n;o[5]!==r?(n=f("span",{className:"flex items-center gap-1",children:[s,r]}),o[5]=r,o[6]=n):n=o[6];let l;o[7]===Symbol.for("react.memo_cache_sentinel")?(l=i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),o[7]=l):l=o[7];let d;o[8]!==e?(d=e("Foreign key"),o[8]=e,o[9]=d):d=o[9];let m;o[10]!==d?(m=f("span",{className:"flex items-center gap-1",children:[l,d]}),o[10]=d,o[11]=m):m=o[11];let c;return o[12]!==n||o[13]!==m?(c=f("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded-xl border border-border bg-card/95 px-2.5 py-1.5 text-[11px] text-muted-foreground shadow-xs",children:[t,a,n,m]}),o[12]=n,o[13]=m,o[14]=c):c=o[14],c},Pe=12,We=o=>{const e=v(9),{containerRef:t,seedKey:a}=o,s=fe(),{fitView:r}=U();let n;e[0]!==t||e[1]!==r||e[2]!==s?(n=()=>{if(!s)return;const d=()=>{L(r({duration:0,maxZoom:1.6,padding:.14}))};d();const m=t.current;if(m===null)return;const c=new ResizeObserver(()=>{d()});return c.observe(m),()=>{c.disconnect()}},e[0]=t,e[1]=r,e[2]=s,e[3]=n):n=e[3];let l;return e[4]!==t||e[5]!==r||e[6]!==s||e[7]!==a?(l=[t,r,s,a],e[4]=t,e[5]=r,e[6]=s,e[7]=a,e[8]=l):l=e[8],D(n,l),null},qe=({containerRef:o,testIdPrefix:e})=>{const t=T(),a=ue(),{getEdges:s}=U(),[r,n]=k(null),l=async()=>{const u=o.current?.querySelector(".react-flow__viewport");if(u){n("png");try{await Me(u,a,`${e}-schema-diagram.png`)}finally{n(null)}}},d=async()=>{const u=o.current?.querySelector(".react-flow__viewport");if(u){n("svg");try{await ke(u,a,`${e}-schema-diagram.svg`)}finally{n(null)}}},m=()=>{n("json");try{Ce(a,s(),`${e}-schema-diagram.json`)}finally{n(null)}},c=()=>{L(l())},p=()=>{L(d())};return i(M,{position:"top-right",children:f(be,{children:[f(xe,{className:"group/button inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-md border border-border bg-background px-2 text-xs font-medium whitespace-nowrap hover:bg-muted disabled:pointer-events-none disabled:opacity-50","data-testid":`${e}-export-trigger`,disabled:r!==null,children:[i(se,{className:"size-3.5",icon:ne,strokeWidth:2}),t("Export")]}),f(Ne,{align:"end",children:[i(C,{"data-testid":`${e}-export-png`,disabled:r!==null,onClick:c,children:t("PNG")}),i(C,{"data-testid":`${e}-export-svg`,disabled:r!==null,onClick:p,children:t("SVG")}),i(C,{"data-testid":`${e}-export-json`,disabled:r!==null,onClick:m,children:t("JSON")})]})]})})},dt=({columnsError:o,fill:e=!1,nodeClasses:t,tables:a,testIdPrefix:s})=>{const r=T(),[n,l]=k(je),[d,m]=k(""),c=_(()=>{const h=d.trim().toLowerCase();return a.filter(H=>n[H.tier]&&H.name.toLowerCase().includes(h))},[a,n,d]),p=_(()=>ze(c,o??!1,t??Fe),[c,o,t]),u=_(()=>Ue(c),[c]),b=c.map(h=>h.name).join(","),[g,A,Q]=le(p),[Z,O,X]=ie(u),$=ge(null);D(()=>{A(p)},[p,A]),D(()=>{O(u)},[u,O]);const ee=h=>{m(h.target.value)},te=()=>{l(h=>({...h,shard:!h.shard}))},oe=()=>{l(h=>({...h,global:!h.global}))};return a.length===0?i("section",{className:"flex flex-col gap-2","data-testid":`${s}-section`,children:i("p",{className:"text-sm text-muted-foreground","data-testid":`${s}-empty`,children:r("No tables to graph.")})}):i("section",{className:y("flex flex-col",e&&"min-h-0 flex-1"),"data-testid":`${s}-section`,children:i("div",{className:y("w-full overflow-hidden border border-border bg-muted/20",e?"min-h-0 flex-1":"h-[560px]"),"data-testid":`${s}-canvas`,ref:$,children:f(ce,{edges:Z,elementsSelectable:!0,fitView:!0,minZoom:.2,nodes:g,nodesConnectable:!1,nodeTypes:Ge,onEdgesChange:X,onNodesChange:Q,children:[i(de,{}),i(M,{position:"top-left",children:f("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card/95 p-2 shadow-xs",children:[i(ye,{"aria-label":r("Find table…"),className:"h-7 w-44 text-xs","data-testid":`${s}-find`,onChange:ee,placeholder:r("Find table…"),value:d}),f("div",{"aria-label":r("Storage tiers"),className:"flex items-center gap-1.5",role:"group",children:[f(j,{"aria-pressed":n.shard,className:"gap-1.5","data-testid":`${s}-tier-shard`,onClick:te,size:"xs",type:"button",variant:n.shard?"default":"outline",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:J}),N.shard.label]}),f(j,{"aria-pressed":n.global,className:"gap-1.5","data-testid":`${s}-tier-global`,onClick:oe,size:"xs",type:"button",variant:n.global?"default":"outline",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),N.global.label]})]})]})}),i(M,{position:"bottom-center",children:i(Ke,{})}),i(me,{showInteractive:!1}),c.length>Pe&&i(pe,{className:"!border !border-border !bg-card",maskColor:"var(--color-muted)",nodeColor:"var(--color-muted-foreground)",nodeStrokeWidth:0,pannable:!0,zoomable:!0}),i(qe,{containerRef:$,testIdPrefix:s}),i(We,{containerRef:$,seedKey:b})]})})})};export{dt as S};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c as u}from"react/compiler-runtime";import{ScrollArea as i}from"@base-ui/react/scroll-area";import{c as m}from"./utils-bhneXptQ.js";import{jsx as c,jsxs as b}from"react/jsx-runtime";function z(s){const r=u(14);let e,l,a;r[0]!==s?({className:l,children:e,...a}=s,r[0]=s,r[1]=e,r[2]=l,r[3]=a):(e=r[1],l=r[2],a=r[3]);let t;r[4]!==l?(t=m("relative",l),r[4]=l,r[5]=t):t=r[5];let o;r[6]!==e?(o=c(i.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:e}),r[6]=e,r[7]=o):o=r[7];let n,d;r[8]===Symbol.for("react.memo_cache_sentinel")?(n=c(h,{}),d=c(i.Corner,{}),r[8]=n,r[9]=d):(n=r[8],d=r[9]);let f;return r[10]!==a||r[11]!==t||r[12]!==o?(f=b(i.Root,{"data-slot":"scroll-area",className:t,...a,children:[o,n,d]}),r[10]=a,r[11]=t,r[12]=o,r[13]=f):f=r[13],f}function h({className:s,orientation:r="vertical",...e}){return c(i.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":r,orientation:r,className:m("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",s),...e,children:c(i.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-md bg-border"})})}export{z as S};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c as u}from"react/compiler-runtime";import{Select as l}from"@base-ui/react/select";import{c}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{UnfoldMoreIcon as g,Tick02Icon as v,ArrowUp01Icon as b,ArrowDown01Icon as h}from"@hugeicons/core-free-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";const I=l.Root;function $(s){const e=u(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("flex flex-1 text-start",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=i(l.Value,{"data-slot":"select-value",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}function j({className:s,size:e="default",children:t,...o}){return p(l.Trigger,{"data-slot":"select-trigger","data-size":e,className:c("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pe-2 ps-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...o,children:[t,i(l.Icon,{render:i(m,{icon:g,strokeWidth:2,className:"pointer-events-none size-4 text-muted-foreground"})})]})}function A({className:s,children:e,side:t="bottom",sideOffset:o=4,align:a="center",alignOffset:r=0,alignItemWithTrigger:n=!0,...d}){return i(l.Portal,{children:i(l.Positioner,{side:t,sideOffset:o,align:a,alignOffset:r,alignItemWithTrigger:n,className:"isolate z-50",children:p(l.Popup,{"data-slot":"select-content","data-align-trigger":n,className:c("isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",s),...d,children:[i(x,{}),i(l.List,{children:e}),i(w,{})]})})})}function U(s){const e=u(13);let t,o,a;e[0]!==s?({className:o,children:t,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==o?(r=c("relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let n;e[6]!==t?(n=i(l.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),e[6]=t,e[7]=n):n=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i(l.ItemIndicator,{render:i("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:i(m,{icon:v,strokeWidth:2,className:"pointer-events-none"})}),e[8]=d):d=e[8];let f;return e[9]!==a||e[10]!==r||e[11]!==n?(f=p(l.Item,{"data-slot":"select-item",className:r,...a,children:[n,d]}),e[9]=a,e[10]=r,e[11]=n,e[12]=f):f=e[12],f}function x(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:b,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}function w(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:h,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}export{$ as S,j as a,A as b,U as c,I as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,l as i}from"./browser-storage-BH1MxLZs.js";const e="lunora-studio-recent-shards",c=10,o=()=>i(e,"session").filter(s=>typeof s=="string"),l=s=>{const r=s.trim();if(r==="")return o();const t=[r,...o().filter(n=>n!==r)].slice(0,c);return a(e,t,"session"),t};export{o as l,l as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSyncExternalStore as f}from"react";import{l as h,s as u}from"./browser-storage-BH1MxLZs.js";const r={console:"`",palette:"k"},c="lunora-studio-shortcuts",n=new Set,p=t=>{const e=typeof t?.console=="string"?t.console.toLowerCase():void 0,s=typeof t?.palette=="string"?t.palette.toLowerCase():void 0;return e?.length===1&&s?.length===1&&e!==s?{console:e,palette:s}:r};let o=r;const S=()=>{o=p(h(c)[0]);for(const t of n)t()};S();const g=t=>(n.add(t),()=>{n.delete(t)}),a=()=>o,w=()=>f(g,a,a),y=(t,e)=>{if(e.length!==1)return;const s=e.toLowerCase(),l=t==="console"?"palette":"console";o=o[l]===s?{...o,[t]:s,[l]:o[t]}:{...o,[t]:s},u(c,[o]);for(const i of n)i()},C=()=>{o=r,u(c,[o]);for(const t of n)t()};export{C as r,y as s,w as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"react/compiler-runtime";import{c as a}from"./utils-bhneXptQ.js";import{jsx as i}from"react/jsx-runtime";function p(m){const e=r(8);let t,s;e[0]!==m?({className:t,...s}=m,e[0]=m,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=a("animate-pulse rounded-md bg-muted",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=i("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p}from"react/compiler-runtime";import{B as u,E as h}from"./bar-chart-B6gzp_f9.js";import{c as g}from"./utils-bhneXptQ.js";import{jsx as d}from"react/jsx-runtime";const v={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},w=i=>{const e=p(12),{ariaLabel:n,className:c,series:r,testId:m}=i;if(r.length<2)return null;let l;e[0]!==r?(l=r.slice(-40).map(b),e[0]=r,e[1]=l):l=e[1];const f=l;let a;e[2]!==c?(a=g("h-6 w-[120px]",c),e[2]=c,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=d(u,{dataKey:"value"}),e[4]=o):o=e[4];let t;e[5]!==f?(t=d(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:v,data:f,children:o}),e[5]=f,e[6]=t):t=e[6];let s;return e[7]!==n||e[8]!==a||e[9]!==t||e[10]!==m?(s=d("div",{"aria-label":n,className:a,"data-testid":m,role:"img",children:t}),e[7]=n,e[8]=a,e[9]=t,e[10]=m,e[11]=s):s=e[11],s};function b(i,e){return{index:e,value:i}}export{w as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k}from"react/compiler-runtime";import{AreaChart as R,CartesianGrid as g,XAxis as N,Area as B,LineChart as X,Line as $}from"recharts";import{useT as S}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{h as E}from"./internal-CwaF9YNk.js";import{E as H,X as _,B as j,T as G,C as O,a as A,b as K}from"./bar-chart-B6gzp_f9.js";import{jsx as l,jsxs as T}from"react/jsx-runtime";import{c as V,a as z,b as L,e as F,d as I,T as M}from"./table-BMsuYFhk.js";import{C as U}from"./data-grid-BFTQnkXq.js";const W=50,q={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},D=o=>{const e=o.columns.find(n=>o.rows.length>0&&o.rows.every(a=>typeof a[n]=="number"))??null;return{label:o.columns.find(n=>n!==e)??null,value:e}},J=o=>{const e=k(3),{data:t,kind:n}=o;let a;return e[0]!==t||e[1]!==n?(a=l(O,{className:"h-full w-full",config:q,children:n==="area"?T(R,{data:t,children:[l(g,{vertical:!1}),l(N,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(K,{})}),l(B,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):T(X,{data:t,children:[l(g,{vertical:!1}),l(N,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(K,{})}),l($,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),e[0]=t,e[1]=n,e[2]=a):a=e[2],a},oe=o=>{const e=k(21),{axes:t,kind:n,result:a}=o,u=S();let r;e[0]!==a?(r=D(a),e[0]=a,e[1]=r):r=e[1];const d=r;let m;e[2]!==a.columns?(m=new Set(a.columns),e[2]=a.columns,e[3]=m):m=e[3];const s=m,i=t!==void 0&&s.has(t.x)?t.x:d.label;let h;e[4]!==t?.y||e[5]!==s?(h=t?.y.find(c=>s.has(c)),e[4]=t?.y,e[5]=s,e[6]=h):h=e[6];const b=h,C=b??d.value;let w;e[7]!==i||e[8]!==a.rows||e[9]!==C?(w=C===null?[]:a.rows.slice(0,W).map((c,v)=>({label:i===null?`#${(v+1).toString()}`:E(c[i]),value:Number(c[C])||0})),e[7]=i,e[8]=a.rows,e[9]=C,e[10]=w):w=e[10];const x=w;if(C===null){let c;e[11]!==u?(c=u("No numeric column to chart."),e[11]=u,e[12]=c):c=e[12];let v;return e[13]!==c?(v=l("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:c}),e[13]=c,e[14]=v):v=e[14],v}const f=n??(t!==void 0&&b!==void 0?t.kind:"bar");let p;e[15]!==x||e[16]!==f?(p=f==="bar"?T(H,{className:"h-full w-full",config:q,data:x,children:[l(_,{dataKey:"label"}),l(j,{dataKey:"value"}),l(G,{})]}):l(J,{data:x,kind:f}),e[15]=x,e[16]=f,e[17]=p):p=e[17];let y;return e[18]!==f||e[19]!==p?(y=l("div",{className:"h-80 w-full p-3","data-chart-kind":f,"data-testid":"sql-chart",children:p}),e[18]=f,e[19]=p,e[20]=y):y=e[20],y},ne=o=>{const e=k(19),{result:t}=o,n=S();if(t.columns.length===0){let s;e[0]!==t.rowCount||e[1]!==n?(s=n("{count} rows",{count:t.rowCount}),e[0]=t.rowCount,e[1]=n,e[2]=s):s=e[2];let i;return e[3]!==s?(i=l("p",{className:"p-4 text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=i):i=e[4],i}let a;e[5]!==t.columns?(a=t.columns.map(P),e[5]=t.columns,e[6]=a):a=e[6];let u;e[7]!==a?(u=l(z,{className:"sticky top-0 z-10 bg-muted",children:l(L,{children:a})}),e[7]=a,e[8]=u):u=e[8];let r;if(e[9]!==t.columns||e[10]!==t.rows){let s;e[12]!==t.columns?(s=(i,h)=>l(L,{"data-testid":"sql-row",children:t.columns.map(b=>l(F,{className:"max-w-md truncate font-mono text-xs",children:l(U,{value:i[b]})},b))},h),e[12]=t.columns,e[13]=s):s=e[13],r=t.rows.map(s),e[9]=t.columns,e[10]=t.rows,e[11]=r}else r=e[11];let d;e[14]!==r?(d=l(I,{children:r}),e[14]=r,e[15]=d):d=e[15];let m;return e[16]!==u||e[17]!==d?(m=T(M,{"data-testid":"sql-rows",children:[u,d]}),e[16]=u,e[17]=d,e[18]=m):m=e[18],m};function P(o){return l(V,{children:o},o)}export{oe as S,ne as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u}from"react/compiler-runtime";import{C as b}from"./card-BGlQzQY-.js";import{jsx as m,jsxs as p}from"react/jsx-runtime";const j=x=>{const e=u(16),{chart:i,footer:o,label:n,testId:c,value:f}=x;let t;e[0]!==n?(t=m("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n}),e[0]=n,e[1]=t):t=e[1];let l;e[2]!==c||e[3]!==f?(l=m("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":c,children:f}),e[2]=c,e[3]=f,e[4]=l):l=e[4];let r;e[5]!==i||e[6]!==l?(r=p("div",{className:"flex items-center justify-between gap-3",children:[l,i]}),e[5]=i,e[6]=l,e[7]=r):r=e[7];let s;e[8]!==t||e[9]!==r?(s=p("div",{className:"flex flex-col gap-2.5 p-4",children:[t,r]}),e[8]=t,e[9]=r,e[10]=s):s=e[10];let a;e[11]!==o?(a=o!=null&&m("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:o}),e[11]=o,e[12]=a):a=e[12];let d;return e[13]!==s||e[14]!==a?(d=p(b,{className:"justify-between gap-0 py-0",children:[s,a]}),e[13]=s,e[14]=a,e[15]=d):d=e[15],d};export{j as S};
|