@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.
- package/LICENSE.md +105 -0
- package/README.md +123 -9
- package/__assets__/package-og.svg +14 -0
- package/dist/index.d.ts +1402 -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_FUNCTION_PREFIX-DmBqMZ-z.js +45 -0
- package/dist/packem_shared/ApiDocsPanel-DpRjJhG5.js +842 -0
- package/dist/packem_shared/ApiReferencePanel-DMIUp-kK.js +229 -0
- package/dist/packem_shared/ApiTab-DURGU15e.js +251 -0
- package/dist/packem_shared/AuditPanel-BC59Nhst.js +212 -0
- package/dist/packem_shared/CommandPalette-Dx_CoB9i.js +373 -0
- package/dist/packem_shared/ConfirmButton-WQVUoGFb.js +59 -0
- package/dist/packem_shared/ConnectionBadge-Bxagrip8.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/DataBrowser-Coz6jJE6.js +4542 -0
- package/dist/packem_shared/DataFilters-FNquMaiu.js +249 -0
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +66 -0
- package/dist/packem_shared/ExportImportPanel-WO34fJxy.js +193 -0
- package/dist/packem_shared/FileBrowser-Zcr-Qgxo.js +2932 -0
- package/dist/packem_shared/FunctionRunner-j0Rd5m9t.js +343 -0
- package/dist/packem_shared/FunctionStatsPanel-DboBl-XL.js +432 -0
- package/dist/packem_shared/GlobalDataBrowser-9MhPEfgN.js +318 -0
- package/dist/packem_shared/HealthPanel-DOIgbUtx.js +640 -0
- package/dist/packem_shared/HomePanel-bdOCNA-p.js +1273 -0
- package/dist/packem_shared/InsightsPanel-DaZPnSgt.js +423 -0
- package/dist/packem_shared/LogsPanel-CWdqAGpQ.js +839 -0
- package/dist/packem_shared/MailPanel-D_EGtDnS.js +447 -0
- package/dist/packem_shared/MetricsPanel-E4Gv6wTO.js +1625 -0
- package/dist/packem_shared/MigrationsPanel-DQdPY9io.js +246 -0
- package/dist/packem_shared/OpenRpcReferencePanel-j2p3HB0s.js +191 -0
- package/dist/packem_shared/PitrPanel-BbBkQR6t.js +252 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +3 -0
- package/dist/packem_shared/ScheduledJobs-Ok1CYYwI.js +159 -0
- package/dist/packem_shared/SchemaViewer-D8XGnp-X.js +2512 -0
- package/dist/packem_shared/SecurityAdvisorPanel-Cdm2IxLW.js +79 -0
- package/dist/packem_shared/SettingsPanel-D3WF2mBU.js +176 -0
- package/dist/packem_shared/ShardInput-DNCsT1KW.js +107 -0
- package/dist/packem_shared/SqlEditorPanel-BuQ7f2Hs.js +13 -0
- package/dist/packem_shared/Studio-D36od9Oz.js +33 -0
- package/dist/packem_shared/StudioApp-dvywkJ8I.js +383 -0
- package/dist/packem_shared/StudioI18nProvider-Dcajsznk.js +48 -0
- package/dist/packem_shared/TableEditor-DIVDk3vT.js +371 -0
- package/dist/packem_shared/advisor-view-DBlzJi6C.js +159 -0
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +108 -0
- package/dist/packem_shared/app.d-CCmwDEVs.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-BZfRdxSE.js +8 -0
- package/dist/packem_shared/checkbox-UNkzAxl-.js +63 -0
- package/dist/packem_shared/createStudioI18n-CgvlmDkN.js +27 -0
- package/dist/packem_shared/data-grid-CCh2Couo.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-DTjG6Sex.js +840 -0
- package/dist/packem_shared/input-XH4r1Pt1.js +53 -0
- package/dist/packem_shared/internal-BBZYexre.js +68 -0
- package/dist/packem_shared/label-D8ykjn5J.js +46 -0
- package/dist/packem_shared/live-status-bPff1O7Y.js +44 -0
- package/dist/packem_shared/reference-view-BCKIoai7.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-CW2y2x9h.js +2562 -0
- package/dist/packem_shared/storage-tier-CL98eOvn.js +85 -0
- package/dist/packem_shared/studio-BDVd7rIV.js +10303 -0
- package/dist/packem_shared/table-_RzNvy3R.js +246 -0
- package/dist/packem_shared/table-list-sidebar-aZHLq70w.js +832 -0
- package/dist/packem_shared/textarea-D3gaCU_-.js +46 -0
- package/dist/packem_shared/use-live-admin-D1h1Fzsd.js +73 -0
- package/dist/packem_shared/use-live-shard-seed-B74RYcOy.js +76 -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 +356 -0
- package/dist/styles.css +2 -0
- package/package.json +77 -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 };
|