@lunora/studio 1.0.0-alpha.3 → 1.0.0-alpha.300
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/LICENSE.md +6 -0
- package/README.md +1 -1
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.mts +1581 -0
- package/dist/index.d.ts +982 -803
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +22 -0
- package/dist/mount.d.ts +11 -10
- 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.mjs +3 -0
- package/dist/packem_chunks/FileBrowser.mjs +4 -0
- 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.mjs +10 -0
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
- package/dist/packem_chunks/analytics-panel.mjs +1 -0
- package/dist/packem_chunks/architecture-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.mjs +4 -0
- 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/privacy-requests-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/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
- package/dist/packem_shared/ApiDocsPanel-fhDlZGE4.mjs +2 -0
- package/dist/packem_shared/ApiReferencePanel-nAf8tNRr.mjs +1 -0
- package/dist/packem_shared/CommandPalette-D9ZY-qQd.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
- package/dist/packem_shared/DataBrowser-C14aRmmR.mjs +4 -0
- package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
- package/dist/packem_shared/GlobalDataBrowser-DhObcZDY.mjs +1 -0
- package/dist/packem_shared/HomePanel-CUuYsApa.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-CkVIwAbK.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-BxEr49D9.mjs +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-BZNcYWBP.mjs +1 -0
- package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
- package/dist/packem_shared/Studio-CZjQXFHC.mjs +1 -0
- package/dist/packem_shared/StudioApp-C9ENwcOH.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
- package/dist/packem_shared/advisor-view-DzI2RQhY.mjs +1 -0
- package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
- package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
- package/dist/packem_shared/app.d-D7vL0y8y.d.mts +349 -0
- package/dist/packem_shared/app.d-D7vL0y8y.d.ts +349 -0
- package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
- package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
- package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
- package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
- package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
- package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
- package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
- package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
- package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
- package/dist/packem_shared/data-grid-DIiNmDR9.mjs +1 -0
- package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
- package/dist/packem_shared/diagram-export-panel-D5CVNJkp.mjs +2 -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-DueSEkt-.mjs +1 -0
- package/dist/packem_shared/grid-features-OVIMIQan.mjs +6 -0
- package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
- package/dist/packem_shared/home-panel-BcE8S2Nn.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/internal-Df43vQI0.mjs +2 -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-fields-BolUoZ9g.mjs +1 -0
- package/dist/packem_shared/log-line-CICyJ_kc.mjs +1 -0
- package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
- package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
- package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
- package/dist/packem_shared/recording-client-CyFiAE2l.mjs +1 -0
- package/dist/packem_shared/reference-view-CIHyURU6.mjs +13 -0
- package/dist/packem_shared/schema-diagram-C5oilX7l.mjs +2 -0
- package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
- package/dist/packem_shared/select-DPyS18Vy.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-DyK762_A.mjs +1 -0
- package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
- package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
- package/dist/packem_shared/studio-fK2DTLde.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-DkPO_Qtz.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-tlBof8Yg.mjs +1 -0
- package/dist/packem_shared/use-admin-spec-Bir7V68L.mjs +1 -0
- package/dist/packem_shared/use-async-submit-CZqCMTJ_.mjs +1 -0
- package/dist/packem_shared/use-auth-config-Z_n4ABCI.mjs +1 -0
- package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
- package/dist/packem_shared/use-open-trace-DMVhpnyG.mjs +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-CZydTzd5.mjs +1 -0
- package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
- package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
- package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
- package/dist/packem_shared/wire-codec-B2DgCbKt.mjs +1 -0
- package/dist/standalone/chunk-23DA2KK5.js +9 -0
- package/dist/standalone/chunk-253UHWDX.js +1 -0
- package/dist/standalone/chunk-2I4NHEKA.js +1 -0
- package/dist/standalone/chunk-2IKDEUCX.js +1 -0
- package/dist/standalone/chunk-2VA5S3IA.js +1 -0
- package/dist/standalone/chunk-2WCD2IHE.js +1 -0
- package/dist/standalone/chunk-2XNKJZR7.js +1 -0
- package/dist/standalone/chunk-37WYCOQ2.js +1 -0
- package/dist/standalone/chunk-3CTF6VCQ.js +1 -0
- package/dist/standalone/chunk-3T5F2LKG.js +1 -0
- package/dist/standalone/chunk-3YXASVTP.js +1 -0
- package/dist/standalone/chunk-47INSVZQ.js +1 -0
- package/dist/standalone/chunk-4FFZMCLM.js +1 -0
- package/dist/standalone/chunk-4QO356DN.js +1 -0
- package/dist/standalone/chunk-4WD4XGC3.js +1 -0
- package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
- package/dist/standalone/chunk-55UGUCQ6.js +1 -0
- package/dist/standalone/chunk-57L3MFDQ.js +14 -0
- package/dist/standalone/chunk-5AORAJFI.js +1 -0
- package/dist/standalone/chunk-5B2RTXBS.js +1 -0
- package/dist/standalone/chunk-5QR2SQIS.js +1 -0
- package/dist/standalone/chunk-6EZBEZ7D.js +1 -0
- package/dist/standalone/chunk-6HLARDYO.js +1 -0
- package/dist/standalone/chunk-6K53DCPW.js +2 -0
- package/dist/standalone/chunk-6MHPVN2Q.js +15 -0
- package/dist/standalone/chunk-6QTAHSDD.js +1 -0
- package/dist/standalone/chunk-76GDLOCA.js +1 -0
- package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
- package/dist/standalone/chunk-7RKB5KS7.js +1 -0
- package/dist/standalone/chunk-7Y3SY37W.js +1 -0
- package/dist/standalone/chunk-A4GRIXDU.js +1 -0
- package/dist/standalone/chunk-APEMVK3W.js +1 -0
- package/dist/standalone/chunk-AUAECCXB.js +1 -0
- package/dist/standalone/chunk-AUGKHAMQ.js +1 -0
- package/dist/standalone/chunk-AUO3CXYH.js +1 -0
- package/dist/standalone/chunk-AXU6L4JV.js +1 -0
- package/dist/standalone/chunk-BOMPSVRC.js +1 -0
- package/dist/standalone/chunk-C3TKN336.js +1 -0
- package/dist/standalone/chunk-C5NU4UZY.js +1 -0
- package/dist/standalone/chunk-CCDX5RYT.js +1 -0
- package/dist/standalone/chunk-CGQMJYCW.js +1 -0
- package/dist/standalone/chunk-CKEE7CZ6.js +1 -0
- package/dist/standalone/chunk-CQILUV6T.js +1 -0
- package/dist/standalone/chunk-CVXNHIQW.js +1 -0
- package/dist/standalone/chunk-DG4MKUNK.js +1 -0
- package/dist/standalone/chunk-E4PXACVL.js +3 -0
- package/dist/standalone/chunk-E6E3H5HA.js +4 -0
- package/dist/standalone/chunk-ECY2JC5F.js +1 -0
- package/dist/standalone/chunk-F2HHJDID.js +1 -0
- package/dist/standalone/chunk-FJKOBDDS.js +1 -0
- package/dist/standalone/chunk-FMJPASTV.js +1 -0
- package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
- package/dist/standalone/chunk-FUYEZFBP.js +1 -0
- package/dist/standalone/chunk-FZIZZO3M.js +5 -0
- package/dist/standalone/chunk-G3MCWHRS.js +1 -0
- package/dist/standalone/chunk-G6DD6BH4.js +3 -0
- package/dist/standalone/chunk-G74GIEU4.js +1 -0
- package/dist/standalone/chunk-G7O4XEPM.js +1 -0
- package/dist/standalone/chunk-GBS5ACLN.js +1 -0
- package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
- package/dist/standalone/chunk-GMIJJY43.js +1 -0
- package/dist/standalone/chunk-GUAU5JHQ.js +1 -0
- package/dist/standalone/chunk-HCTJKP5J.js +1 -0
- package/dist/standalone/chunk-HJHSQPHW.js +19 -0
- package/dist/standalone/chunk-I26MS5PJ.js +1 -0
- package/dist/standalone/chunk-IALIMFV2.js +1 -0
- package/dist/standalone/chunk-IHPBU2X4.js +1 -0
- package/dist/standalone/chunk-IMBXNH5M.js +1 -0
- package/dist/standalone/chunk-IT6VW5MM.js +1 -0
- package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
- package/dist/standalone/chunk-JQXA2OYK.js +1 -0
- package/dist/standalone/chunk-JZGTSH2C.js +4 -0
- package/dist/standalone/chunk-KCNSN6ZF.js +1 -0
- package/dist/standalone/chunk-KQSQVNVI.js +1 -0
- package/dist/standalone/chunk-KUFFHQPR.js +1 -0
- package/dist/standalone/chunk-LOKJEEUS.js +1 -0
- package/dist/standalone/chunk-LUNNBKUL.js +1 -0
- package/dist/standalone/chunk-MK7SA3YV.js +8 -0
- package/dist/standalone/chunk-MVWZMWPD.js +1 -0
- package/dist/standalone/chunk-NCPW7WHO.js +1 -0
- package/dist/standalone/chunk-NDTQTKDX.js +6 -0
- package/dist/standalone/chunk-NGVP66OH.js +1 -0
- package/dist/standalone/chunk-NQZALRU3.js +1 -0
- package/dist/standalone/chunk-NRP22GKC.js +1 -0
- package/dist/standalone/chunk-NXQW5E6W.js +1 -0
- package/dist/standalone/chunk-OPM7ESDV.js +1 -0
- package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
- package/dist/standalone/chunk-OSGXNEFA.js +1 -0
- package/dist/standalone/chunk-OWD32MWS.js +1 -0
- package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
- package/dist/standalone/chunk-P2I22USO.js +1 -0
- package/dist/standalone/chunk-P5OQ2T7O.js +1 -0
- package/dist/standalone/chunk-PIMTWCRD.js +1 -0
- package/dist/standalone/chunk-PPX63XHJ.js +1 -0
- package/dist/standalone/chunk-PTPKBYI5.js +1 -0
- package/dist/standalone/chunk-Q4UISMBL.js +1 -0
- package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
- package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
- package/dist/standalone/chunk-QAQDMS6R.js +1 -0
- package/dist/standalone/chunk-QJLHH3ET.js +1 -0
- package/dist/standalone/chunk-R6U22RSY.js +1 -0
- package/dist/standalone/chunk-RGMVGZV4.js +1 -0
- package/dist/standalone/chunk-ROX6INV5.js +1 -0
- package/dist/standalone/chunk-RUBMOQH2.js +1 -0
- package/dist/standalone/chunk-RWVIV3U7.js +1 -0
- package/dist/standalone/chunk-RZ6QAA2I.js +1 -0
- package/dist/standalone/chunk-S4Z7K55A.js +1 -0
- package/dist/standalone/chunk-SA2OGF3F.js +1 -0
- package/dist/standalone/chunk-SJQERRSZ.js +1 -0
- package/dist/standalone/chunk-SV764LKQ.js +1 -0
- package/dist/standalone/chunk-UC7MNI2F.js +1 -0
- package/dist/standalone/chunk-UIC7EN6V.js +1 -0
- package/dist/standalone/chunk-UVUKVNCP.js +1 -0
- package/dist/standalone/chunk-UYEZR3BI.js +1 -0
- package/dist/standalone/chunk-VAITO6LM.js +3 -0
- package/dist/standalone/chunk-VAVZCMJZ.js +1 -0
- package/dist/standalone/chunk-VCFEO3RI.js +1 -0
- package/dist/standalone/chunk-VESGIGMQ.js +1 -0
- package/dist/standalone/chunk-VHLKUGQL.js +1 -0
- package/dist/standalone/chunk-VMLLR636.js +1 -0
- package/dist/standalone/chunk-VZWZIIP6.js +1 -0
- package/dist/standalone/chunk-WIASRPIC.js +59 -0
- package/dist/standalone/chunk-WJRYEML4.js +1 -0
- package/dist/standalone/chunk-XGCIDUJF.js +1 -0
- package/dist/standalone/chunk-XHRKNCCI.js +1 -0
- package/dist/standalone/chunk-XTUTKZ2F.js +1 -0
- package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
- package/dist/standalone/chunk-YIDRRLUF.js +1 -0
- package/dist/standalone/chunk-YLPATGWK.js +15 -0
- package/dist/standalone/chunk-YSIOHDX6.js +1 -0
- package/dist/standalone/chunk-YVR4SEPU.js +1 -0
- package/dist/standalone/chunk-Z22BDS6N.js +1 -0
- package/dist/standalone/chunk-ZG4KF3SJ.js +1 -0
- package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
- package/dist/standalone/studio.js +9 -356
- package/dist/styles.css +2 -2
- package/package.json +26 -21
- package/dist/index.js +0 -41
- package/dist/mount.js +0 -26
- package/dist/packem_shared/ADMIN_FUNCTIONS-DmBqMZ-z.js +0 -45
- package/dist/packem_shared/ApiDocsPanel-C5-yJ1p7.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-W3no0KOj.js +0 -251
- package/dist/packem_shared/AuditPanel-Bq4o_IqT.js +0 -212
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-CtBe1So9.js +0 -4542
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-dxY56TDF.js +0 -193
- package/dist/packem_shared/FileBrowser-Dhy4zES8.js +0 -2932
- package/dist/packem_shared/FunctionRunner--fQJRPAD.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-BjRUA_G3.js +0 -432
- package/dist/packem_shared/GlobalDataBrowser-BTEmGrph.js +0 -318
- package/dist/packem_shared/HealthPanel-PxclMWmA.js +0 -640
- package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
- package/dist/packem_shared/InsightsPanel-CWS_C-xW.js +0 -423
- package/dist/packem_shared/LogsPanel-CTW8CFcM.js +0 -839
- package/dist/packem_shared/MailPanel-BwkvfIHF.js +0 -447
- package/dist/packem_shared/MetricsPanel-BLuOhZQ4.js +0 -1625
- package/dist/packem_shared/MigrationsPanel-DT3lnwHF.js +0 -246
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-CdErL7EJ.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-CabfKbyM.js +0 -159
- package/dist/packem_shared/SchemaViewer-LJDcmNIO.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-C_ETsPih.js +0 -79
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
- package/dist/packem_shared/StudioApp-CHOZA-z-.js +0 -383
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-ChfUOZec.js +0 -371
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-CCmwDEVs.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-BFRpzj6r.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLunora as de}from"@lunora/react";import{useState as V,useRef as H,useEffect as I}from"react";import{b as J}from"./use-admin-query-tlBof8Yg.mjs";import{useAutoRefresh as me}from"./DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs";import{u as ue}from"./use-mirrored-ref-CVDf2z1M.mjs";import{useT as B}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{b as fe}from"./cf-links-CBJ5SywP.mjs";import{k as pe,n as ge}from"./internal-Df43vQI0.mjs";import{m as Q,u as be,a as he,T as xe,D as ke}from"./table-list-sidebar-DkPO_Qtz.mjs";import{c as W}from"react/compiler-runtime";import{c as ve,a as Ne,b as Z,e as ye,d as we,T as Te}from"./table-D0SBiDu-.mjs";import{a as Se}from"./control-button-BOZ5K-FC.mjs";import{C as q,G as Ce}from"./data-grid-DIiNmDR9.mjs";import{G as Fe}from"./grid-pagination-DgzyzfBh.mjs";import{jsx as r,jsxs as P}from"react/jsx-runtime";import{E as Pe}from"./empty-state-D7jEML_T.mjs";const Ee=(t,e)=>{const o=t._id;return typeof o=="string"||typeof o=="number"?String(o):`row-${e.toString()}`},Me=t=>t==null?"∅":t===""?"(empty)":pe(t),Ge=t=>{const e=W(45),{filters:o,hasMaskedColumns:f,mask:s,maskOn:u,onChangePageSize:i,onJumpToPage:L,onNext:d,onPrevious:T,onRemoveFilter:p,onToggleMask:O,page:c,pageSize:E,pagination:S}=t,C=B(),{hasNext:z,hasPrevious:D,rangeEnd:$,rangeStart:F,total:k}=S;let v;e[0]!==f||e[1]!==u||e[2]!==O||e[3]!==C?(v=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:Se,"data-testid":"gdb-mask-toggle",onClick:O,type:"button",children:C("Mask sensitive columns")})}),e[0]=f,e[1]=u,e[2]=O,e[3]=C,e[4]=v):v=e[4];let g;e[5]!==o||e[6]!==s||e[7]!==p||e[8]!==C?(g=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=Me(Q(n.value,n.column,s));return P("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:()=>{p(m)},type:"button",children:"✕"})]},`${n.column}:${G}`)})}),e[5]=o,e[6]=s,e[7]=p,e[8]=C,e[9]=g):g=e[9];let a;if(e[10]!==s||e[11]!==c.columns){let n;e[13]!==s?(n=m=>P(ve,{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 N;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(ye,{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))},Ee(m,G)),e[21]=s,e[22]=c.columns,e[23]=n):n=e[23],N=c.rows.map(n),e[17]=s,e[18]=c.columns,e[19]=c.rows,e[20]=N}else N=e[20];let y;e[24]!==N?(y=r(we,{children:N}),e[24]=N,e[25]=y):y=e[25];let h;e[26]!==b||e[27]!==y?(h=r(Ce,{layout:"fill",children:r("div",{className:"min-h-0 flex-1 overflow-auto",children:P(Te,{"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]!==L||e[33]!==d||e[34]!==T||e[35]!==E||e[36]!==$||e[37]!==F||e[38]!==k?(x=r("div",{className:"flex shrink-0 items-center border-t border-border px-4 py-2",children:r(Fe,{hasNext:z,hasPrevious:D,onJumpToPage:L,onNext:d,onPageSizeChange:i,onPrevious:T,pageSize:E,prefix:"gdb",rangeEnd:$,rangeStart:F,total:k})}),e[29]=z,e[30]=D,e[31]=i,e[32]=L,e[33]=d,e[34]=T,e[35]=E,e[36]=$,e[37]=F,e[38]=k,e[39]=x):x=e[39];let M;return e[40]!==v||e[41]!==g||e[42]!==h||e[43]!==x?(M=P("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"gdb-page",children:[v,g,h,x]}),e[40]=v,e[41]=g,e[42]=h,e[43]=x,e[44]=M):M=e[44],M},Re=()=>{const t=W(8),e=B();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=P("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(Pe,{description:o,icon:f,testId:"gdb-empty",title:s})}),t[5]=o,t[6]=s,t[7]=u):u=t[7],u},Le=50,Oe=[],K=[],We=({initialTable:t,onSelectTable:e,pageSize:o=Le,schemaSwitch:f}={})=>{const s=de(),u=B(),[i,L]=V(t??null),[d,T]=V(0),[p,O]=V(o),[c,E]=V([]),S=ue(c),{clearFacets:C,facets:z,refetchFacets:D,toggleFacet:$}=be(),F=J(["lunora-global-tables"],()=>s.listGlobalTables()),k=F.data??null,v=F.error,g=J(["lunora-global-page",i??"",d,p,JSON.stringify(c)],()=>s.readGlobalTablePage({filters:c,limit:p,offset:d,table:i??""}),{enabled:i!==null,keepPreviousData:!1}),a=g.data??null,b=g.error,N=(l,R)=>j=>s.facetGlobalColumn({column:j,filters:R,table:l}),y=(l,R)=>{D(N(l,R))};me(()=>{F.refetch(),i!==null&&(g.refetch(),y(i,S.current))},!0);const h=H(void 0),x=l=>{L(l),h.current=l,E([]),S.current=[],C(),T(0),e?.(l)},M=l=>{$(l,i===null?null:N(i,S.current))},n=l=>{E(l),S.current=l,T(0),i!==null&&y(i,l)},m=(l,R)=>{n([...S.current.filter(j=>j.column!==l),{column:l,value:ge(R)}])},G=l=>{n(S.current.filter((R,j)=>j!==l))},w=H(x);I(()=>{w.current=x}),I(()=>{if(t===void 0||t===""||h.current===t)return;h.current=t;const l=t;queueMicrotask(()=>{w.current(l)})},[t]);const A=l=>{i!==null&&T(Math.max(0,l))},{maskColumns:X,maskOn:Y,maskView:_,onToggleMask:ee}=he({columns:a?.columns??K,selectedTable:i}),U=a?.total??0,te=d>0,re=a!==null&&d+a.rows.length<U,se=a===null||a.rows.length===0?0:d+1,le=a===null?0:d+a.rows.length,ae=()=>{F.refetch()},oe=()=>{A(d-p)},ne=()=>{A(d+p)},ie=l=>{A(Math.max(0,(l-1)*p))},ce=l=>{O(l),T(0)};return P("div",{className:"flex h-full min-w-0","data-testid":"lunora-global-data-browser",children:[r(xe,{header:P("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:fe,rel:"noreferrer",target:"_blank",children:u("Open in Cloudflare")})]}),onReload:ae,onSelect:x,prefix:"gdb",selected:i,tables:k??Oe}),P("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[v!==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:v}),k!==null&&k.length===0&&r(Re,{}),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(Ge,{filters:c,hasMaskedColumns:X.size>0,mask:_,maskOn:Y,onChangePageSize:ce,onJumpToPage:ie,onNext:ne,onPrevious:oe,onRemoveFilter:G,onToggleMask:ee,page:a,pageSize:p,pagination:{hasNext:re,hasPrevious:te,rangeEnd:le,rangeStart:se,total:U}})]}),r(ke,{columns:a?.columns??K,facets:z,mask:_,onFacetFilter:m,onToggleFacet:M})]})};export{We as GlobalDataBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./badge-r_5B4LHP.mjs";import"./card-By2O8ULa.mjs";import"./empty-state-D7jEML_T.mjs";import"./use-admin-query-tlBof8Yg.mjs";import"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import"./internal-Df43vQI0.mjs";import"./utils-bhneXptQ.mjs";import"./DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs";import{H,c as f}from"./home-panel-BcE8S2Nn.mjs";export{H as HomePanel,f as cacheFooterText};
|
|
@@ -0,0 +1 @@
|
|
|
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-DU4p72Er.mjs";import{E as Me}from"./error-alert-DueSEkt-.mjs";import{L as Te}from"./live-status-BuJdUZFU.mjs";import{ShardInput as _e}from"./ShardInput-C6mjgAh4.mjs";import{B as ke}from"./badge-r_5B4LHP.mjs";import{B as Le}from"./button-q0UYSmrn.mjs";import{C as we,a as De}from"./card-By2O8ULa.mjs";import{E as Be}from"./empty-state-D7jEML_T.mjs";import{I as Ae}from"./input-CXhxesPC.mjs";import{L as ue}from"./label-DKFzyHq6.mjs";import{T as Ke,a as je,b as fe,c as u,d as Fe,e as f}from"./table-D0SBiDu-.mjs";import{u as Oe}from"./use-admin-query-tlBof8Yg.mjs";import{u as qe}from"./use-shard-key-BsP3o5wT.mjs";import{useT as He}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{ADMIN_FUNCTIONS as he}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{h as Qe,c as Ue,f as $e,d as ze,b as Ge}from"./internal-Df43vQI0.mjs";import{r as Pe}from"./shard-history-CaO3C4KQ.mjs";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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k}from"react/compiler-runtime";import{useLunora as O}from"@lunora/react";import{E as g}from"./empty-state-D7jEML_T.mjs";import{S as y}from"./skeleton-DX1gfixl.mjs";import{u as R}from"./use-admin-spec-Bir7V68L.mjs";import{useT as S}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{R as P}from"./reference-view-CIHyURU6.mjs";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}},q=n=>{const e=k(23),{spec:m}=n,r=S(),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(P,{model:u}),e[21]=u,e[22]=d):d=e[22],d};export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="lunora-studio-root";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I}from"react/compiler-runtime";import{useLunora as $}from"@lunora/react";import{useState as T,useEffect as H}from"react";import{ConfirmButton as M}from"./ConfirmButton-DU4p72Er.mjs";import{C as P,a as Q}from"./card-By2O8ULa.mjs";import{E as R}from"./empty-state-D7jEML_T.mjs";import{T as q,a as D,b as J,c as l,d as K,e as i}from"./table-D0SBiDu-.mjs";import{b as V}from"./use-admin-query-tlBof8Yg.mjs";import{useAutoRefresh as W}from"./DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs";import{useT as z}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{f as G,h as O,b as U}from"./internal-Df43vQI0.mjs";import{jsx as t,jsxs as p}from"react/jsx-runtime";const X=s=>Number.isFinite(s)?O(s,"—"):"—",F=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 F(r)}),[L,j]=T(void 0),[k,w]=T(void 0);let v,x;e[1]!==n||e[2]!==c?(v=()=>{if(c)return n.subscribeScheduledJobs(r=>{w(void 0),j(F(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=L??d.data,N=k??d.error,A=async r=>{if(C!==void 0){w(void 0);try{await C(r),c||d.refetch()}catch(_){w(U(_))}}},E="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 S=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.workflow??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(A(r.id))},testId:`sj-cancel-${r.id}`,children:o("Cancel")})})]},r.id))})]})})});let g;return e[12]!==S||e[13]!==m||e[14]!==h?(g=p("div",{className:E,"data-testid":B,children:[m,h,S]}),e[12]=S,e[13]=m,e[14]=h,e[15]=g):g=e[15],g};export{he as ScheduledJobs};
|
|
@@ -0,0 +1 @@
|
|
|
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.mjs";import{l as j}from"./shard-history-CaO3C4KQ.mjs";import{I as k}from"./input-CXhxesPC.mjs";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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as b}from"./studio-fK2DTLde.mjs";import"./ErrorBoundary-BWNF98VF.mjs";import"./operation-console-provider-DoloEvon.mjs";import"./badge-r_5B4LHP.mjs";import"./input-CXhxesPC.mjs";import"./skeleton-DX1gfixl.mjs";import"./home-panel-BcE8S2Nn.mjs";import"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import"./StudioI18nProvider-fVsCSs5L.mjs";import"./data-view-params-DhYmAkcj.mjs";import"./internal-Df43vQI0.mjs";import"./utils-bhneXptQ.mjs";import"./CommandPalette-D9ZY-qQd.mjs";export{b as Studio};
|
|
@@ -0,0 +1 @@
|
|
|
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 $}from"react";import{ErrorBoundary as z}from"./ErrorBoundary-BWNF98VF.mjs";import{u as U,B as V,T as Y,a as q,S as J}from"./studio-fK2DTLde.mjs";import Q from"./useDebounced-DVeQ5-oW.mjs";import{useT as j,createStudioI18n as X}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{StudioI18nProvider as D}from"./StudioI18nProvider-fVsCSs5L.mjs";import{r as Z}from"./internal-Df43vQI0.mjs";import{w as R}from"./recording-client-CyFiAE2l.mjs";import F from"./STUDIO_ROOT_CLASS-C6MccdVk.mjs";import{a as K}from"./browser-storage-BH1MxLZs.mjs";import{c as W}from"./utils-bhneXptQ.mjs";import{B as ee}from"./button-q0UYSmrn.mjs";import{I as te}from"./input-CXhxesPC.mjs";import{jsx as f,jsxs as C}from"react/jsx-runtime";const M="lunora-studio-admin-token",oe=()=>{try{return K("session")?.getItem(M)??""}catch{return""}},ne=m=>{const e=K("session");if(e!==void 0)try{m===""?e.removeItem(M):e.setItem(M,m)}catch{}},ie="/_lunora/admin/ws-token",se=1e4,le=m=>{const e=m;return typeof e?.token=="string"&&e.token.length>0&&typeof e.expiresAtMs=="number"},re=m=>{const{adminToken:e,baseUrl:a}=m,o=m.fetchImpl??fetch;let l=a;for(;l.endsWith("/");)l=l.slice(0,-1);const r=`${l}${ie}`;let t,n;const i=async()=>{const s=await o(r,{headers:{authorization:`Bearer ${e}`},method:"POST"});if(!s.ok)throw new Error(`ws-token mint failed: ${String(s.status)}`);const u=await s.json().catch(()=>{});if(!le(u))throw new Error("ws-token mint failed: malformed response body");return t=u,u.token};return{getToken:async()=>t!==void 0&&t.expiresAtMs-se>Date.now()?t.token:(n??=i().finally(()=>{n=void 0}),n),invalidate:()=>{t=void 0}}},ae=m=>{const e=O(42),{onSubmit:a}=m,o=j(),[l,r]=B("");let t;e[0]!==l?(t=l.trim(),e[0]=l,e[1]=t):t=e[1];const n=t;let i;e[2]!==a||e[3]!==n?(i=_=>{_.preventDefault(),n!==""&&a(n)},e[2]=a,e[3]=n,e[4]=i):i=e[4];const s=i;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=f("div",{className:"h-10 w-10 text-foreground",children:f(V,{})}),e[5]=u):u=e[5];let d;e[6]!==o?(d=o("Connect to Lunora Studio"),e[6]=o,e[7]=d):d=e[7];let v;e[8]!==d?(v=f("h1",{className:"text-base font-semibold text-foreground",children:d}),e[8]=d,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 p;e[12]!==k?(p=f("p",{className:"text-[13px] text-muted-foreground",children:k}),e[12]=k,e[13]=p):p=e[13];let h;e[14]!==v||e[15]!==p?(h=C("div",{className:"flex flex-col items-center gap-3 text-center",children:[u,C("div",{className:"flex flex-col gap-1",children:[v,p]})]}),e[14]=v,e[15]=p,e[16]=h):h=e[16];let g;e[17]!==o?(g=o("admin token"),e[17]=o,e[18]=g):g=e[18];let c;e[19]!==g?(c=f("label",{className:"text-xs font-medium text-foreground",htmlFor:"lunora-studio-login-token",children:g}),e[19]=g,e[20]=c):c=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=_=>{r(_.target.value)},e[21]=b):b=e[21];let x;e[22]!==l?(x=f(te,{autoComplete:"off",autoFocus:!0,"data-testid":"lunora-studio-login-token",id:"lunora-studio-login-token",onChange:b,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:l}),e[22]=l,e[23]=x):x=e[23];let T;e[24]!==o?(T=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]=T):T=e[25];let I;e[26]!==T?(I=f("p",{className:"text-[11px] text-muted-foreground",children:T}),e[26]=T,e[27]=I):I=e[27];let S;e[28]!==c||e[29]!==x||e[30]!==I?(S=C("div",{className:"flex flex-col gap-1.5",children:[c,x,I]}),e[28]=c,e[29]=x,e[30]=I,e[31]=S):S=e[31];const E=n==="";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=f(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]!==s||e[38]!==S||e[39]!==w||e[40]!==h?(N=C("form",{className:"flex w-full max-w-sm flex-col gap-5 rounded-xl border border-border bg-card p-7 shadow-lg","data-testid":"lunora-studio-login",onSubmit:s,children:[h,S,w]}),e[37]=s,e[38]=S,e[39]=w,e[40]=h,e[41]=N):N=e[41],N},de=m=>{const e=O(10),{i18n:a,onSubmit:o}=m,{resolvedTheme:l}=U(),r=l==="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 n;e[2]!==o?(n=f(ae,{onSubmit:o}),e[2]=o,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i=f(D,{i18n:a,children:n}),e[4]=a,e[5]=n,e[6]=i):i=e[6];let s;return e[7]!==t||e[8]!==i?(s=f("div",{className:t,"data-testid":"lunora-studio-login-root",children:i}),e[7]=t,e[8]=i,e[9]=s):s=e[9],s},ce=m=>{const e=O(15),{basePath:a,chrome:o,studio:l}=m,r=j();let t;e[0]!==r?(t=r("Studio failed"),e[0]=r,e[1]=t):t=e[1];let n;e[2]!==r?(n=r("Studio"),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==r?(i=r("Try again"),e[4]=r,e[5]=i):i=e[5];let s;e[6]!==a||e[7]!==o||e[8]!==l?(s=f(J,{...l,basePath:a,chrome:o}),e[6]=a,e[7]=o,e[8]=l,e[9]=s):s=e[9];let u;return e[10]!==t||e[11]!==n||e[12]!==i||e[13]!==s?(u=f(z,{fallbackTitle:t,label:n,retryLabel:i,children:s}),e[10]=t,e[11]=n,e[12]=i,e[13]=s,e[14]=u):u=e[14],u},fe=m=>{const e=O(20),{basePath:a,clearToken:o,client:l,i18n:r,onTokenChange:t,rulesInstalled:n,studio:i,token:s}=m,{resolvedTheme:u}=U();let d;e[0]!==o||e[1]!==t||e[2]!==n||e[3]!==s?(d={clearToken:o,onTokenChange:t,rulesInstalled:n,token:s},e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=d):d=e[4];const v=d,k=u==="dark"&&"dark";let p;e[5]!==k?(p=W(F,k,"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground"),e[5]=k,e[6]=p):p=e[6];let h;e[7]!==a||e[8]!==v||e[9]!==i?(h=f(q,{children:f(ce,{basePath:a,chrome:v,studio:i})}),e[7]=a,e[8]=v,e[9]=i,e[10]=h):h=e[10];let g;e[11]!==r||e[12]!==h?(g=f(D,{i18n:r,children:h}),e[11]=r,e[12]=h,e[13]=g):g=e[13];let c;e[14]!==l||e[15]!==g?(c=f(H,{client:l,children:g}),e[14]=l,e[15]=g,e[16]=c):c=e[16];let b;return e[17]!==p||e[18]!==c?(b=f("div",{className:p,"data-testid":"lunora-studio-app",children:c}),e[17]=p,e[18]=c,e[19]=b):b=e[19],b},Ee=m=>{const e=O(28);let a;e[0]!==m?(a=m===void 0?{}:m,e[0]=m,e[1]=a):a=e[1];const{adminToken:o,basePath:l,baseUrl:r,client:t,rulesInstalled:n,studio:i,locale:s}=a;let u;e[2]!==o?(u=()=>o??oe(),e[2]=o,e[3]=u):u=e[3];const[d,v]=B(u);let k,p;e[4]!==d?(k=()=>{ne(d)},p=[d],e[4]=d,e[5]=k,e[6]=p):(k=e[5],p=e[6]),$(k,p);const h=Q(d,300,d==="");let g;e:{if(t!==void 0){let A;e[7]!==t?(A=R(t),e[7]=t,e[8]=A):A=e[8],g=A;break e}let _;if(e[9]!==r||e[10]!==h){const A=Z(r),P=h===""?void 0:re({adminToken:h,baseUrl:A}),L=new G({url:A,...P===void 0?{}:{wsToken:P.getToken}});P!==void 0&&(L.setAuthToken(h),L.onTokenExpired(P.invalidate)),_=R(L),e[9]=r,e[10]=h,e[11]=_}else _=e[11];g=_}const c=g;let b,x;e[12]!==c||e[13]!==t?(b=()=>()=>{t===void 0&&c.close()},x=[c,t],e[12]=c,e[13]=t,e[14]=b,e[15]=x):(b=e[14],x=e[15]),$(b,x);let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=_=>{v(_.target.value)},e[16]=T):T=e[16];const I=T;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{v("")},e[17]=S):S=e[17];const E=S;let y;e[18]!==s?(y=X(s),e[18]=s,e[19]=y):y=e[19];const w=y;let N;return e[20]!==l||e[21]!==c||e[22]!==w||e[23]!==t||e[24]!==n||e[25]!==i||e[26]!==d?(N=f(Y,{children:d===""&&t===void 0?f(de,{i18n:w,onSubmit:v}):f(fe,{basePath:l,clearToken:E,client:c,i18n:w,onTokenChange:I,rulesInstalled:n,studio:i,token:d})}),e[20]=l,e[21]=c,e[22]=w,e[23]=t,e[24]=n,e[25]=i,e[26]=d,e[27]=N):N=e[27],N};export{Ee as StudioApp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u}from"react/compiler-runtime";import{studioI18n as f,createStudioI18n as l,StudioI18nContext as m}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as g}from"react";import{E as x}from"./error-alert-DueSEkt-.mjs";import{C as N,a as y}from"./card-By2O8ULa.mjs";import{T as v,a as T,b as d,c as m,d as w,e as l}from"./table-D0SBiDu-.mjs";import{useT as E}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{c as L}from"./utils-bhneXptQ.mjs";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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i=l=>{let e=0,s=0,o=0,c=0,t=0,n=0,r=0;for(const{metrics:a}of l){if(a===null){t+=1;continue}c+=1,e+=a.requests,s+=a.errors,o+=a.databaseSize??0,a.cache&&(n+=a.cache.hits,r+=a.cache.hits+a.cache.misses)}return{failed:t,hitRate:r===0?null:n/r,reachable:c,totalDatabaseSize:o,totalErrors:s,totalRequests:e}},u=(l,e)=>{const s=new Set,o=[];for(const c of["",l.trim(),...e])s.has(c)||(s.add(c),o.push(c));return o},h=l=>{const e=l,s=[];let o=0;for(const t of e.functions??[])t.calls>0&&(s.push({avg:t.totalDurationMs/t.calls,calls:t.calls}),o+=t.calls);s.sort((t,n)=>t.avg-n.avg);const c=t=>{const n=Math.ceil(t/100*o);let r=0;for(const a of s)if(r+=a.calls,r>=n)return a.avg;return s.at(-1)?.avg??0};return{p90:c(90),p95:c(95)}},f=l=>l.map(e=>({...e,avgDurationMs:e.execCount>0?e.totalDurationMs/e.execCount:0}));export{i as aggregateMetrics,h as computeLatencyPercentiles,f as enrichQueryStats,u as shardsToAggregate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l}from"react/compiler-runtime";import{cva as c}from"class-variance-authority";import{c as v}from"./utils-bhneXptQ.mjs";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};
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { CronJobInfo, ScheduleRecord, LunoraClient } from '@lunora/client';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { I18n } from '@lingui/core';
|
|
4
|
+
import { FunctionUsagePanel, AnalyticsSqlQueryResult } from '@lunora/bindings/analytics-sql';
|
|
5
|
+
interface AnalyticsPanelProps {
|
|
6
|
+
/**
|
|
7
|
+
* Resolve one usage panel. The panel sends only its key; the host's runner
|
|
8
|
+
* calls an action that builds the statement server-side with
|
|
9
|
+
* `functionUsageQuery(panel)` from `@lunora/bindings/analytics-sql` and runs it
|
|
10
|
+
* through `ctx.analyticsSql`. That action reads account analytics, so it must
|
|
11
|
+
* be admin-gated, and it must take the panel key, never SQL: an action that
|
|
12
|
+
* ran caller-supplied SQL could read every dataset in the account. Studio passes
|
|
13
|
+
* its analyticsSqlQuery prop through here; with none, the panel renders an empty
|
|
14
|
+
* state and makes no network call.
|
|
15
|
+
*/
|
|
16
|
+
readonly runQuery?: (panel: FunctionUsagePanel) => Promise<AnalyticsSqlQueryResult>;
|
|
17
|
+
}
|
|
18
|
+
interface CronTriggersPanelProps {
|
|
19
|
+
/**
|
|
20
|
+
* Load the code-defined cron triggers. Defaults to `client.getCronJobs`,
|
|
21
|
+
* which hits the worker's admin-gated `/_lunora/admin/cron-jobs` endpoint —
|
|
22
|
+
* so the panel works out of the box under `<LunoraProvider>`, provided the
|
|
23
|
+
* worker is built with a `cronJobs` map and `adminToken`. Override it to
|
|
24
|
+
* source triggers from elsewhere (e.g. tests).
|
|
25
|
+
*/
|
|
26
|
+
readonly loadCronJobs?: () => Promise<CronJobInfo[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Manually fire one cron job by name. Defaults to `client.runCronJob`, which
|
|
29
|
+
* hits the admin-gated `POST /_lunora/admin/cron-jobs/run` endpoint (the same
|
|
30
|
+
* dispatch the scheduled trigger runs). When a custom {@link CronTriggersPanelProps.loadCronJobs}
|
|
31
|
+
* is supplied without a `runCronJob`, the "Run now" control is hidden — useful
|
|
32
|
+
* for a read-only view.
|
|
33
|
+
*/
|
|
34
|
+
readonly runCronJob?: (name: string) => Promise<{
|
|
35
|
+
name: string;
|
|
36
|
+
ran: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
interface ScheduledJobsProps {
|
|
40
|
+
/**
|
|
41
|
+
* Cancel a pending job by id. Defaults to `client.cancelScheduledJob` when
|
|
42
|
+
* {@link ScheduledJobsProps.loadJobs} is also left to the client. When a
|
|
43
|
+
* custom `loadJobs` is supplied without a `cancelJob`, the cancel control is
|
|
44
|
+
* hidden — useful for a read-only view.
|
|
45
|
+
*/
|
|
46
|
+
readonly cancelJob?: (id: string) => Promise<{
|
|
47
|
+
cancelled: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Load the pending scheduled jobs. Defaults to `client.listScheduledJobs`,
|
|
51
|
+
* which hits the worker's admin-gated `/_lunora/admin/scheduled` endpoint —
|
|
52
|
+
* so the panel works out of the box under `<LunoraProvider>`, provided the
|
|
53
|
+
* worker is built with a `schedulerDO` namespace and `adminToken`. Override
|
|
54
|
+
* it to source jobs from elsewhere.
|
|
55
|
+
*/
|
|
56
|
+
readonly loadJobs?: () => Promise<ScheduleRecord[]>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* View — and cancel — the functions queued via `runAfter` / `runAt` on the
|
|
60
|
+
* scheduler. Cron *triggers* are static wrangler config and don't appear here;
|
|
61
|
+
* this lists the dynamic, in-flight schedule only.
|
|
62
|
+
*
|
|
63
|
+
* Works out of the box under `<LunoraProvider>` via the client's scheduler
|
|
64
|
+
* admin methods; pass {@link ScheduledJobsProps.loadJobs} /
|
|
65
|
+
* {@link ScheduledJobsProps.cancelJob} to override the transport.
|
|
66
|
+
*/
|
|
67
|
+
declare const ScheduledJobs: ({ cancelJob, loadJobs }?: ScheduledJobsProps) => ReactElement;
|
|
68
|
+
interface SchedulePanelProps {
|
|
69
|
+
/** Override how the Cron triggers sub-view loads triggers; see {@link CronTriggersPanel}. */
|
|
70
|
+
readonly loadCronJobs?: CronTriggersPanelProps["loadCronJobs"];
|
|
71
|
+
/** Override how the Scheduled jobs sub-view cancels a job; see {@link ScheduledJobs}. */
|
|
72
|
+
readonly scheduledCancel?: ScheduledJobsProps["cancelJob"];
|
|
73
|
+
/** Override how the Scheduled jobs sub-view loads jobs; see {@link ScheduledJobs}. */
|
|
74
|
+
readonly scheduledLoad?: ScheduledJobsProps["loadJobs"];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The statuses a privacy request moves through, and which of them are terminal.
|
|
78
|
+
*
|
|
79
|
+
* `@lunora/privacy` stores them and the Studio's Privacy requests page renders them.
|
|
80
|
+
* The Studio must not depend on the runtime package, so both read the list from here
|
|
81
|
+
* and the bundler inlines it into each. A status added here reaches both, and the
|
|
82
|
+
* Studio's exhaustive badge map fails to compile until it has a variant.
|
|
83
|
+
*/
|
|
84
|
+
/** Every status, in lifecycle order. */
|
|
85
|
+
declare const REQUEST_STATUSES: readonly ["received", "grace", "processing", "ready", "completed", "failed", "cancelled", "expired"];
|
|
86
|
+
type RequestStatus = (typeof REQUEST_STATUSES)[number];
|
|
87
|
+
type RequestType = "erasure" | "export";
|
|
88
|
+
/**
|
|
89
|
+
* Timestamps are epoch milliseconds. `extendedDueAt` is set only when the deadline was extended, so
|
|
90
|
+
* the effective deadline is `extendedDueAt ?? dueAt`.
|
|
91
|
+
*/
|
|
92
|
+
interface PrivacyRequestRow {
|
|
93
|
+
readonly dueAt: number;
|
|
94
|
+
readonly extendedDueAt?: null | number;
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly receivedAt: number;
|
|
97
|
+
readonly status: RequestStatus;
|
|
98
|
+
readonly subjectId: string;
|
|
99
|
+
readonly type: RequestType;
|
|
100
|
+
}
|
|
101
|
+
/** What the Studio's Privacy requests page reads and writes. */
|
|
102
|
+
interface PrivacyRequestsSource {
|
|
103
|
+
/** The open requests, in any order; the page sorts nothing. */
|
|
104
|
+
listOpenPrivacyRequests: () => Promise<ReadonlyArray<PrivacyRequestRow>>;
|
|
105
|
+
/** Re-run a failed request. Rejects with the server's message on failure. */
|
|
106
|
+
retryPrivacyRequest: (id: string) => Promise<unknown>;
|
|
107
|
+
}
|
|
108
|
+
/** Which client method a {@link FunctionDescriptor} is invoked through. */
|
|
109
|
+
type FunctionKind = "action" | "mutation" | "query";
|
|
110
|
+
/**
|
|
111
|
+
* One argument of a registered function, derived from its `v.*` validator by the
|
|
112
|
+
* worker's `/_lunora/admin/functions` endpoint. A compact signature shape.
|
|
113
|
+
*/
|
|
114
|
+
interface FunctionArgumentDescriptor {
|
|
115
|
+
/** Element validator kind for an `array` arg (one level), e.g. `string`. */
|
|
116
|
+
element?: string;
|
|
117
|
+
/** The (optional-unwrapped) validator kind, e.g. `string`, `id`, `object`. */
|
|
118
|
+
kind: string;
|
|
119
|
+
/** The argument name. */
|
|
120
|
+
name: string;
|
|
121
|
+
/** True when the arg is wrapped in `v.optional(...)`. */
|
|
122
|
+
optional: boolean;
|
|
123
|
+
/** Target table for an `id` arg (`v.id("table")`). */
|
|
124
|
+
table?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Runtime descriptor for a registered Lunora function. The function's `kind` is
|
|
128
|
+
* a compile-time-only phantom on `FunctionReference`, so the runner needs it
|
|
129
|
+
* spelled out here to know which client method to call. `args` carries the
|
|
130
|
+
* function's argument signature (absent on responses from an older worker).
|
|
131
|
+
*/
|
|
132
|
+
interface FunctionDescriptor {
|
|
133
|
+
args?: FunctionArgumentDescriptor[];
|
|
134
|
+
kind: FunctionKind;
|
|
135
|
+
/** The `<file>:<function>` identifier, e.g. `messages:list`. */
|
|
136
|
+
path: string;
|
|
137
|
+
}
|
|
138
|
+
/** Outcome of a single `FunctionRunner` invocation. */
|
|
139
|
+
type RunStatus = "error" | "idle" | "running" | "success";
|
|
140
|
+
interface StudioProps {
|
|
141
|
+
/**
|
|
142
|
+
* Resolve one Analytics tab panel by its key (`"volume"`, `"latency"`,
|
|
143
|
+
* `"hotShards"`). Supply a runner that calls an action in your app which
|
|
144
|
+
* builds the statement server-side and runs it through `ctx.analyticsSql`:
|
|
145
|
+
*
|
|
146
|
+
* ```ts
|
|
147
|
+
* // lunora/studio-analytics.ts
|
|
148
|
+
* export const usagePanel = action.input({ panel: v.string() }).action(async ({ args, ctx }) => {
|
|
149
|
+
* assertAdmin(ctx); // your own admin check: this reads account analytics
|
|
150
|
+
* if (!isFunctionUsagePanel(args.panel)) throw new LunoraError("BAD_REQUEST", "unknown panel");
|
|
151
|
+
* const { params, query } = functionUsageQuery(args.panel);
|
|
152
|
+
* return ctx.analyticsSql.query(query, params);
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* The action MUST be admin-gated and MUST take the panel key, never SQL: an
|
|
157
|
+
* action running caller-supplied SQL could read every dataset in the account.
|
|
158
|
+
* Without a runner the Analytics tab renders an empty state and issues no
|
|
159
|
+
* request.
|
|
160
|
+
*
|
|
161
|
+
* Pass a STABLE reference — a module-level function, or one held in a
|
|
162
|
+
* `useCallback`/ref. It is read while building the tab router, so a fresh
|
|
163
|
+
* inline arrow on every render rebuilds the router and remounts the panel
|
|
164
|
+
* tree, losing in-progress query state. The same holds for `scheduledLoad`,
|
|
165
|
+
* `scheduledCancel` and `scheduledCron`.
|
|
166
|
+
*/
|
|
167
|
+
readonly analyticsSqlQuery?: AnalyticsPanelProps["runQuery"];
|
|
168
|
+
/**
|
|
169
|
+
* URL path prefix the studio is mounted under, passed to the router as its
|
|
170
|
+
* `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
|
|
171
|
+
* dev route serves the studio under `/__lunora`, so it sets this — without
|
|
172
|
+
* it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
|
|
173
|
+
* the mount.
|
|
174
|
+
*/
|
|
175
|
+
readonly basePath?: string;
|
|
176
|
+
/**
|
|
177
|
+
* App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
|
|
178
|
+
* popover, rules banner). The batteries-included `StudioApp` supplies
|
|
179
|
+
* this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
|
|
180
|
+
*/
|
|
181
|
+
readonly chrome?: StudioChrome;
|
|
182
|
+
/**
|
|
183
|
+
* Show the data tab's write controls (insert/edit/delete rows). Off by
|
|
184
|
+
* default; see {@link TableEditor}.
|
|
185
|
+
*
|
|
186
|
+
* **This HIDES THE CONTROLS. It does not make anything read-only.** The
|
|
187
|
+
* write RPCs are gated server-side by `LUNORA_ADMIN_TOKEN` alone — one
|
|
188
|
+
* all-or-nothing check in `handleAdminRpc`, with no read/write scoping — and
|
|
189
|
+
* `renderStudioHtml({ adminToken })` already ships that bearer to the
|
|
190
|
+
* browser. So a viewer handed a studio deployed with `dataEditable: false`
|
|
191
|
+
* still holds a credential that can write; the buttons are simply absent
|
|
192
|
+
* from the page. Treat it as an affordance switch for a trusted operator,
|
|
193
|
+
* never as an authorization boundary. The same holds for
|
|
194
|
+
* {@link StudioProps.schemaEditable} and {@link StudioProps.runAsIdentity}.
|
|
195
|
+
*/
|
|
196
|
+
readonly dataEditable?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Functions exposed in the runner tab. The runner tab only appears when at
|
|
199
|
+
* least one descriptor is supplied (a query/mutation/action's `kind` is
|
|
200
|
+
* compile-time-only, so it must be named here).
|
|
201
|
+
*/
|
|
202
|
+
readonly functions?: FunctionDescriptor[];
|
|
203
|
+
/** Reuse an existing Lingui instance (wins over `locale`). */
|
|
204
|
+
readonly i18n?: I18n;
|
|
205
|
+
/** Shard key every shard-scoped panel targets on first load. */
|
|
206
|
+
readonly initialShardKey?: string;
|
|
207
|
+
/** Active locale for the studio's own UI strings. Defaults to `en`. */
|
|
208
|
+
readonly locale?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
|
|
211
|
+
* Thread the generated `_generated/openapi.json` here to render it
|
|
212
|
+
* without a round-trip. When omitted the reference fetches the worker's
|
|
213
|
+
* admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
|
|
214
|
+
*/
|
|
215
|
+
readonly openApiSpec?: unknown;
|
|
216
|
+
/**
|
|
217
|
+
* Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
|
|
218
|
+
* when the OpenRPC format is selected. Thread the generated
|
|
219
|
+
* `_generated/openrpc.json` here to render it without a round-trip. When
|
|
220
|
+
* omitted the OpenRPC view fetches the worker's admin-gated
|
|
221
|
+
* `GET /_lunora/admin/openrpc` endpoint via the client.
|
|
222
|
+
*/
|
|
223
|
+
readonly openRpcSpec?: unknown;
|
|
224
|
+
/**
|
|
225
|
+
* The app's data-subject request source for the Privacy requests page, built
|
|
226
|
+
* from the app's own admin functions (`listOpenPrivacyRequests`,
|
|
227
|
+
* `retryPrivacyRequest`). Without one the page renders a "not configured" state
|
|
228
|
+
* and issues no request. Pass a STABLE reference, as for `analyticsSqlQuery`.
|
|
229
|
+
*/
|
|
230
|
+
readonly privacyRequests?: PrivacyRequestsSource;
|
|
231
|
+
/**
|
|
232
|
+
* Allow the function runner to execute a function AS a chosen authenticated
|
|
233
|
+
* identity (the "Run as identity" tool), so an operator can test auth + RLS
|
|
234
|
+
* behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
|
|
235
|
+
* the host MUST set this only on a trusted loopback-dev gate (the same gate
|
|
236
|
+
* as `dataEditable`) — never in a production/static deploy. Off by default;
|
|
237
|
+
* see {@link FunctionRunner}.
|
|
238
|
+
*
|
|
239
|
+
* Like {@link StudioProps.dataEditable}, leaving it off only hides the tool.
|
|
240
|
+
* The RPC behind it stays reachable to anyone holding the admin token the
|
|
241
|
+
* page already carries — the gate is the token, not this flag.
|
|
242
|
+
*/
|
|
243
|
+
readonly runAsIdentity?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Override how the schedule tab cancels a job. Defaults to the client's
|
|
246
|
+
* scheduler admin endpoint; see {@link SchedulePanel}.
|
|
247
|
+
*/
|
|
248
|
+
readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
|
|
249
|
+
/**
|
|
250
|
+
* Override how the schedule tab's Cron triggers sub-view loads triggers.
|
|
251
|
+
* Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
|
|
252
|
+
* {@link SchedulePanel}.
|
|
253
|
+
*/
|
|
254
|
+
readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
|
|
255
|
+
/**
|
|
256
|
+
* Override how the schedule tab loads jobs. Defaults to the client's
|
|
257
|
+
* scheduler admin endpoint, so the tab works without extra wiring.
|
|
258
|
+
*/
|
|
259
|
+
readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
|
|
260
|
+
/**
|
|
261
|
+
* Show the visual schema editor overlay on the schema diagram (add table /
|
|
262
|
+
* column / index, written back to `lunora/schema.ts` + codegen). Off by
|
|
263
|
+
* default. Only the loopback-only dev hosts set this — the write path needs
|
|
264
|
+
* the project's filesystem + toolchain, so a static deploy leaves it off.
|
|
265
|
+
*
|
|
266
|
+
* Like {@link StudioProps.dataEditable}, it hides the overlay rather than
|
|
267
|
+
* making the diagram read-only: what actually stops a schema write in a
|
|
268
|
+
* static deploy is that the host has no filesystem to write to, not this
|
|
269
|
+
* flag.
|
|
270
|
+
*/
|
|
271
|
+
readonly schemaEditable?: boolean;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
|
|
275
|
+
* token state, the rules banner) but which renders *inside* the router-owned
|
|
276
|
+
* {@link StudioLayout} (the header and sidebar footer). The layout is a route
|
|
277
|
+
* component with no props, so it reads this from context rather than threading
|
|
278
|
+
* it through the router. Absent (composing `<Studio>` bare) the layout simply
|
|
279
|
+
* omits those affordances.
|
|
280
|
+
*/
|
|
281
|
+
interface StudioChrome {
|
|
282
|
+
readonly clearToken: () => void;
|
|
283
|
+
readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
284
|
+
readonly rulesInstalled?: boolean;
|
|
285
|
+
readonly token: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The composable studio. {@link StudioShell} reads its strings from `useT`,
|
|
289
|
+
* which needs a `StudioI18nProvider` above it.
|
|
290
|
+
*
|
|
291
|
+
* When an `i18n` instance or a `locale` is supplied, this owns a provider so the
|
|
292
|
+
* studio localises itself standalone. When neither is given it renders the
|
|
293
|
+
* shell bare and inherits whatever provider is already in scope — the host app's
|
|
294
|
+
* (`StudioApp` owns one for the top bar too) or the shared default — instead
|
|
295
|
+
* of nesting a second, redundant provider.
|
|
296
|
+
*/
|
|
297
|
+
declare const Studio: ({ i18n, locale, ...shellProps }: StudioProps) => ReactElement;
|
|
298
|
+
interface StudioAppProps {
|
|
299
|
+
/**
|
|
300
|
+
* Admin bearer token to send with every admin request. When omitted the app
|
|
301
|
+
* renders a small prompt so an operator can paste it at runtime — handy in
|
|
302
|
+
* dev where you don't want to bake the token into a bundle.
|
|
303
|
+
*/
|
|
304
|
+
readonly adminToken?: string;
|
|
305
|
+
/**
|
|
306
|
+
* URL path prefix the studio is mounted under (router `basepath`). Defaults
|
|
307
|
+
* to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
|
|
308
|
+
* composed {@link Studio}.
|
|
309
|
+
*/
|
|
310
|
+
readonly basePath?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Base URL of the Lunora worker the studio talks to. Defaults to the
|
|
313
|
+
* current origin, which is correct when the studio is served from the
|
|
314
|
+
* same worker (the `@lunora/vite` dev route) or proxied to it.
|
|
315
|
+
*/
|
|
316
|
+
readonly baseUrl?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Inject a pre-built client instead of constructing one from `baseUrl` +
|
|
319
|
+
* the admin token. Used by the dev mock harness (and embeddings that own
|
|
320
|
+
* the client) so the chrome renders against a supplied client; when set,
|
|
321
|
+
* `baseUrl`/`adminToken` are ignored and this client is never closed here.
|
|
322
|
+
*/
|
|
323
|
+
readonly client?: LunoraClient;
|
|
324
|
+
/** UI language for the studio's own strings. Defaults to `en`. */
|
|
325
|
+
readonly locale?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Whether the project's Lunora agent skills ("rules") are installed. When
|
|
328
|
+
* explicitly `false`, the studio shows a one-line banner pointing at
|
|
329
|
+
* `lunora rules install`. The loopback dev hosts inject this; a static deploy
|
|
330
|
+
* leaves it unset (no banner).
|
|
331
|
+
*/
|
|
332
|
+
readonly rulesInstalled?: boolean;
|
|
333
|
+
/** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
|
|
334
|
+
readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* A fully self-contained studio page: it constructs a {@link LunoraClient}
|
|
338
|
+
* pointed at the worker, wires it through a `<LunoraProvider>`, manages the
|
|
339
|
+
* admin token + theme, and renders the composed {@link Studio} — handing it the
|
|
340
|
+
* top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
|
|
341
|
+
* banner) so those affordances render inside the sidebar shell.
|
|
342
|
+
*
|
|
343
|
+
* Mount this directly (the standalone app and the `@lunora/vite` dev route both
|
|
344
|
+
* do) when you want the batteries-included page rather than composing panels
|
|
345
|
+
* yourself. For embedding into an existing admin UI, use the individual panels
|
|
346
|
+
* or `<Studio>` under your own provider instead.
|
|
347
|
+
*/
|
|
348
|
+
declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
|
|
349
|
+
export { FunctionDescriptor as F, PrivacyRequestRow as P, RunStatus as R, StudioAppProps as S, FunctionKind as a, PrivacyRequestsSource as b, ScheduledJobs as c, ScheduledJobsProps as d, Studio as e, StudioApp as f, StudioProps as g };
|