@lunora/studio 1.0.0-alpha.37 → 1.0.0-alpha.370

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 (489) hide show
  1. package/README.md +4 -4
  2. package/dist/index.d.mts +1626 -0
  3. package/dist/index.d.ts +1018 -809
  4. package/dist/index.mjs +1 -0
  5. package/dist/mount.d.mts +23 -0
  6. package/dist/mount.d.ts +13 -11
  7. package/dist/mount.mjs +1 -0
  8. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  9. package/dist/packem_chunks/ApiTab.mjs +1 -0
  10. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  11. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  12. package/dist/packem_chunks/ExportImportPanel.mjs +10 -0
  13. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  14. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  15. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  16. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  17. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  18. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  19. package/dist/packem_chunks/MailPanel.mjs +2 -0
  20. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  21. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  22. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  23. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  24. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  25. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  26. package/dist/packem_chunks/SqlEditorPanel.mjs +25 -0
  27. package/dist/packem_chunks/TableEditor.mjs +1 -0
  28. package/dist/packem_chunks/agents-panel.mjs +1 -0
  29. package/dist/packem_chunks/ai-knowledge.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/assistant-panel.mjs +3 -0
  34. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  36. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  37. package/dist/packem_chunks/containers-panel.mjs +1 -0
  38. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  39. package/dist/packem_chunks/evals-panel.mjs +1 -0
  40. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  41. package/dist/packem_chunks/flags-panel.mjs +1 -0
  42. package/dist/packem_chunks/issues-panel.mjs +1 -0
  43. package/dist/packem_chunks/kv-browser.mjs +1 -0
  44. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  45. package/dist/packem_chunks/migrations-route.mjs +1 -0
  46. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  47. package/dist/packem_chunks/payments-panel.mjs +1 -0
  48. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  49. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  50. package/dist/packem_chunks/queues-panel.mjs +1 -0
  51. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  52. package/dist/packem_chunks/rls-panel.mjs +1 -0
  53. package/dist/packem_chunks/schedule-panel.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/theme-indicator.mjs +1 -0
  58. package/dist/packem_chunks/traces-panel.mjs +1 -0
  59. package/dist/packem_chunks/users-panel.mjs +1 -0
  60. package/dist/packem_chunks/vector-browser.mjs +1 -0
  61. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  62. package/dist/packem_shared/ADMIN_FUNCTIONS-DUXsXId1.mjs +1 -0
  63. package/dist/packem_shared/ApiDocsPanel-B9S9l1Ce.mjs +2 -0
  64. package/dist/packem_shared/ApiReferencePanel-CQxU1Ocx.mjs +1 -0
  65. package/dist/packem_shared/CommandPalette-BZCHLpst.mjs +1 -0
  66. package/dist/packem_shared/ConfirmButton-CIXYF6Mg.mjs +1 -0
  67. package/dist/packem_shared/ConnectionBadge-BfcoN-VE.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Py5Yx7rP.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  70. package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
  71. package/dist/packem_shared/DataBrowser-Dm-jhIUP.mjs +4 -0
  72. package/dist/packem_shared/DataFilters--ocFTVT2.mjs +1 -0
  73. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  74. package/dist/packem_shared/GlobalDataBrowser-C1Y8GUhe.mjs +1 -0
  75. package/dist/packem_shared/HomePanel-B5ytwPIo.mjs +1 -0
  76. package/dist/packem_shared/MigrationsPanel-CwLikxDT.mjs +1 -0
  77. package/dist/packem_shared/OpenRpcReferencePanel-BFDG91tn.mjs +1 -0
  78. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  79. package/dist/packem_shared/ScheduledJobs-QCTRdugp.mjs +1 -0
  80. package/dist/packem_shared/ShardInput-CoySruKZ.mjs +1 -0
  81. package/dist/packem_shared/Studio-wrwGcG7J.mjs +1 -0
  82. package/dist/packem_shared/StudioApp-D1XLXXe_.mjs +1 -0
  83. package/dist/packem_shared/StudioI18nProvider-CGXCPnQn.mjs +1 -0
  84. package/dist/packem_shared/advisor-view-CzieqKMe.mjs +5 -0
  85. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  86. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  87. package/dist/packem_shared/app.d-jC98McBG.d.mts +358 -0
  88. package/dist/packem_shared/app.d-jC98McBG.d.ts +358 -0
  89. package/dist/packem_shared/assistant-provider-Bp72uWsq.mjs +1 -0
  90. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  91. package/dist/packem_shared/auth-pager-DW77WeZw.mjs +1 -0
  92. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  93. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  94. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  95. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  96. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  97. package/dist/packem_shared/cf-links-C4DVTr8A.mjs +1 -0
  98. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  99. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  100. package/dist/packem_shared/data-grid-B5m1OosL.mjs +1 -0
  101. package/dist/packem_shared/data-view-params-C-_G-biH.mjs +1 -0
  102. package/dist/packem_shared/diagram-export-panel-Vdt-DZnO.mjs +2 -0
  103. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  104. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  105. package/dist/packem_shared/error-alert-DKXm5h19.mjs +6 -0
  106. package/dist/packem_shared/grid-features-Drvfswwy.mjs +6 -0
  107. package/dist/packem_shared/grid-pagination-DY2erU65.mjs +1 -0
  108. package/dist/packem_shared/home-panel-5fGktYeD.mjs +3 -0
  109. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  110. package/dist/packem_shared/internal-hIuTpSbx.mjs +2 -0
  111. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  112. package/dist/packem_shared/live-status-D1GasNsH.mjs +1 -0
  113. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  114. package/dist/packem_shared/log-line-BH0iWiBv.mjs +1 -0
  115. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  116. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  117. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  118. package/dist/packem_shared/recording-client-z4CBi0y8.mjs +1 -0
  119. package/dist/packem_shared/reference-view-DENugPcj.mjs +13 -0
  120. package/dist/packem_shared/schema-diagram-CtVPhOGj.mjs +2 -0
  121. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  122. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  123. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  124. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  125. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  126. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  127. package/dist/packem_shared/sql-result-table-DCwooMGW.mjs +1 -0
  128. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  129. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  130. package/dist/packem_shared/studio-Cm9ea8j7.mjs +2 -0
  131. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  132. package/dist/packem_shared/table-list-sidebar-kpHaDWjy.mjs +1 -0
  133. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  134. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  135. package/dist/packem_shared/use-admin-query-CaOm4JS3.mjs +1 -0
  136. package/dist/packem_shared/use-admin-spec-CK7mk3Ui.mjs +1 -0
  137. package/dist/packem_shared/use-assistant-rpc-GCUK2zPa.mjs +1 -0
  138. package/dist/packem_shared/use-async-submit-D0r7-m2J.mjs +1 -0
  139. package/dist/packem_shared/use-auth-config-CG7VvAvQ.mjs +1 -0
  140. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  141. package/dist/packem_shared/use-open-trace-BJKMJjeS.mjs +1 -0
  142. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  143. package/dist/packem_shared/use-studio-client-DCA50tF2.mjs +1 -0
  144. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  145. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  146. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  147. package/dist/standalone/chunk-2DT3QG6Q.js +1 -0
  148. package/dist/standalone/chunk-2EB7FN5S.js +1 -0
  149. package/dist/standalone/chunk-2JD7ZSZV.js +4 -0
  150. package/dist/standalone/chunk-2TBMJ7XV.js +1 -0
  151. package/dist/standalone/chunk-2W4UO5BC.js +1 -0
  152. package/dist/standalone/chunk-36RORAX3.js +1 -0
  153. package/dist/standalone/chunk-3D67ZJRW.js +1 -0
  154. package/dist/standalone/chunk-3IMLG2OT.js +1 -0
  155. package/dist/standalone/chunk-4EPW63HS.js +1 -0
  156. package/dist/standalone/chunk-4NKJV7YX.js +1 -0
  157. package/dist/standalone/chunk-4PI2OSSP.js +1 -0
  158. package/dist/standalone/chunk-5BXW4BR6.js +1 -0
  159. package/dist/standalone/chunk-5KZIXB6E.js +1 -0
  160. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  161. package/dist/standalone/chunk-5QUEED5Z.js +1 -0
  162. package/dist/standalone/chunk-5SKGLIO5.js +1 -0
  163. package/dist/standalone/chunk-5X6BEWUI.js +1 -0
  164. package/dist/standalone/chunk-5XN5GQP5.js +1 -0
  165. package/dist/standalone/chunk-62XXKQH3.js +1 -0
  166. package/dist/standalone/chunk-6FLYVL6K.js +1 -0
  167. package/dist/standalone/chunk-6FNFOTRR.js +1 -0
  168. package/dist/standalone/chunk-6FPV3EK2.js +1 -0
  169. package/dist/standalone/chunk-6G3E4PJ2.js +1 -0
  170. package/dist/standalone/chunk-6LLUZFDD.js +3 -0
  171. package/dist/standalone/chunk-6VLPJOPR.js +1 -0
  172. package/dist/standalone/chunk-6XL3EV2X.js +8 -0
  173. package/dist/standalone/chunk-7N2OPADC.js +5 -0
  174. package/dist/standalone/chunk-7TTX42IR.js +1 -0
  175. package/dist/standalone/chunk-7YZKGLGA.js +1 -0
  176. package/dist/standalone/chunk-A2Q3TGIQ.js +1 -0
  177. package/dist/standalone/chunk-AA3R3QNN.js +1 -0
  178. package/dist/standalone/chunk-AMOPLAX6.js +1 -0
  179. package/dist/standalone/chunk-ARGGBECJ.js +1 -0
  180. package/dist/standalone/chunk-B4K4IET7.js +1 -0
  181. package/dist/standalone/chunk-BG2CJOVS.js +1 -0
  182. package/dist/standalone/chunk-BKI3JMXQ.js +1 -0
  183. package/dist/standalone/chunk-CL3JOU6F.js +1 -0
  184. package/dist/standalone/chunk-CLYI7JF2.js +1 -0
  185. package/dist/standalone/chunk-CNQBTB5C.js +1 -0
  186. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  187. package/dist/standalone/chunk-D65UVZIA.js +1 -0
  188. package/dist/standalone/chunk-DA2CAFXI.js +1 -0
  189. package/dist/standalone/chunk-DBLSNTHL.js +1 -0
  190. package/dist/standalone/chunk-E5LR7G22.js +6 -0
  191. package/dist/standalone/chunk-E6FH3ZOB.js +1 -0
  192. package/dist/standalone/chunk-E6NWADUS.js +1 -0
  193. package/dist/standalone/chunk-F7EKRF7I.js +1 -0
  194. package/dist/standalone/chunk-FHKZP25N.js +1 -0
  195. package/dist/standalone/chunk-FTJ6RR64.js +4 -0
  196. package/dist/standalone/chunk-FWM5Z6CH.js +1 -0
  197. package/dist/standalone/chunk-G2Z7WFAT.js +1 -0
  198. package/dist/standalone/chunk-G6PUHYKD.js +1 -0
  199. package/dist/standalone/chunk-GM7MBMYI.js +1 -0
  200. package/dist/standalone/chunk-GWNGVKLG.js +1 -0
  201. package/dist/standalone/chunk-GXTSE66Z.js +1 -0
  202. package/dist/standalone/chunk-H6KIDQ6V.js +1 -0
  203. package/dist/standalone/chunk-HCOF7HOM.js +1 -0
  204. package/dist/standalone/chunk-HFBSWKJS.js +1 -0
  205. package/dist/standalone/chunk-HGNPJO7S.js +1 -0
  206. package/dist/standalone/chunk-HLWDT5VZ.js +1 -0
  207. package/dist/standalone/chunk-HWFV5UCF.js +1 -0
  208. package/dist/standalone/chunk-IDHU47FP.js +1 -0
  209. package/dist/standalone/chunk-IDNHNCZV.js +14 -0
  210. package/dist/standalone/chunk-IHWSRI72.js +1 -0
  211. package/dist/standalone/chunk-J45HAKBU.js +1 -0
  212. package/dist/standalone/chunk-J77YDVBD.js +3 -0
  213. package/dist/standalone/chunk-JG74C6DH.js +1 -0
  214. package/dist/standalone/chunk-JMZT3CEW.js +1 -0
  215. package/dist/standalone/chunk-JT7UYB6L.js +1 -0
  216. package/dist/standalone/chunk-JWQOB4EW.js +7 -0
  217. package/dist/standalone/chunk-K3DHV2YQ.js +1 -0
  218. package/dist/standalone/chunk-K5BAERB3.js +1 -0
  219. package/dist/standalone/chunk-KAK3HS5E.js +2 -0
  220. package/dist/standalone/chunk-KGLIQIZU.js +1 -0
  221. package/dist/standalone/chunk-KTK4NDWQ.js +1 -0
  222. package/dist/standalone/chunk-KZ6YQ234.js +1 -0
  223. package/dist/standalone/chunk-LZHT6UGJ.js +1 -0
  224. package/dist/standalone/chunk-MGJZKA6O.js +1 -0
  225. package/dist/standalone/chunk-MQBQBEGM.js +1 -0
  226. package/dist/standalone/chunk-NEFVDZHP.js +1 -0
  227. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  228. package/dist/standalone/chunk-NHUEXULQ.js +1 -0
  229. package/dist/standalone/chunk-NSAQ3EDS.js +1 -0
  230. package/dist/standalone/chunk-NYJXRBOK.js +1 -0
  231. package/dist/standalone/chunk-O24UFHUY.js +1 -0
  232. package/dist/standalone/chunk-O3AZ7JKE.js +1 -0
  233. package/dist/standalone/chunk-O6W2YLME.js +1 -0
  234. package/dist/standalone/chunk-O7XG7DTU.js +1 -0
  235. package/dist/standalone/chunk-OBYE3IXP.js +1 -0
  236. package/dist/standalone/chunk-OCYIIOBX.js +1 -0
  237. package/dist/standalone/chunk-ONTGYVAN.js +1 -0
  238. package/dist/standalone/chunk-OOOT4H45.js +33 -0
  239. package/dist/standalone/chunk-OQOKF4LL.js +1 -0
  240. package/dist/standalone/chunk-OS5DOPZW.js +1 -0
  241. package/dist/standalone/chunk-P6VNMPWR.js +1 -0
  242. package/dist/standalone/chunk-PDBCAPP6.js +1 -0
  243. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  244. package/dist/standalone/chunk-PFNK2MGW.js +1 -0
  245. package/dist/standalone/chunk-PMDLNIHA.js +1 -0
  246. package/dist/standalone/chunk-PZGLD7G7.js +5 -0
  247. package/dist/standalone/chunk-Q3WMP7OA.js +3 -0
  248. package/dist/standalone/chunk-Q65X2ZIP.js +1 -0
  249. package/dist/standalone/chunk-QAOZXPLU.js +1 -0
  250. package/dist/standalone/chunk-QBRBGDCL.js +1 -0
  251. package/dist/standalone/chunk-QR6RYVUD.js +1 -0
  252. package/dist/standalone/chunk-QRA7AKYO.js +1 -0
  253. package/dist/standalone/chunk-QSUQAWEP.js +1 -0
  254. package/dist/standalone/chunk-RIAOZECW.js +1 -0
  255. package/dist/standalone/chunk-RLJYW6TY.js +1 -0
  256. package/dist/standalone/chunk-RTS5G3ET.js +2 -0
  257. package/dist/standalone/chunk-S36FVTKK.js +1 -0
  258. package/dist/standalone/chunk-SGIBDCPB.js +59 -0
  259. package/dist/standalone/chunk-STK3KLLV.js +1 -0
  260. package/dist/standalone/chunk-TDPAITW5.js +1 -0
  261. package/dist/standalone/chunk-TW4O2BA5.js +159 -0
  262. package/dist/standalone/chunk-TZ5PSNZW.js +1 -0
  263. package/dist/standalone/chunk-UBX5ZPLV.js +1 -0
  264. package/dist/standalone/chunk-UCJWHNUJ.js +1 -0
  265. package/dist/standalone/chunk-V3SVDOVD.js +1 -0
  266. package/dist/standalone/chunk-V6YA4TAL.js +1 -0
  267. package/dist/standalone/chunk-VB2XDTVB.js +6 -0
  268. package/dist/standalone/chunk-VFB22IM2.js +1 -0
  269. package/dist/standalone/chunk-VGIDGJ5K.js +1 -0
  270. package/dist/standalone/chunk-VJC5PQ7D.js +1 -0
  271. package/dist/standalone/chunk-VNH4OBJS.js +1 -0
  272. package/dist/standalone/chunk-VUOEJJUH.js +1 -0
  273. package/dist/standalone/chunk-W42GZL6T.js +1 -0
  274. package/dist/standalone/chunk-WGGSW4E2.js +1 -0
  275. package/dist/standalone/chunk-XLYFGUEF.js +1 -0
  276. package/dist/standalone/chunk-XMOG3LIP.js +1 -0
  277. package/dist/standalone/chunk-Y2JFJP4B.js +1 -0
  278. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-Y2YLTUMD.js} +1 -1
  279. package/dist/standalone/chunk-YLXNXB7E.js +1 -0
  280. package/dist/standalone/chunk-YORPLSI5.js +1 -0
  281. package/dist/standalone/chunk-YUVGMKHG.js +1 -0
  282. package/dist/standalone/chunk-YYIW5EKO.js +30 -0
  283. package/dist/standalone/chunk-ZCN4YUCA.js +1 -0
  284. package/dist/standalone/chunk-ZEWRYBCB.js +1 -0
  285. package/dist/standalone/chunk-ZGZSTTKN.js +10 -0
  286. package/dist/standalone/chunk-ZM3A5WO5.js +1 -0
  287. package/dist/standalone/chunk-ZPQBVYNN.js +1 -0
  288. package/dist/standalone/chunk-ZSWW2UGP.js +1 -0
  289. package/dist/standalone/chunk-ZYZ5ATT2.js +1 -0
  290. package/dist/standalone/studio.js +9 -214
  291. package/dist/styles.css +2 -2
  292. package/package.json +27 -22
  293. package/dist/index.js +0 -41
  294. package/dist/mount.js +0 -27
  295. package/dist/packem_chunks/ApiTab.js +0 -251
  296. package/dist/packem_chunks/AuditPanel.js +0 -200
  297. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  298. package/dist/packem_chunks/FileBrowser.js +0 -2932
  299. package/dist/packem_chunks/FunctionRunner.js +0 -343
  300. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  301. package/dist/packem_chunks/HealthPanel.js +0 -648
  302. package/dist/packem_chunks/InsightsPanel.js +0 -462
  303. package/dist/packem_chunks/LogsPanel.js +0 -827
  304. package/dist/packem_chunks/MailPanel.js +0 -353
  305. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  306. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  307. package/dist/packem_chunks/PitrPanel.js +0 -252
  308. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  309. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  310. package/dist/packem_chunks/SettingsPanel.js +0 -391
  311. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  312. package/dist/packem_chunks/TableEditor.js +0 -313
  313. package/dist/packem_chunks/analytics-panel.js +0 -261
  314. package/dist/packem_chunks/auth-config-panel.js +0 -179
  315. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  316. package/dist/packem_chunks/containers-panel.js +0 -247
  317. package/dist/packem_chunks/dashboards-panel.js +0 -780
  318. package/dist/packem_chunks/fanout-panel.js +0 -482
  319. package/dist/packem_chunks/flags-panel.js +0 -176
  320. package/dist/packem_chunks/kv-browser.js +0 -1896
  321. package/dist/packem_chunks/log-drains-panel.js +0 -273
  322. package/dist/packem_chunks/organizations-panel.js +0 -670
  323. package/dist/packem_chunks/payments-panel.js +0 -186
  324. package/dist/packem_chunks/permissions-panel.js +0 -805
  325. package/dist/packem_chunks/queues-panel.js +0 -1052
  326. package/dist/packem_chunks/rls-panel.js +0 -315
  327. package/dist/packem_chunks/schedule-panel.js +0 -831
  328. package/dist/packem_chunks/sparkline.js +0 -79
  329. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  330. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  331. package/dist/packem_chunks/users-panel.js +0 -1265
  332. package/dist/packem_chunks/vector-browser.js +0 -281
  333. package/dist/packem_chunks/workflows-panel.js +0 -562
  334. package/dist/packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js +0 -52
  335. package/dist/packem_shared/ApiDocsPanel-D4CJf2ad.js +0 -842
  336. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  337. package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
  338. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  339. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  340. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  341. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  342. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  343. package/dist/packem_shared/DataBrowser-BeVNxSVm.js +0 -4493
  344. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  345. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  346. package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
  347. package/dist/packem_shared/HomePanel-D9MQk8I7.js +0 -14
  348. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  349. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  350. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  351. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  352. package/dist/packem_shared/Studio-C48P1K5W.js +0 -16
  353. package/dist/packem_shared/StudioApp-Cqh-SYm2.js +0 -657
  354. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  355. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  356. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  357. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  358. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  359. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  360. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  361. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  362. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  363. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  364. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  365. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  366. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  367. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  368. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  369. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  370. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  371. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  372. package/dist/packem_shared/home-panel-CoGxi-oj.js +0 -1639
  373. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  374. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  375. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  376. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  377. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  378. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  379. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  380. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  381. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  382. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  383. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  384. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  385. package/dist/packem_shared/studio-CPHA_-3I.js +0 -4015
  386. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  387. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  388. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  389. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  390. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  391. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  392. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  393. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  394. package/dist/standalone/chunk-22W5VKZ6.js +0 -1
  395. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  396. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  397. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  398. package/dist/standalone/chunk-2THHW7BC.js +0 -1
  399. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  400. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  401. package/dist/standalone/chunk-46K3NKPA.js +0 -1
  402. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  403. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  404. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  405. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  406. package/dist/standalone/chunk-6WRZP62V.js +0 -1
  407. package/dist/standalone/chunk-764T6X6X.js +0 -1
  408. package/dist/standalone/chunk-7SLSB2TS.js +0 -4
  409. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  410. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  411. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  412. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  413. package/dist/standalone/chunk-ATYUMPDM.js +0 -1
  414. package/dist/standalone/chunk-BACPICH6.js +0 -1
  415. package/dist/standalone/chunk-BI35RXKQ.js +0 -1
  416. package/dist/standalone/chunk-BOXSWNXZ.js +0 -1
  417. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  418. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  419. package/dist/standalone/chunk-DC72CQY4.js +0 -76
  420. package/dist/standalone/chunk-DORBUITF.js +0 -1
  421. package/dist/standalone/chunk-DVC6YWVP.js +0 -1
  422. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  423. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  424. package/dist/standalone/chunk-DWTBY343.js +0 -1
  425. package/dist/standalone/chunk-EUIHTPKI.js +0 -1
  426. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  427. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  428. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  429. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  430. package/dist/standalone/chunk-ILCTSAOB.js +0 -1
  431. package/dist/standalone/chunk-IOFMK4D7.js +0 -1
  432. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  433. package/dist/standalone/chunk-JE2YOAB7.js +0 -4
  434. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  435. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  436. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  437. package/dist/standalone/chunk-KJJ3WM6H.js +0 -4
  438. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  439. package/dist/standalone/chunk-LAK5VSPI.js +0 -1
  440. package/dist/standalone/chunk-LD2R263D.js +0 -1
  441. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  442. package/dist/standalone/chunk-M55U7NHO.js +0 -1
  443. package/dist/standalone/chunk-MPTM7ZU3.js +0 -3
  444. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  445. package/dist/standalone/chunk-NKJDGOM3.js +0 -1
  446. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  447. package/dist/standalone/chunk-OCHNCAXJ.js +0 -1
  448. package/dist/standalone/chunk-OIZ4CHPN.js +0 -8
  449. package/dist/standalone/chunk-OY3GVYS7.js +0 -4
  450. package/dist/standalone/chunk-PACH5AHG.js +0 -1
  451. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  452. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  453. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  454. package/dist/standalone/chunk-Q52CHOSY.js +0 -1
  455. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  456. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  457. package/dist/standalone/chunk-QLM6FYZW.js +0 -2
  458. package/dist/standalone/chunk-RRAFQ5G2.js +0 -1
  459. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  460. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  461. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  462. package/dist/standalone/chunk-SG3ALJJU.js +0 -1
  463. package/dist/standalone/chunk-SLKF2L74.js +0 -1
  464. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  465. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  466. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  467. package/dist/standalone/chunk-TO4JQX7W.js +0 -1
  468. package/dist/standalone/chunk-TOJ3TC35.js +0 -1
  469. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  470. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  471. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  472. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  473. package/dist/standalone/chunk-VTGBPW24.js +0 -1
  474. package/dist/standalone/chunk-WI7GWFEG.js +0 -1
  475. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  476. package/dist/standalone/chunk-X5P2WRYI.js +0 -1
  477. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  478. package/dist/standalone/chunk-XLQ4BHBD.js +0 -1
  479. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  480. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  481. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  482. package/dist/standalone/chunk-YAECF5LW.js +0 -1
  483. package/dist/standalone/chunk-YEVCU7TB.js +0 -13
  484. package/dist/standalone/chunk-ZHVTQ37P.js +0 -1
  485. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  486. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  487. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  488. package/dist/standalone/chunk-ZU4DZ6NK.js +0 -1
  489. package/dist/standalone/chunk-ZYRGPDZB.js +0 -1
