@lunora/studio 1.0.0-alpha.34 → 1.0.0-alpha.340

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.
Files changed (472) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1597 -0
  4. package/dist/index.d.ts +991 -807
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +22 -0
  7. package/dist/mount.d.ts +11 -10
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +6 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +10 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  34. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  36. package/dist/packem_chunks/containers-panel.mjs +1 -0
  37. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  38. package/dist/packem_chunks/evals-panel.mjs +1 -0
  39. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  40. package/dist/packem_chunks/flags-panel.mjs +1 -0
  41. package/dist/packem_chunks/issues-panel.mjs +1 -0
  42. package/dist/packem_chunks/kv-browser.mjs +1 -0
  43. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  44. package/dist/packem_chunks/migrations-route.mjs +1 -0
  45. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  46. package/dist/packem_chunks/payments-panel.mjs +1 -0
  47. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  48. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  49. package/dist/packem_chunks/queues-panel.mjs +1 -0
  50. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  51. package/dist/packem_chunks/rls-panel.mjs +1 -0
  52. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  53. package/dist/packem_chunks/sparkline.mjs +1 -0
  54. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  55. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  56. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  57. package/dist/packem_chunks/traces-panel.mjs +1 -0
  58. package/dist/packem_chunks/users-panel.mjs +1 -0
  59. package/dist/packem_chunks/vector-browser.mjs +1 -0
  60. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  61. package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
  62. package/dist/packem_shared/ApiDocsPanel-Py7C4ibM.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-DlYVADAy.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-CM1hqAOD.mjs +1 -0
  65. package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
  66. package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
  67. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
  70. package/dist/packem_shared/DataBrowser-DxlLv5x1.mjs +4 -0
  71. package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
  72. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  73. package/dist/packem_shared/GlobalDataBrowser-TFTQpSVj.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-BVz2sDQ4.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-fUyhbt0w.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-nYyfjjse.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-zSeU_6cN.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  80. package/dist/packem_shared/Studio-CNqMkRmB.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-CUxEVr__.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-CXiPdw4B.mjs +1 -0
  84. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  85. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  86. package/dist/packem_shared/app.d-D45VvUTx.d.mts +351 -0
  87. package/dist/packem_shared/app.d-D45VvUTx.d.ts +351 -0
  88. package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
  89. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  90. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  91. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  92. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  93. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  94. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  95. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  96. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  97. package/dist/packem_shared/data-grid-BHTuvSI7.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-BMLzao0Y.mjs +2 -0
  100. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  101. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  102. package/dist/packem_shared/error-alert-D-ftqyo-.mjs +1 -0
  103. package/dist/packem_shared/grid-features-CIdZ8Dqo.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  105. package/dist/packem_shared/home-panel-CF-MfsnH.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-BXEjuLPN.mjs +2 -0
  108. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  109. package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
  110. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  111. package/dist/packem_shared/log-line-BWDt_F56.mjs +1 -0
  112. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  113. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  114. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  115. package/dist/packem_shared/recording-client-CFBkH4uZ.mjs +1 -0
  116. package/dist/packem_shared/reference-view-BrsL8UGn.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-ghsOCED7.mjs +2 -0
  118. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  119. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  120. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  121. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  122. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  123. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  124. package/dist/packem_shared/sql-result-table-COsfUSGc.mjs +1 -0
  125. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  126. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  127. package/dist/packem_shared/studio-BcHsk7mT.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-DwqtHSHU.mjs +1 -0
  130. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  131. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  132. package/dist/packem_shared/use-admin-query-I1uILsUP.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-BdNLZbTO.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-2eBBD0-m.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-DQ8tNyBh.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-B_0LbTD7.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-DetnUyFf.mjs +1 -0
  140. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  141. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  142. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  143. package/dist/standalone/chunk-253UHWDX.js +1 -0
  144. package/dist/standalone/chunk-2I4NHEKA.js +1 -0
  145. package/dist/standalone/chunk-2IKDEUCX.js +1 -0
  146. package/dist/standalone/chunk-2SNK7KHX.js +1 -0
  147. package/dist/standalone/chunk-37WYCOQ2.js +1 -0
  148. package/dist/standalone/chunk-3FYMEXVB.js +1 -0
  149. package/dist/standalone/chunk-3N5PRV3V.js +1 -0
  150. package/dist/standalone/chunk-3YXASVTP.js +1 -0
  151. package/dist/standalone/chunk-43GV7LQK.js +1 -0
  152. package/dist/standalone/chunk-4CGBMYO3.js +6 -0
  153. package/dist/standalone/chunk-4NOMAGEO.js +1 -0
  154. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  155. package/dist/standalone/chunk-55UGUCQ6.js +1 -0
  156. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  157. package/dist/standalone/chunk-5QR2SQIS.js +1 -0
  158. package/dist/standalone/chunk-5SLTDY4C.js +1 -0
  159. package/dist/standalone/chunk-5Y5UTG4N.js +1 -0
  160. package/dist/standalone/chunk-6XKL22OG.js +3 -0
  161. package/dist/standalone/chunk-6ZSIPBTC.js +6 -0
  162. package/dist/standalone/chunk-74IYYDDI.js +19 -0
  163. package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
  164. package/dist/standalone/chunk-7GVT36VI.js +1 -0
  165. package/dist/standalone/chunk-7Q256NLI.js +1 -0
  166. package/dist/standalone/chunk-7RKB5KS7.js +1 -0
  167. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  168. package/dist/standalone/chunk-APEQELK3.js +1 -0
  169. package/dist/standalone/chunk-AUAECCXB.js +1 -0
  170. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-AUGKHAMQ.js} +1 -1
  171. package/dist/standalone/chunk-BFQMOALO.js +1 -0
  172. package/dist/standalone/chunk-BOMPSVRC.js +1 -0
  173. package/dist/standalone/chunk-BTG6YDYM.js +1 -0
  174. package/dist/standalone/chunk-BTQ72TPT.js +1 -0
  175. package/dist/standalone/chunk-CCDX5RYT.js +1 -0
  176. package/dist/standalone/chunk-CGQMJYCW.js +1 -0
  177. package/dist/standalone/chunk-CVXNHIQW.js +1 -0
  178. package/dist/standalone/chunk-DBHZXRL6.js +1 -0
  179. package/dist/standalone/chunk-DBZ4TBP5.js +1 -0
  180. package/dist/standalone/chunk-DEFCA7GG.js +5 -0
  181. package/dist/standalone/chunk-DHGPCQ2F.js +1 -0
  182. package/dist/standalone/chunk-E4PXACVL.js +3 -0
  183. package/dist/standalone/chunk-E5DXYVPB.js +1 -0
  184. package/dist/standalone/chunk-ECY2JC5F.js +1 -0
  185. package/dist/standalone/chunk-EE227HDE.js +1 -0
  186. package/dist/standalone/chunk-ENIA26XP.js +1 -0
  187. package/dist/standalone/chunk-EWMBX5N2.js +1 -0
  188. package/dist/standalone/chunk-FCXFQF2W.js +1 -0
  189. package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
  190. package/dist/standalone/chunk-FUL4ROKH.js +1 -0
  191. package/dist/standalone/chunk-FUYEZFBP.js +1 -0
  192. package/dist/standalone/chunk-G2F22AMT.js +1 -0
  193. package/dist/standalone/chunk-GC4XRCRZ.js +1 -0
  194. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  195. package/dist/standalone/chunk-GOFZ4Y74.js +1 -0
  196. package/dist/standalone/chunk-GUDC24NJ.js +1 -0
  197. package/dist/standalone/chunk-GWVYDOBH.js +1 -0
  198. package/dist/standalone/chunk-GYBCO7NN.js +1 -0
  199. package/dist/standalone/chunk-HCFJBY65.js +1 -0
  200. package/dist/standalone/chunk-HCTJKP5J.js +1 -0
  201. package/dist/standalone/chunk-HGHIVU76.js +1 -0
  202. package/dist/standalone/chunk-HH52IEFY.js +4 -0
  203. package/dist/standalone/chunk-HIJGQX6F.js +4 -0
  204. package/dist/standalone/chunk-HPYJUVCC.js +1 -0
  205. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  206. package/dist/standalone/chunk-ICRKYAYO.js +1 -0
  207. package/dist/standalone/chunk-IRSSZXC3.js +1 -0
  208. package/dist/standalone/chunk-ITT6MM23.js +1 -0
  209. package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
  210. package/dist/standalone/chunk-JR4ROUBB.js +1 -0
  211. package/dist/standalone/chunk-K2EHRNYW.js +1 -0
  212. package/dist/standalone/chunk-K3UAOIR7.js +1 -0
  213. package/dist/standalone/chunk-KCFO2BVI.js +15 -0
  214. package/dist/standalone/chunk-KF7Y5S5O.js +1 -0
  215. package/dist/standalone/chunk-LHG2JVIM.js +2 -0
  216. package/dist/standalone/chunk-LXCVA5SP.js +1 -0
  217. package/dist/standalone/chunk-M3QKMHAP.js +15 -0
  218. package/dist/standalone/chunk-MVWZMWPD.js +1 -0
  219. package/dist/standalone/chunk-NCBLHBRW.js +1 -0
  220. package/dist/standalone/chunk-NCCORPSU.js +7 -0
  221. package/dist/standalone/chunk-NCPW7WHO.js +1 -0
  222. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  223. package/dist/standalone/chunk-NQZALRU3.js +1 -0
  224. package/dist/standalone/chunk-NRP22GKC.js +1 -0
  225. package/dist/standalone/chunk-NXQW5E6W.js +1 -0
  226. package/dist/standalone/chunk-O2FW4VRL.js +1 -0
  227. package/dist/standalone/chunk-OI5HX3ZO.js +1 -0
  228. package/dist/standalone/chunk-OLIKYC3C.js +59 -0
  229. package/dist/standalone/chunk-OPM7ESDV.js +1 -0
  230. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  231. package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
  232. package/dist/standalone/chunk-PSMQQV6S.js +1 -0
  233. package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
  234. package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
  235. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-QAQDMS6R.js} +1 -1
  236. package/dist/standalone/chunk-QJLHH3ET.js +1 -0
  237. package/dist/standalone/chunk-R3ADWOYR.js +1 -0
  238. package/dist/standalone/chunk-R6U22RSY.js +1 -0
  239. package/dist/standalone/chunk-RB3WPSY5.js +14 -0
  240. package/dist/standalone/chunk-RGMVGZV4.js +1 -0
  241. package/dist/standalone/chunk-RWVIV3U7.js +1 -0
  242. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  243. package/dist/standalone/chunk-SA2OGF3F.js +1 -0
  244. package/dist/standalone/chunk-SC6P4M3S.js +1 -0
  245. package/dist/standalone/chunk-SJQERRSZ.js +1 -0
  246. package/dist/standalone/chunk-SU6QNITV.js +1 -0
  247. package/dist/standalone/chunk-T6IV7OKH.js +1 -0
  248. package/dist/standalone/chunk-UC7MNI2F.js +1 -0
  249. package/dist/standalone/chunk-UIIKW4II.js +1 -0
  250. package/dist/standalone/chunk-UJQNKTYE.js +1 -0
  251. package/dist/standalone/chunk-UVL7N5IL.js +1 -0
  252. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  253. package/dist/standalone/chunk-VCFEO3RI.js +1 -0
  254. package/dist/standalone/chunk-VDC6JP4A.js +1 -0
  255. package/dist/standalone/chunk-VENSZ6LF.js +1 -0
  256. package/dist/standalone/chunk-VESGIGMQ.js +1 -0
  257. package/dist/standalone/chunk-VJ7RCBJ7.js +1 -0
  258. package/dist/standalone/chunk-VNMKNORK.js +1 -0
  259. package/dist/standalone/chunk-VQRCJJXS.js +1 -0
  260. package/dist/standalone/chunk-VVCXVAA7.js +8 -0
  261. package/dist/standalone/chunk-VXJJSPX3.js +1 -0
  262. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  263. package/dist/standalone/chunk-WUI2PUY6.js +1 -0
  264. package/dist/standalone/chunk-WVWCUB4S.js +1 -0
  265. package/dist/standalone/chunk-WVYIBXUH.js +1 -0
  266. package/dist/standalone/chunk-X4MAMXRE.js +1 -0
  267. package/dist/standalone/chunk-XBQ66PGW.js +1 -0
  268. package/dist/standalone/chunk-XGCIDUJF.js +1 -0
  269. package/dist/standalone/chunk-XKISL2CG.js +1 -0
  270. package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
  271. package/dist/standalone/chunk-YZ72ZAGX.js +1 -0
  272. package/dist/standalone/chunk-ZJQIGWLG.js +1 -0
  273. package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
  274. package/dist/standalone/chunk-ZKV2XC5B.js +1 -0
  275. package/dist/standalone/chunk-ZPNTFCVI.js +1 -0
  276. package/dist/standalone/studio.js +9 -214
  277. package/dist/styles.css +2 -2
  278. package/package.json +26 -22
  279. package/dist/index.js +0 -41
  280. package/dist/mount.js +0 -27
  281. package/dist/packem_chunks/ApiTab.js +0 -251
  282. package/dist/packem_chunks/AuditPanel.js +0 -200
  283. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  284. package/dist/packem_chunks/FileBrowser.js +0 -2932
  285. package/dist/packem_chunks/FunctionRunner.js +0 -343
  286. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  287. package/dist/packem_chunks/HealthPanel.js +0 -648
  288. package/dist/packem_chunks/InsightsPanel.js +0 -462
  289. package/dist/packem_chunks/LogsPanel.js +0 -827
  290. package/dist/packem_chunks/MailPanel.js +0 -441
  291. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  292. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  293. package/dist/packem_chunks/PitrPanel.js +0 -252
  294. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  295. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  296. package/dist/packem_chunks/SettingsPanel.js +0 -391
  297. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  298. package/dist/packem_chunks/TableEditor.js +0 -313
  299. package/dist/packem_chunks/analytics-panel.js +0 -261
  300. package/dist/packem_chunks/auth-config-panel.js +0 -179
  301. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  302. package/dist/packem_chunks/containers-panel.js +0 -247
  303. package/dist/packem_chunks/dashboards-panel.js +0 -780
  304. package/dist/packem_chunks/fanout-panel.js +0 -482
  305. package/dist/packem_chunks/flags-panel.js +0 -176
  306. package/dist/packem_chunks/kv-browser.js +0 -1896
  307. package/dist/packem_chunks/log-drains-panel.js +0 -273
  308. package/dist/packem_chunks/organizations-panel.js +0 -670
  309. package/dist/packem_chunks/payments-panel.js +0 -186
  310. package/dist/packem_chunks/permissions-panel.js +0 -805
  311. package/dist/packem_chunks/queues-panel.js +0 -148
  312. package/dist/packem_chunks/rls-panel.js +0 -315
  313. package/dist/packem_chunks/schedule-panel.js +0 -831
  314. package/dist/packem_chunks/sparkline.js +0 -79
  315. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  316. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  317. package/dist/packem_chunks/users-panel.js +0 -1265
  318. package/dist/packem_chunks/vector-browser.js +0 -281
  319. package/dist/packem_chunks/workflows-panel.js +0 -562
  320. package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
  321. package/dist/packem_shared/ApiDocsPanel-Cu6mD4u7.js +0 -842
  322. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  323. package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
  324. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  325. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  326. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  327. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  328. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  329. package/dist/packem_shared/DataBrowser-DSNK1tPg.js +0 -4493
  330. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  331. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  332. package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
  333. package/dist/packem_shared/HomePanel-DQk3P8xX.js +0 -14
  334. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  335. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  336. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  337. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  338. package/dist/packem_shared/Studio-Biu37c3O.js +0 -16
  339. package/dist/packem_shared/StudioApp-D6a2ZmXS.js +0 -657
  340. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  341. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  342. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  343. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  344. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  345. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  346. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  347. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  348. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  349. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  350. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  351. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  352. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  353. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  354. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  355. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  356. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  357. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  358. package/dist/packem_shared/home-panel-Bo-Mgrkn.js +0 -1639
  359. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  360. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  361. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  362. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  363. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  364. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  365. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  366. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  367. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  368. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  369. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  370. package/dist/packem_shared/studio-C4sgu0F7.js +0 -4015
  371. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  372. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  373. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  374. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  375. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  376. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  377. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  378. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  379. package/dist/standalone/chunk-25VHPD2I.js +0 -1
  380. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  381. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  382. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  383. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  384. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  385. package/dist/standalone/chunk-4H2OJBXO.js +0 -1
  386. package/dist/standalone/chunk-4MLAVZP4.js +0 -1
  387. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  388. package/dist/standalone/chunk-55YA7ZZI.js +0 -76
  389. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  390. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  391. package/dist/standalone/chunk-5PQMXK24.js +0 -1
  392. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  393. package/dist/standalone/chunk-764T6X6X.js +0 -1
  394. package/dist/standalone/chunk-7M3F6U4L.js +0 -1
  395. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  396. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  397. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  398. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  399. package/dist/standalone/chunk-AQGOX5DK.js +0 -1
  400. package/dist/standalone/chunk-BACPICH6.js +0 -1
  401. package/dist/standalone/chunk-BET2625I.js +0 -1
  402. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  403. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  404. package/dist/standalone/chunk-DCECRP45.js +0 -1
  405. package/dist/standalone/chunk-DFP2DADO.js +0 -1
  406. package/dist/standalone/chunk-DORBUITF.js +0 -1
  407. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  408. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  409. package/dist/standalone/chunk-E6WUCLSI.js +0 -1
  410. package/dist/standalone/chunk-E7WLF6IU.js +0 -1
  411. package/dist/standalone/chunk-EVPLBWUT.js +0 -8
  412. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  413. package/dist/standalone/chunk-FKO3HO6I.js +0 -4
  414. package/dist/standalone/chunk-G2ICR3DL.js +0 -1
  415. package/dist/standalone/chunk-GJ6PGSES.js +0 -13
  416. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  417. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  418. package/dist/standalone/chunk-GVRM4U6W.js +0 -2
  419. package/dist/standalone/chunk-GZDWDDXN.js +0 -1
  420. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  421. package/dist/standalone/chunk-ISJAJWYI.js +0 -1
  422. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  423. package/dist/standalone/chunk-JIDZFLTB.js +0 -4
  424. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  425. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  426. package/dist/standalone/chunk-K4ZDRTQM.js +0 -1
  427. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  428. package/dist/standalone/chunk-KTK3V4DC.js +0 -1
  429. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  430. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  431. package/dist/standalone/chunk-MFPTVCJ6.js +0 -1
  432. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  433. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  434. package/dist/standalone/chunk-O77VNUFD.js +0 -1
  435. package/dist/standalone/chunk-PA3LN4XJ.js +0 -1
  436. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  437. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  438. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  439. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  440. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  441. package/dist/standalone/chunk-QHIIRFG7.js +0 -1
  442. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  443. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  444. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  445. package/dist/standalone/chunk-SGDQIWAR.js +0 -4
  446. package/dist/standalone/chunk-SVR644RF.js +0 -1
  447. package/dist/standalone/chunk-SYEIXTEU.js +0 -1
  448. package/dist/standalone/chunk-T5HRXUSY.js +0 -1
  449. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  450. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  451. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  452. package/dist/standalone/chunk-TM7CMA7X.js +0 -1
  453. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  454. package/dist/standalone/chunk-TY7L2V4E.js +0 -1
  455. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  456. package/dist/standalone/chunk-UDSVXA42.js +0 -1
  457. package/dist/standalone/chunk-UII66UVF.js +0 -1
  458. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  459. package/dist/standalone/chunk-VEZO7G5Q.js +0 -3
  460. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  461. package/dist/standalone/chunk-VSHUSN6T.js +0 -1
  462. package/dist/standalone/chunk-VYMCCC6O.js +0 -1
  463. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  464. package/dist/standalone/chunk-X72PYOEW.js +0 -1
  465. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  466. package/dist/standalone/chunk-XIGIWZLO.js +0 -4
  467. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  468. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  469. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  470. package/dist/standalone/chunk-YM6BBZDN.js +0 -1
  471. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  472. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
