@lunora/studio 0.0.0 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +105 -0
- package/README.md +123 -9
- package/__assets__/package-og.svg +14 -0
- package/dist/index.d.ts +1403 -0
- package/dist/index.js +41 -0
- package/dist/mount.d.ts +21 -0
- package/dist/mount.js +26 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +46 -0
- package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +842 -0
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +229 -0
- package/dist/packem_shared/ApiTab-rwttyQ1-.js +251 -0
- package/dist/packem_shared/AuditPanel-D9Eh7j7E.js +200 -0
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +373 -0
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +59 -0
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +111 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +50 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +89 -0
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +27 -0
- package/dist/packem_shared/DataBrowser-CyckZRwj.js +4480 -0
- package/dist/packem_shared/DataFilters-FNquMaiu.js +249 -0
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +66 -0
- package/dist/packem_shared/ExportImportPanel-BGJqFK9X.js +197 -0
- package/dist/packem_shared/FileBrowser-0pCpdKPE.js +2932 -0
- package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +343 -0
- package/dist/packem_shared/FunctionStatsPanel-CXynSuqT.js +375 -0
- package/dist/packem_shared/GlobalDataBrowser-DAxzB-Br.js +289 -0
- package/dist/packem_shared/HealthPanel-CyLs7qZm.js +648 -0
- package/dist/packem_shared/HomePanel-BOkFRbuj.js +1334 -0
- package/dist/packem_shared/InsightsPanel-CvXMoZuv.js +461 -0
- package/dist/packem_shared/LogsPanel-BrUstOk6.js +827 -0
- package/dist/packem_shared/MailPanel-GnnrNqL6.js +440 -0
- package/dist/packem_shared/MetricsPanel-BN_uUU-_.js +1611 -0
- package/dist/packem_shared/MigrationsPanel-DaZuUHje.js +239 -0
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +191 -0
- package/dist/packem_shared/PitrPanel-LJGNP_IX.js +252 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +3 -0
- package/dist/packem_shared/ScheduledJobs-UmVaMbJy.js +262 -0
- package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +2512 -0
- package/dist/packem_shared/SecurityAdvisorPanel-DTmjUNqt.js +92 -0
- package/dist/packem_shared/SettingsPanel-C2wDK-8F.js +390 -0
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +107 -0
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +13 -0
- package/dist/packem_shared/Studio-DpgYe4qt.js +33 -0
- package/dist/packem_shared/StudioApp-C7aaizqc.js +657 -0
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +48 -0
- package/dist/packem_shared/TableEditor-DzK3Z6rL.js +371 -0
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +159 -0
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +108 -0
- package/dist/packem_shared/app.d-Nbhpihxv.d.ts +300 -0
- package/dist/packem_shared/badge-B2PKA1-5.js +49 -0
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +3245 -0
- package/dist/packem_shared/button-BhsN2uZH.js +49 -0
- package/dist/packem_shared/card-DURq3ElK.js +175 -0
- package/dist/packem_shared/cf-links-2cktDedA.js +8 -0
- package/dist/packem_shared/checkbox-UNkzAxl-.js +63 -0
- package/dist/packem_shared/data-grid-B5CaV3wS.js +183 -0
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +280 -0
- package/dist/packem_shared/empty-state-DY_oe0k6.js +98 -0
- package/dist/packem_shared/grid-features-CzUfqgsM.js +840 -0
- package/dist/packem_shared/input-XH4r1Pt1.js +53 -0
- package/dist/packem_shared/internal-rXJEAhXS.js +68 -0
- package/dist/packem_shared/label-D8ykjn5J.js +46 -0
- package/dist/packem_shared/live-status-FZ0psC1z.js +44 -0
- package/dist/packem_shared/reference-view-B4E49Lip.js +2180 -0
- package/dist/packem_shared/shard-history-DyebH1R5.js +38 -0
- package/dist/packem_shared/sparkline-10dG-_f0.js +93 -0
- package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +2562 -0
- package/dist/packem_shared/storage-tier-CL98eOvn.js +85 -0
- package/dist/packem_shared/studio-9Mq0PdMi.js +10831 -0
- package/dist/packem_shared/table-_RzNvy3R.js +246 -0
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +832 -0
- package/dist/packem_shared/textarea-D3gaCU_-.js +46 -0
- package/dist/packem_shared/use-admin-query-4JQW2rr1.js +88 -0
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +32 -0
- package/dist/packem_shared/utils-B05Dmz_H.js +8 -0
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +10 -0
- package/dist/standalone/studio.js +378 -0
- package/dist/styles.css +2 -0
- package/package.json +78 -17
- 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 };
|