@lunora/studio 0.0.0 → 1.0.0-alpha.1

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 (81) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +123 -9
  3. package/__assets__/package-og.svg +14 -0
  4. package/dist/index.d.ts +1402 -0
  5. package/dist/index.js +41 -0
  6. package/dist/mount.d.ts +21 -0
  7. package/dist/mount.js +26 -0
  8. package/dist/packem_shared/ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js +45 -0
  9. package/dist/packem_shared/ApiDocsPanel-DpRjJhG5.js +842 -0
  10. package/dist/packem_shared/ApiReferencePanel-DMIUp-kK.js +229 -0
  11. package/dist/packem_shared/ApiTab-DURGU15e.js +251 -0
  12. package/dist/packem_shared/AuditPanel-BC59Nhst.js +212 -0
  13. package/dist/packem_shared/CommandPalette-Dx_CoB9i.js +373 -0
  14. package/dist/packem_shared/ConfirmButton-WQVUoGFb.js +59 -0
  15. package/dist/packem_shared/ConnectionBadge-Bxagrip8.js +111 -0
  16. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +50 -0
  17. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +89 -0
  18. package/dist/packem_shared/DataBrowser-Coz6jJE6.js +4542 -0
  19. package/dist/packem_shared/DataFilters-FNquMaiu.js +249 -0
  20. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +66 -0
  21. package/dist/packem_shared/ExportImportPanel-WO34fJxy.js +193 -0
  22. package/dist/packem_shared/FileBrowser-Zcr-Qgxo.js +2932 -0
  23. package/dist/packem_shared/FunctionRunner-j0Rd5m9t.js +343 -0
  24. package/dist/packem_shared/FunctionStatsPanel-DboBl-XL.js +432 -0
  25. package/dist/packem_shared/GlobalDataBrowser-9MhPEfgN.js +318 -0
  26. package/dist/packem_shared/HealthPanel-DOIgbUtx.js +640 -0
  27. package/dist/packem_shared/HomePanel-bdOCNA-p.js +1273 -0
  28. package/dist/packem_shared/InsightsPanel-DaZPnSgt.js +423 -0
  29. package/dist/packem_shared/LogsPanel-CWdqAGpQ.js +839 -0
  30. package/dist/packem_shared/MailPanel-D_EGtDnS.js +447 -0
  31. package/dist/packem_shared/MetricsPanel-E4Gv6wTO.js +1625 -0
  32. package/dist/packem_shared/MigrationsPanel-DQdPY9io.js +246 -0
  33. package/dist/packem_shared/OpenRpcReferencePanel-j2p3HB0s.js +191 -0
  34. package/dist/packem_shared/PitrPanel-BbBkQR6t.js +252 -0
  35. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +3 -0
  36. package/dist/packem_shared/ScheduledJobs-Ok1CYYwI.js +159 -0
  37. package/dist/packem_shared/SchemaViewer-D8XGnp-X.js +2512 -0
  38. package/dist/packem_shared/SecurityAdvisorPanel-Cdm2IxLW.js +79 -0
  39. package/dist/packem_shared/SettingsPanel-D3WF2mBU.js +176 -0
  40. package/dist/packem_shared/ShardInput-DNCsT1KW.js +107 -0
  41. package/dist/packem_shared/SqlEditorPanel-BuQ7f2Hs.js +13 -0
  42. package/dist/packem_shared/Studio-D36od9Oz.js +33 -0
  43. package/dist/packem_shared/StudioApp-dvywkJ8I.js +383 -0
  44. package/dist/packem_shared/StudioI18nProvider-Dcajsznk.js +48 -0
  45. package/dist/packem_shared/TableEditor-DIVDk3vT.js +371 -0
  46. package/dist/packem_shared/advisor-view-DBlzJi6C.js +159 -0
  47. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +108 -0
  48. package/dist/packem_shared/app.d-CCmwDEVs.d.ts +300 -0
  49. package/dist/packem_shared/badge-B2PKA1-5.js +49 -0
  50. package/dist/packem_shared/bar-chart-CzJAgqkp.js +3245 -0
  51. package/dist/packem_shared/button-BhsN2uZH.js +49 -0
  52. package/dist/packem_shared/card-DURq3ElK.js +175 -0
  53. package/dist/packem_shared/cf-links-BZfRdxSE.js +8 -0
  54. package/dist/packem_shared/checkbox-UNkzAxl-.js +63 -0
  55. package/dist/packem_shared/createStudioI18n-CgvlmDkN.js +27 -0
  56. package/dist/packem_shared/data-grid-CCh2Couo.js +183 -0
  57. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +280 -0
  58. package/dist/packem_shared/empty-state-DY_oe0k6.js +98 -0
  59. package/dist/packem_shared/grid-features-DTjG6Sex.js +840 -0
  60. package/dist/packem_shared/input-XH4r1Pt1.js +53 -0
  61. package/dist/packem_shared/internal-BBZYexre.js +68 -0
  62. package/dist/packem_shared/label-D8ykjn5J.js +46 -0
  63. package/dist/packem_shared/live-status-bPff1O7Y.js +44 -0
  64. package/dist/packem_shared/reference-view-BCKIoai7.js +2180 -0
  65. package/dist/packem_shared/shard-history-DyebH1R5.js +38 -0
  66. package/dist/packem_shared/sparkline-10dG-_f0.js +93 -0
  67. package/dist/packem_shared/sql-editor-panel-CW2y2x9h.js +2562 -0
  68. package/dist/packem_shared/storage-tier-CL98eOvn.js +85 -0
  69. package/dist/packem_shared/studio-BDVd7rIV.js +10303 -0
  70. package/dist/packem_shared/table-_RzNvy3R.js +246 -0
  71. package/dist/packem_shared/table-list-sidebar-aZHLq70w.js +832 -0
  72. package/dist/packem_shared/textarea-D3gaCU_-.js +46 -0
  73. package/dist/packem_shared/use-live-admin-D1h1Fzsd.js +73 -0
  74. package/dist/packem_shared/use-live-shard-seed-B74RYcOy.js +76 -0
  75. package/dist/packem_shared/useDebounced-Dxncpg6z.js +32 -0
  76. package/dist/packem_shared/utils-B05Dmz_H.js +8 -0
  77. package/dist/packem_shared/virtual-rect-CVMUskSm.js +10 -0
  78. package/dist/standalone/studio.js +356 -0
  79. package/dist/styles.css +2 -0
  80. package/package.json +77 -17
  81. package/src/theme.css +59 -0
