@lunora/studio 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (60) hide show
  1. package/__assets__/package-og.svg +1 -1
  2. package/dist/index.d.ts +23 -17
  3. package/dist/index.js +34 -34
  4. package/dist/mount.d.ts +1 -1
  5. package/dist/mount.js +1 -1
  6. package/dist/packem_shared/{ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js → ADMIN_FUNCTIONS-CdaxLGkE.js} +3 -0
  7. package/dist/packem_shared/{ApiDocsPanel-DpRjJhG5.js → ApiDocsPanel-BgrN4kml.js} +3 -3
  8. package/dist/packem_shared/{ApiReferencePanel-DMIUp-kK.js → ApiReferencePanel-1vubqG5s.js} +2 -2
  9. package/dist/packem_shared/{ApiTab-DURGU15e.js → ApiTab-CHkX49o_.js} +4 -4
  10. package/dist/packem_shared/{AuditPanel-BC59Nhst.js → AuditPanel-CP9HM9nq.js} +19 -31
  11. package/dist/packem_shared/{CommandPalette-Dx_CoB9i.js → CommandPalette-BtgkBzZI.js} +2 -2
  12. package/dist/packem_shared/{ConfirmButton-WQVUoGFb.js → ConfirmButton-C2eVi2Qv.js} +1 -1
  13. package/dist/packem_shared/{ConnectionBadge-Bxagrip8.js → ConnectionBadge-B2DDM2Tn.js} +1 -1
  14. package/dist/packem_shared/{createStudioI18n-CgvlmDkN.js → DEFAULT_LOCALE-CiX4W7Kr.js} +1 -1
  15. package/dist/packem_shared/{DataBrowser-Coz6jJE6.js → DataBrowser-Bb1gTQ6c.js} +182 -249
  16. package/dist/packem_shared/{ExportImportPanel-WO34fJxy.js → ExportImportPanel-Dj87tRa5.js} +9 -5
  17. package/dist/packem_shared/{FileBrowser-Zcr-Qgxo.js → FileBrowser-CWvxp_is.js} +7 -7
  18. package/dist/packem_shared/{FunctionRunner-j0Rd5m9t.js → FunctionRunner-DlWApMCH.js} +4 -4
  19. package/dist/packem_shared/{FunctionStatsPanel-DboBl-XL.js → FunctionStatsPanel-CuO2Tmw-.js} +141 -198
  20. package/dist/packem_shared/{GlobalDataBrowser-9MhPEfgN.js → GlobalDataBrowser-3X9uRfdO.js} +37 -66
  21. package/dist/packem_shared/{HealthPanel-DOIgbUtx.js → HealthPanel-Dj0GRo5P.js} +31 -23
  22. package/dist/packem_shared/{HomePanel-bdOCNA-p.js → HomePanel-BewOCuag.js} +450 -389
  23. package/dist/packem_shared/{InsightsPanel-DaZPnSgt.js → InsightsPanel-y_Q-xdPY.js} +104 -66
  24. package/dist/packem_shared/{LogsPanel-CWdqAGpQ.js → LogsPanel-C7crgYoS.js} +35 -47
  25. package/dist/packem_shared/{MailPanel-D_EGtDnS.js → MailPanel-PILidruz.js} +31 -38
  26. package/dist/packem_shared/{MetricsPanel-E4Gv6wTO.js → MetricsPanel-DioILzgf.js} +34 -48
  27. package/dist/packem_shared/{MigrationsPanel-DQdPY9io.js → MigrationsPanel-DkIcRoE5.js} +31 -38
  28. package/dist/packem_shared/{OpenRpcReferencePanel-j2p3HB0s.js → OpenRpcReferencePanel-vbcYbv3V.js} +2 -2
  29. package/dist/packem_shared/{PitrPanel-BbBkQR6t.js → PitrPanel-yKJ1JPPk.js} +4 -4
  30. package/dist/packem_shared/{ScheduledJobs-Ok1CYYwI.js → ScheduledJobs-BWNwIN3I.js} +164 -61
  31. package/dist/packem_shared/{SchemaViewer-D8XGnp-X.js → SchemaViewer-CNr8Wame.js} +4 -4
  32. package/dist/packem_shared/{SecurityAdvisorPanel-Cdm2IxLW.js → SecurityAdvisorPanel-BBzv7L3c.js} +44 -31
  33. package/dist/packem_shared/SettingsPanel-BKSKl8tl.js +390 -0
  34. package/dist/packem_shared/{ShardInput-DNCsT1KW.js → ShardInput-gx_DZXXn.js} +1 -1
  35. package/dist/packem_shared/SqlEditorPanel-CkemCQvy.js +13 -0
  36. package/dist/packem_shared/Studio-QkOjc2NS.js +33 -0
  37. package/dist/packem_shared/{StudioApp-dvywkJ8I.js → StudioApp-TEElspKL.js} +278 -4
  38. package/dist/packem_shared/{StudioI18nProvider-Dcajsznk.js → StudioI18nProvider-B-tDCZIi.js} +1 -1
  39. package/dist/packem_shared/TableEditor-JS3sXYgS.js +11 -0
  40. package/dist/packem_shared/{advisor-view-DBlzJi6C.js → advisor-view-CGcfMiPq.js} +1 -1
  41. package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-Cnij4Zp5.d.ts} +1 -1
  42. package/dist/packem_shared/{cf-links-BZfRdxSE.js → cf-links-2cktDedA.js} +1 -1
  43. package/dist/packem_shared/{data-grid-CCh2Couo.js → data-grid-B5CaV3wS.js} +2 -2
  44. package/dist/packem_shared/{grid-features-DTjG6Sex.js → grid-features-CzUfqgsM.js} +3 -3
  45. package/dist/packem_shared/{internal-BBZYexre.js → internal-rXJEAhXS.js} +1 -1
  46. package/dist/packem_shared/{live-status-bPff1O7Y.js → live-status-FZ0psC1z.js} +1 -1
  47. package/dist/packem_shared/{reference-view-BCKIoai7.js → reference-view-B4E49Lip.js} +3 -3
  48. package/dist/packem_shared/{sql-editor-panel-CW2y2x9h.js → sql-editor-panel-CUJoYF1Z.js} +6 -6
  49. package/dist/packem_shared/{studio-BDVd7rIV.js → studio-c5Vf7kSh.js} +2897 -1668
  50. package/dist/packem_shared/{TableEditor-DIVDk3vT.js → table-editor-9fhJ4hMJ.js} +43 -7
  51. package/dist/packem_shared/{table-list-sidebar-aZHLq70w.js → table-list-sidebar-Bg7uzbvC.js} +2 -2
  52. package/dist/packem_shared/use-admin-query-BkbdNFNz.js +105 -0
  53. package/dist/standalone/studio.js +198 -176
  54. package/dist/styles.css +1 -1
  55. package/package.json +13 -12
  56. package/dist/packem_shared/SettingsPanel-D3WF2mBU.js +0 -176
  57. package/dist/packem_shared/SqlEditorPanel-BuQ7f2Hs.js +0 -13
  58. package/dist/packem_shared/Studio-D36od9Oz.js +0 -33
  59. package/dist/packem_shared/use-live-admin-D1h1Fzsd.js +0 -73
  60. package/dist/packem_shared/use-live-shard-seed-B74RYcOy.js +0 -76