@@ -0,0 +1,358 @@
1
+ import { LunoraAdminClient } from '@lunora/client/admin';
2
+ import { ReactElement } from 'react';
3
+ import { I18n } from '@lingui/core';
4
+ import { FunctionUsagePanel, AnalyticsSqlQueryResult } from '@lunora/bindings/analytics-sql';
5
+ import { CronJobInfo, CronRunsResult, ScheduleRecord } from '@lunora/client';
6
+ interface AnalyticsPanelProps {
7
+ /**
8
+ * Resolve one usage panel. The panel sends only its key; the host's runner
9
+ * calls an action that builds the statement server-side with
10
+ * `functionUsageQuery(panel)` from `@lunora/bindings/analytics-sql` and runs it
11
+ * through `ctx.analyticsSql`. That action reads account analytics, so it must
12
+ * be admin-gated, and it must take the panel key, never SQL: an action that
13
+ * ran caller-supplied SQL could read every dataset in the account. Studio passes
14
+ * its analyticsSqlQuery prop through here; with none, the panel renders an empty
15
+ * state and makes no network call.
16
+ */
17
+ readonly runQuery?: (panel: FunctionUsagePanel) => Promise<AnalyticsSqlQueryResult>;
18
+ }
19
+ interface CronTriggersPanelProps {
20
+ /**
21
+ * Load the code-defined cron triggers. Defaults to `client.getCronJobs`,
22
+ * which hits the worker's admin-gated `/_lunora/admin/cron-jobs` endpoint —
23
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
24
+ * worker is built with a `cronJobs` map and `adminToken`. Override it to
25
+ * source triggers from elsewhere (e.g. tests).
26
+ */
27
+ readonly loadCronJobs?: () => Promise<CronJobInfo[]>;
28
+ /**
29
+ * Load the cron run history (in-flight runs and recorded fires). Defaults to
30
+ * `client.listCronRuns` when the triggers also come from the client; a custom
31
+ * {@link CronTriggersPanelProps.loadCronJobs} without one shows no history.
32
+ */
33
+ readonly loadCronRuns?: () => Promise<CronRunsResult>;
34
+ /**
35
+ * Manually fire one cron job by name. Defaults to `client.runCronJob`, which
36
+ * hits the admin-gated `POST /_lunora/admin/cron-jobs/run` endpoint (the same
37
+ * dispatch the scheduled trigger runs). When a custom {@link CronTriggersPanelProps.loadCronJobs}
38
+ * is supplied without a `runCronJob`, the "Run now" control is hidden — useful
39
+ * for a read-only view.
40
+ */
41
+ readonly runCronJob?: (name: string) => Promise<{
42
+ name: string;
43
+ ran: boolean;
44
+ }>;
45
+ }
46
+ interface ScheduledJobsProps {
47
+ /**
48
+ * Cancel a pending job by id. Defaults to `client.cancelScheduledJob` when
49
+ * {@link ScheduledJobsProps.loadJobs} is also left to the client. When a
50
+ * custom `loadJobs` is supplied without a `cancelJob`, the cancel control is
51
+ * hidden — useful for a read-only view.
52
+ */
53
+ readonly cancelJob?: (id: string) => Promise<{
54
+ cancelled: boolean;
55
+ }>;
56
+ /**
57
+ * Load the pending scheduled jobs. Defaults to `client.listScheduledJobs`,
58
+ * which hits the worker's admin-gated `/_lunora/admin/scheduled` endpoint —
59
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
60
+ * worker is built with a `schedulerDO` namespace and `adminToken`. Override
61
+ * it to source jobs from elsewhere.
62
+ */
63
+ readonly loadJobs?: () => Promise<ScheduleRecord[]>;
64
+ }
65
+ /**
66
+ * View — and cancel — the functions queued via `runAfter` / `runAt` on the
67
+ * scheduler. Cron *triggers* are static wrangler config and don't appear here;
68
+ * this lists the dynamic, in-flight schedule only.
69
+ *
70
+ * Works out of the box under `<LunoraProvider>` via the client's scheduler
71
+ * admin methods; pass {@link ScheduledJobsProps.loadJobs} /
72
+ * {@link ScheduledJobsProps.cancelJob} to override the transport.
73
+ */
74
+ declare const ScheduledJobs: ({ cancelJob, loadJobs }?: ScheduledJobsProps) => ReactElement;
75
+ interface SchedulePanelProps {
76
+ /** Override how the Cron triggers sub-view loads triggers; see {@link CronTriggersPanel}. */
77
+ readonly loadCronJobs?: CronTriggersPanelProps["loadCronJobs"];
78
+ /** Override how the Scheduled jobs sub-view cancels a job; see {@link ScheduledJobs}. */
79
+ readonly scheduledCancel?: ScheduledJobsProps["cancelJob"];
80
+ /** Override how the Scheduled jobs sub-view loads jobs; see {@link ScheduledJobs}. */
81
+ readonly scheduledLoad?: ScheduledJobsProps["loadJobs"];
82
+ }
83
+ /**
84
+ * The statuses a privacy request moves through, and which of them are terminal.
85
+ *
86
+ * `@lunora/privacy` stores them and the Studio's Privacy requests page renders them.
87
+ * The Studio must not depend on the runtime package, so both read the list from here
88
+ * and the bundler inlines it into each. A status added here reaches both, and the
89
+ * Studio's exhaustive badge map fails to compile until it has a variant.
90
+ */
91
+ /** Every status, in lifecycle order. */
92
+ declare const REQUEST_STATUSES: readonly ["received", "grace", "processing", "ready", "completed", "failed", "cancelled", "expired"];
93
+ type RequestStatus = (typeof REQUEST_STATUSES)[number];
94
+ type RequestType = "erasure" | "export";
95
+ /**
96
+ * Timestamps are epoch milliseconds. `extendedDueAt` is set only when the deadline was extended, so
97
+ * the effective deadline is `extendedDueAt ?? dueAt`.
98
+ */
99
+ interface PrivacyRequestRow {
100
+ readonly dueAt: number;
101
+ readonly extendedDueAt?: null | number;
102
+ readonly id: string;
103
+ readonly receivedAt: number;
104
+ readonly status: RequestStatus;
105
+ readonly subjectId: string;
106
+ readonly type: RequestType;
107
+ }
108
+ /** What the Studio's Privacy requests page reads and writes. */
109
+ interface PrivacyRequestsSource {
110
+ /** The open requests, in any order; the page sorts nothing. */
111
+ listOpenPrivacyRequests: () => Promise<ReadonlyArray<PrivacyRequestRow>>;
112
+ /** Re-run a failed request. Rejects with the server's message on failure. */
113
+ retryPrivacyRequest: (id: string) => Promise<unknown>;
114
+ }
115
+ /** Which client method a {@link FunctionDescriptor} is invoked through. */
116
+ type FunctionKind = "action" | "mutation" | "query";
117
+ /**
118
+ * One argument of a registered function, derived from its `v.*` validator by the
119
+ * worker's `/_lunora/admin/functions` endpoint. A compact signature shape.
120
+ */
121
+ interface FunctionArgumentDescriptor {
122
+ /** Element validator kind for an `array` arg (one level), e.g. `string`. */
123
+ element?: string;
124
+ /** The (optional-unwrapped) validator kind, e.g. `string`, `id`, `object`. */
125
+ kind: string;
126
+ /** The argument name. */
127
+ name: string;
128
+ /** True when the arg is wrapped in `v.optional(...)`. */
129
+ optional: boolean;
130
+ /** True when the arg is marked `v.sensitive`: its value is never kept in run history. */
131
+ sensitive?: true;
132
+ /** Target table for an `id` arg (`v.id("table")`). */
133
+ table?: string;
134
+ }
135
+ /**
136
+ * Runtime descriptor for a registered Lunora function. The function's `kind` is
137
+ * a compile-time-only phantom on `FunctionReference`, so the runner needs it
138
+ * spelled out here to know which client method to call. `args` carries the
139
+ * function's argument signature (absent on responses from an older worker).
140
+ */
141
+ interface FunctionDescriptor {
142
+ args?: FunctionArgumentDescriptor[];
143
+ kind: FunctionKind;
144
+ /** The `<file>:<function>` identifier, e.g. `messages:list`. */
145
+ path: string;
146
+ }
147
+ /** Outcome of a single `FunctionRunner` invocation. */
148
+ type RunStatus = "error" | "idle" | "running" | "success";
149
+ interface StudioProps {
150
+ /**
151
+ * Resolve one Analytics tab panel by its key (`"volume"`, `"latency"`,
152
+ * `"hotShards"`). Supply a runner that calls an action in your app which
153
+ * builds the statement server-side and runs it through `ctx.analyticsSql`:
154
+ *
155
+ * ```ts
156
+ * // lunora/studio-analytics.ts
157
+ * export const usagePanel = action.input({ panel: v.string() }).action(async ({ args, ctx }) => {
158
+ * assertAdmin(ctx); // your own admin check: this reads account analytics
159
+ * if (!isFunctionUsagePanel(args.panel)) throw new LunoraError("BAD_REQUEST", "unknown panel");
160
+ * const { params, query } = functionUsageQuery(args.panel);
161
+ * return ctx.analyticsSql.query(query, params);
162
+ * });
163
+ * ```
164
+ *
165
+ * The action MUST be admin-gated and MUST take the panel key, never SQL: an
166
+ * action running caller-supplied SQL could read every dataset in the account.
167
+ * Without a runner the Analytics tab renders an empty state and issues no
168
+ * request.
169
+ *
170
+ * Pass a STABLE reference — a module-level function, or one held in a
171
+ * `useCallback`/ref. It is read while building the tab router, so a fresh
172
+ * inline arrow on every render rebuilds the router and remounts the panel
173
+ * tree, losing in-progress query state. The same holds for `scheduledLoad`,
174
+ * `scheduledCancel` and `scheduledCron`.
175
+ */
176
+ readonly analyticsSqlQuery?: AnalyticsPanelProps["runQuery"];
177
+ /**
178
+ * URL path prefix the studio is mounted under, passed to the router as its
179
+ * `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
180
+ * dev route serves the studio under `/__lunora`, so it sets this — without
181
+ * it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
182
+ * the mount.
183
+ */
184
+ readonly basePath?: string;
185
+ /**
186
+ * App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
187
+ * popover, rules banner). The batteries-included `StudioApp` supplies
188
+ * this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
189
+ */
190
+ readonly chrome?: StudioChrome;
191
+ /**
192
+ * Show the data tab's write controls (insert/edit/delete rows). Off by
193
+ * default; see {@link TableEditor}.
194
+ *
195
+ * **This HIDES THE CONTROLS. It does not make anything read-only.** The
196
+ * write RPCs are gated server-side by `LUNORA_ADMIN_TOKEN` alone — one
197
+ * all-or-nothing check in `handleAdminRpc`, with no read/write scoping — and
198
+ * `renderStudioHtml({ adminToken })` already ships that bearer to the
199
+ * browser. So a viewer handed a studio deployed with `dataEditable: false`
200
+ * still holds a credential that can write; the buttons are simply absent
201
+ * from the page. Treat it as an affordance switch for a trusted operator,
202
+ * never as an authorization boundary. The same holds for
203
+ * {@link StudioProps.schemaEditable} and {@link StudioProps.runAsIdentity}.
204
+ */
205
+ readonly dataEditable?: boolean;
206
+ /**
207
+ * Functions exposed in the runner tab. The runner tab only appears when at
208
+ * least one descriptor is supplied (a query/mutation/action's `kind` is
209
+ * compile-time-only, so it must be named here).
210
+ */
211
+ readonly functions?: FunctionDescriptor[];
212
+ /** Reuse an existing Lingui instance (wins over `locale`). */
213
+ readonly i18n?: I18n;
214
+ /** Shard key every shard-scoped panel targets on first load. */
215
+ readonly initialShardKey?: string;
216
+ /** Active locale for the studio's own UI strings. Defaults to `en`. */
217
+ readonly locale?: string;
218
+ /**
219
+ * Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
220
+ * Thread the generated `_generated/openapi.json` here to render it
221
+ * without a round-trip. When omitted the reference fetches the worker's
222
+ * admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
223
+ */
224
+ readonly openApiSpec?: unknown;
225
+ /**
226
+ * Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
227
+ * when the OpenRPC format is selected. Thread the generated
228
+ * `_generated/openrpc.json` here to render it without a round-trip. When
229
+ * omitted the OpenRPC view fetches the worker's admin-gated
230
+ * `GET /_lunora/admin/openrpc` endpoint via the client.
231
+ */
232
+ readonly openRpcSpec?: unknown;
233
+ /**
234
+ * The app's data-subject request source for the Privacy requests page, built
235
+ * from the app's own admin functions (`listOpenPrivacyRequests`,
236
+ * `retryPrivacyRequest`). Without one the page renders a "not configured" state
237
+ * and issues no request. Pass a STABLE reference, as for `analyticsSqlQuery`.
238
+ */
239
+ readonly privacyRequests?: PrivacyRequestsSource;
240
+ /**
241
+ * Allow the function runner to execute a function AS a chosen authenticated
242
+ * identity (the "Run as identity" tool), so an operator can test auth + RLS
243
+ * behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
244
+ * the host MUST set this only on a trusted loopback-dev gate (the same gate
245
+ * as `dataEditable`) — never in a production/static deploy. Off by default;
246
+ * see {@link FunctionRunner}.
247
+ *
248
+ * Like {@link StudioProps.dataEditable}, leaving it off only hides the tool.
249
+ * The RPC behind it stays reachable to anyone holding the admin token the
250
+ * page already carries — the gate is the token, not this flag.
251
+ */
252
+ readonly runAsIdentity?: boolean;
253
+ /**
254
+ * Override how the schedule tab cancels a job. Defaults to the client's
255
+ * scheduler admin endpoint; see {@link SchedulePanel}.
256
+ */
257
+ readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
258
+ /**
259
+ * Override how the schedule tab's Cron triggers sub-view loads triggers.
260
+ * Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
261
+ * {@link SchedulePanel}.
262
+ */
263
+ readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
264
+ /**
265
+ * Override how the schedule tab loads jobs. Defaults to the client's
266
+ * scheduler admin endpoint, so the tab works without extra wiring.
267
+ */
268
+ readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
269
+ /**
270
+ * Show the visual schema editor overlay on the schema diagram (add table /
271
+ * column / index, written back to `lunora/schema.ts` + codegen). Off by
272
+ * default. Only the loopback-only dev hosts set this — the write path needs
273
+ * the project's filesystem + toolchain, so a static deploy leaves it off.
274
+ *
275
+ * Like {@link StudioProps.dataEditable}, it hides the overlay rather than
276
+ * making the diagram read-only: what actually stops a schema write in a
277
+ * static deploy is that the host has no filesystem to write to, not this
278
+ * flag.
279
+ */
280
+ readonly schemaEditable?: boolean;
281
+ }
282
+ /**
283
+ * Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
284
+ * token state, the rules banner) but which renders *inside* the router-owned
285
+ * {@link StudioLayout} (the header and sidebar footer). The layout is a route
286
+ * component with no props, so it reads this from context rather than threading
287
+ * it through the router. Absent (composing `<Studio>` bare) the layout simply
288
+ * omits those affordances.
289
+ */
290
+ interface StudioChrome {
291
+ readonly clearToken: () => void;
292
+ readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
293
+ readonly rulesInstalled?: boolean;
294
+ readonly token: string;
295
+ }
296
+ /**
297
+ * The composable studio. {@link StudioShell} reads its strings from `useT`,
298
+ * which needs a `StudioI18nProvider` above it.
299
+ *
300
+ * When an `i18n` instance or a `locale` is supplied, this owns a provider so the
301
+ * studio localises itself standalone. When neither is given it renders the
302
+ * shell bare and inherits whatever provider is already in scope — the host app's
303
+ * (`StudioApp` owns one for the top bar too) or the shared default — instead
304
+ * of nesting a second, redundant provider.
305
+ */
306
+ declare const Studio: ({ i18n, locale, ...shellProps }: StudioProps) => ReactElement;
307
+ interface StudioAppProps {
308
+ /**
309
+ * Admin bearer token to send with every admin request. When omitted the app
310
+ * renders a small prompt so an operator can paste it at runtime — handy in
311
+ * dev where you don't want to bake the token into a bundle.
312
+ */
313
+ readonly adminToken?: string;
314
+ /**
315
+ * URL path prefix the studio is mounted under (router `basepath`). Defaults
316
+ * to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
317
+ * composed {@link Studio}.
318
+ */
319
+ readonly basePath?: string;
320
+ /**
321
+ * Base URL of the Lunora worker the studio talks to. Defaults to the
322
+ * current origin, which is correct when the studio is served from the
323
+ * same worker (the `@lunora/vite` dev route) or proxied to it.
324
+ */
325
+ readonly baseUrl?: string;
326
+ /**
327
+ * Inject a pre-built client instead of constructing one from `baseUrl` +
328
+ * the admin token. Used by the dev mock harness (and embeddings that own
329
+ * the client) so the chrome renders against a supplied client; when set,
330
+ * `baseUrl`/`adminToken` are ignored and this client is never closed here.
331
+ */
332
+ readonly client?: LunoraAdminClient;
333
+ /** UI language for the studio's own strings. Defaults to `en`. */
334
+ readonly locale?: string;
335
+ /**
336
+ * Whether the project's Lunora agent skills ("rules") are installed. When
337
+ * explicitly `false`, the studio shows a one-line banner pointing at
338
+ * `lunora rules install`. The loopback dev hosts inject this; a static deploy
339
+ * leaves it unset (no banner).
340
+ */
341
+ readonly rulesInstalled?: boolean;
342
+ /** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
343
+ readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
344
+ }
345
+ /**
346
+ * A fully self-contained studio page: it constructs a {@link LunoraAdminClient}
347
+ * pointed at the worker, wires it through a `<LunoraProvider>`, manages the
348
+ * admin token + theme, and renders the composed {@link Studio} — handing it the
349
+ * top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
350
+ * banner) so those affordances render inside the sidebar shell.
351
+ *
352
+ * Mount this directly (the standalone app and the `@lunora/vite` dev route both
353
+ * do) when you want the batteries-included page rather than composing panels
354
+ * yourself. For embedding into an existing admin UI, use the individual panels
355
+ * or `<Studio>` under your own provider instead.
356
+ */
357
+ declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
358
+ 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 };
@@ -0,0 +1 @@
1
+ import{c as R}from"react/compiler-runtime";import{use as b,createContext as u,useState as k}from"react";import{u as K}from"./use-admin-query-CaOm4JS3.mjs";import{ADMIN_FUNCTIONS as x}from"./ADMIN_FUNCTIONS-DUXsXId1.mjs";import{jsx as w}from"react/jsx-runtime";const S=u(void 0),C={},N="New chat",F=(t,s)=>({id:t,name:s?.title??N,schema:s?.schema??[],shardKey:s?.shardKey,suggestions:s?.suggestions??[],turns:[]}),T=(t,s)=>[...t.sessions,s].slice(-10),f=(t,s)=>{const n=`chat-${String(t.seq+1)}`;return{activeId:n,draft:s?.draft===void 0?void 0:{id:t.seq+1,text:s.draft},hasEditor:t.hasEditor,insertRequest:void 0,open:!0,pendingAsk:s?.ask===void 0?void 0:{id:t.seq+1,sessionId:n,text:s.ask},seq:t.seq+1,sessions:T(t,F(n,s))}},l=(t,s)=>t.find(n=>n.id===s),D=(t,s,n)=>t.map(v=>v.id===s?{...v,schema:n}:v),O=(t,s,n)=>t.map(v=>v.id===s?{...v,schema:[],shardKey:n}:v),U=(t,s)=>t.filter(n=>n.id!==s),y=(t,s,n)=>t.map(v=>v.id===s?{...v,turns:n}:v),P=t=>{const s=R(16),{children:n}=t;let v;s[0]===Symbol.for("react.memo_cache_sentinel")?(v={shardKey:""},s[0]=v):v=s[0];const E=K(x.aiAvailable,C,v);let m;s[1]===Symbol.for("react.memo_cache_sentinel")?(m={activeId:void 0,draft:void 0,hasEditor:!1,insertRequest:void 0,open:!1,pendingAsk:void 0,seq:0,sessions:[]},s[1]=m):m=s[1];const[a,h]=k(m);let c;s[2]===Symbol.for("react.memo_cache_sentinel")?(c=()=>({close:()=>{h($)},deleteChat:i=>{h(e=>{const o=U(e.sessions,i);return{...e,activeId:e.activeId===i?o.at(-1)?.id:e.activeId,open:o.length===0?!1:e.open,sessions:o}})},newChat:i=>{h(e=>f(e,i))},openAssistant:i=>{h(e=>{const o=e.activeId===void 0?void 0:l(e.sessions,e.activeId);return i?.ask!==void 0||o===void 0||(i?.shardKey??"")!==(o.shardKey??"")?f(e,i):{...e,draft:i?.draft===void 0?e.draft:{id:e.seq+1,text:i.draft},open:!0,sessions:i?.schema===void 0?e.sessions:D(e.sessions,o.id,i.schema),seq:e.seq+1}})},rebindShard:(i,e)=>{h(o=>{const d=o.activeId===void 0?void 0:l(o.sessions,o.activeId);return!o.open||d===void 0||(d.shardKey??"")!==i||i===e?o:d.turns.length===0?{...o,sessions:O(o.sessions,d.id,e)}:f(o,{shardKey:e,title:d.name})})},requestInsert:i=>{h(e=>({...e,insertRequest:{id:e.seq+1,sql:i},seq:e.seq+1}))},setHasEditor:i=>{h(e=>e.hasEditor===i?e:{...e,hasEditor:i})},takeInsert:i=>{h(e=>e.insertRequest?.id===i?{...e,insertRequest:void 0}:e)},selectChat:i=>{h(e=>({...e,activeId:i,open:!0}))},branchFrom:(i,e)=>{h(o=>{const d=l(o.sessions,i);if(d===void 0)return o;const g=f(o,{schema:d.schema,shardKey:d.shardKey,title:d.name});return{...g,sessions:y(g.sessions,g.activeId??"",d.turns.slice(0,e+1))}})},setTurns:(i,e)=>{h(o=>{const d=l(o.sessions,i);return d===void 0?o:{...o,sessions:y(o.sessions,i,typeof e=="function"?e(d.turns):e)}})},toggle:()=>{h(j)},truncateFrom:(i,e)=>{h(o=>{const d=l(o.sessions,i);return d===void 0?o:{...o,sessions:y(o.sessions,i,d.turns.slice(0,e))}})},takeAsk:i=>{h(e=>e.pendingAsk?.id===i?{...e,pendingAsk:void 0}:e)}}),s[2]=c):c=s[2];const[I]=k(c),q=E.data?.available!==!0;let p;s[3]!==I||s[4]!==a.activeId||s[5]!==a.draft||s[6]!==a.hasEditor||s[7]!==a.insertRequest||s[8]!==a.open||s[9]!==a.pendingAsk||s[10]!==a.sessions||s[11]!==q?(p={...I,activeId:a.activeId,draft:a.draft,hasEditor:a.hasEditor,insertRequest:a.insertRequest,open:a.open,pendingAsk:a.pendingAsk,sessions:a.sessions,unavailable:q},s[3]=I,s[4]=a.activeId,s[5]=a.draft,s[6]=a.hasEditor,s[7]=a.insertRequest,s[8]=a.open,s[9]=a.pendingAsk,s[10]=a.sessions,s[11]=q,s[12]=p):p=s[12];const A=p;let r;return s[13]!==n||s[14]!==A?(r=w(S,{value:A,children:n}),s[13]=n,s[14]=A,s[15]=r):r=s[15],r},Q=()=>b(S);function $(t){return{...t,open:!1}}function j(t){return!t.open&&t.activeId===void 0?f(t,void 0):{...t,open:!t.open}}export{P as A,Q as u};
@@ -0,0 +1 @@
1
+ const o=(t,e)=>e(t==="unsafe-response"?"The model returned a statement that is not read-only, so it was discarded.":t==="too-long"?"The statement is too long to rewrite. Select a shorter part of it.":t==="empty-response"?"The model returned nothing usable.":"The model could not be reached.");export{o as a};
@@ -0,0 +1 @@
1
+ import{c as x}from"react/compiler-runtime";import{useState as P}from"react";import{G as d}from"./grid-pagination-DY2erU65.mjs";import{jsx as M}from"react/jsx-runtime";const G=o=>{const t=x(18),{count:n,offset:e,onOffsetChange:i,pageSize:s,prefix:a,total:f}=o;if(f===void 0)return null;const c=Math.max(0,Math.floor((f-1)/s)*s),u=e+n<f,g=e>0;let r;t[0]!==e||t[1]!==i||t[2]!==s?(r=()=>{i(e+s)},t[0]=e,t[1]=i,t[2]=s,t[3]=r):r=t[3];let l;t[4]!==c||t[5]!==e||t[6]!==i||t[7]!==s?(l=()=>{i(Math.max(0,Math.min(e-s,c)))},t[4]=c,t[5]=e,t[6]=i,t[7]=s,t[8]=l):l=t[8];const h=n===0?0:e+n,p=n===0?0:e+1;let m;return t[9]!==a||t[10]!==u||t[11]!==g||t[12]!==r||t[13]!==l||t[14]!==h||t[15]!==p||t[16]!==f?(m=M(d,{hasNext:u,hasPrevious:g,onNext:r,onPrevious:l,prefix:a,rangeEnd:h,rangeStart:p,total:f}),t[9]=a,t[10]=u,t[11]=g,t[12]=r,t[13]=l,t[14]=h,t[15]=p,t[16]=f,t[17]=m):m=t[17],m},N=o=>{const t=x(7);let n;t[0]!==o?(n={offset:0,owner:o},t[0]=o,t[1]=n):n=t[1];const[e,i]=P(n);e.owner!==o&&i({offset:0,owner:o});const s=e.owner===o?e.offset:0;let a;t[2]!==o?(a=c=>{i({offset:c,owner:o})},t[2]=o,t[3]=a):a=t[3];let f;return t[4]!==s||t[5]!==a?(f=[s,a],t[4]=s,t[5]=a,t[6]=f):f=t[6],f};export{G as A,N as u};
@@ -0,0 +1 @@
1
+ import{mergeProps as n}from"@base-ui/react/merge-props";import{useRender as a}from"@base-ui/react/use-render";import{cva as o}from"class-variance-authority";import{c as s}from"./utils-bhneXptQ.mjs";const d=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function f({className:r,variant:e="default",render:t,...i}){return a({defaultTagName:"span",props:n({className:s(d({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{f as B};
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import{c as k}from"react/compiler-runtime";import{LunoraError as B}from"@lunora/errors";import{useReducedMotion as V,motion as K}from"motion/react";import*as w from"react";import{useId as j,useState as X,use as Y,createContext as H}from"react";import*as I from"recharts";import{BarChart as U,ReferenceLine as F,XAxis as q,Bar as z,Rectangle as R}from"recharts";import{c as A}from"./utils-bhneXptQ.mjs";import{jsx as l,jsxs as b,Fragment as E}from"react/jsx-runtime";const L={light:"",dark:".dark"},T=Object.keys(L);function W(r){for(const[t,e]of Object.entries(r))if(e.colors&&!T.some(o=>e.colors?.[o]!==void 0))throw new B("INTERNAL",`[EvilCharts] Invalid chart config for "${t}": colors object must have at least one theme key (${T.join(", ")}). Received empty object or invalid keys.`)}const D=w.createContext(null);function J(){const r=w.useContext(D);if(!r)throw new B("INTERNAL","useChart must be used within a <ChartContainer />");return r}const Q=({id:r,config:t,initialDimension:e={width:320,height:200},className:n,children:o,...s})=>{const a=w.useId(),i=`chart-${r??a.replaceAll(":","")}`;return W(t),l(D.Provider,{value:{config:t},children:b("div",{className:A("min-h-0 w-full flex-1","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick_text]:font-mono [&_.recharts-cartesian-axis-tick_text]:text-[11px] [&_.recharts-cartesian-axis-tick_text]:tracking-wide [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border relative flex flex-col justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden","aspect-video",n),"data-chart":i,"data-slot":"chart",...s,children:[l(tt,{config:t,id:i}),l(I.ResponsiveContainer,{className:"min-h-0 w-full flex-1",initialDimension:e,children:o})]})})};function Z(r,t){const e=r.length;if(e>=t)return r.slice(0,t);const n=[],o=Math.floor(t/e),s=t%e;for(let a=0;a<e;a++){const i=a>=e-s,d=o+(i?1:0);for(let u=0;u<d;u++)n.push(r[a])}return n}const tt=r=>{const t=k(6),{id:e,config:n}=r;let o,s;if(t[0]!==n||t[1]!==e){s=Symbol.for("react.early_return_sentinel");t:{const d=Object.entries(n).filter(et);if(d.length===0){s=null;break t}const u=g=>d.flatMap(f=>{const[m,v]=f,h=v.colors?.[g];if(!h||!Array.isArray(h)||h.length===0)return[];const y=N(v);return Z(h,y).map((c,p)=>` --color-${m}-${p}: ${c};`)}).filter(Boolean).join(`
3
+ `);o=Object.entries(L).map(g=>{const[f,m]=g;return`${m} [data-chart=${e}] {
4
+ ${u(f)}
5
+ }`})}t[0]=n,t[1]=e,t[2]=o,t[3]=s}else o=t[2],s=t[3];if(s!==Symbol.for("react.early_return_sentinel"))return s;const a=o.join(`
6
+ `);let i;return t[4]!==a?(i=l("style",{dangerouslySetInnerHTML:{__html:a}}),t[4]=a,t[5]=i):i=t[5],i};function M(r,t,e){if(typeof t!="object"||t===null)return;const n="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=e;return e in t&&typeof t[e]=="string"?o=t[e]:n&&e in n&&typeof n[e]=="string"&&(o=n[e]),o in r?r[o]:r[e]}function N(r){if(!r.colors)return 1;const t=T.map(e=>r.colors?.[e]?.length??0);return Math.max(...t,1)}function et(r){const[,t]=r;return t.colors}const rt={sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},nt={default:"bg-background","frosted-glass":"bg-background"},ot=({active:r,payload:t,className:e,indicator:n="dot",hideLabel:o=!1,hideIndicator:s=!1,label:a,labelFormatter:i,labelClassName:d,formatter:u,nameKey:g,labelKey:f,roundness:m="lg",variant:v="default"})=>{const{config:h}=J(),y=w.useMemo(()=>{if(o||!t?.length)return null;const[c]=t,p=`${f??c?.dataKey??c?.name??"value"}`,$=M(h,c,p),C=!f&&typeof a=="string"?h[a]?.label??a:$?.label;return i?l("div",{className:A("font-medium",d),children:i(C,t)}):C?l("div",{className:A("font-medium",d),children:C}):null},[a,i,t,o,d,h,f]);if(!r||!t?.length)return l("span",{className:"p-4"});const x=t.length===1&&n!=="dot";return b("div",{className:A("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs",rt[m],nt[v],e),children:[x?null:y,l("div",{className:"grid gap-1.5",children:t.filter(c=>c.type!=="none").map((c,p)=>{const C=`${(g&&c.payload?c.payload[g]:void 0)??c.name??c.dataKey??"value"}`,_=M(h,c,C),P=_?N(_):1;return l("div",{className:A("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",n==="dot"&&"items-center"),children:u&&c?.value!==void 0&&c.name?u(c.value,c.name,c,p,c.payload):b(E,{children:[_?.icon?l(_.icon,{}):!s&&l("div",{className:A("shrink-0 rounded-[2px]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent!":n==="dashed","my-0.5":x&&n==="dashed"}),style:st(C,P)}),b("div",{className:A("flex flex-1 justify-between gap-4 leading-none",x?"items-end":"items-center"),children:[b("div",{className:"grid gap-1.5",children:[x?y:null,l("span",{className:"text-muted-foreground",children:_?.label??c.name})]}),c.value!=null&&l("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof c.value=="number"?c.value.toLocaleString():String(c.value)})]})]})},p)})})]})};function st(r,t){return t<=1?{background:`var(--color-${r}-0)`}:{background:`linear-gradient(to right, ${Array.from({length:t},(n,o)=>{const s=o/(t-1)*100;return`var(--color-${r}-${o}) ${s}%`}).join(", ")})`}}const at=({animationDuration:r=200,...t})=>l(I.Tooltip,{animationDuration:r,...t}),G=2,it=.5,lt=.05,ct=[0,.7,.5,1],O=H(null);function dt(){const r=Y(O);if(!r)throw new B("INTERNAL","Bar chart parts (<Bar />, <XAxis />, …) must be used within <EvilBarChart />");return r}const Ct=({config:r,data:t,children:e,className:n,animationType:o="left-to-right",barCategoryGap:s})=>{const a=j().replaceAll(":",""),[i]=X(()=>Date.now()),d={animationType:o,config:r,dataLength:t.length,introStartedAt:i};return l(O,{value:d,children:l(Q,{className:n,config:r,children:b(U,{accessibilityLayer:!0,barCategoryGap:s,data:t,id:a,layout:"horizontal",children:[l(F,{stroke:"var(--border)"}),e]})})})},bt=r=>{const t=k(24),{dataKey:e}=r,{animationType:n,config:o,dataLength:s,introStartedAt:a}=dt(),i=j();let d;t[0]!==i?(d=i.replaceAll(":",""),t[0]=i,t[1]=d):d=t[1];const u=d,f=V()?"none":n;let m;t[2]!==e||t[3]!==s||t[4]!==u||t[5]!==a?(m={dataKey:e,dataLength:s,id:u,introStartedAt:a},t[2]=e,t[3]=s,t[4]=u,t[5]=a,t[6]=m):m=t[6];const v=m;let h;t[7]!==v?(h=C=>l(S,{...C,...v,animationType:"none"}),t[7]=v,t[8]=h):h=t[8];const y=`url(#${u}-colors-${e})`;let x;t[9]!==v||t[10]!==f?(x=C=>l(S,{...C,...v,animationType:f}),t[9]=v,t[10]=f,t[11]=x):x=t[11];let c;t[12]!==e||t[13]!==h||t[14]!==y||t[15]!==x?(c=l(z,{activeBar:h,dataKey:e,fill:y,isAnimationActive:!1,radius:G,shape:x}),t[12]=e,t[13]=h,t[14]=y,t[15]=x,t[16]=c):c=t[16];let p;t[17]!==o||t[18]!==e||t[19]!==u?(p=l("defs",{children:l(ft,{config:o,dataKey:e,id:u})}),t[17]=o,t[18]=e,t[19]=u,t[20]=p):p=t[20];let $;return t[21]!==c||t[22]!==p?($=b(E,{children:[c,p]}),t[21]=c,t[22]=p,t[23]=$):$=t[23],$},$t=({tickLine:r=!1,axisLine:t=!1,tickMargin:e=8,minTickGap:n=8,...o})=>l(q,{axisLine:t,minTickGap:n,tickLine:r,tickMargin:e,type:"category",...o}),At=r=>{const t=k(6),{variant:e,roundness:n,defaultIndex:o}=r;let s;t[0]!==n||t[1]!==e?(s=l(ot,{roundness:n,variant:e}),t[0]=n,t[1]=e,t[2]=s):s=t[2];let a;return t[3]!==o||t[4]!==s?(a=l(at,{content:s,cursor:!1,defaultIndex:o}),t[3]=o,t[4]=s,t[5]=a):a=t[5],a},S=r=>{const{x:t=0,y:e=0,width:n=0,height:o=0,id:s,dataKey:a,animationType:i="none",introStartedAt:d=0,dataLength:u=0}=r,g=typeof r.index=="number"?r.index:-1,f=ut(i,g,u,d),m=l(R,{fill:`url(#${s}-colors-${a})`,height:Math.max(0,o-3),radius:G,width:n,x:t,y:e});return b("g",{children:[l(R,{...r,fill:"transparent"}),f?l(K.g,{animate:f.animate,initial:f.initial,style:f.style,transition:f.transition,children:m}):m]})},ut=(r,t,e,n)=>{if(r==="none"||t<0||e<=0)return null;const o=t*lt*1e3,s=it*1e3,a=o+s,i=Date.now()-n;if(i>=a)return null;const d=i<=o?0:(i-o)/s,u={delay:Math.max(0,o-i)/1e3,duration:(a-Math.max(i,o))/1e3,ease:ct};return{animate:{scaleY:1},initial:{scaleY:d},style:{originY:1},transition:u}},ft=r=>{const t=k(16),{id:e,dataKey:n,config:o}=r;let s,a,i,d,u,g;if(t[0]!==o||t[1]!==n||t[2]!==e){const m=N(o[n]??{});s=`${e}-colors-${n}`,a="0",i="0",d="0",u="1",g=m===1?b(E,{children:[l("stop",{offset:"0%",stopColor:`var(--color-${n}-0)`}),l("stop",{offset:"100%",stopColor:`var(--color-${n}-0)`})]}):Array.from({length:m},(v,h)=>{const y=`${h/(m-1)*100}%`;return l("stop",{offset:y,stopColor:`var(--color-${n}-${h}, var(--color-${n}-0))`},y)}),t[0]=o,t[1]=n,t[2]=e,t[3]=s,t[4]=a,t[5]=i,t[6]=d,t[7]=u,t[8]=g}else s=t[3],a=t[4],i=t[5],d=t[6],u=t[7],g=t[8];let f;return t[9]!==s||t[10]!==a||t[11]!==i||t[12]!==d||t[13]!==u||t[14]!==g?(f=l("linearGradient",{id:s,x1:a,x2:i,y1:d,y2:u,children:g}),t[9]=s,t[10]=a,t[11]=i,t[12]=d,t[13]=u,t[14]=g,t[15]=f):f=t[15],f};export{bt as B,Q as C,Ct as E,At as T,$t as X,at as a,ot as b};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useState as h,useRef as $,useEffect as S}from"react";const d=(o="local")=>{try{return o==="local"?globalThis.localStorage:globalThis.sessionStorage}catch{return}},g=function(o,e="local"){try{const s=d(e)?.getItem(o)??void 0,t=s===void 0?[]:JSON.parse(s);return Array.isArray(t)?t:[]}catch{return[]}},I=(o,e,s="local")=>{const t=d(s);if(t!==void 0)try{t.setItem(o,JSON.stringify(e))}catch{}},A=(o,e="local")=>{try{d(e)?.removeItem(o)}catch{}},J=function(o,e){const s=m(10),t=e===void 0?"local":e;let i;s[0]!==o||s[1]!==t?(i=()=>g(o,t),s[0]=o,s[1]=t,s[2]=i):i=s[2];const[r,u]=h(i),a=$(`${t}:${o}`);let c,l;s[3]!==o||s[4]!==t||s[5]!==r?(c=()=>{const f=`${t}:${o}`;if(a.current!==f){a.current=f,u(g(o,t));return}I(o,r,t)},l=[o,t,r],s[3]=o,s[4]=t,s[5]=r,s[6]=c,s[7]=l):(c=s[6],l=s[7]),S(c,l);let n;return s[8]!==r?(n=[r,u],s[8]=r,s[9]=n):n=s[9],n},O=function(o,e,s){const t=m(6),i="local",[r,u]=J(o,i);let a;t[0]!==e||t[1]!==u?(a=f=>{u(v=>{const p=v[0]??e;return[typeof f=="function"?f(p):f]})},t[0]=e,t[1]=u,t[2]=a):a=t[2];const c=a,l=r[0]??e;let n;return t[3]!==c||t[4]!==l?(n=[l,c],t[3]=c,t[4]=l,t[5]=n):n=t[5],n},V=o=>globalThis.crypto?.randomUUID?.()??`${o}-${globalThis.performance.now().toString(36)}`;export{d as a,O as b,g as l,V as n,A as r,I as s,J as u};
@@ -0,0 +1 @@
1
+ import{Button as a}from"@base-ui/react/button";import{cva as n}from"class-variance-authority";import{c as d}from"./utils-bhneXptQ.mjs";import{jsx as o}from"react/jsx-runtime";const s=n("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",xs:"h-6 gap-1 rounded-md px-2 text-xs has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-md px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-md","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function v({className:e,variant:r="default",size:i="default",...t}){return o(a,{"data-slot":"button",className:d(s({variant:r,size:i,className:e})),...t})}export{v as B};
@@ -0,0 +1 @@
1
+ import{c as i}from"react/compiler-runtime";import{c as o}from"./utils-bhneXptQ.mjs";import{jsx as l}from"react/jsx-runtime";function p({className:d,size:e="default",...a}){return l("div",{"data-slot":"card","data-size":e,className:o("group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-border bg-card py-4 text-xs/relaxed text-card-foreground shadow-xs has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-md *:[img:last-child]:rounded-md",d),...a})}function f(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-md px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-header",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function u(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("font-heading text-sm font-medium group-data-[size=sm]/card:text-sm",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-title",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function x(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-description",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function g(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("px-4 group-data-[size=sm]/card:px-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-content",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}export{p as C,g as a,f as b,u as c,x as d};
@@ -0,0 +1 @@
1
+ const s="https://dash.cloudflare.com/?to=/:account",L=`${s}/workers-and-pages/observability`,o=`${s}/workers-and-pages`,R=`${s}/r2`,a=`${s}/workers/d1`,r=`${s}/workers/durable-objects`;export{L as C,o as a,a as b,r as c,R as d};
@@ -0,0 +1 @@
1
+ import{c as s}from"react/compiler-runtime";import{Checkbox as d}from"@base-ui/react/checkbox";import{c as l}from"./utils-bhneXptQ.mjs";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as b}from"@hugeicons/core-free-icons";import{jsx as n}from"react/jsx-runtime";function v(c){const e=s(9);let r,i;e[0]!==c?({className:r,...i}=c,e[0]=c,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=l("peer relative flex size-4 shrink-0 items-center justify-center rounded-md border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=n(d.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:n(m,{icon:b,strokeWidth:2})}),e[5]=t):t=e[5];let o;return e[6]!==i||e[7]!==a?(o=n(d.Root,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=o):o=e[8],o}export{v as C};
@@ -0,0 +1 @@
1
+ const e="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",n=`${e} aria-pressed:bg-accent aria-pressed:text-accent-foreground`;export{e as C,n as a};
@@ -0,0 +1 @@
1
+ import{c as x}from"react/compiler-runtime";import{useT as w}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{l as y}from"./internal-hIuTpSbx.mjs";import{jsx as i,jsxs as u}from"react/jsx-runtime";const N=(l,e)=>{if(e==="")return[{match:!1,offset:0,text:l}];const a=[],s=l.toLowerCase(),o=e.toLowerCase();let t=0;for(let r=s.indexOf(o);r!==-1;r=s.indexOf(o,t))r>t&&a.push({match:!1,offset:t,text:l.slice(t,r)}),a.push({match:!0,offset:r,text:l.slice(r,r+e.length)}),t=r+e.length;return t<l.length&&a.push({match:!1,offset:t,text:l.slice(t)}),a},v=l=>{const e=x(9),{highlight:a,value:s}=l;if(s==null){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=n):n=e[0],n}let o,t,r;if(e[1]!==a||e[2]!==s){r=Symbol.for("react.early_return_sentinel");e:{const n=y(s);if(a===void 0||a===""){r=i("span",{title:n,children:n});break e}o=n,t=N(n,a).map(_)}e[1]=a,e[2]=s,e[3]=o,e[4]=t,e[5]=r}else o=e[3],t=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let d;return e[6]!==o||e[7]!==t?(d=i("span",{title:o,children:t}),e[6]=o,e[7]=t,e[8]=d):d=e[8],d},T=l=>{const e=x(22),{columns:a,rows:s}=l,o=w();let t;e[0]!==o?(t=o("Field"),e[0]=o,e[1]=t):t=e[1];let r;e[2]!==t?(r=i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:t}),e[2]=t,e[3]=r):r=e[3];let d;if(e[4]!==s||e[5]!==o){let c;e[7]!==o?(c=(b,p)=>i("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:o("Row {n}",{n:p+1})},p),e[7]=o,e[8]=c):c=e[8],d=s.map(c),e[4]=s,e[5]=o,e[6]=d}else d=e[6];let n;e[9]!==r||e[10]!==d?(n=i("thead",{className:"sticky top-0 z-10 bg-muted",children:u("tr",{children:[r,d]})}),e[9]=r,e[10]=d,e[11]=n):n=e[11];let f;if(e[12]!==a||e[13]!==s){let c;e[15]!==s?(c=b=>u("tr",{className:"hover:bg-muted/40",children:[i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:b}),s.map((p,g)=>i("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:i(v,{value:p[b]})},g))]},b),e[15]=s,e[16]=c):c=e[16],f=a.map(c),e[12]=a,e[13]=s,e[14]=f}else f=e[14];let m;e[17]!==f?(m=i("tbody",{children:f}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==n||e[20]!==m?(h=i("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:u("table",{className:"border-collapse text-xs",children:[n,m]})}),e[19]=n,e[20]=m,e[21]=h):h=e[21],h},j=({children:l,layout:e="card",testId:a})=>i("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":a,children:l});function _(l){return i("mark",{className:l.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:l.text},l.offset)}export{v as C,j as G,T};
@@ -0,0 +1 @@
1
+ const h=new Set(["contains","eq","gt","gte","has","lt","lte","ne"]),i=t=>typeof t=="number"&&Number.isSafeInteger(t)?String(t):t,s=t=>{if(typeof t!="string")return;const r=t.trim();return r===""?void 0:r},g=t=>{if(t===null||typeof t!="object")return!1;const r=t,e=r.path===void 0||Array.isArray(r.path)&&r.path.every(o=>typeof o=="string");return typeof r.column=="string"&&typeof r.operator=="string"&&h.has(r.operator)&&e},f=t=>{if(typeof t!="string"||t==="")return[];try{const r=JSON.parse(t);return Array.isArray(r)?r.filter(g):[]}catch{return[]}},p=t=>{if(typeof t!="string"||t==="")return;const r=t.lastIndexOf(":");if(r<=0)return;const e=t.slice(0,r),o=t.slice(r+1);if(!(o!=="asc"&&o!=="desc"))return{column:e,direction:o}},u=/^[\da-f]{16}$/u,y=t=>{const r={};if(typeof t.pins=="string"&&t.pins!==""){const l=t.pins.split(",").filter(c=>c!==""&&c.length<=64).slice(0,12);l.length>0&&(r.pins=l.join(","))}t.schema==="global"&&(r.schema="global");const e=s(t.table);e!==void 0&&(r.table=e);const o=s(i(t.shard));o!==void 0&&(r.shard=o);const d=s(i(t.search));d!==void 0&&(r.search=d);const n=s(t.order);n!==void 0&&p(n)!==void 0&&(r.order=n);const a=s(t.filters);return a!==void 0&&f(a).length>0&&(r.filters=a),r},b=t=>{const r=f(t.filters),e=p(t.order);return{filters:r.length>0?r:void 0,orderBy:e,search:s(i(t.search)),shard:s(i(t.shard)),table:s(t.table),tier:t.schema==="global"?"global":"shard"}},v=t=>{const r=t.filters??[];return{filters:r.length>0?JSON.stringify(r):void 0,order:t.orderBy===void 0?void 0:`${t.orderBy.column}:${t.orderBy.direction}`,schema:t.tier==="global"?"global":void 0,search:t.search!==void 0&&t.search!==""?t.search:void 0,shard:t.shard!==void 0&&t.shard!==""?t.shard:void 0,table:t.table!==void 0&&t.table!==""?t.table:void 0}},S=t=>{const{version:r}=t;return typeof r=="string"&&u.test(r)?{version:r}:{}};export{y as a,v as d,b as s,S as v};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{Download01Icon as k}from"@hugeicons/core-free-icons";import{HugeiconsIcon as j}from"@hugeicons/react";import{getNodesBounds as N,getViewportForBounds as A,useNodes as L,useReactFlow as O,Panel as R}from"@xyflow/react";import{useState as x}from"react";import{LunoraError as U}from"@lunora/errors";import{toBlob as C,toSvg as M}from"html-to-image";import{useT as _}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{f as w,b as G}from"./internal-hIuTpSbx.mjs";import{d as I,D as F,c as H,b as f}from"./dropdown-menu-jLZenfWH.mjs";import{jsxs as p,jsx as g}from"react/jsx-runtime";const c=1920,m=1080,y=32,h=(e,r)=>{const o=globalThis.document.createElement("a");o.href=e,o.download=r,globalThis.document.body.append(o),o.click(),o.remove()},J=(e,r,o="schema-diagram.json")=>{const n={edges:r,exportedAt:new Date().toISOString(),nodes:e},s=JSON.stringify(n,void 0,2),a=globalThis.URL.createObjectURL(new globalThis.Blob([s],{type:"application/json"}));h(a,o),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(a)},0)},v=(e,r,o,n)=>{const s=N(e),{x:a,y:i,zoom:t}=A(s,r,o,.1,2,n);return{transform:[a,i,t],zoom:t}},P=async(e,r,o="schema-diagram.png")=>{const{transform:n}=v(r,c,m,y),[s,a,i]=n,t=await C(e,{backgroundColor:"#ffffff",height:m,style:{transform:`translate(${s.toString()}px, ${a.toString()}px) scale(${i.toString()})`,transformOrigin:"top left",width:`${c.toString()}px`},width:c});if(t===null)throw new U("INTERNAL","html-to-image produced no blob");const d=globalThis.URL.createObjectURL(t);h(d,o),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(d)},0)},q=async(e,r,o="schema-diagram.svg")=>{const{transform:n}=v(r,c,m,y),[s,a,i]=n,t=await M(e,{backgroundColor:"#ffffff",height:m,style:{transform:`translate(${s.toString()}px, ${a.toString()}px) scale(${i.toString()})`,transformOrigin:"top left",width:`${c.toString()}px`},width:c});h(t,o)},to=({containerRef:e,filenameBase:r,testIdPrefix:o})=>{const n=_(),s=L(),{getEdges:a}=O(),[i,t]=x(null),[d,u]=x(null),b=l=>{u(n("Export failed: {message}",{message:G(l)}))},S=async()=>{const l=e.current?.querySelector(".react-flow__viewport");if(l){t("png");try{await P(l,s,`${r}.png`)}finally{t(null)}}},E=async()=>{const l=e.current?.querySelector(".react-flow__viewport");if(l){t("svg");try{await q(l,s,`${r}.svg`)}finally{t(null)}}},D=()=>{t("json");try{J(s,a(),`${r}.json`)}finally{t(null)}},T=()=>{u(null),w(S(),b)},$=()=>{u(null),w(E(),b)};return p(R,{position:"top-right",children:[p(I,{children:[p(F,{className:"group/button inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-md border border-border bg-background px-2 text-xs font-medium whitespace-nowrap hover:bg-muted disabled:pointer-events-none disabled:opacity-50","data-testid":`${o}-export-trigger`,disabled:i!==null,children:[g(j,{className:"size-3.5",icon:k,strokeWidth:2}),n("Export")]}),p(H,{align:"end",children:[g(f,{"data-testid":`${o}-export-png`,disabled:i!==null,onClick:T,children:n("PNG")}),g(f,{"data-testid":`${o}-export-svg`,disabled:i!==null,onClick:$,children:n("SVG")}),g(f,{"data-testid":`${o}-export-json`,disabled:i!==null,onClick:D,children:n("JSON")})]})]}),d!==null&&g("p",{className:"mt-1 max-w-64 text-right text-xs text-destructive","data-testid":`${o}-export-error`,role:"alert",children:d})]})};export{to as D};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c}from"react/compiler-runtime";import{Menu as i}from"@base-ui/react/menu";import{c as u}from"./utils-bhneXptQ.mjs";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as g}from"@hugeicons/core-free-icons";import{jsx as s,jsxs as v}from"react/jsx-runtime";function N(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Root,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function z(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Trigger,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function D({align:n="start",alignOffset:e=0,side:t="bottom",sideOffset:o=4,className:a,...r}){return s(i.Portal,{children:s(i.Positioner,{className:"isolate z-50 outline-none",align:n,alignOffset:e,side:t,sideOffset:o,children:s(i.Popup,{"data-slot":"dropdown-menu-content",className:u("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",a),...r})})})}function M(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Group,{"data-slot":"dropdown-menu-group",...t}),e[2]=t,e[3]=o):o=e[3],o}function y(n){const e=c(10);let t,o,a;e[0]!==n?({className:t,inset:o,...a}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==t?(r=u("px-2 py-2 text-xs text-muted-foreground data-inset:ps-7",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==a||e[8]!==r?(d=s(i.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:r,...a}),e[6]=o,e[7]=a,e[8]=r,e[9]=d):d=e[9],d}function I({className:n,inset:e,variant:t="default",...o}){return s(i.Item,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":t,className:u("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),...o})}function _(n){const e=c(15);let t,o,a,r,d;e[0]!==n?({className:a,children:o,checked:t,inset:r,...d}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=r,e[5]=d):(t=e[1],o=e[2],a=e[3],r=e[4],d=e[5]);let l;e[6]!==a?(l=u("relative flex cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[6]=a,e[7]=l):l=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:s(i.CheckboxItemIndicator,{children:s(m,{icon:g,strokeWidth:2})})}),e[8]=f):f=e[8];let p;return e[9]!==t||e[10]!==o||e[11]!==r||e[12]!==d||e[13]!==l?(p=v(i.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:l,checked:t,...d,children:[f,o]}),e[9]=t,e[10]=o,e[11]=r,e[12]=d,e[13]=l,e[14]=p):p=e[14],p}function C(n){const e=c(8);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("-mx-1 h-px bg-border",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=s(i.Separator,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}export{z as D,y as a,I as b,D as c,N as d,M as e,_ as f,C as g};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{c as v}from"./utils-bhneXptQ.mjs";import{jsx as a,jsxs as u}from"react/jsx-runtime";const y=g=>{const e=h(19),{action:o,className:f,description:c,icon:m,testId:x,title:p}=g;let t;e[0]!==f?(t=v("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border px-6 py-14 text-center",f),e[0]=f,e[1]=t):t=e[1];let s;e[2]!==m?(s=m!==void 0&&a("span",{className:"flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-5",children:m}),e[2]=m,e[3]=s):s=e[3];let l;e[4]!==p?(l=a("p",{className:"text-sm font-medium text-foreground",children:p}),e[4]=p,e[5]=l):l=e[5];let r;e[6]!==c?(r=c!==void 0&&a("p",{className:"max-w-sm text-sm text-muted-foreground",children:c}),e[6]=c,e[7]=r):r=e[7];let i;e[8]!==l||e[9]!==r?(i=u("div",{className:"flex flex-col gap-1",children:[l,r]}),e[8]=l,e[9]=r,e[10]=i):i=e[10];let d;e[11]!==o?(d=o!==void 0&&a("div",{className:"mt-1 flex items-center gap-2",children:o}),e[11]=o,e[12]=d):d=e[12];let n;return e[13]!==t||e[14]!==s||e[15]!==i||e[16]!==d||e[17]!==x?(n=u("div",{className:t,"data-testid":x,children:[s,i,d]}),e[13]=t,e[14]=s,e[15]=i,e[16]=d,e[17]=x,e[18]=n):n=e[18],n};export{y as E};
@@ -0,0 +1,6 @@
1
+ import{c as U}from"react/compiler-runtime";import{flattenHint as D}from"@lunora/errors";import{useT as V}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{e as $,a as K,b as E}from"./internal-hIuTpSbx.mjs";import{o as M}from"./recording-client-z4CBi0y8.mjs";import{u as W}from"./assistant-provider-Bp72uWsq.mjs";import{u as _}from"./operation-console-provider-DoloEvon.mjs";import{A as z}from"./alert-PB5W11MM.mjs";import{jsx as x,jsxs as B}from"react/jsx-runtime";const Z=H=>{const e=U(51),{className:I,error:t,shardKey:T,testId:O}=H,s=V(),o=_(),v=W(),j=v!==void 0&&!v.unavailable;let l,a,n,c,m,u,d,r,i,f;if(e[0]!==v||e[1]!==I||e[2]!==t||e[3]!==o||e[4]!==T||e[5]!==s||e[6]!==O){const w=$(t);let y;e[17]!==t?(y=K(t),e[17]=t,e[18]=y):y=e[18],n=y;let A;e[19]!==t?(A=M(t),e[19]=t,e[20]=A):A=e[20];const q=A,N=t?.why;let C;e[21]!==o||e[22]!==q?(C=()=>{o?.openConsole({errorsOnly:!0,seq:q})},e[21]=o,e[22]=q,e[23]=C):C=e[23],c=C,a=()=>{const S=w===void 0?"":`
2
+
3
+ ${s("The studio suggested: {hint}",{hint:D(w)})}`;v?.openAssistant({ask:s(`The studio reported this error:
4
+ {message}{detail}
5
+
6
+ What causes it, and how do I fix it?`,{detail:S,message:E(t)}),shardKey:T,title:s("Debug error")})},l=z,m=I,u=O,d="destructive";let g;e[24]!==t?(g=E(t),e[24]=t,e[25]=g):g=e[25],e[26]!==g?(r=x("p",{className:"font-medium",children:g}),e[26]=g,e[27]=r):r=e[27],e[28]!==N?(i=typeof N=="string"?x("p",{className:"mt-1 text-xs opacity-90",children:N}):null,e[28]=N,e[29]=i):i=e[29],f=w===void 0?null:x("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:D(w)}),e[0]=v,e[1]=I,e[2]=t,e[3]=o,e[4]=T,e[5]=s,e[6]=O,e[7]=l,e[8]=a,e[9]=n,e[10]=c,e[11]=m,e[12]=u,e[13]=d,e[14]=r,e[15]=i,e[16]=f}else l=e[7],a=e[8],n=e[9],c=e[10],m=e[11],u=e[12],d=e[13],r=e[14],i=e[15],f=e[16];let p;e[30]!==n?(p=n===void 0?null:x("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:n,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[30]=n,e[31]=p):p=e[31];let h;e[32]!==o||e[33]!==c||e[34]!==s?(h=o===void 0?null:x("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:c,type:"button",children:s("Show in console")}),e[32]=o,e[33]=c,e[34]=s,e[35]=h):h=e[35];let b;e[36]!==a||e[37]!==j||e[38]!==s?(b=j?x("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-ask-assistant",onClick:a,type:"button",children:s("Ask the assistant")}):null,e[36]=a,e[37]=j,e[38]=s,e[39]=b):b=e[39];let k;return e[40]!==l||e[41]!==m||e[42]!==u||e[43]!==d||e[44]!==r||e[45]!==i||e[46]!==f||e[47]!==p||e[48]!==h||e[49]!==b?(k=B(l,{className:m,testId:u,variant:d,children:[r,i,f,p,h,b]}),e[40]=l,e[41]=m,e[42]=u,e[43]=d,e[44]=r,e[45]=i,e[46]=f,e[47]=p,e[48]=h,e[49]=b,e[50]=k):k=e[50],k};export{Z as E};
@@ -0,0 +1,6 @@
1
+ import{c as v}from"react/compiler-runtime";import{useState as A,useEffect as Y}from"react";import{ConfirmButton as z}from"./ConfirmButton-CIXYF6Mg.mjs";import{D as Q,a as I,b as O,c as H,d as P,e as V,f as U,g as F}from"./dropdown-menu-jLZenfWH.mjs";import{M as X}from"./modal-shell-CDztwLnv.mjs";import{useT as E}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{l as B,g as Z,k as W,f as ee}from"./internal-hIuTpSbx.mjs";import{C as L}from"./control-button-BOZ5K-FC.mjs";import{jsx as m,jsxs as j}from"react/jsx-runtime";const q=l=>`"${l.replaceAll('"','""')}"`,te=/["\n\r,]/u,le=/^[=+\-@\t\r]/u,J=l=>{if(l==null)return"";let e;return typeof l=="string"?e=le.test(l)?` ${l}`:l:typeof l=="number"||typeof l=="boolean"||typeof l=="bigint"?e=String(l):e=B(l),te.test(e)?`"${e.replaceAll('"','""')}"`:e},ne=(l,e)=>{const n=l.map(t=>J(t)).join(","),o=e.map(t=>l.map(c=>J(t[c])).join(","));return[n,...o].join(`
2
+ `)},oe=l=>JSON.stringify(l,W,2),G=500,K=l=>l==null?"NULL":typeof l=="number"?Number.isFinite(l)?String(l):"NULL":typeof l=="bigint"?String(l):typeof l=="boolean"?l?"1":"0":`'${(typeof l=="string"?l:B(l)).replaceAll("'","''")}'`,D="__doc__",se=(l,e,n,o)=>{if(e.length===0||n.length===0)return"";const t=o?.includes(D)===!0&&!e.includes(D)?e.filter(a=>!o.includes(a)):void 0,c=t===void 0?e:o,i=(a,u)=>K(t===void 0||u!==D?a[u]:JSON.stringify(Object.fromEntries(t.map(f=>[f,a[f]])),W)),s=c.map(a=>q(a)).join(", "),r=[];for(let a=0;a<n.length;a+=G){const u=n.slice(a,a+G).map(f=>` (${c.map(d=>i(f,d)).join(", ")})`).join(`,
3
+ `);r.push(`INSERT INTO ${q(l)} (${s}) VALUES
4
+ ${u};`)}return r.join(`
5
+
6
+ `)},M=(l,e,n)=>{if(!("document"in globalThis))return;const o=globalThis.URL.createObjectURL(new globalThis.Blob([e],{type:n})),t=globalThis.document.createElement("a");t.href=o,t.download=l,globalThis.document.body.append(t),t.click(),t.remove(),globalThis.URL.revokeObjectURL(o)},ie=l=>{const e=v(37),{columns:n,name:o,rows:t,sqlColumns:c}=l,i=E();let s;e[0]!==n||e[1]!==o||e[2]!==t?(s=()=>{M(`${o}.csv`,ne(n,t),"text/csv;charset=utf-8")},e[0]=n,e[1]=o,e[2]=t,e[3]=s):s=e[3];const r=s;let a;e[4]!==o||e[5]!==t?(a=()=>{M(`${o}.json`,oe(t),"application/json")},e[4]=o,e[5]=t,e[6]=a):a=e[6];const u=a;let f;e[7]!==n||e[8]!==o||e[9]!==t||e[10]!==c?(f=()=>{M(`${o}.sql`,se(o,n,t,c),"application/sql;charset=utf-8")},e[7]=n,e[8]=o,e[9]=t,e[10]=c,e[11]=f):f=e[11];const d=f,N=t.length===0;let p;e[12]!==N?(p=m(Q,{className:L,"data-testid":"grid-export",disabled:N,title:"Exports only the rows loaded on the current page, not the whole table",children:"Export page"}),e[12]=N,e[13]=p):p=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=m(I,{children:"Export loaded rows"}),e[14]=C):C=e[14];let g;e[15]!==i?(g=i("CSV"),e[15]=i,e[16]=g):g=e[16];let y;e[17]!==r||e[18]!==g?(y=m(O,{"data-testid":"grid-export-csv",onClick:r,children:g}),e[17]=r,e[18]=g,e[19]=y):y=e[19];let k;e[20]!==i?(k=i("JSON"),e[20]=i,e[21]=k):k=e[21];let x;e[22]!==u||e[23]!==k?(x=m(O,{"data-testid":"grid-export-json",onClick:u,children:k}),e[22]=u,e[23]=k,e[24]=x):x=e[24];let S;e[25]!==i?(S=i("SQL"),e[25]=i,e[26]=S):S=e[26];let h;e[27]!==d||e[28]!==S?(h=m(O,{"data-testid":"grid-export-sql",onClick:d,children:S}),e[27]=d,e[28]=S,e[29]=h):h=e[29];let b;e[30]!==x||e[31]!==h||e[32]!==y?(b=j(H,{align:"end",children:[C,y,x,h]}),e[30]=x,e[31]=h,e[32]=y,e[33]=b):b=e[33];let w;return e[34]!==b||e[35]!==p?(w=j(P,{children:[p,b]}),e[34]=b,e[35]=p,e[36]=w):w=e[36],w},re=l=>{const e=v(9),{column:n}=l;let o;e[0]!==n?(o=()=>{n.toggleVisibility()},e[0]=n,e[1]=o):o=e[1];const t=o;let c;e[2]!==n?(c=n.getIsVisible(),e[2]=n,e[3]=c):c=e[3];const i=`grid-column-${n.id}`;let s;return e[4]!==n.id||e[5]!==t||e[6]!==c||e[7]!==i?(s=m(U,{checked:c,closeOnClick:!1,"data-testid":i,onCheckedChange:t,children:n.id}),e[4]=n.id,e[5]=t,e[6]=c,e[7]=i,e[8]=s):s=e[8],s},ce=[],ae=({backRelations:l=ce,enabledBackRelations:e,onToggleBackRelation:n,table:o})=>{const t=E(),c=o.getIsAllColumnsVisible(),i=()=>{o.toggleAllColumnsVisible(!c)};return j(P,{children:[m(Q,{className:L,"data-testid":"grid-columns",children:t("Columns")}),j(H,{align:"end",className:"max-h-80 overflow-y-auto",children:[j(V,{children:[m(I,{children:t("Columns")}),m(U,{checked:c,closeOnClick:!1,"data-testid":"grid-columns-all",onCheckedChange:i,children:t(c?"Hide all":"Show all")}),m(F,{}),o.getAllLeafColumns().filter(s=>!s.id.startsWith("__back__:")).map(s=>m(re,{column:s},s.id))]}),l.length>0&&n!==void 0&&j(V,{children:[m(F,{}),m(I,{children:t("Related")}),l.map(s=>{const r=`${s.table}.${s.column}`;return m(U,{checked:e?.has(r)===!0,closeOnClick:!1,"data-testid":`grid-back-relation-${r}`,onCheckedChange:()=>{n(r)},children:`← ${s.table}.${s.column}`},r)})]})]})]})},de=l=>{const e=v(19),{count:n,editable:o,onClear:t,onDelete:c}=l,i=E();let s;e[0]!==n||e[1]!==i?(s=i("{count} selected",{count:n}),e[0]=n,e[1]=i,e[2]=s):s=e[2];let r;e[3]!==s?(r=m("span",{className:"font-medium tabular-nums","data-testid":"grid-selection-count",children:s}),e[3]=s,e[4]=r):r=e[4];let a;e[5]!==i?(a=i("Clear"),e[5]=i,e[6]=a):a=e[6];let u;e[7]!==t||e[8]!==a?(u=m("button",{className:L,"data-testid":"grid-selection-clear",onClick:t,type:"button",children:a}),e[7]=t,e[8]=a,e[9]=u):u=e[9];let f;e[10]!==n||e[11]!==o||e[12]!==c||e[13]!==i?(f=o&&m(z,{confirmLabel:i("Delete {count} rows and everything that cascades?",{count:n}),onConfirm:c,testId:"grid-selection-delete",children:i("Delete {count}",{count:n})}),e[10]=n,e[11]=o,e[12]=c,e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==r||e[16]!==u||e[17]!==f?(d=j("div",{className:"flex items-center gap-2 rounded-md border border-border bg-accent/40 px-3 py-1.5 text-xs","data-testid":"grid-selection-bar",children:[r,u,f]}),e[15]=r,e[16]=u,e[17]=f,e[18]=d):d=e[18],d},fe=/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/iu,me=l=>{const e=v(9),{bucket:n,objectKey:o,resolveUrl:t}=l,[c,i]=A(null),[s,r]=A(!1);let a,u;e[0]!==n||e[1]!==o||e[2]!==t?(a=()=>{const p={cancelled:!1};return ee((async()=>{try{const C=await t(o,n);p.cancelled||i(C)}catch{p.cancelled||r(!0)}})()),()=>{p.cancelled=!0}},u=[n,o,t],e[0]=n,e[1]=o,e[2]=t,e[3]=a,e[4]=u):(a=e[3],u=e[4]),Y(a,u);let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{r(!0)},e[5]=f):f=e[5];const d=f;if(c===null||s)return null;let N;return e[6]!==o||e[7]!==c?(N=m("div",{className:"flex max-h-64 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/30",children:m("img",{alt:o,className:"max-h-64 object-contain","data-testid":"grid-cell-image",onError:d,src:c})}),e[6]=o,e[7]=c,e[8]=N):N=e[8],N},ke=l=>{const e=v(41),{bucket:n,column:o,onClose:t,onFilter:c,resolveUrl:i,value:s}=l,r=E(),[a,u]=A(!1);let f;e[0]!==s?(f=B(s),e[0]=s,e[1]=f):f=e[1];const d=f;let N;e[2]!==d?(N=()=>{Z(d)&&u(!0)},e[2]=d,e[3]=N):N=e[3];const p=N;let C;e[4]!==r?(C=r("Cell value"),e[4]=r,e[5]=C):C=e[5];let g;e[6]!==o?(g=m("h2",{className:"truncate font-mono text-sm font-semibold text-foreground",children:o}),e[6]=o,e[7]=g):g=e[7];let y;e[8]!==c||e[9]!==r?(y=c!==void 0&&m("button",{className:L,"data-testid":"grid-cell-filter",onClick:c,type:"button",children:r("Filter by this value")}),e[8]=c,e[9]=r,e[10]=y):y=e[10];let k;e[11]!==a||e[12]!==r?(k=r(a?"Copied":"Copy"),e[11]=a,e[12]=r,e[13]=k):k=e[13];let x;e[14]!==p||e[15]!==k?(x=m("button",{className:L,"data-testid":"grid-cell-copy",onClick:p,type:"button",children:k}),e[14]=p,e[15]=k,e[16]=x):x=e[16];let S;e[17]!==r?(S=r("Close"),e[17]=r,e[18]=S):S=e[18];let h;e[19]!==t||e[20]!==S?(h=m("button",{className:L,"data-testid":"grid-cell-close",onClick:t,type:"button",children:S}),e[19]=t,e[20]=S,e[21]=h):h=e[21];let b;e[22]!==y||e[23]!==x||e[24]!==h?(b=j("div",{className:"flex items-center gap-1.5",children:[y,x,h]}),e[22]=y,e[23]=x,e[24]=h,e[25]=b):b=e[25];let w;e[26]!==b||e[27]!==g?(w=j("div",{className:"flex items-center justify-between",children:[g,b]}),e[26]=b,e[27]=g,e[28]=w):w=e[28];let _;e[29]!==n||e[30]!==i||e[31]!==s?(_=i!==void 0&&typeof s=="string"&&fe.test(s)&&m(me,{bucket:n,objectKey:s,resolveUrl:i}),e[29]=n,e[30]=i,e[31]=s,e[32]=_):_=e[32];let $;e[33]!==d?($=m("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/30 p-3 font-mono text-xs whitespace-pre-wrap","data-testid":"grid-cell-value",children:d}),e[33]=d,e[34]=$):$=e[34];let T;return e[35]!==t||e[36]!==w||e[37]!==_||e[38]!==$||e[39]!==C?(T=j(X,{className:"max-h-[70vh] w-[min(40rem,90vw)]",label:C,onClose:t,panelTestId:"grid-cell-dialog",testId:"grid-cell-dialog-overlay",variant:"dialog",children:[w,_,$]}),e[35]=t,e[36]=w,e[37]=_,e[38]=$,e[39]=C,e[40]=T):T=e[40],T},Se=l=>{const e=v(37),{backRelations:n,enabledBackRelations:o,onToggleBackRelation:t,columns:c,editable:i,name:s,onBulkDelete:r,onToggleTranspose:a,rows:u,sqlColumns:f,table:d,transposed:N}=l,p=E();let C;e[0]!==d?(C=d.getSelectedRowModel(),e[0]=d,e[1]=C):C=e[1];const g=C.rows;let y;e[2]!==d?(y=()=>{d.resetRowSelection()},e[2]=d,e[3]=y):y=e[3];const k=y;let x;e[4]!==r||e[5]!==g||e[6]!==d?(x=()=>{r(g.map(ue)),d.resetRowSelection()},e[4]=r,e[5]=g,e[6]=d,e[7]=x):x=e[7];const S=x;let h;e[8]!==c||e[9]!==s||e[10]!==u||e[11]!==f?(h=m(ie,{columns:c,name:s,rows:u,sqlColumns:f}),e[8]=c,e[9]=s,e[10]=u,e[11]=f,e[12]=h):h=e[12];let b;e[13]!==n||e[14]!==o||e[15]!==t||e[16]!==d?(b=m(ae,{backRelations:n,enabledBackRelations:o,onToggleBackRelation:t,table:d}),e[13]=n,e[14]=o,e[15]=t,e[16]=d,e[17]=b):b=e[17];let w;e[18]!==p?(w=p("Swap rows and columns"),e[18]=p,e[19]=w):w=e[19];let _;e[20]!==p?(_=p("Transpose"),e[20]=p,e[21]=_):_=e[21];let $;e[22]!==a||e[23]!==w||e[24]!==_||e[25]!==N?($=m("button",{"aria-pressed":N,className:L,"data-testid":"grid-transpose",onClick:a,title:w,type:"button",children:_}),e[22]=a,e[23]=w,e[24]=_,e[25]=N,e[26]=$):$=e[26];let T;e[27]!==i||e[28]!==k||e[29]!==S||e[30]!==g.length?(T=g.length>0&&m(de,{count:g.length,editable:i,onClear:k,onDelete:S}),e[27]=i,e[28]=k,e[29]=S,e[30]=g.length,e[31]=T):T=e[31];let R;return e[32]!==h||e[33]!==b||e[34]!==$||e[35]!==T?(R=j("div",{className:"flex flex-wrap items-center gap-1.5","data-testid":"grid-actions",children:[h,b,$,T]}),e[32]=h,e[33]=b,e[34]=$,e[35]=T,e[36]=R):R=e[36],R};function ue(l){return l.id}export{ke as C,ie as E,Se as G,de as S,M as d};
@@ -0,0 +1 @@
1
+ import{c as k}from"react/compiler-runtime";import{useT as M}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{jsxs as $,jsx as p}from"react/jsx-runtime";const w=[25,50,100,250],C=f=>{const e=k(18),{onChange:u,options:m,prefix:a,value:x}=f,t=M();let c;e[0]!==u?(c=h=>{u(Number.parseInt(h.target.value,10))},e[0]=u,e[1]=c):c=e[1];const n=c,b=`${a}-page-size`;let r;e[2]!==t?(r=t("Rows per page"),e[2]=t,e[3]=r):r=e[3];let o;e[4]!==r?(o=p("span",{children:r}),e[4]=r,e[5]=o):o=e[5];const d=`${a}-page-size`,l=`${a}-page-size`;let s;e[6]!==m?(s=m.map(E),e[6]=m,e[7]=s):s=e[7];let i;e[8]!==n||e[9]!==d||e[10]!==l||e[11]!==s||e[12]!==x?(i=p("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":d,id:l,onChange:n,value:x,children:s}),e[8]=n,e[9]=d,e[10]=l,e[11]=s,e[12]=x,e[13]=i):i=e[13];let g;return e[14]!==b||e[15]!==o||e[16]!==i?(g=$("label",{className:"flex items-center gap-1.5",htmlFor:b,children:[o,i]}),e[14]=b,e[15]=o,e[16]=i,e[17]=g):g=e[17],g},j=f=>{const e=k(25),{onJump:u,page:m,pages:a,prefix:x}=f,t=M();let c;e[0]!==u||e[1]!==a?(c=N=>{const P=Number.parseInt(N,10);Number.isNaN(P)||u(Math.min(Math.max(1,P),Math.max(1,a)))},e[0]=u,e[1]=a,e[2]=c):c=e[2];const n=c;let b;e[3]!==n?(b=N=>{N.key==="Enter"&&n(N.currentTarget.value)},e[3]=n,e[4]=b):b=e[4];const r=b;let o;e[5]!==n?(o=N=>{n(N.currentTarget.value)},e[5]=n,e[6]=o):o=e[6];const d=o;let l;e[7]!==t?(l=t("Page"),e[7]=t,e[8]=l):l=e[8];let s;e[9]!==t?(s=t("Page"),e[9]=t,e[10]=s):s=e[10];const i=`${x}-page-jump`,g=Math.max(1,a);let h;e[11]!==d||e[12]!==r||e[13]!==m||e[14]!==s||e[15]!==i||e[16]!==g?(h=p("input",{"aria-label":s,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":i,defaultValue:m,max:g,min:1,onBlur:d,onKeyDown:r,type:"number"},m),e[11]=d,e[12]=r,e[13]=m,e[14]=s,e[15]=i,e[16]=g,e[17]=h):h=e[17];let v;e[18]!==a||e[19]!==t?(v=t("of {pages}",{pages:a}),e[18]=a,e[19]=t,e[20]=v):v=e[20];let y;return e[21]!==l||e[22]!==h||e[23]!==v?(y=$("span",{className:"flex items-center gap-1.5 tabular-nums",children:[l,h,v]}),e[21]=l,e[22]=h,e[23]=v,e[24]=y):y=e[24],y},_=({hasNext:f,hasPrevious:e,onJumpToPage:u,onNext:m,onPageSizeChange:a,onPrevious:x,pageSize:t,pageSizeOptions:c=w,prefix:n,rangeEnd:b,rangeStart:r,total:o})=>{const d=M(),l="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",s=t!==void 0&&t>0?Math.max(1,Math.ceil(o/t)):1,i=t!==void 0&&t>0?Math.floor(Math.max(0,r-1)/t)+1:1;return $("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[$("div",{className:"flex items-center gap-3",children:[t!==void 0&&a!==void 0&&p(C,{onChange:a,options:c,prefix:n,value:t}),p("span",{className:"tabular-nums","data-testid":`${n}-page-info`,children:d("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:b,rangeStart:r,total:o})})]}),$("div",{className:"flex items-center gap-3",children:[p("button",{className:l,"data-testid":`${n}-prev`,disabled:!e,onClick:x,type:"button",children:d("Previous")}),t!==void 0&&u!==void 0&&p(j,{onJump:u,page:i,pages:s,prefix:n}),p("button",{className:l,"data-testid":`${n}-next`,disabled:!f,onClick:m,type:"button",children:d("Next")})]})]})};function E(f){return p("option",{value:f,children:f},f)}export{_ as G};