@lunora/studio 1.0.0-alpha.29 → 1.0.0-alpha.290

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 (354) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1581 -0
  4. package/dist/index.d.ts +974 -806
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +22 -0
  7. package/dist/mount.d.ts +11 -10
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +3 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +10 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  34. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  36. package/dist/packem_chunks/containers-panel.mjs +1 -0
  37. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  38. package/dist/packem_chunks/evals-panel.mjs +1 -0
  39. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  40. package/dist/packem_chunks/flags-panel.mjs +1 -0
  41. package/dist/packem_chunks/issues-panel.mjs +1 -0
  42. package/dist/packem_chunks/kv-browser.mjs +1 -0
  43. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  44. package/dist/packem_chunks/migrations-route.mjs +1 -0
  45. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  46. package/dist/packem_chunks/payments-panel.mjs +1 -0
  47. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  48. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  49. package/dist/packem_chunks/queues-panel.mjs +1 -0
  50. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  51. package/dist/packem_chunks/rls-panel.mjs +1 -0
  52. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  53. package/dist/packem_chunks/sparkline.mjs +1 -0
  54. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  55. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  56. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  57. package/dist/packem_chunks/traces-panel.mjs +1 -0
  58. package/dist/packem_chunks/users-panel.mjs +1 -0
  59. package/dist/packem_chunks/vector-browser.mjs +1 -0
  60. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  61. package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
  62. package/dist/packem_shared/ApiDocsPanel-fhDlZGE4.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-nAf8tNRr.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-D9ZY-qQd.mjs +1 -0
  65. package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
  66. package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
  67. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
  70. package/dist/packem_shared/DataBrowser-C14aRmmR.mjs +4 -0
  71. package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
  72. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  73. package/dist/packem_shared/GlobalDataBrowser-DhObcZDY.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-CUuYsApa.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-CkVIwAbK.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-BxEr49D9.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-BZNcYWBP.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  80. package/dist/packem_shared/Studio-CZjQXFHC.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-C9ENwcOH.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-DzI2RQhY.mjs +1 -0
  84. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  85. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  86. package/dist/packem_shared/app.d-D7vL0y8y.d.mts +349 -0
  87. package/dist/packem_shared/app.d-D7vL0y8y.d.ts +349 -0
  88. package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
  89. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  90. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  91. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  92. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  93. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  94. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  95. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  96. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  97. package/dist/packem_shared/data-grid-DIiNmDR9.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-D5CVNJkp.mjs +2 -0
  100. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  101. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  102. package/dist/packem_shared/error-alert-DueSEkt-.mjs +1 -0
  103. package/dist/packem_shared/grid-features-OVIMIQan.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  105. package/dist/packem_shared/home-panel-BcE8S2Nn.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-Df43vQI0.mjs +2 -0
  108. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  109. package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
  110. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  111. package/dist/packem_shared/log-line-CICyJ_kc.mjs +1 -0
  112. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  113. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  114. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  115. package/dist/packem_shared/recording-client-CyFiAE2l.mjs +1 -0
  116. package/dist/packem_shared/reference-view-CIHyURU6.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-C5oilX7l.mjs +2 -0
  118. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  119. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  120. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  121. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  122. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  123. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  124. package/dist/packem_shared/sql-result-table-DyK762_A.mjs +1 -0
  125. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  126. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  127. package/dist/packem_shared/studio-fK2DTLde.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-DkPO_Qtz.mjs +1 -0
  130. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  131. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  132. package/dist/packem_shared/use-admin-query-tlBof8Yg.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-Bir7V68L.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-CZqCMTJ_.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-Z_n4ABCI.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-DMVhpnyG.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-CZydTzd5.mjs +1 -0
  140. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  141. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  142. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  143. package/dist/packem_shared/wire-codec-B2DgCbKt.mjs +1 -0
  144. package/dist/standalone/chunk-253UHWDX.js +1 -0
  145. package/dist/standalone/chunk-2I4NHEKA.js +1 -0
  146. package/dist/standalone/chunk-2IKDEUCX.js +1 -0
  147. package/dist/standalone/chunk-2VA5S3IA.js +1 -0
  148. package/dist/standalone/chunk-37WYCOQ2.js +1 -0
  149. package/dist/standalone/chunk-3YXASVTP.js +1 -0
  150. package/dist/standalone/chunk-4A6ICQ33.js +1 -0
  151. package/dist/standalone/chunk-4JV44PC5.js +3 -0
  152. package/dist/standalone/chunk-4U2J2ME3.js +1 -0
  153. package/dist/standalone/chunk-4UO2OTLK.js +4 -0
  154. package/dist/standalone/chunk-4WD4XGC3.js +1 -0
  155. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  156. package/dist/standalone/chunk-54JZD74E.js +15 -0
  157. package/dist/standalone/chunk-55UGUCQ6.js +1 -0
  158. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  159. package/dist/standalone/chunk-5KFKN5DE.js +1 -0
  160. package/dist/standalone/chunk-5QR2SQIS.js +1 -0
  161. package/dist/standalone/chunk-5WVYD4BT.js +1 -0
  162. package/dist/standalone/chunk-63IQGHPL.js +1 -0
  163. package/dist/standalone/chunk-6FGQ5E2B.js +1 -0
  164. package/dist/standalone/chunk-6HLARDYO.js +1 -0
  165. package/dist/standalone/chunk-6JHWSJQU.js +1 -0
  166. package/dist/standalone/chunk-6MPWC5MD.js +1 -0
  167. package/dist/standalone/chunk-6QTAHSDD.js +1 -0
  168. package/dist/standalone/chunk-6RXWGRH7.js +1 -0
  169. package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
  170. package/dist/standalone/chunk-7RKB5KS7.js +1 -0
  171. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  172. package/dist/standalone/chunk-A6EGILT4.js +1 -0
  173. package/dist/standalone/chunk-AF5ERKUP.js +1 -0
  174. package/dist/standalone/chunk-AGWOZ6P2.js +1 -0
  175. package/dist/standalone/chunk-AUAECCXB.js +1 -0
  176. package/dist/standalone/chunk-AUGKHAMQ.js +1 -0
  177. package/dist/standalone/chunk-BL4ORKKN.js +1 -0
  178. package/dist/standalone/chunk-BOMPSVRC.js +1 -0
  179. package/dist/standalone/chunk-C7DRRPQQ.js +1 -0
  180. package/dist/standalone/chunk-CCDX5RYT.js +1 -0
  181. package/dist/standalone/chunk-CESYGLNZ.js +1 -0
  182. package/dist/standalone/chunk-CGQMJYCW.js +1 -0
  183. package/dist/standalone/chunk-CK6HFTG7.js +1 -0
  184. package/dist/standalone/chunk-CQWFDDTK.js +15 -0
  185. package/dist/standalone/chunk-CVXNHIQW.js +1 -0
  186. package/dist/standalone/chunk-DQHTOUUS.js +1 -0
  187. package/dist/standalone/chunk-DVMO32RX.js +1 -0
  188. package/dist/standalone/chunk-E4PXACVL.js +3 -0
  189. package/dist/standalone/chunk-E5XPDR5D.js +1 -0
  190. package/dist/standalone/chunk-EASJRBTN.js +1 -0
  191. package/dist/standalone/chunk-ECY2JC5F.js +1 -0
  192. package/dist/standalone/chunk-EN2PGJWN.js +1 -0
  193. package/dist/standalone/chunk-F6VN7MAF.js +1 -0
  194. package/dist/standalone/chunk-FA46V4KR.js +1 -0
  195. package/dist/standalone/chunk-FED7KM46.js +1 -0
  196. package/dist/standalone/chunk-FGWGG424.js +1 -0
  197. package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
  198. package/dist/standalone/chunk-FUYEZFBP.js +1 -0
  199. package/dist/standalone/chunk-G6N5A4TA.js +1 -0
  200. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  201. package/dist/standalone/chunk-GJ6J6JZA.js +1 -0
  202. package/dist/standalone/chunk-GTV5WDXF.js +1 -0
  203. package/dist/standalone/chunk-GXXIGCIF.js +1 -0
  204. package/dist/standalone/chunk-HCTJKP5J.js +1 -0
  205. package/dist/standalone/chunk-HDVUWQQM.js +1 -0
  206. package/dist/standalone/chunk-HGTKL66S.js +14 -0
  207. package/dist/standalone/chunk-HJHSQPHW.js +19 -0
  208. package/dist/standalone/chunk-HPY2HNZK.js +5 -0
  209. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  210. package/dist/standalone/chunk-IHPSJ2PU.js +1 -0
  211. package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
  212. package/dist/standalone/chunk-JNKH43IG.js +1 -0
  213. package/dist/standalone/chunk-JQXA2OYK.js +1 -0
  214. package/dist/standalone/chunk-JYTVI62T.js +1 -0
  215. package/dist/standalone/chunk-JZGTSH2C.js +4 -0
  216. package/dist/standalone/chunk-KIVY3C4V.js +1 -0
  217. package/dist/standalone/chunk-KKVPUQD2.js +1 -0
  218. package/dist/standalone/chunk-KU6ZTYP4.js +9 -0
  219. package/dist/standalone/chunk-MJ3WFI7T.js +1 -0
  220. package/dist/standalone/chunk-MKRA2W3P.js +3 -0
  221. package/dist/standalone/chunk-MVWZMWPD.js +1 -0
  222. package/dist/standalone/chunk-NCPW7WHO.js +1 -0
  223. package/dist/standalone/chunk-NDTQTKDX.js +6 -0
  224. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  225. package/dist/standalone/chunk-NQZALRU3.js +1 -0
  226. package/dist/standalone/chunk-NR2U7C6X.js +1 -0
  227. package/dist/standalone/chunk-NRP22GKC.js +1 -0
  228. package/dist/standalone/chunk-NXQW5E6W.js +1 -0
  229. package/dist/standalone/chunk-OE6FYYDJ.js +1 -0
  230. package/dist/standalone/chunk-OFURQPKP.js +1 -0
  231. package/dist/standalone/chunk-OKQS3RV4.js +1 -0
  232. package/dist/standalone/chunk-OPM7ESDV.js +1 -0
  233. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  234. package/dist/standalone/chunk-OSGXNEFA.js +1 -0
  235. package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
  236. package/dist/standalone/chunk-PHEWXIFF.js +1 -0
  237. package/dist/standalone/chunk-PIMTWCRD.js +1 -0
  238. package/dist/standalone/chunk-PQPCOO6E.js +1 -0
  239. package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
  240. package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
  241. package/dist/standalone/chunk-QAQDMS6R.js +1 -0
  242. package/dist/standalone/chunk-QJLHH3ET.js +1 -0
  243. package/dist/standalone/chunk-R6U22RSY.js +1 -0
  244. package/dist/standalone/chunk-RGMVGZV4.js +1 -0
  245. package/dist/standalone/chunk-RWVIV3U7.js +1 -0
  246. package/dist/standalone/chunk-RY2R7KP5.js +1 -0
  247. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  248. package/dist/standalone/chunk-SA2OGF3F.js +1 -0
  249. package/dist/standalone/chunk-SAOBVEGV.js +1 -0
  250. package/dist/standalone/chunk-SFPHDV3R.js +1 -0
  251. package/dist/standalone/chunk-SJQERRSZ.js +1 -0
  252. package/dist/standalone/chunk-SUOPCQD7.js +1 -0
  253. package/dist/standalone/chunk-SV764LKQ.js +1 -0
  254. package/dist/standalone/chunk-TRPBILYS.js +1 -0
  255. package/dist/standalone/chunk-UC7MNI2F.js +1 -0
  256. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  257. package/dist/standalone/chunk-VCFEO3RI.js +1 -0
  258. package/dist/standalone/chunk-VESGIGMQ.js +1 -0
  259. package/dist/standalone/chunk-VK26SQ7G.js +1 -0
  260. package/dist/standalone/chunk-VOJEROA7.js +1 -0
  261. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  262. package/dist/standalone/chunk-WSUUMPYP.js +1 -0
  263. package/dist/standalone/chunk-XGCIDUJF.js +1 -0
  264. package/dist/standalone/chunk-XHRKNCCI.js +1 -0
  265. package/dist/standalone/chunk-XSZHBDQO.js +1 -0
  266. package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
  267. package/dist/standalone/chunk-YF7ZNDI4.js +1 -0
  268. package/dist/standalone/chunk-YK7KJ3B6.js +1 -0
  269. package/dist/standalone/chunk-YKGW4P6U.js +1 -0
  270. package/dist/standalone/chunk-YU53KJ7Y.js +59 -0
  271. package/dist/standalone/chunk-YVR4SEPU.js +1 -0
  272. package/dist/standalone/chunk-Z22BDS6N.js +1 -0
  273. package/dist/standalone/chunk-ZEFFMYSN.js +8 -0
  274. package/dist/standalone/chunk-ZG4KF3SJ.js +1 -0
  275. package/dist/standalone/chunk-ZKESOLYY.js +1 -0
  276. package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
  277. package/dist/standalone/chunk-ZMBT2OFU.js +2 -0
  278. package/dist/standalone/studio.js +9 -378
  279. package/dist/styles.css +2 -2
  280. package/package.json +25 -21
  281. package/dist/index.js +0 -41
  282. package/dist/mount.js +0 -26
  283. package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
  284. package/dist/packem_shared/ApiDocsPanel-BSSgtcVf.js +0 -842
  285. package/dist/packem_shared/ApiReferencePanel-D24xOjCw.js +0 -229
  286. package/dist/packem_shared/ApiTab-vo8uhE29.js +0 -251
  287. package/dist/packem_shared/AuditPanel-CBjYR6S5.js +0 -200
  288. package/dist/packem_shared/CommandPalette-L-CuSRUc.js +0 -373
  289. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  290. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  291. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  292. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  293. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  294. package/dist/packem_shared/DataBrowser-DBKOIVKS.js +0 -4492
  295. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  296. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  297. package/dist/packem_shared/ExportImportPanel-DtDEy4OD.js +0 -197
  298. package/dist/packem_shared/FileBrowser-DqLRjqsM.js +0 -2932
  299. package/dist/packem_shared/FunctionRunner-BmRkCvT4.js +0 -343
  300. package/dist/packem_shared/FunctionStatsPanel-Bi3kyQvu.js +0 -375
  301. package/dist/packem_shared/GlobalDataBrowser-DOjhvhKa.js +0 -289
  302. package/dist/packem_shared/HealthPanel-C7IPO6Ts.js +0 -648
  303. package/dist/packem_shared/HomePanel-dJIkHY_i.js +0 -14
  304. package/dist/packem_shared/InsightsPanel-BD29GXXd.js +0 -461
  305. package/dist/packem_shared/LogsPanel-2JhE1qep.js +0 -827
  306. package/dist/packem_shared/MailPanel-DwNsuFJC.js +0 -440
  307. package/dist/packem_shared/MetricsPanel-CRa4ITlq.js +0 -19
  308. package/dist/packem_shared/MigrationsPanel-Z1DmSSzf.js +0 -239
  309. package/dist/packem_shared/OpenRpcReferencePanel-Dq0yyVWz.js +0 -191
  310. package/dist/packem_shared/PitrPanel-3mec0LTF.js +0 -252
  311. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  312. package/dist/packem_shared/ScheduledJobs--Z9GTmKb.js +0 -262
  313. package/dist/packem_shared/SchemaViewer-nxDV7dZJ.js +0 -2512
  314. package/dist/packem_shared/SecurityAdvisorPanel-5tYrJdvn.js +0 -92
  315. package/dist/packem_shared/SettingsPanel-SijRekVc.js +0 -390
  316. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  317. package/dist/packem_shared/SqlEditorPanel-DI4obotI.js +0 -13
  318. package/dist/packem_shared/Studio-B_L5Q2-X.js +0 -33
  319. package/dist/packem_shared/StudioApp-wxioPfiP.js +0 -657
  320. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  321. package/dist/packem_shared/TableEditor-1T-5KYtr.js +0 -11
  322. package/dist/packem_shared/advisor-view-DzqyvUU3.js +0 -159
  323. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  324. package/dist/packem_shared/app.d-B6MyY_al.d.ts +0 -300
  325. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  326. package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
  327. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  328. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  329. package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
  330. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  331. package/dist/packem_shared/data-grid-CrapHxR-.js +0 -183
  332. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  333. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  334. package/dist/packem_shared/grid-features-DnTbXXNb.js +0 -840
  335. package/dist/packem_shared/home-panel-VdQI_8oX.js +0 -1700
  336. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  337. package/dist/packem_shared/internal-CvMZCVd6.js +0 -68
  338. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  339. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  340. package/dist/packem_shared/metrics-panel-3FSfzgEX.js +0 -1611
  341. package/dist/packem_shared/reference-view-DVyk5kXj.js +0 -2180
  342. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  343. package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
  344. package/dist/packem_shared/sql-editor-panel-DBuIpCXk.js +0 -2562
  345. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  346. package/dist/packem_shared/studio-Dm6H5DHS.js +0 -13388
  347. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  348. package/dist/packem_shared/table-editor-7iSgi3te.js +0 -407
  349. package/dist/packem_shared/table-list-sidebar-BbSgfLJ2.js +0 -832
  350. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  351. package/dist/packem_shared/use-admin-query-CFl5GUg_.js +0 -105
  352. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  353. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  354. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