@@ -0,0 +1 @@
1
+ import{useLunora as me}from"@lunora/react";import{useState as A,useRef as I,useEffect as J}from"react";import{b as Q}from"./use-admin-query-I1uILsUP.mjs";import{useAutoRefresh as B}from"./DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs";import{u as ue}from"./use-mirrored-ref-CVDf2z1M.mjs";import{useT as _}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{b as fe}from"./cf-links-CBJ5SywP.mjs";import{l as pe,o as ge,f as be}from"./internal-BXEjuLPN.mjs";import{m as Z,u as he,a as xe,T as ke,D as ve}from"./table-list-sidebar-DwqtHSHU.mjs";import{c as X}from"react/compiler-runtime";import{c as Ne,a as ye,b as q,e as we,d as Te,T as Se}from"./table-D0SBiDu-.mjs";import{a as Ce}from"./control-button-BOZ5K-FC.mjs";import{C as K,G as Fe}from"./data-grid-BHTuvSI7.mjs";import{G as Pe}from"./grid-pagination-DgzyzfBh.mjs";import{jsx as r,jsxs as P}from"react/jsx-runtime";import{E as Ee}from"./empty-state-D7jEML_T.mjs";const Me=(t,e)=>{const n=t._id;return typeof n=="string"||typeof n=="number"?String(n):`row-${e.toString()}`},Ge=t=>t==null?"∅":t===""?"(empty)":pe(t),Re=t=>{const e=X(45),{filters:n,hasMaskedColumns:f,mask:s,maskOn:u,onChangePageSize:o,onJumpToPage:L,onNext:d,onPrevious:T,onRemoveFilter:p,onToggleMask:O,page:c,pageSize:E,pagination:S}=t,C=_(),{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:Ce,"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]!==n||e[6]!==s||e[7]!==p||e[8]!==C?(g=n.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:n.map((i,m)=>{const G=Ge(Z(i.value,i.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:i.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:"✕"})]},`${i.column}:${G}`)})}),e[5]=n,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 i;e[13]!==s?(i=m=>P(Ne,{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]=i):i=e[14],a=c.columns.map(i),e[10]=s,e[11]=c.columns,e[12]=a}else a=e[12];let b;e[15]!==a?(b=r(ye,{children:r(q,{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 i;e[21]!==s||e[22]!==c.columns?(i=(m,G)=>r(q,{"data-testid":"gdb-row",children:c.columns.map(w=>r(we,{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(K,{value:Z(m[w],w,s)})}):r(K,{value:m[w]})},w))},Me(m,G)),e[21]=s,e[22]=c.columns,e[23]=i):i=e[23],N=c.rows.map(i),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(Te,{children:N}),e[24]=N,e[25]=y):y=e[25];let h;e[26]!==b||e[27]!==y?(h=r(Fe,{layout:"fill",children:r("div",{className:"min-h-0 flex-1 overflow-auto",children:P(Se,{"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]!==o||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(Pe,{hasNext:z,hasPrevious:D,onJumpToPage:L,onNext:d,onPageSizeChange:o,onPrevious:T,pageSize:E,prefix:"gdb",rangeEnd:$,rangeStart:F,total:k})}),e[29]=z,e[30]=D,e[31]=o,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},Le=()=>{const t=X(8),e=_();let n;t[0]!==e?(n=e("Tables marked .global() (D1-backed, region-replicated) will appear here."),t[0]=e,t[1]=n):n=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]!==n||t[6]!==s?(u=r("div",{className:"flex flex-1 items-center justify-center p-6",children:r(Ee,{description:n,icon:f,testId:"gdb-empty",title:s})}),t[5]=n,t[6]=s,t[7]=u):u=t[7],u},Oe=50,ze=[],W=[],Xe=({initialTable:t,onSelectTable:e,pageSize:n=Oe,schemaSwitch:f}={})=>{const s=me(),u=_(),[o,L]=A(t??null),[d,T]=A(0),[p,O]=A(n),[c,E]=A([]),S=ue(c),{clearFacets:C,facets:z,refetchFacets:D,toggleFacet:$}=he(),F=Q(["lunora-global-tables"],()=>s.listGlobalTables()),k=F.data??null,v=F.error,g=Q(["lunora-global-page",o??"",d,p,JSON.stringify(c)],()=>s.readGlobalTablePage({filters:c,limit:p,offset:d,table:o??""}),{enabled:o!==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));B(()=>F.poll(),!0),B(()=>g.poll(),o!==null),B(()=>o===null?void 0:y(o,S.current),o!==null);const h=I(void 0),x=l=>{L(l),h.current=l,E([]),S.current=[],C(),T(0),e?.(l)},M=l=>{$(l,o===null?null:N(o,S.current))},i=l=>{E(l),S.current=l,T(0),o!==null&&be(y(o,l))},m=(l,R)=>{i([...S.current.filter(j=>j.column!==l),{column:l,value:ge(R)}])},G=l=>{i(S.current.filter((R,j)=>j!==l))},w=I(x);J(()=>{w.current=x}),J(()=>{if(t===void 0||t===""||h.current===t)return;h.current=t;const l=t;queueMicrotask(()=>{w.current(l)})},[t]);const V=l=>{o!==null&&T(Math.max(0,l))},{maskColumns:Y,maskOn:ee,maskView:U,onToggleMask:te}=xe({columns:a?.columns??W,selectedTable:o}),H=a?.total??0,re=d>0,se=a!==null&&d+a.rows.length<H,le=a===null||a.rows.length===0?0:d+1,ae=a===null?0:d+a.rows.length,oe=()=>{F.refetch()},ne=()=>{V(d-p)},ie=()=>{V(d+p)},ce=l=>{V(Math.max(0,(l-1)*p))},de=l=>{O(l),T(0)};return P("div",{className:"flex h-full min-w-0","data-testid":"lunora-global-data-browser",children:[r(ke,{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:oe,onSelect:x,prefix:"gdb",selected:o,tables:k??ze}),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(Le,{}),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(Re,{filters:c,hasMaskedColumns:Y.size>0,mask:U,maskOn:ee,onChangePageSize:de,onJumpToPage:ce,onNext:ie,onPrevious:ne,onRemoveFilter:G,onToggleMask:te,page:a,pageSize:p,pagination:{hasNext:se,hasPrevious:re,rangeEnd:ae,rangeStart:le,total:H}})]}),r(ve,{columns:a?.columns??W,facets:z,mask:U,onFacetFilter:m,onToggleFacet:M})]})};export{Xe 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-I1uILsUP.mjs";import"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import"./internal-BXEjuLPN.mjs";import"./utils-bhneXptQ.mjs";import"./DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs";import{H,c as f}from"./home-panel-CF-MfsnH.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-D-ftqyo-.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-I1uILsUP.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-BXEjuLPN.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 O}from"react/compiler-runtime";import{useLunora as R}from"@lunora/react";import{E as g}from"./empty-state-D7jEML_T.mjs";import{S as y}from"./skeleton-DX1gfixl.mjs";import{u as S}from"./use-admin-spec-BdNLZbTO.mjs";import{useT as P}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{R as x}from"./reference-view-BrsL8UGn.mjs";import{jsxs as h,jsx as l}from"react/jsx-runtime";const k=n=>(n.methods??[]).filter(e=>e["x-lunora-function-kind"]!=="stream"),w=n=>(n.params??[]).find(e=>e.name==="args")??(n.params??[])[0],I=n=>n["x-tags"]?.[0]?.name??(n.name.includes(":")?n.name.slice(0,n.name.indexOf(":")):""),v=n=>{const e=w(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:[I(n)],title:n.summary??n.name}},C=n=>{const e=n??{},m=k(e).map(a=>v(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}},N=n=>k(n).length===0,b=n=>{const e=n;return N(e)?{kind:"empty"}:{kind:"ready",spec:e}},B=n=>{const e=O(23),{spec:m}=n,r=P(),f=R();let a;e[0]!==f?(a=()=>f.fetchOpenRpc(),e[0]=f,e[1]=a):a=e[1];const s=S(m,a,b);let p;e[2]!==s.kind||e[3]!==s.spec?(p=s.kind==="ready"?C(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(x,{model:u}),e[21]=u,e[22]=d):d=e[22],d};export{B 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-I1uILsUP.mjs";import{useAutoRefresh as W}from"./DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs";import{useT as z}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{f as G,h as O,b as U}from"./internal-BXEjuLPN.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.poll(),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-BcHsk7mT.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-CF-MfsnH.mjs";import"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import"./StudioI18nProvider-fVsCSs5L.mjs";import"./data-view-params-DhYmAkcj.mjs";import"./internal-BXEjuLPN.mjs";import"./utils-bhneXptQ.mjs";import"./CommandPalette-CM1hqAOD.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-BcHsk7mT.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-BXEjuLPN.mjs";import{w as R}from"./recording-client-CFBkH4uZ.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?{}:{wsTicket: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-D-ftqyo-.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,351 @@
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
+ /** True when the arg is marked `v.sensitive`: its value is never kept in run history. */
124
+ sensitive?: true;
125
+ /** Target table for an `id` arg (`v.id("table")`). */
126
+ table?: string;
127
+ }
128
+ /**
129
+ * Runtime descriptor for a registered Lunora function. The function's `kind` is
130
+ * a compile-time-only phantom on `FunctionReference`, so the runner needs it
131
+ * spelled out here to know which client method to call. `args` carries the
132
+ * function's argument signature (absent on responses from an older worker).
133
+ */
134
+ interface FunctionDescriptor {
135
+ args?: FunctionArgumentDescriptor[];
136
+ kind: FunctionKind;
137
+ /** The `<file>:<function>` identifier, e.g. `messages:list`. */
138
+ path: string;
139
+ }
140
+ /** Outcome of a single `FunctionRunner` invocation. */
141
+ type RunStatus = "error" | "idle" | "running" | "success";
142
+ interface StudioProps {
143
+ /**
144
+ * Resolve one Analytics tab panel by its key (`"volume"`, `"latency"`,
145
+ * `"hotShards"`). Supply a runner that calls an action in your app which
146
+ * builds the statement server-side and runs it through `ctx.analyticsSql`:
147
+ *
148
+ * ```ts
149
+ * // lunora/studio-analytics.ts
150
+ * export const usagePanel = action.input({ panel: v.string() }).action(async ({ args, ctx }) => {
151
+ * assertAdmin(ctx); // your own admin check: this reads account analytics
152
+ * if (!isFunctionUsagePanel(args.panel)) throw new LunoraError("BAD_REQUEST", "unknown panel");
153
+ * const { params, query } = functionUsageQuery(args.panel);
154
+ * return ctx.analyticsSql.query(query, params);
155
+ * });
156
+ * ```
157
+ *
158
+ * The action MUST be admin-gated and MUST take the panel key, never SQL: an
159
+ * action running caller-supplied SQL could read every dataset in the account.
160
+ * Without a runner the Analytics tab renders an empty state and issues no
161
+ * request.
162
+ *
163
+ * Pass a STABLE reference — a module-level function, or one held in a
164
+ * `useCallback`/ref. It is read while building the tab router, so a fresh
165
+ * inline arrow on every render rebuilds the router and remounts the panel
166
+ * tree, losing in-progress query state. The same holds for `scheduledLoad`,
167
+ * `scheduledCancel` and `scheduledCron`.
168
+ */
169
+ readonly analyticsSqlQuery?: AnalyticsPanelProps["runQuery"];
170
+ /**
171
+ * URL path prefix the studio is mounted under, passed to the router as its
172
+ * `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
173
+ * dev route serves the studio under `/__lunora`, so it sets this — without
174
+ * it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
175
+ * the mount.
176
+ */
177
+ readonly basePath?: string;
178
+ /**
179
+ * App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
180
+ * popover, rules banner). The batteries-included `StudioApp` supplies
181
+ * this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
182
+ */
183
+ readonly chrome?: StudioChrome;
184
+ /**
185
+ * Show the data tab's write controls (insert/edit/delete rows). Off by
186
+ * default; see {@link TableEditor}.
187
+ *
188
+ * **This HIDES THE CONTROLS. It does not make anything read-only.** The
189
+ * write RPCs are gated server-side by `LUNORA_ADMIN_TOKEN` alone — one
190
+ * all-or-nothing check in `handleAdminRpc`, with no read/write scoping — and
191
+ * `renderStudioHtml({ adminToken })` already ships that bearer to the
192
+ * browser. So a viewer handed a studio deployed with `dataEditable: false`
193
+ * still holds a credential that can write; the buttons are simply absent
194
+ * from the page. Treat it as an affordance switch for a trusted operator,
195
+ * never as an authorization boundary. The same holds for
196
+ * {@link StudioProps.schemaEditable} and {@link StudioProps.runAsIdentity}.
197
+ */
198
+ readonly dataEditable?: boolean;
199
+ /**
200
+ * Functions exposed in the runner tab. The runner tab only appears when at
201
+ * least one descriptor is supplied (a query/mutation/action's `kind` is
202
+ * compile-time-only, so it must be named here).
203
+ */
204
+ readonly functions?: FunctionDescriptor[];
205
+ /** Reuse an existing Lingui instance (wins over `locale`). */
206
+ readonly i18n?: I18n;
207
+ /** Shard key every shard-scoped panel targets on first load. */
208
+ readonly initialShardKey?: string;
209
+ /** Active locale for the studio's own UI strings. Defaults to `en`. */
210
+ readonly locale?: string;
211
+ /**
212
+ * Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
213
+ * Thread the generated `_generated/openapi.json` here to render it
214
+ * without a round-trip. When omitted the reference fetches the worker's
215
+ * admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
216
+ */
217
+ readonly openApiSpec?: unknown;
218
+ /**
219
+ * Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
220
+ * when the OpenRPC format is selected. Thread the generated
221
+ * `_generated/openrpc.json` here to render it without a round-trip. When
222
+ * omitted the OpenRPC view fetches the worker's admin-gated
223
+ * `GET /_lunora/admin/openrpc` endpoint via the client.
224
+ */
225
+ readonly openRpcSpec?: unknown;
226
+ /**
227
+ * The app's data-subject request source for the Privacy requests page, built
228
+ * from the app's own admin functions (`listOpenPrivacyRequests`,
229
+ * `retryPrivacyRequest`). Without one the page renders a "not configured" state
230
+ * and issues no request. Pass a STABLE reference, as for `analyticsSqlQuery`.
231
+ */
232
+ readonly privacyRequests?: PrivacyRequestsSource;
233
+ /**
234
+ * Allow the function runner to execute a function AS a chosen authenticated
235
+ * identity (the "Run as identity" tool), so an operator can test auth + RLS
236
+ * behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
237
+ * the host MUST set this only on a trusted loopback-dev gate (the same gate
238
+ * as `dataEditable`) — never in a production/static deploy. Off by default;
239
+ * see {@link FunctionRunner}.
240
+ *
241
+ * Like {@link StudioProps.dataEditable}, leaving it off only hides the tool.
242
+ * The RPC behind it stays reachable to anyone holding the admin token the
243
+ * page already carries — the gate is the token, not this flag.
244
+ */
245
+ readonly runAsIdentity?: boolean;
246
+ /**
247
+ * Override how the schedule tab cancels a job. Defaults to the client's
248
+ * scheduler admin endpoint; see {@link SchedulePanel}.
249
+ */
250
+ readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
251
+ /**
252
+ * Override how the schedule tab's Cron triggers sub-view loads triggers.
253
+ * Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
254
+ * {@link SchedulePanel}.
255
+ */
256
+ readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
257
+ /**
258
+ * Override how the schedule tab loads jobs. Defaults to the client's
259
+ * scheduler admin endpoint, so the tab works without extra wiring.
260
+ */
261
+ readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
262
+ /**
263
+ * Show the visual schema editor overlay on the schema diagram (add table /
264
+ * column / index, written back to `lunora/schema.ts` + codegen). Off by
265
+ * default. Only the loopback-only dev hosts set this — the write path needs
266
+ * the project's filesystem + toolchain, so a static deploy leaves it off.
267
+ *
268
+ * Like {@link StudioProps.dataEditable}, it hides the overlay rather than
269
+ * making the diagram read-only: what actually stops a schema write in a
270
+ * static deploy is that the host has no filesystem to write to, not this
271
+ * flag.
272
+ */
273
+ readonly schemaEditable?: boolean;
274
+ }
275
+ /**
276
+ * Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
277
+ * token state, the rules banner) but which renders *inside* the router-owned
278
+ * {@link StudioLayout} (the header and sidebar footer). The layout is a route
279
+ * component with no props, so it reads this from context rather than threading
280
+ * it through the router. Absent (composing `<Studio>` bare) the layout simply
281
+ * omits those affordances.
282
+ */
283
+ interface StudioChrome {
284
+ readonly clearToken: () => void;
285
+ readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
286
+ readonly rulesInstalled?: boolean;
287
+ readonly token: string;
288
+ }
289
+ /**
290
+ * The composable studio. {@link StudioShell} reads its strings from `useT`,
291
+ * which needs a `StudioI18nProvider` above it.
292
+ *
293
+ * When an `i18n` instance or a `locale` is supplied, this owns a provider so the
294
+ * studio localises itself standalone. When neither is given it renders the
295
+ * shell bare and inherits whatever provider is already in scope — the host app's
296
+ * (`StudioApp` owns one for the top bar too) or the shared default — instead
297
+ * of nesting a second, redundant provider.
298
+ */
299
+ declare const Studio: ({ i18n, locale, ...shellProps }: StudioProps) => ReactElement;
300
+ interface StudioAppProps {
301
+ /**
302
+ * Admin bearer token to send with every admin request. When omitted the app
303
+ * renders a small prompt so an operator can paste it at runtime — handy in
304
+ * dev where you don't want to bake the token into a bundle.
305
+ */
306
+ readonly adminToken?: string;
307
+ /**
308
+ * URL path prefix the studio is mounted under (router `basepath`). Defaults
309
+ * to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
310
+ * composed {@link Studio}.
311
+ */
312
+ readonly basePath?: string;
313
+ /**
314
+ * Base URL of the Lunora worker the studio talks to. Defaults to the
315
+ * current origin, which is correct when the studio is served from the
316
+ * same worker (the `@lunora/vite` dev route) or proxied to it.
317
+ */
318
+ readonly baseUrl?: string;
319
+ /**
320
+ * Inject a pre-built client instead of constructing one from `baseUrl` +
321
+ * the admin token. Used by the dev mock harness (and embeddings that own
322
+ * the client) so the chrome renders against a supplied client; when set,
323
+ * `baseUrl`/`adminToken` are ignored and this client is never closed here.
324
+ */
325
+ readonly client?: LunoraClient;
326
+ /** UI language for the studio's own strings. Defaults to `en`. */
327
+ readonly locale?: string;
328
+ /**
329
+ * Whether the project's Lunora agent skills ("rules") are installed. When
330
+ * explicitly `false`, the studio shows a one-line banner pointing at
331
+ * `lunora rules install`. The loopback dev hosts inject this; a static deploy
332
+ * leaves it unset (no banner).
333
+ */
334
+ readonly rulesInstalled?: boolean;
335
+ /** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
336
+ readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
337
+ }
338
+ /**
339
+ * A fully self-contained studio page: it constructs a {@link LunoraClient}
340
+ * pointed at the worker, wires it through a `<LunoraProvider>`, manages the
341
+ * admin token + theme, and renders the composed {@link Studio} — handing it the
342
+ * top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
343
+ * banner) so those affordances render inside the sidebar shell.
344
+ *
345
+ * Mount this directly (the standalone app and the `@lunora/vite` dev route both
346
+ * do) when you want the batteries-included page rather than composing panels
347
+ * yourself. For embedding into an existing admin UI, use the individual panels
348
+ * or `<Studio>` under your own provider instead.
349
+ */
350
+ declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
351
+ 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 };