@@ -1,13 +1,14 @@
1
1
  import { useLunora } from '@lunora/react';
2
2
  import { useState } from 'react';
3
- import { ConfirmButton } from './ConfirmButton-WQVUoGFb.js';
4
- import { ShardInput } from './ShardInput-DNCsT1KW.js';
3
+ import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
4
+ import { ShardInput } from './ShardInput-gx_DZXXn.js';
5
5
  import { B as Button } from './button-BhsN2uZH.js';
6
6
  import { C as Card, a as CardContent } from './card-DURq3ElK.js';
7
7
  import { T as Textarea } from './textarea-D3gaCU_-.js';
8
- import { useT } from './createStudioI18n-CgvlmDkN.js';
9
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js';
10
- import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from './internal-BBZYexre.js';
8
+ import { a as useInvalidateAdmin } from './use-admin-query-BkbdNFNz.js';
9
+ import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
10
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
11
+ import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from './internal-rXJEAhXS.js';
11
12
  import { r as recordShard } from './shard-history-DyebH1R5.js';
12
13
  import { jsxDEV } from 'react/jsx-dev-runtime';
13
14
 
@@ -38,6 +39,7 @@ const ExportImportPanel = ({
38
39
  initialShardKey
39
40
  }) => {
40
41
  const client = useLunora();
42
+ const invalidateAdmin = useInvalidateAdmin();
41
43
  const t = useT();
42
44
  const [shardKey, setShardKey] = useState(initialShardKey ?? "");
43
45
  const [ndjson, setNdjson] = useState("");
@@ -81,6 +83,8 @@ const ExportImportPanel = ({
81
83
  }, callOptions(shardKey));
82
84
  recordShard(shardKey);
83
85
  setImportResult(result_0);
86
+ invalidateAdmin(ADMIN_FUNCTIONS.readTablePage);
87
+ invalidateAdmin(ADMIN_FUNCTIONS.listTables);
84
88
  } catch (error__1) {
85
89
  setError(errorMessage(error__1));
86
90
  } finally {
@@ -1,22 +1,22 @@
1
1
  import { c } from 'react/compiler-runtime';
2
2
  import { useState, useEffect, useMemo, useCallback, useRef } from 'react';
3
- import { ShardInput } from './ShardInput-DNCsT1KW.js';
3
+ import { ShardInput } from './ShardInput-gx_DZXXn.js';
4
4
  import { B as Button } from './button-BhsN2uZH.js';
5
5
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
6
- import { useT } from './createStudioI18n-CgvlmDkN.js';
7
- import { S as SelectionBar } from './grid-features-DTjG6Sex.js';
6
+ import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
7
+ import { S as SelectionBar } from './grid-features-CzUfqgsM.js';
8
8
  import { C as Card, a as CardContent } from './card-DURq3ElK.js';
9
9
  import { C as Checkbox } from './checkbox-UNkzAxl-.js';
10
10
  import { c as TableHead, a as TableHeader, b as TableRow, d as TableBody, T as Table, e as TableCell } from './table-_RzNvy3R.js';
11
- import { g as formatBytes, f as fireAndForget, e as errorMessage, c as callOptions, a as adminRef } from './internal-BBZYexre.js';
12
- import { ConfirmButton } from './ConfirmButton-WQVUoGFb.js';
11
+ import { d as formatBytes, f as fireAndForget, e as errorMessage, c as callOptions, a as adminRef } from './internal-rXJEAhXS.js';
12
+ import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
13
13
  import { B as Badge } from './badge-B2PKA1-5.js';
14
14
  import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
15
15
  import { I as Input } from './input-XH4r1Pt1.js';
16
- import { d as CLOUDFLARE_R2_URL } from './cf-links-BZfRdxSE.js';
16
+ import { d as CLOUDFLARE_R2_URL } from './cf-links-2cktDedA.js';
17
17
  import { useLunora } from '@lunora/react';
18
18
  import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
19
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js';
19
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
20
20
 
21
21
  const useFileItem = (object, prefix, handlers) => {
22
22
  const $ = c(21);
@@ -1,14 +1,14 @@
1
1
  import { useLunora } from '@lunora/react';
2
2
  import { useState, useEffect } from 'react';
3
- import { ShardInput } from './ShardInput-DNCsT1KW.js';
3
+ import { ShardInput } from './ShardInput-gx_DZXXn.js';
4
4
  import { B as Badge } from './badge-B2PKA1-5.js';
5
5
  import { B as Button } from './button-BhsN2uZH.js';
6
6
  import { I as Input } from './input-XH4r1Pt1.js';
7
7
  import { L as Label } from './label-D8ykjn5J.js';
8
8
  import { T as Textarea } from './textarea-D3gaCU_-.js';
9
- import { useT } from './createStudioI18n-CgvlmDkN.js';
10
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js';
11
- import { e as errorMessage, d as formatTimestamp, f as fireAndForget, a as adminRef } from './internal-BBZYexre.js';
9
+ import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
10
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
11
+ import { e as errorMessage, b as formatTimestamp, f as fireAndForget, a as adminRef } from './internal-rXJEAhXS.js';
12
12
  import { r as recordShard } from './shard-history-DyebH1R5.js';
13
13
  import { jsxDEV } from 'react/jsx-dev-runtime';
14
14
 
@@ -1,22 +1,20 @@
1
1
  import { c } from 'react/compiler-runtime';
2
- import { useLunora } from '@lunora/react';
3
- import { useState, useRef, useEffect } from 'react';
4
- import { L as LiveError } from './live-status-bPff1O7Y.js';
5
- import { ShardInput } from './ShardInput-DNCsT1KW.js';
2
+ import { useState } from 'react';
3
+ import { L as LiveError } from './live-status-FZ0psC1z.js';
4
+ import { ShardInput } from './ShardInput-gx_DZXXn.js';
6
5
  import { B as Badge } from './badge-B2PKA1-5.js';
7
6
  import { B as Button } from './button-BhsN2uZH.js';
8
7
  import { C as Card, a as CardContent } from './card-DURq3ElK.js';
9
8
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
10
9
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-_RzNvy3R.js';
11
- import { u as useLiveAdmin } from './use-live-admin-D1h1Fzsd.js';
12
- import { useT } from './createStudioI18n-CgvlmDkN.js';
13
- import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTION_PREFIX-DmBqMZ-z.js';
14
- import { d as formatTimestamp, c as callOptions, e as errorMessage, a as adminRef } from './internal-BBZYexre.js';
10
+ import { u as useAdminQuery } from './use-admin-query-BkbdNFNz.js';
11
+ import useDebounced from './useDebounced-Dxncpg6z.js';
12
+ import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
13
+ import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
14
+ import { b as formatTimestamp } from './internal-rXJEAhXS.js';
15
15
  import { c as cn } from './utils-B05Dmz_H.js';
16
- import { u as useLiveShardSeed } from './use-live-shard-seed-B74RYcOy.js';
17
16
  import { jsxDEV } from 'react/jsx-dev-runtime';
18
17
 
19
- const GET_FUNCTION_STATS = adminRef(ADMIN_FUNCTIONS.getFunctionStats);
20
18
  const KIND_VARIANT = {
21
19
  action: "outline",
22
20
  mutation: "default",
@@ -53,218 +51,163 @@ const SORTERS = {
53
51
  slowest: (a, b) => b.maxDurationMs - a.maxDurationMs
54
52
  };
55
53
  const FunctionStatsPanel = (t0) => {
56
- const $ = c(48);
54
+ const $ = c(45);
57
55
  const {
58
56
  functions,
59
57
  initialShardKey
60
58
  } = t0;
61
- const client = useLunora();
62
59
  const t = useT();
63
60
  const [shardKey, setShardKey] = useState(initialShardKey ?? "");
64
- const [stats, setStats] = useState(null);
65
- const [error, setError] = useState(null);
66
61
  const [sortKey, setSortKey] = useState("recent");
67
- const [liveError, setLiveError] = useState(void 0);
68
- const mountedRef = useRef(true);
69
62
  let t1;
63
+ if ($[0] !== shardKey) {
64
+ t1 = shardKey.trim();
65
+ $[0] = shardKey;
66
+ $[1] = t1;
67
+ } else {
68
+ t1 = $[1];
69
+ }
70
+ const debouncedShard = useDebounced(t1, 400);
70
71
  let t2;
71
- if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
72
- t1 = () => {
73
- mountedRef.current = true;
74
- return () => {
75
- mountedRef.current = false;
76
- };
77
- };
78
- t2 = [];
79
- $[0] = t1;
80
- $[1] = t2;
72
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
73
+ t2 = {};
74
+ $[2] = t2;
81
75
  } else {
82
- t1 = $[0];
83
- t2 = $[1];
76
+ t2 = $[2];
84
77
  }
85
- useEffect(t1, t2);
86
78
  let t3;
87
- if ($[2] !== functions) {
88
- t3 = new Map((functions ?? []).map(_temp));
89
- $[2] = functions;
90
- $[3] = t3;
79
+ if ($[3] !== debouncedShard) {
80
+ t3 = {
81
+ live: true,
82
+ shardKey: debouncedShard
83
+ };
84
+ $[3] = debouncedShard;
85
+ $[4] = t3;
91
86
  } else {
92
- t3 = $[3];
87
+ t3 = $[4];
93
88
  }
94
- const kindByPath = t3;
89
+ const {
90
+ data,
91
+ error,
92
+ liveError
93
+ } = useAdminQuery(ADMIN_FUNCTIONS.getFunctionStats, t2, t3);
94
+ const stats = data?.functions ?? null;
95
95
  let t4;
96
- if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
97
- t4 = (result) => {
98
- setError(null);
99
- setLiveError(void 0);
100
- setStats(result.functions);
101
- };
102
- $[4] = t4;
96
+ if ($[5] !== functions) {
97
+ t4 = new Map((functions ?? []).map(_temp));
98
+ $[5] = functions;
99
+ $[6] = t4;
103
100
  } else {
104
- t4 = $[4];
101
+ t4 = $[6];
105
102
  }
106
- const applyResult = t4;
103
+ const kindByPath = t4;
107
104
  let t5;
108
- if ($[5] !== client) {
109
- t5 = async (shard) => {
110
- try {
111
- const next = await client.query(GET_FUNCTION_STATS, {}, callOptions(shard));
112
- if (mountedRef.current) {
113
- applyResult(next);
114
- }
115
- } catch (t62) {
116
- const error_ = t62;
117
- if (mountedRef.current) {
118
- setStats(null);
119
- setError(errorMessage(error_));
120
- }
121
- throw error_;
122
- }
123
- };
124
- $[5] = client;
125
- $[6] = t5;
126
- } else {
127
- t5 = $[6];
128
- }
129
- const refresh = t5;
130
- const committedShard = useLiveShardSeed(shardKey, refresh);
131
- let t6;
132
105
  if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
133
- t6 = {};
134
- $[7] = t6;
135
- } else {
136
- t6 = $[7];
137
- }
138
- let t7;
139
- if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
140
- t7 = (next_0) => {
141
- if (mountedRef.current) {
142
- applyResult(next_0);
143
- }
144
- };
145
- $[8] = t7;
146
- } else {
147
- t7 = $[8];
148
- }
149
- let t8;
150
- if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
151
- t8 = (message) => {
152
- if (mountedRef.current) {
153
- setLiveError(message);
154
- }
155
- };
156
- $[9] = t8;
157
- } else {
158
- t8 = $[9];
159
- }
160
- useLiveAdmin(ADMIN_FUNCTIONS.getFunctionStats, t6, committedShard ?? "", t7, committedShard !== void 0, t8);
161
- let t9;
162
- if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
163
- t9 = (event) => {
106
+ t5 = (event) => {
164
107
  setSortKey(event.currentTarget.dataset.sort);
165
108
  };
166
- $[10] = t9;
109
+ $[7] = t5;
167
110
  } else {
168
- t9 = $[10];
111
+ t5 = $[7];
169
112
  }
170
- const selectSort = t9;
171
- let t10;
172
- if ($[11] !== error || $[12] !== kindByPath || $[13] !== liveError || $[14] !== shardKey || $[15] !== sortKey || $[16] !== stats || $[17] !== t) {
113
+ const selectSort = t5;
114
+ let t6;
115
+ if ($[8] !== error || $[9] !== kindByPath || $[10] !== liveError || $[11] !== shardKey || $[12] !== sortKey || $[13] !== stats || $[14] !== t) {
173
116
  const sorted = stats === null ? [] : stats.toSorted(SORTERS[sortKey]);
174
- let t11;
175
- if ($[19] !== t) {
176
- t11 = t("Recent");
177
- $[19] = t;
178
- $[20] = t11;
117
+ let t7;
118
+ if ($[16] !== t) {
119
+ t7 = t("Recent");
120
+ $[16] = t;
121
+ $[17] = t7;
179
122
  } else {
180
- t11 = $[20];
123
+ t7 = $[17];
181
124
  }
182
- let t12;
183
- if ($[21] !== t11) {
184
- t12 = {
125
+ let t8;
126
+ if ($[18] !== t7) {
127
+ t8 = {
185
128
  key: "recent",
186
- label: t11
129
+ label: t7
187
130
  };
188
- $[21] = t11;
189
- $[22] = t12;
131
+ $[18] = t7;
132
+ $[19] = t8;
190
133
  } else {
191
- t12 = $[22];
134
+ t8 = $[19];
192
135
  }
193
- let t13;
194
- if ($[23] !== t) {
195
- t13 = t("Most called");
196
- $[23] = t;
197
- $[24] = t13;
136
+ let t9;
137
+ if ($[20] !== t) {
138
+ t9 = t("Most called");
139
+ $[20] = t;
140
+ $[21] = t9;
198
141
  } else {
199
- t13 = $[24];
142
+ t9 = $[21];
200
143
  }
201
- let t14;
202
- if ($[25] !== t13) {
203
- t14 = {
144
+ let t10;
145
+ if ($[22] !== t9) {
146
+ t10 = {
204
147
  key: "calls",
205
- label: t13
148
+ label: t9
206
149
  };
207
- $[25] = t13;
208
- $[26] = t14;
150
+ $[22] = t9;
151
+ $[23] = t10;
209
152
  } else {
210
- t14 = $[26];
153
+ t10 = $[23];
211
154
  }
212
- let t15;
213
- if ($[27] !== t) {
214
- t15 = t("Slowest");
215
- $[27] = t;
216
- $[28] = t15;
155
+ let t11;
156
+ if ($[24] !== t) {
157
+ t11 = t("Slowest");
158
+ $[24] = t;
159
+ $[25] = t11;
217
160
  } else {
218
- t15 = $[28];
161
+ t11 = $[25];
219
162
  }
220
- let t16;
221
- if ($[29] !== t15) {
222
- t16 = {
163
+ let t12;
164
+ if ($[26] !== t11) {
165
+ t12 = {
223
166
  key: "slowest",
224
- label: t15
167
+ label: t11
225
168
  };
226
- $[29] = t15;
227
- $[30] = t16;
169
+ $[26] = t11;
170
+ $[27] = t12;
228
171
  } else {
229
- t16 = $[30];
172
+ t12 = $[27];
230
173
  }
231
- let t17;
232
- if ($[31] !== t12 || $[32] !== t14 || $[33] !== t16) {
233
- t17 = [t12, t14, t16];
234
- $[31] = t12;
235
- $[32] = t14;
236
- $[33] = t16;
237
- $[34] = t17;
174
+ let t13;
175
+ if ($[28] !== t10 || $[29] !== t12 || $[30] !== t8) {
176
+ t13 = [t8, t10, t12];
177
+ $[28] = t10;
178
+ $[29] = t12;
179
+ $[30] = t8;
180
+ $[31] = t13;
238
181
  } else {
239
- t17 = $[34];
182
+ t13 = $[31];
240
183
  }
241
- const sortButtons = t17;
242
- let t18;
243
- if ($[35] !== shardKey) {
244
- t18 = /* @__PURE__ */ jsxDEV(ShardInput, {
184
+ const sortButtons = t13;
185
+ let t14;
186
+ if ($[32] !== shardKey) {
187
+ t14 = /* @__PURE__ */ jsxDEV(ShardInput, {
245
188
  onChange: setShardKey,
246
189
  testId: "fs-shard-input",
247
190
  value: shardKey
248
191
  }, void 0, false);
249
- $[35] = shardKey;
250
- $[36] = t18;
192
+ $[32] = shardKey;
193
+ $[33] = t14;
251
194
  } else {
252
- t18 = $[36];
195
+ t14 = $[33];
253
196
  }
254
- let t19;
255
- if ($[37] !== liveError) {
256
- t19 = /* @__PURE__ */ jsxDEV(LiveError, {
197
+ let t15;
198
+ if ($[34] !== liveError) {
199
+ t15 = /* @__PURE__ */ jsxDEV(LiveError, {
257
200
  message: liveError,
258
201
  prefix: "fs"
259
202
  }, void 0, false);
260
- $[37] = liveError;
261
- $[38] = t19;
203
+ $[34] = liveError;
204
+ $[35] = t15;
262
205
  } else {
263
- t19 = $[38];
206
+ t15 = $[35];
264
207
  }
265
- let t20;
266
- if ($[39] !== sortButtons || $[40] !== sortKey) {
267
- t20 = /* @__PURE__ */ jsxDEV("div", {
208
+ let t16;
209
+ if ($[36] !== sortButtons || $[37] !== sortKey) {
210
+ t16 = /* @__PURE__ */ jsxDEV("div", {
268
211
  className: "ml-auto flex items-center gap-1",
269
212
  role: "group",
270
213
  children: sortButtons.map((option) => /* @__PURE__ */ jsxDEV(Button, {
@@ -277,42 +220,42 @@ const FunctionStatsPanel = (t0) => {
277
220
  children: option.label
278
221
  }, option.key, false))
279
222
  }, void 0, false);
280
- $[39] = sortButtons;
281
- $[40] = sortKey;
282
- $[41] = t20;
223
+ $[36] = sortButtons;
224
+ $[37] = sortKey;
225
+ $[38] = t16;
283
226
  } else {
284
- t20 = $[41];
227
+ t16 = $[38];
285
228
  }
286
- let t21;
287
- if ($[42] !== t18 || $[43] !== t19 || $[44] !== t20) {
288
- t21 = /* @__PURE__ */ jsxDEV("div", {
229
+ let t17;
230
+ if ($[39] !== t14 || $[40] !== t15 || $[41] !== t16) {
231
+ t17 = /* @__PURE__ */ jsxDEV("div", {
289
232
  className: "flex flex-wrap items-center gap-2",
290
- children: [t18, t19, t20]
233
+ children: [t14, t15, t16]
291
234
  }, void 0, true);
292
- $[42] = t18;
293
- $[43] = t19;
294
- $[44] = t20;
295
- $[45] = t21;
235
+ $[39] = t14;
236
+ $[40] = t15;
237
+ $[41] = t16;
238
+ $[42] = t17;
296
239
  } else {
297
- t21 = $[45];
240
+ t17 = $[42];
298
241
  }
299
- let t22;
300
- if ($[46] !== error) {
301
- t22 = error !== null && /* @__PURE__ */ jsxDEV("p", {
242
+ let t18;
243
+ if ($[43] !== error) {
244
+ t18 = error !== null && /* @__PURE__ */ jsxDEV("p", {
302
245
  className: "text-sm text-destructive",
303
246
  "data-testid": "fs-error",
304
247
  role: "alert",
305
248
  children: error
306
249
  }, void 0, false);
307
- $[46] = error;
308
- $[47] = t22;
250
+ $[43] = error;
251
+ $[44] = t18;
309
252
  } else {
310
- t22 = $[47];
253
+ t18 = $[44];
311
254
  }
312
- t10 = /* @__PURE__ */ jsxDEV("div", {
255
+ t6 = /* @__PURE__ */ jsxDEV("div", {
313
256
  className: "flex flex-col gap-4",
314
257
  "data-testid": "lunora-function-stats",
315
- children: [t21, t22, stats !== null && sorted.length === 0 && error === null && /* @__PURE__ */ jsxDEV(EmptyState, {
258
+ children: [t17, t18, stats !== null && sorted.length === 0 && error === null && /* @__PURE__ */ jsxDEV(EmptyState, {
316
259
  description: t("Per-function call counts, error rates, and latency land here after your first request."),
317
260
  icon: /* @__PURE__ */ jsxDEV("svg", {
318
261
  "aria-hidden": "true",
@@ -412,18 +355,18 @@ const FunctionStatsPanel = (t0) => {
412
355
  }, void 0, false)
413
356
  }, void 0, false)]
414
357
  }, void 0, true);
415
- $[11] = error;
416
- $[12] = kindByPath;
417
- $[13] = liveError;
418
- $[14] = shardKey;
419
- $[15] = sortKey;
420
- $[16] = stats;
421
- $[17] = t;
422
- $[18] = t10;
358
+ $[8] = error;
359
+ $[9] = kindByPath;
360
+ $[10] = liveError;
361
+ $[11] = shardKey;
362
+ $[12] = sortKey;
363
+ $[13] = stats;
364
+ $[14] = t;
365
+ $[15] = t6;
423
366
  } else {
424
- t10 = $[18];
367
+ t6 = $[15];
425
368
  }
426
- return t10;
369
+ return t6;
427
370
  };
428
371
  function _temp(descriptor) {
429
372
  return [descriptor.path, descriptor.kind];