@@ -1,239 +0,0 @@
1
- import { useLunora } from '@lunora/react';
2
- import { useState, useEffect } from 'react';
3
- import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
4
- import { L as LiveError } from './live-status-FZ0psC1z.js';
5
- import { ShardInput } from './ShardInput-gx_DZXXn.js';
6
- import { B as Badge } from './badge-B2PKA1-5.js';
7
- import { B as Button } from './button-BhsN2uZH.js';
8
- import { C as Card, a as CardContent } from './card-DURq3ElK.js';
9
- import { E as EmptyState } from './empty-state-DY_oe0k6.js';
10
- import { I as Input } from './input-XH4r1Pt1.js';
11
- import { L as Label } from './label-D8ykjn5J.js';
12
- import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
13
- import { u as useAdminQuery } from './use-admin-query-CFl5GUg_.js';
14
- import useDebounced from './useDebounced-Dxncpg6z.js';
15
- import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
16
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
17
- import { b as formatTimestamp, f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from './internal-CvMZCVd6.js';
18
- import { r as recordShard } from './shard-history-DyebH1R5.js';
19
- import { jsxDEV } from 'react/jsx-dev-runtime';
20
-
21
- const RUN_MIGRATION = adminRef(ADMIN_FUNCTIONS.runMigration);
22
- const MigrationsPanel = ({
23
- initialShardKey
24
- }) => {
25
- const client = useLunora();
26
- const t = useT();
27
- const [shardKey, setShardKey] = useState(initialShardKey ?? "");
28
- const [migrationId, setMigrationId] = useState("");
29
- const [direction, setDirection] = useState("up");
30
- const [dryRun, setDryRun] = useState(true);
31
- const [running, setRunning] = useState(false);
32
- const [runResult, setRunResult] = useState(null);
33
- const [runError, setRunError] = useState(null);
34
- const debouncedShard = useDebounced(shardKey.trim(), 400);
35
- const shardSettled = shardKey.trim() === debouncedShard;
36
- const statusQuery = useAdminQuery(ADMIN_FUNCTIONS.migrationStatus, {}, {
37
- live: true,
38
- shardKey: debouncedShard
39
- });
40
- const rows = statusQuery.data?.migrations ?? null;
41
- const statusError = statusQuery.error;
42
- const {
43
- liveError
44
- } = statusQuery;
45
- useEffect(() => {
46
- if (statusQuery.data !== void 0) {
47
- recordShard(debouncedShard);
48
- }
49
- }, [statusQuery.data, debouncedShard]);
50
- const run = async () => {
51
- const id = migrationId.trim();
52
- if (id === "") {
53
- setRunError(t("Enter a migration id"));
54
- setRunResult(null);
55
- return;
56
- }
57
- setRunning(true);
58
- setRunError(null);
59
- try {
60
- const result = await client.query(RUN_MIGRATION, {
61
- direction,
62
- dryRun,
63
- id
64
- }, callOptions(shardKey));
65
- setRunResult(result);
66
- statusQuery.refetch();
67
- } catch (error) {
68
- setRunResult(null);
69
- setRunError(errorMessage(error));
70
- } finally {
71
- setRunning(false);
72
- }
73
- };
74
- const runMigration = () => {
75
- fireAndForget(run());
76
- };
77
- const onIdChange = (event) => {
78
- setMigrationId(event.target.value);
79
- };
80
- const onDirectionChange = (event_0) => {
81
- setDirection(event_0.target.value === "down" ? "down" : "up");
82
- };
83
- const onDryRunChange = (event_1) => {
84
- setDryRun(event_1.target.checked);
85
- };
86
- return /* @__PURE__ */ jsxDEV("div", {
87
- className: "flex flex-col gap-3",
88
- "data-testid": "lunora-migrations",
89
- children: [/* @__PURE__ */ jsxDEV("div", {
90
- className: "flex flex-wrap items-center gap-2",
91
- children: [/* @__PURE__ */ jsxDEV(ShardInput, {
92
- onChange: setShardKey,
93
- testId: "mg-shard-input",
94
- value: shardKey
95
- }, void 0, false), /* @__PURE__ */ jsxDEV(LiveError, {
96
- message: liveError,
97
- prefix: "mg"
98
- }, void 0, false)]
99
- }, void 0, true), statusError !== null && /* @__PURE__ */ jsxDEV("p", {
100
- className: "text-sm text-destructive",
101
- "data-testid": "mg-status-error",
102
- role: "alert",
103
- children: statusError
104
- }, void 0, false), rows !== null && rows.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
105
- description: t("Data migrations you run against this shard will be tracked here."),
106
- icon: /* @__PURE__ */ jsxDEV("svg", {
107
- "aria-hidden": "true",
108
- fill: "none",
109
- stroke: "currentColor",
110
- strokeLinecap: "round",
111
- strokeLinejoin: "round",
112
- strokeWidth: 1.6,
113
- viewBox: "0 0 24 24",
114
- children: /* @__PURE__ */ jsxDEV("path", {
115
- d: "M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"
116
- }, void 0, false)
117
- }, void 0, false),
118
- testId: "mg-empty",
119
- title: t("No migrations have run on this shard.")
120
- }, void 0, false), rows !== null && rows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
121
- className: "overflow-hidden py-0",
122
- children: /* @__PURE__ */ jsxDEV(CardContent, {
123
- className: "px-0",
124
- children: /* @__PURE__ */ jsxDEV(Table, {
125
- "data-testid": "mg-table",
126
- children: [/* @__PURE__ */ jsxDEV(TableHeader, {
127
- children: /* @__PURE__ */ jsxDEV(TableRow, {
128
- children: [/* @__PURE__ */ jsxDEV(TableHead, {
129
- children: t("id")
130
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
131
- children: t("direction")
132
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
133
- children: t("status")
134
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
135
- children: t("processed")
136
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
137
- children: t("changed")
138
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
139
- children: t("updated")
140
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
141
- children: t("error")
142
- }, void 0, false)]
143
- }, void 0, true)
144
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
145
- children: rows.map((row) => /* @__PURE__ */ jsxDEV(TableRow, {
146
- "data-testid": `mg-row-${row.id}`,
147
- children: [/* @__PURE__ */ jsxDEV(TableCell, {
148
- children: row.id
149
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
150
- children: row.direction
151
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
152
- children: /* @__PURE__ */ jsxDEV(Badge, {
153
- variant: "secondary",
154
- children: row.status
155
- }, void 0, false)
156
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
157
- children: row.processed
158
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
159
- children: row.changed
160
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
161
- children: formatTimestamp(row.updatedAt)
162
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
163
- children: row.error ?? ""
164
- }, void 0, false)]
165
- }, row.id, true))
166
- }, void 0, false)]
167
- }, void 0, true)
168
- }, void 0, false)
169
- }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
170
- className: "flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",
171
- children: [/* @__PURE__ */ jsxDEV(Label, {
172
- children: t("Run migration")
173
- }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
174
- className: "flex flex-wrap items-center gap-2",
175
- children: [/* @__PURE__ */ jsxDEV(Input, {
176
- "aria-label": t("Migration id"),
177
- className: "w-auto",
178
- "data-testid": "mg-id-input",
179
- onChange: onIdChange,
180
- placeholder: t("migration id"),
181
- value: migrationId
182
- }, void 0, false), /* @__PURE__ */ jsxDEV("select", {
183
- "aria-label": t("Direction"),
184
- className: "flex h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
185
- "data-testid": "mg-direction",
186
- onChange: onDirectionChange,
187
- value: direction,
188
- children: [/* @__PURE__ */ jsxDEV("option", {
189
- value: "up",
190
- children: t("up")
191
- }, void 0, false), /* @__PURE__ */ jsxDEV("option", {
192
- value: "down",
193
- children: t("down")
194
- }, void 0, false)]
195
- }, void 0, true), /* @__PURE__ */ jsxDEV(Label, {
196
- className: "flex items-center gap-1.5",
197
- htmlFor: "mg-dry-run",
198
- children: [/* @__PURE__ */ jsxDEV("input", {
199
- checked: dryRun,
200
- className: "size-4 accent-primary",
201
- "data-testid": "mg-dry-run",
202
- id: "mg-dry-run",
203
- onChange: onDryRunChange,
204
- type: "checkbox"
205
- }, void 0, false), t("Dry run")]
206
- }, void 0, true), dryRun ? /* @__PURE__ */ jsxDEV(Button, {
207
- "data-testid": "mg-run",
208
- disabled: running || !shardSettled,
209
- onClick: runMigration,
210
- size: "sm",
211
- type: "button",
212
- children: running ? t("Running…") : t("Run")
213
- }, void 0, false) : (
214
- // A real (non-dry-run) migration mutates rows — guard it.
215
- /* @__PURE__ */ jsxDEV(ConfirmButton, {
216
- confirmLabel: running ? t("Running…") : t("Run migration?"),
217
- disabled: running || !shardSettled,
218
- onConfirm: runMigration,
219
- testId: "mg-run",
220
- children: t("Run")
221
- }, void 0, false)
222
- )]
223
- }, void 0, true)]
224
- }, void 0, true), runError !== null && /* @__PURE__ */ jsxDEV("pre", {
225
- className: "text-sm text-destructive whitespace-pre-wrap",
226
- "data-testid": "mg-run-error",
227
- role: "alert",
228
- children: runError
229
- }, void 0, false), runResult !== null && /* @__PURE__ */ jsxDEV("p", {
230
- className: "text-sm text-muted-foreground",
231
- "data-testid": "mg-run-result",
232
- children: [runResult.dryRun ? t("Dry run: ") : "", t("{status} — processed", {
233
- status: runResult.status
234
- }), runResult.processed, t(", changed"), runResult.changed]
235
- }, void 0, true)]
236
- }, void 0, true);
237
- };
238
-
239
- export { MigrationsPanel };
@@ -1,191 +0,0 @@
1
- import { c } from 'react/compiler-runtime';
2
- import { useLunora } from '@lunora/react';
3
- import { E as EmptyState } from './empty-state-DY_oe0k6.js';
4
- import { u as useAdminSpec, S as Skeleton, R as ReferenceView } from './reference-view-DVyk5kXj.js';
5
- import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
6
- import { jsxDEV } from 'react/jsx-dev-runtime';
7
-
8
- const argsParameterOf = (method) => (method.params ?? []).find((parameter) => parameter.name === "args") ?? (method.params ?? [])[0];
9
- const namespaceOf = (method) => method["x-tags"]?.[0]?.name ?? (method.name.includes(":") ? method.name.slice(0, method.name.indexOf(":")) : "");
10
- const toOperation = (method) => {
11
- const argsSchema = argsParameterOf(method)?.schema;
12
- return {
13
- argsSchema,
14
- description: method.description,
15
- functionPath: method.name,
16
- httpPath: "/_lunora/rpc",
17
- key: method.name,
18
- kind: method["x-lunora-function-kind"],
19
- method: "POST",
20
- operationId: method.name,
21
- requestSchema: argsSchema,
22
- responses: [{
23
- description: method.result?.name,
24
- schema: method.result?.schema,
25
- status: "200"
26
- }],
27
- summary: method.summary ?? method.name,
28
- tags: [namespaceOf(method)],
29
- title: method.summary ?? method.name
30
- };
31
- };
32
- const parseOpenRpc = (raw) => {
33
- const document = raw ?? {};
34
- const operations = (document.methods ?? []).map((method) => toOperation(method));
35
- const byNamespace = /* @__PURE__ */ new Map();
36
- for (const operation of operations) {
37
- const namespace = operation.tags[0] ?? "";
38
- const bucket = byNamespace.get(namespace) ?? [];
39
- bucket.push(operation);
40
- byNamespace.set(namespace, bucket);
41
- }
42
- const groups = [...byNamespace.entries()].map(([name, members]) => {
43
- return {
44
- name,
45
- operations: members.toSorted((a, b) => a.operationId.localeCompare(b.operationId))
46
- };
47
- }).toSorted((a, b) => a.name.localeCompare(b.name));
48
- return {
49
- groups,
50
- operationByKey: new Map(operations.map((operation) => [operation.key, operation])),
51
- title: document.info?.title ?? "API reference",
52
- version: document.info?.version
53
- };
54
- };
55
-
56
- const isEmptyDocument = (document) => document.methods === void 0 || document.methods.length === 0;
57
- const classifyDocument = (spec) => {
58
- const document = spec;
59
- return isEmptyDocument(document) ? {
60
- kind: "empty"
61
- } : {
62
- kind: "ready",
63
- spec: document
64
- };
65
- };
66
- const OpenRpcReferencePanel = (t0) => {
67
- const $ = c(23);
68
- const {
69
- spec: inlineSpec
70
- } = t0;
71
- const t = useT();
72
- const client = useLunora();
73
- let t1;
74
- if ($[0] !== client) {
75
- t1 = () => client.fetchOpenRpc();
76
- $[0] = client;
77
- $[1] = t1;
78
- } else {
79
- t1 = $[1];
80
- }
81
- const fetchOpenRpc = t1;
82
- const state = useAdminSpec(inlineSpec, fetchOpenRpc, classifyDocument);
83
- let t2;
84
- if ($[2] !== state.kind || $[3] !== state.spec) {
85
- t2 = state.kind === "ready" ? parseOpenRpc(state.spec) : void 0;
86
- $[2] = state.kind;
87
- $[3] = state.spec;
88
- $[4] = t2;
89
- } else {
90
- t2 = $[4];
91
- }
92
- const model = t2;
93
- if (state.kind === "loading") {
94
- let t32;
95
- if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
96
- t32 = /* @__PURE__ */ jsxDEV("div", {
97
- className: "flex flex-col gap-4",
98
- "data-testid": "openrpc-reference-loading",
99
- children: [/* @__PURE__ */ jsxDEV(Skeleton, {
100
- className: "h-8 w-48"
101
- }, void 0, false), /* @__PURE__ */ jsxDEV(Skeleton, {
102
- className: "h-64 w-full"
103
- }, void 0, false)]
104
- }, void 0, true);
105
- $[5] = t32;
106
- } else {
107
- t32 = $[5];
108
- }
109
- return t32;
110
- }
111
- if (state.kind === "error") {
112
- let t32;
113
- if ($[6] !== state.message || $[7] !== t) {
114
- t32 = t("Couldn't load the OpenRPC spec: {message}", {
115
- message: state.message
116
- });
117
- $[6] = state.message;
118
- $[7] = t;
119
- $[8] = t32;
120
- } else {
121
- t32 = $[8];
122
- }
123
- let t4;
124
- if ($[9] !== t) {
125
- t4 = t("API reference unavailable");
126
- $[9] = t;
127
- $[10] = t4;
128
- } else {
129
- t4 = $[10];
130
- }
131
- let t5;
132
- if ($[11] !== t32 || $[12] !== t4) {
133
- t5 = /* @__PURE__ */ jsxDEV(EmptyState, {
134
- description: t32,
135
- testId: "openrpc-reference-error",
136
- title: t4
137
- }, void 0, false);
138
- $[11] = t32;
139
- $[12] = t4;
140
- $[13] = t5;
141
- } else {
142
- t5 = $[13];
143
- }
144
- return t5;
145
- }
146
- if (state.kind === "empty" || model === void 0) {
147
- let t32;
148
- if ($[14] !== t) {
149
- t32 = t("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here.");
150
- $[14] = t;
151
- $[15] = t32;
152
- } else {
153
- t32 = $[15];
154
- }
155
- let t4;
156
- if ($[16] !== t) {
157
- t4 = t("No OpenRPC spec configured");
158
- $[16] = t;
159
- $[17] = t4;
160
- } else {
161
- t4 = $[17];
162
- }
163
- let t5;
164
- if ($[18] !== t32 || $[19] !== t4) {
165
- t5 = /* @__PURE__ */ jsxDEV(EmptyState, {
166
- description: t32,
167
- testId: "openrpc-reference-empty",
168
- title: t4
169
- }, void 0, false);
170
- $[18] = t32;
171
- $[19] = t4;
172
- $[20] = t5;
173
- } else {
174
- t5 = $[20];
175
- }
176
- return t5;
177
- }
178
- let t3;
179
- if ($[21] !== model) {
180
- t3 = /* @__PURE__ */ jsxDEV(ReferenceView, {
181
- model
182
- }, void 0, false);
183
- $[21] = model;
184
- $[22] = t3;
185
- } else {
186
- t3 = $[22];
187
- }
188
- return t3;
189
- };
190
-
191
- export { OpenRpcReferencePanel as default };
@@ -1,252 +0,0 @@
1
- import { useLunora } from '@lunora/react';
2
- import { useState, useCallback, useEffect } from 'react';
3
- import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
4
- import { B as Badge } from './badge-B2PKA1-5.js';
5
- import { B as Button } from './button-BhsN2uZH.js';
6
- import { I as Input } from './input-XH4r1Pt1.js';
7
- import { L as Label } from './label-D8ykjn5J.js';
8
- import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
9
- import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
10
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
11
- import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from './internal-CvMZCVd6.js';
12
- import { jsxDEV } from 'react/jsx-dev-runtime';
13
-
14
- const GET_BOOKMARK = adminRef(ADMIN_FUNCTIONS.getPitrBookmark);
15
- const PITR_RESTORE = adminRef(ADMIN_FUNCTIONS.pitrRestore);
16
- const PitrPanel = ({
17
- initialShardKey
18
- }) => {
19
- const client = useLunora();
20
- const t = useT();
21
- const shardKey = initialShardKey ?? "";
22
- const [current, setCurrent] = useState(null);
23
- const [time, setTime] = useState("");
24
- const [preview, setPreview] = useState(null);
25
- const [bookmark, setBookmark] = useState("");
26
- const [restart, setRestart] = useState(false);
27
- const [restored, setRestored] = useState(null);
28
- const [error, setError] = useState(null);
29
- const [busy, setBusy] = useState(false);
30
- const refresh = useCallback(async () => {
31
- setBusy(true);
32
- setError(null);
33
- try {
34
- const result = await client.query(GET_BOOKMARK, {}, callOptions(shardKey));
35
- setCurrent(result.current);
36
- } catch (error_) {
37
- setError(errorMessage(error_));
38
- } finally {
39
- setBusy(false);
40
- }
41
- }, [client, shardKey]);
42
- useEffect(() => {
43
- fireAndForget(refresh());
44
- }, [refresh]);
45
- useAutoRefresh(() => {
46
- fireAndForget((async () => {
47
- try {
48
- const result_0 = await client.query(GET_BOOKMARK, {}, callOptions(shardKey));
49
- setCurrent(result_0.current);
50
- } catch {
51
- }
52
- })());
53
- }, true);
54
- const onTimeChange = (event) => {
55
- setTime(event.target.value);
56
- };
57
- const onBookmarkChange = (event_0) => {
58
- setBookmark(event_0.target.value);
59
- };
60
- const onRestartChange = (event_1) => {
61
- setRestart(event_1.target.checked);
62
- };
63
- const onPreview = () => {
64
- if (time.trim() === "") {
65
- return;
66
- }
67
- fireAndForget((async () => {
68
- setBusy(true);
69
- setError(null);
70
- try {
71
- const result_1 = await client.query(GET_BOOKMARK, {
72
- time: time.trim()
73
- }, callOptions(shardKey));
74
- setPreview(result_1.forTime ?? null);
75
- setCurrent(result_1.current);
76
- } catch (error__0) {
77
- setPreview(null);
78
- setError(errorMessage(error__0));
79
- } finally {
80
- setBusy(false);
81
- }
82
- })());
83
- };
84
- const runRestore = (args) => {
85
- fireAndForget((async () => {
86
- setBusy(true);
87
- setError(null);
88
- try {
89
- const result_2 = await client.mutation(PITR_RESTORE, args, callOptions(shardKey));
90
- setRestored(result_2);
91
- await refresh();
92
- } catch (error__1) {
93
- setError(errorMessage(error__1));
94
- } finally {
95
- setBusy(false);
96
- }
97
- })());
98
- };
99
- const canRestore = bookmark.trim() !== "" || time.trim() !== "";
100
- const onConfirmRestore = () => {
101
- const args_0 = restart ? {
102
- restart: true
103
- } : {};
104
- if (bookmark.trim() === "") {
105
- args_0.time = time.trim();
106
- } else {
107
- args_0.bookmark = bookmark.trim();
108
- }
109
- runRestore(args_0);
110
- };
111
- const onUndo = () => {
112
- if (restored === null) {
113
- return;
114
- }
115
- runRestore(restart ? {
116
- bookmark: restored.undoBookmark,
117
- restart: true
118
- } : {
119
- bookmark: restored.undoBookmark
120
- });
121
- };
122
- return /* @__PURE__ */ jsxDEV("div", {
123
- className: "flex flex-col gap-4",
124
- "data-testid": "lunora-pitr",
125
- children: [/* @__PURE__ */ jsxDEV("div", {
126
- className: "flex flex-wrap items-center gap-3",
127
- children: /* @__PURE__ */ jsxDEV("span", {
128
- className: "text-xs text-muted-foreground",
129
- children: [t("Shard"), ": ", /* @__PURE__ */ jsxDEV("span", {
130
- className: "font-mono",
131
- children: shardKey === "" ? t("root") : shardKey
132
- }, void 0, false)]
133
- }, void 0, true)
134
- }, void 0, false), /* @__PURE__ */ jsxDEV("p", {
135
- className: "text-sm text-muted-foreground",
136
- "data-testid": "pitr-note",
137
- children: t("In-place recovery to any moment in the last 30 days. For older or portable recovery, use the snapshot backup tier.")
138
- }, void 0, false), error !== null && /* @__PURE__ */ jsxDEV("p", {
139
- className: "text-sm text-destructive",
140
- "data-testid": "pitr-error",
141
- role: "alert",
142
- children: error
143
- }, void 0, false), /* @__PURE__ */ jsxDEV("section", {
144
- className: "rounded-xl border border-border bg-card p-3 shadow-xs",
145
- children: [/* @__PURE__ */ jsxDEV("h3", {
146
- className: "mb-2 text-sm font-semibold",
147
- children: t("Current bookmark")
148
- }, void 0, false), /* @__PURE__ */ jsxDEV("p", {
149
- className: "font-mono text-xs break-all text-muted-foreground",
150
- "data-testid": "pitr-current",
151
- children: current ?? /* @__PURE__ */ jsxDEV("span", {
152
- className: "text-muted-foreground",
153
- children: "—"
154
- }, void 0, false)
155
- }, void 0, false)]
156
- }, void 0, true), /* @__PURE__ */ jsxDEV("section", {
157
- className: "flex flex-col gap-3 rounded-xl border border-border bg-card p-3 shadow-xs",
158
- children: [/* @__PURE__ */ jsxDEV("h3", {
159
- className: "text-sm font-semibold",
160
- children: t("Restore")
161
- }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
162
- className: "flex flex-col gap-1",
163
- children: [/* @__PURE__ */ jsxDEV(Label, {
164
- htmlFor: "pitr-time",
165
- children: t("Time (ISO or epoch-ms, last 30 days)")
166
- }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
167
- className: "flex items-center gap-2",
168
- children: [/* @__PURE__ */ jsxDEV(Input, {
169
- "data-testid": "pitr-time",
170
- id: "pitr-time",
171
- onChange: onTimeChange,
172
- placeholder: "2026-06-01T00:00:00.000Z",
173
- value: time
174
- }, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
175
- "data-testid": "pitr-preview",
176
- disabled: busy || time.trim() === "",
177
- onClick: onPreview,
178
- size: "sm",
179
- type: "button",
180
- variant: "outline",
181
- children: t("Preview")
182
- }, void 0, false)]
183
- }, void 0, true), preview !== null && /* @__PURE__ */ jsxDEV("p", {
184
- className: "font-mono text-xs break-all text-muted-foreground",
185
- "data-testid": "pitr-preview-bookmark",
186
- children: [t("Bookmark for that time"), ": ", preview]
187
- }, void 0, true)]
188
- }, void 0, true), /* @__PURE__ */ jsxDEV("div", {
189
- className: "flex flex-col gap-1",
190
- children: [/* @__PURE__ */ jsxDEV(Label, {
191
- htmlFor: "pitr-bookmark",
192
- children: t("Or an explicit bookmark (wins over time)")
193
- }, void 0, false), /* @__PURE__ */ jsxDEV(Input, {
194
- "data-testid": "pitr-bookmark",
195
- id: "pitr-bookmark",
196
- onChange: onBookmarkChange,
197
- placeholder: t("bookmark string"),
198
- value: bookmark
199
- }, void 0, false)]
200
- }, void 0, true), /* @__PURE__ */ jsxDEV(Label, {
201
- className: "flex items-center gap-2 text-xs font-normal text-muted-foreground",
202
- htmlFor: "pitr-restart",
203
- children: [/* @__PURE__ */ jsxDEV("input", {
204
- checked: restart,
205
- className: "size-4 accent-primary",
206
- "data-testid": "pitr-restart",
207
- id: "pitr-restart",
208
- onChange: onRestartChange,
209
- type: "checkbox"
210
- }, void 0, false), t("Restart the shard now so recovery applies immediately")]
211
- }, void 0, true), /* @__PURE__ */ jsxDEV("div", {
212
- children: /* @__PURE__ */ jsxDEV(ConfirmButton, {
213
- confirmLabel: t("Confirm restore"),
214
- disabled: busy || !canRestore,
215
- onConfirm: onConfirmRestore,
216
- testId: "pitr-restore",
217
- children: t("Restore")
218
- }, void 0, false)
219
- }, void 0, false)]
220
- }, void 0, true), restored !== null && /* @__PURE__ */ jsxDEV("section", {
221
- className: "flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",
222
- "data-testid": "pitr-result",
223
- children: [/* @__PURE__ */ jsxDEV("div", {
224
- className: "flex items-center gap-2",
225
- children: [/* @__PURE__ */ jsxDEV("h3", {
226
- className: "text-sm font-semibold",
227
- children: t("Restore armed")
228
- }, void 0, false), /* @__PURE__ */ jsxDEV(Badge, {
229
- variant: restored.restarted ? "destructive" : "secondary",
230
- children: restored.restarted ? t("restarted now") : t("on next restart")
231
- }, void 0, false)]
232
- }, void 0, true), /* @__PURE__ */ jsxDEV("p", {
233
- className: "font-mono text-xs break-all text-muted-foreground",
234
- children: [t("Restored to"), ": ", restored.restoredTo]
235
- }, void 0, true), /* @__PURE__ */ jsxDEV("p", {
236
- className: "font-mono text-xs break-all text-muted-foreground",
237
- "data-testid": "pitr-undo-bookmark",
238
- children: [t("Undo bookmark"), ": ", restored.undoBookmark]
239
- }, void 0, true), /* @__PURE__ */ jsxDEV("div", {
240
- children: /* @__PURE__ */ jsxDEV(ConfirmButton, {
241
- confirmLabel: t("Confirm undo"),
242
- disabled: busy,
243
- onConfirm: onUndo,
244
- testId: "pitr-undo",
245
- children: t("Undo restore")
246
- }, void 0, false)
247
- }, void 0, false)]
248
- }, void 0, true)]
249
- }, void 0, true);
250
- };
251
-
252
- export { PitrPanel };
@@ -1,3 +0,0 @@
1
- const STUDIO_ROOT_CLASS = "lunora-studio-root";
2
-
3
- export { STUDIO_ROOT_CLASS as default };