@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,53 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { Input as Input$1 } from '@base-ui/react/input';
|
|
4
|
+
import { c as cn } from './utils-B05Dmz_H.js';
|
|
5
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
6
|
+
|
|
7
|
+
function Input(t0) {
|
|
8
|
+
const $ = c(10);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let type;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
className,
|
|
15
|
+
type,
|
|
16
|
+
...props
|
|
17
|
+
} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = className;
|
|
20
|
+
$[2] = props;
|
|
21
|
+
$[3] = type;
|
|
22
|
+
} else {
|
|
23
|
+
className = $[1];
|
|
24
|
+
props = $[2];
|
|
25
|
+
type = $[3];
|
|
26
|
+
}
|
|
27
|
+
let t1;
|
|
28
|
+
if ($[4] !== className) {
|
|
29
|
+
t1 = cn("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className);
|
|
30
|
+
$[4] = className;
|
|
31
|
+
$[5] = t1;
|
|
32
|
+
} else {
|
|
33
|
+
t1 = $[5];
|
|
34
|
+
}
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== type) {
|
|
37
|
+
t2 = /* @__PURE__ */ jsxDEV(Input$1, {
|
|
38
|
+
type,
|
|
39
|
+
"data-slot": "input",
|
|
40
|
+
className: t1,
|
|
41
|
+
...props
|
|
42
|
+
}, void 0, false);
|
|
43
|
+
$[6] = props;
|
|
44
|
+
$[7] = t1;
|
|
45
|
+
$[8] = type;
|
|
46
|
+
$[9] = t2;
|
|
47
|
+
} else {
|
|
48
|
+
t2 = $[9];
|
|
49
|
+
}
|
|
50
|
+
return t2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { Input as I };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const adminRef = (path) => {
|
|
2
|
+
return {
|
|
3
|
+
__lunoraRef: path
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
const callOptions = (shardKey) => {
|
|
7
|
+
const trimmed = shardKey.trim();
|
|
8
|
+
return trimmed === "" ? {} : {
|
|
9
|
+
shardKey: trimmed
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
const errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
13
|
+
const formatCell = (value) => {
|
|
14
|
+
if (value === null || value === void 0) {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
switch (typeof value) {
|
|
18
|
+
case "bigint":
|
|
19
|
+
case "boolean":
|
|
20
|
+
case "number": {
|
|
21
|
+
return value.toString();
|
|
22
|
+
}
|
|
23
|
+
case "string": {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
case "symbol": {
|
|
27
|
+
return value.toString();
|
|
28
|
+
}
|
|
29
|
+
default: {
|
|
30
|
+
return JSON.stringify(value);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const fireAndForget = (promise, onError) => {
|
|
35
|
+
promise.catch((error) => {
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const copyToClipboard = (text) => {
|
|
39
|
+
const clipboard = "navigator" in globalThis ? globalThis.navigator.clipboard : void 0;
|
|
40
|
+
if (clipboard !== void 0) {
|
|
41
|
+
fireAndForget(clipboard.writeText(text));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const formatBytes = (bytes) => {
|
|
45
|
+
if (bytes === null || bytes === void 0) {
|
|
46
|
+
return "—";
|
|
47
|
+
}
|
|
48
|
+
if (bytes < 1024) {
|
|
49
|
+
return `${bytes.toString()} B`;
|
|
50
|
+
}
|
|
51
|
+
const units = ["KB", "MB", "GB", "TB"];
|
|
52
|
+
let value = bytes / 1024;
|
|
53
|
+
let unit = 0;
|
|
54
|
+
while (value >= 1024 && unit < units.length - 1) {
|
|
55
|
+
value /= 1024;
|
|
56
|
+
unit += 1;
|
|
57
|
+
}
|
|
58
|
+
return `${value.toFixed(1)} ${units[unit] ?? "TB"}`;
|
|
59
|
+
};
|
|
60
|
+
const formatTimestamp = (value, fallback = "") => {
|
|
61
|
+
if (value === null || value === void 0 || value === "") {
|
|
62
|
+
return fallback;
|
|
63
|
+
}
|
|
64
|
+
const date = new Date(value);
|
|
65
|
+
return Number.isNaN(date.getTime()) ? String(value) : date.toLocaleString();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { adminRef as a, copyToClipboard as b, callOptions as c, formatTimestamp as d, errorMessage as e, fireAndForget as f, formatBytes as g, formatCell as h };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { c as cn } from './utils-B05Dmz_H.js';
|
|
4
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
5
|
+
|
|
6
|
+
function Label(t0) {
|
|
7
|
+
const $ = c(8);
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
}
|
|
22
|
+
let t1;
|
|
23
|
+
if ($[3] !== className) {
|
|
24
|
+
t1 = cn("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t1;
|
|
27
|
+
} else {
|
|
28
|
+
t1 = $[4];
|
|
29
|
+
}
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsxDEV("label", {
|
|
33
|
+
"data-slot": "label",
|
|
34
|
+
className: t1,
|
|
35
|
+
...props
|
|
36
|
+
}, void 0, false);
|
|
37
|
+
$[5] = props;
|
|
38
|
+
$[6] = t1;
|
|
39
|
+
$[7] = t2;
|
|
40
|
+
} else {
|
|
41
|
+
t2 = $[7];
|
|
42
|
+
}
|
|
43
|
+
return t2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { Label as L };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useT } from './createStudioI18n-CgvlmDkN.js';
|
|
3
|
+
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
4
|
+
|
|
5
|
+
const LiveError = (t0) => {
|
|
6
|
+
const $ = c(6);
|
|
7
|
+
const {
|
|
8
|
+
message,
|
|
9
|
+
prefix
|
|
10
|
+
} = t0;
|
|
11
|
+
const t = useT();
|
|
12
|
+
if (message === void 0) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const t1 = `${prefix}-live-error`;
|
|
16
|
+
let t2;
|
|
17
|
+
if ($[0] !== message || $[1] !== t) {
|
|
18
|
+
t2 = t("Live unavailable: {liveError}", {
|
|
19
|
+
liveError: message
|
|
20
|
+
});
|
|
21
|
+
$[0] = message;
|
|
22
|
+
$[1] = t;
|
|
23
|
+
$[2] = t2;
|
|
24
|
+
} else {
|
|
25
|
+
t2 = $[2];
|
|
26
|
+
}
|
|
27
|
+
let t3;
|
|
28
|
+
if ($[3] !== t1 || $[4] !== t2) {
|
|
29
|
+
t3 = /* @__PURE__ */ jsxDEV("span", {
|
|
30
|
+
className: "text-xs text-destructive",
|
|
31
|
+
"data-testid": t1,
|
|
32
|
+
role: "status",
|
|
33
|
+
children: t2
|
|
34
|
+
}, void 0, false);
|
|
35
|
+
$[3] = t1;
|
|
36
|
+
$[4] = t2;
|
|
37
|
+
$[5] = t3;
|
|
38
|
+
} else {
|
|
39
|
+
t3 = $[5];
|
|
40
|
+
}
|
|
41
|
+
return t3;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { LiveError as L };
|