@@ -0,0 +1,38 @@
1
+ const STORAGE_KEY = "lunora-studio-recent-shards";
2
+ const MAX_RECENTS = 10;
3
+ const store = () => {
4
+ try {
5
+ return globalThis.sessionStorage;
6
+ } catch {
7
+ return void 0;
8
+ }
9
+ };
10
+ const loadRecentShards = () => {
11
+ try {
12
+ const raw = store()?.getItem(STORAGE_KEY);
13
+ if (raw === null || raw === void 0) {
14
+ return [];
15
+ }
16
+ const parsed = JSON.parse(raw);
17
+ return Array.isArray(parsed) ? parsed.filter((entry) => typeof entry === "string") : [];
18
+ } catch {
19
+ return [];
20
+ }
21
+ };
22
+ const recordShard = (shardKey) => {
23
+ const trimmed = shardKey.trim();
24
+ if (trimmed === "") {
25
+ return loadRecentShards();
26
+ }
27
+ const next = [trimmed, ...loadRecentShards().filter((entry) => entry !== trimmed)].slice(0, MAX_RECENTS);
28
+ const storage = store();
29
+ if (storage !== void 0) {
30
+ try {
31
+ storage.setItem(STORAGE_KEY, JSON.stringify(next));
32
+ } catch {
33
+ }
34
+ }
35
+ return next;
36
+ };
37
+
38
+ export { loadRecentShards as l, recordShard as r };
@@ -0,0 +1,93 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { B as Bar, E as EvilBarChart } from './bar-chart-CzJAgqkp.js';
3
+ import { c as cn } from './utils-B05Dmz_H.js';
4
+ import { jsxDEV } from 'react/jsx-dev-runtime';
5
+
6
+ const SPARK_CONFIG = {
7
+ value: {
8
+ colors: {
9
+ dark: ["var(--foreground)"],
10
+ light: ["var(--foreground)"]
11
+ },
12
+ label: ""
13
+ }
14
+ };
15
+ const Sparkline = (t0) => {
16
+ const $ = c(12);
17
+ const {
18
+ ariaLabel,
19
+ className,
20
+ series,
21
+ testId
22
+ } = t0;
23
+ if (series.length < 2) {
24
+ return null;
25
+ }
26
+ let t1;
27
+ if ($[0] !== series) {
28
+ t1 = series.slice(-40).map(_temp);
29
+ $[0] = series;
30
+ $[1] = t1;
31
+ } else {
32
+ t1 = $[1];
33
+ }
34
+ const rows = t1;
35
+ let t2;
36
+ if ($[2] !== className) {
37
+ t2 = cn("h-6 w-[120px]", className);
38
+ $[2] = className;
39
+ $[3] = t2;
40
+ } else {
41
+ t2 = $[3];
42
+ }
43
+ let t3;
44
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
45
+ t3 = /* @__PURE__ */ jsxDEV(Bar, {
46
+ dataKey: "value"
47
+ }, void 0, false);
48
+ $[4] = t3;
49
+ } else {
50
+ t3 = $[4];
51
+ }
52
+ let t4;
53
+ if ($[5] !== rows) {
54
+ t4 = /* @__PURE__ */ jsxDEV(EvilBarChart, {
55
+ animationType: "none",
56
+ barCategoryGap: 1,
57
+ className: "h-full w-full",
58
+ config: SPARK_CONFIG,
59
+ data: rows,
60
+ children: t3
61
+ }, void 0, false);
62
+ $[5] = rows;
63
+ $[6] = t4;
64
+ } else {
65
+ t4 = $[6];
66
+ }
67
+ let t5;
68
+ if ($[7] !== ariaLabel || $[8] !== t2 || $[9] !== t4 || $[10] !== testId) {
69
+ t5 = /* @__PURE__ */ jsxDEV("div", {
70
+ "aria-label": ariaLabel,
71
+ className: t2,
72
+ "data-testid": testId,
73
+ role: "img",
74
+ children: t4
75
+ }, void 0, false);
76
+ $[7] = ariaLabel;
77
+ $[8] = t2;
78
+ $[9] = t4;
79
+ $[10] = testId;
80
+ $[11] = t5;
81
+ } else {
82
+ t5 = $[11];
83
+ }
84
+ return t5;
85
+ };
86
+ function _temp(value, index) {
87
+ return {
88
+ index,
89
+ value
90
+ };
91
+ }
92
+
93
+ export { Sparkline as S };