@lunora/studio 1.0.0-alpha.56 → 1.0.0-alpha.58

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 (147) hide show
  1. package/dist/index.d.ts +61 -4
  2. package/dist/index.js +13 -11
  3. package/dist/mount.d.ts +1 -1
  4. package/dist/mount.js +1 -1
  5. package/dist/packem_chunks/ApiTab.js +3 -3
  6. package/dist/packem_chunks/AuditPanel.js +4 -4
  7. package/dist/packem_chunks/DeploymentHealthPanel.js +664 -0
  8. package/dist/packem_chunks/ExportImportPanel.js +3 -3
  9. package/dist/packem_chunks/FileBrowser.js +3 -3
  10. package/dist/packem_chunks/FunctionRunner.js +2 -2
  11. package/dist/packem_chunks/FunctionStatsPanel.js +4 -4
  12. package/dist/packem_chunks/HealthPanel.js +3 -3
  13. package/dist/packem_chunks/InsightsPanel.js +4 -4
  14. package/dist/packem_chunks/LogsPanel.js +537 -89
  15. package/dist/packem_chunks/MailPanel.js +4 -4
  16. package/dist/packem_chunks/MetricsPanel.js +475 -244
  17. package/dist/packem_chunks/MigrationsPanel.js +4 -4
  18. package/dist/packem_chunks/NotificationsPanel.js +306 -0
  19. package/dist/packem_chunks/PitrPanel.js +2 -2
  20. package/dist/packem_chunks/SchemaViewer.js +2 -2
  21. package/dist/packem_chunks/SecurityAdvisorPanel.js +3 -3
  22. package/dist/packem_chunks/SettingsPanel.js +3 -3
  23. package/dist/packem_chunks/SqlEditorPanel.js +5 -5
  24. package/dist/packem_chunks/TableEditor.js +3 -3
  25. package/dist/packem_chunks/agents-panel.js +4 -4
  26. package/dist/packem_chunks/analytics-panel.js +1 -1
  27. package/dist/packem_chunks/auth-audit-panel.js +247 -0
  28. package/dist/packem_chunks/auth-config-panel.js +1 -1
  29. package/dist/packem_chunks/auth-sessions-panel.js +2 -2
  30. package/dist/packem_chunks/containers-panel.js +2 -2
  31. package/dist/packem_chunks/dashboards-panel.js +3 -3
  32. package/dist/packem_chunks/fanout-panel.js +3 -3
  33. package/dist/packem_chunks/flags-panel.js +3 -3
  34. package/dist/packem_chunks/issues-panel.js +3 -3
  35. package/dist/packem_chunks/kv-browser.js +2 -2
  36. package/dist/packem_chunks/log-drains-panel.js +1 -1
  37. package/dist/packem_chunks/organizations-panel.js +3 -3
  38. package/dist/packem_chunks/payments-panel.js +31 -4
  39. package/dist/packem_chunks/permissions-panel.js +4 -4
  40. package/dist/packem_chunks/queues-panel.js +4 -4
  41. package/dist/packem_chunks/rls-panel.js +3 -3
  42. package/dist/packem_chunks/schedule-panel.js +3 -3
  43. package/dist/packem_chunks/storage-rules-panel.js +3 -3
  44. package/dist/packem_chunks/subscriptions-panel.js +3 -3
  45. package/dist/packem_chunks/traces-panel.js +128 -115
  46. package/dist/packem_chunks/users-panel.js +3 -3
  47. package/dist/packem_chunks/vector-browser.js +1 -1
  48. package/dist/packem_chunks/workflows-panel.js +3 -3
  49. package/dist/packem_shared/{ADMIN_FUNCTIONS-C1LXrovV.js → ADMIN_FUNCTIONS-P2UzJscH.js} +3 -0
  50. package/dist/packem_shared/{ApiDocsPanel-cYkYKjK3.js → ApiDocsPanel-DNDpeR5O.js} +2 -2
  51. package/dist/packem_shared/{ApiReferencePanel-Dd8pcswz.js → ApiReferencePanel-ChlRsAXU.js} +1 -1
  52. package/dist/packem_shared/{CommandPalette-BXV4eKf5.js → CommandPalette-BpkopP5f.js} +1 -1
  53. package/dist/packem_shared/{DataBrowser-CowupumK.js → DataBrowser-obTn4sKX.js} +6 -6
  54. package/dist/packem_shared/{GlobalDataBrowser-D8h1fTL1.js → GlobalDataBrowser-BCaohHZ5.js} +3 -3
  55. package/dist/packem_shared/{HomePanel-B12QgvIn.js → HomePanel-DCRj3hGB.js} +4 -4
  56. package/dist/packem_shared/{OpenRpcReferencePanel-CWaf0ZtX.js → OpenRpcReferencePanel-CIeQE1aE.js} +1 -1
  57. package/dist/packem_shared/{ScheduledJobs-Cz5Tr-M6.js → ScheduledJobs-BQzQo84k.js} +2 -2
  58. package/dist/packem_shared/{Studio-DV1PhCIl.js → Studio-DnlPCbID.js} +4 -4
  59. package/dist/packem_shared/{StudioApp-BF2rK77z.js → StudioApp-CzqlB4zO.js} +2 -2
  60. package/dist/packem_shared/{advisor-view-1RaDWED7.js → advisor-view-D95sN-wO.js} +1 -1
  61. package/dist/packem_shared/{app.d-C-kxb-1T.d.ts → app.d-bRPJhby-.d.ts} +1 -1
  62. package/dist/packem_shared/{data-grid-C9I16KWr.js → data-grid-BywzWfek.js} +1 -1
  63. package/dist/packem_shared/{error-alert-vIPQoN3Y.js → error-alert-D9uIFJUS.js} +1 -1
  64. package/dist/packem_shared/{grid-features-B_fZH4iQ.js → grid-features-ZOLhHKrR.js} +1 -1
  65. package/dist/packem_shared/{home-panel-DDo_fi19.js → home-panel-BRAA2UlM.js} +3 -3
  66. package/dist/packem_shared/{internal-zwBoOv24.js → internal-DzHCc2Rq.js} +10 -1
  67. package/dist/packem_shared/{reference-view-DUULLuOi.js → reference-view-DfXN7oWP.js} +1 -1
  68. package/dist/packem_shared/{result-chart-DZradBAS.js → result-chart-Bf9mbCIo.js} +1 -1
  69. package/dist/packem_shared/{studio-CuNuEnSJ.js → studio-8QSXbZ98.js} +684 -609
  70. package/dist/packem_shared/{table-list-sidebar-huX4VmgI.js → table-list-sidebar-gCE17v9B.js} +1 -1
  71. package/dist/packem_shared/trace-handoff-CGolF3KS.js +38 -0
  72. package/dist/packem_shared/{use-admin-query-BGJ010yZ.js → use-admin-query-C7JNuQp-.js} +1 -1
  73. package/dist/packem_shared/{use-async-submit-DGCtuDyz.js → use-async-submit-rnSk_jXl.js} +2 -2
  74. package/dist/standalone/{chunk-WOYQG5AM.js → chunk-2YTF6LJ6.js} +1 -1
  75. package/dist/standalone/chunk-3LJEGSMK.js +11 -0
  76. package/dist/standalone/{chunk-OOLK6C5I.js → chunk-56XQYNUJ.js} +1 -1
  77. package/dist/standalone/chunk-5QT5JRXD.js +3 -0
  78. package/dist/standalone/{chunk-VC2VDAUO.js → chunk-6RLPR7PL.js} +1 -1
  79. package/dist/standalone/{chunk-XFINDIAB.js → chunk-6V74EUPK.js} +1 -1
  80. package/dist/standalone/{chunk-RCSULEDU.js → chunk-7EE33WLB.js} +1 -1
  81. package/dist/standalone/{chunk-XCNYUUD6.js → chunk-AN4RKMKW.js} +1 -1
  82. package/dist/standalone/{chunk-S7BCXJWD.js → chunk-AXNGWSBM.js} +1 -1
  83. package/dist/standalone/{chunk-4A7VE2UO.js → chunk-AXZILWRM.js} +1 -1
  84. package/dist/standalone/{chunk-EGANQQLW.js → chunk-C7RHEBOH.js} +1 -1
  85. package/dist/standalone/chunk-CSWIYOB3.js +1 -0
  86. package/dist/standalone/{chunk-AL5UKM6M.js → chunk-D3VAON25.js} +1 -1
  87. package/dist/standalone/{chunk-HNIDN3RX.js → chunk-DDLQN67F.js} +1 -1
  88. package/dist/standalone/chunk-DGHW5JG5.js +1 -0
  89. package/dist/standalone/{chunk-6RW37KKD.js → chunk-DMCSOTAE.js} +1 -1
  90. package/dist/standalone/{chunk-E5Z2TAAR.js → chunk-E3BKETAS.js} +1 -1
  91. package/dist/standalone/{chunk-LJE6PGHD.js → chunk-E3OXNN6O.js} +1 -1
  92. package/dist/standalone/chunk-E6BOGDIS.js +1 -0
  93. package/dist/standalone/{chunk-FDWXYXOM.js → chunk-F2YMCQ6B.js} +1 -1
  94. package/dist/standalone/{chunk-D73WYMRU.js → chunk-F7GE4X2U.js} +1 -1
  95. package/dist/standalone/{chunk-3W4CSGDO.js → chunk-FAVUOGJR.js} +1 -1
  96. package/dist/standalone/{chunk-YS7NUMAN.js → chunk-FXP6256Q.js} +1 -1
  97. package/dist/standalone/{chunk-RVVADT2N.js → chunk-G6CTAYHJ.js} +1 -1
  98. package/dist/standalone/chunk-H42W62SE.js +1 -0
  99. package/dist/standalone/{chunk-5XO36X4C.js → chunk-HBGS4SEX.js} +8 -8
  100. package/dist/standalone/{chunk-25CDYYNE.js → chunk-HTF5ZX4I.js} +1 -1
  101. package/dist/standalone/{chunk-6ZGXWDSY.js → chunk-I2PS4L74.js} +1 -1
  102. package/dist/standalone/{chunk-LJ3KEIPO.js → chunk-J7OGP4NN.js} +1 -1
  103. package/dist/standalone/{chunk-3BYY75EO.js → chunk-L2LN3MK4.js} +1 -1
  104. package/dist/standalone/{chunk-2U3KE6IP.js → chunk-LT3FH6MW.js} +1 -1
  105. package/dist/standalone/{chunk-ZXLEXF4X.js → chunk-LXULVPEM.js} +3 -3
  106. package/dist/standalone/{chunk-XTOCLVRS.js → chunk-LZUWZBPE.js} +1 -1
  107. package/dist/standalone/{chunk-2DCA6LV7.js → chunk-M4JM3TOY.js} +1 -1
  108. package/dist/standalone/{chunk-OEIBZ5AI.js → chunk-MLA5ZAEB.js} +1 -1
  109. package/dist/standalone/{chunk-WQC5IIF7.js → chunk-MRBI5HNQ.js} +1 -1
  110. package/dist/standalone/{chunk-CHNXZYAC.js → chunk-N5XX4HOL.js} +1 -1
  111. package/dist/standalone/{chunk-SPACAIAR.js → chunk-NKFXMDOD.js} +1 -1
  112. package/dist/standalone/{chunk-D54HL2MW.js → chunk-NPSNKFHE.js} +1 -1
  113. package/dist/standalone/{chunk-WCLFE2ZB.js → chunk-O7FVPUCO.js} +1 -1
  114. package/dist/standalone/{chunk-GVFODXW2.js → chunk-OKQXTLFX.js} +1 -1
  115. package/dist/standalone/{chunk-G4GGGHEV.js → chunk-QAIM6KWT.js} +1 -1
  116. package/dist/standalone/{chunk-7YGTGBP7.js → chunk-QCPMTB6W.js} +1 -1
  117. package/dist/standalone/{chunk-LYAWJGSH.js → chunk-QQ2LOSZL.js} +1 -1
  118. package/dist/standalone/{chunk-XZWFP2GI.js → chunk-QVUQXJCT.js} +1 -1
  119. package/dist/standalone/{chunk-6LQ3FXP2.js → chunk-R2GMHLJY.js} +1 -1
  120. package/dist/standalone/{chunk-4F72YCTU.js → chunk-RD5UG2YL.js} +1 -1
  121. package/dist/standalone/chunk-RJTIP3WF.js +1 -0
  122. package/dist/standalone/chunk-SOC5CY3F.js +1 -0
  123. package/dist/standalone/{chunk-JWCCDDLY.js → chunk-SS7JLF2I.js} +1 -1
  124. package/dist/standalone/{chunk-VDOUWYIZ.js → chunk-SWWYUGPL.js} +1 -1
  125. package/dist/standalone/chunk-TEWVD66F.js +1 -0
  126. package/dist/standalone/{chunk-ULOBAURC.js → chunk-TTXRHJUP.js} +1 -1
  127. package/dist/standalone/{chunk-BZ5BHTVF.js → chunk-UKDHGVOC.js} +1 -1
  128. package/dist/standalone/{chunk-5IGHDPEP.js → chunk-UPNTMJFF.js} +1 -1
  129. package/dist/standalone/{chunk-FQUNSQLG.js → chunk-WMDH2CIZ.js} +1 -1
  130. package/dist/standalone/{chunk-DOLG4V3A.js → chunk-XN6QYJQ6.js} +1 -1
  131. package/dist/standalone/chunk-Y4U6CC22.js +1 -0
  132. package/dist/standalone/{chunk-SWMBBYJU.js → chunk-Y7PD5KP4.js} +1 -1
  133. package/dist/standalone/chunk-YFIPHCEC.js +1 -0
  134. package/dist/standalone/chunk-YJXOWLFJ.js +1 -0
  135. package/dist/standalone/{chunk-2XJ3WRKW.js → chunk-YNN6NFRZ.js} +1 -1
  136. package/dist/standalone/{chunk-DBCP55V6.js → chunk-YUGHRVPD.js} +1 -1
  137. package/dist/standalone/studio.js +1 -1
  138. package/dist/styles.css +1 -1
  139. package/package.json +6 -6
  140. package/dist/standalone/chunk-5SXQWGTH.js +0 -1
  141. package/dist/standalone/chunk-DGWFJ3GW.js +0 -1
  142. package/dist/standalone/chunk-ILGPO3PK.js +0 -3
  143. package/dist/standalone/chunk-MHGJUKCZ.js +0 -1
  144. package/dist/standalone/chunk-N3V74RBP.js +0 -1
  145. package/dist/standalone/chunk-OBFYFJYZ.js +0 -1
  146. package/dist/standalone/chunk-S2G7OH5T.js +0 -11
  147. package/dist/standalone/chunk-VJABWVPW.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { useLunora } from '@lunora/react';
2
2
  import { useState, useEffect } from 'react';
3
3
  import { ConfirmButton } from '../packem_shared/ConfirmButton-C2eVi2Qv.js';
4
- import { E as ErrorAlert } from '../packem_shared/error-alert-vIPQoN3Y.js';
4
+ import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
5
5
  import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
6
6
  import { ShardInput } from '../packem_shared/ShardInput-CZnpHILL.js';
7
7
  import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
@@ -11,11 +11,11 @@ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
11
11
  import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
12
12
  import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
13
13
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
14
- import { u as useAdminQuery } from '../packem_shared/use-admin-query-BGJ010yZ.js';
14
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
15
15
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
16
16
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
17
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
18
- import { i as formatTimestamp, f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-zwBoOv24.js';
17
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
18
+ import { i as formatTimestamp, f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
19
19
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
20
20
  import { jsxDEV } from 'react/jsx-dev-runtime';
21
21
 
@@ -0,0 +1,306 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useState } from 'react';
3
+ import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
4
+ import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
5
+ import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
6
+ import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
7
+ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
8
+ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
9
+ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
10
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
11
+ import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
12
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
13
+ import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
14
+ import { jsxDEV } from 'react/jsx-dev-runtime';
15
+
16
+ const statusVariant = (status) => {
17
+ if (status === "ok") {
18
+ return "success";
19
+ }
20
+ if (status === "failed") {
21
+ return "destructive";
22
+ }
23
+ if (status === "expired") {
24
+ return "warning";
25
+ }
26
+ return "secondary";
27
+ };
28
+ const deviceTarget = (device) => device.endpoint ?? device.id;
29
+ const NotificationsPanel = () => {
30
+ const $ = c(38);
31
+ const t = useT();
32
+ const [kind, setKind] = useState("all");
33
+ const [search, setSearch] = useState("");
34
+ let t0;
35
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
36
+ t0 = {};
37
+ $[0] = t0;
38
+ } else {
39
+ t0 = $[0];
40
+ }
41
+ const {
42
+ data,
43
+ error,
44
+ errorSource,
45
+ isLoading,
46
+ refetch
47
+ } = useAdminQuery(ADMIN_FUNCTIONS.listPushSubscriptions, t0);
48
+ let t1;
49
+ if ($[1] !== data?.subscriptions || $[2] !== error || $[3] !== errorSource || $[4] !== isLoading || $[5] !== kind || $[6] !== refetch || $[7] !== search || $[8] !== t) {
50
+ const devices = data?.subscriptions ?? [];
51
+ const needle = search.trim().toLowerCase();
52
+ const filtered = devices.filter((device) => {
53
+ if (kind !== "all" && device.kind !== kind) {
54
+ return false;
55
+ }
56
+ if (needle === "") {
57
+ return true;
58
+ }
59
+ return `${deviceTarget(device)} ${device.userId ?? ""}`.toLowerCase().includes(needle);
60
+ });
61
+ let t2;
62
+ if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
63
+ t2 = (event) => {
64
+ setSearch(event.target.value);
65
+ };
66
+ $[10] = t2;
67
+ } else {
68
+ t2 = $[10];
69
+ }
70
+ const onSearchChange = t2;
71
+ let t3;
72
+ if ($[11] !== refetch) {
73
+ t3 = () => {
74
+ refetch();
75
+ };
76
+ $[11] = refetch;
77
+ $[12] = t3;
78
+ } else {
79
+ t3 = $[12];
80
+ }
81
+ const onRefresh = t3;
82
+ let t4;
83
+ if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
84
+ t4 = ["all", "web-push", "fcm"];
85
+ $[13] = t4;
86
+ } else {
87
+ t4 = $[13];
88
+ }
89
+ const kinds = t4;
90
+ let t5;
91
+ if ($[14] !== kind || $[15] !== t) {
92
+ t5 = /* @__PURE__ */ jsxDEV("div", {
93
+ className: "flex items-center gap-1",
94
+ "data-testid": "nt-kind-filter",
95
+ role: "tablist",
96
+ children: kinds.map((value) => /* @__PURE__ */ jsxDEV(Button, {
97
+ "aria-selected": kind === value,
98
+ "data-testid": `nt-kind-${value}`,
99
+ onClick: () => {
100
+ setKind(value);
101
+ },
102
+ role: "tab",
103
+ size: "sm",
104
+ type: "button",
105
+ variant: kind === value ? "secondary" : "ghost",
106
+ children: value === "all" ? t("All") : value
107
+ }, value, false))
108
+ }, void 0, false);
109
+ $[14] = kind;
110
+ $[15] = t;
111
+ $[16] = t5;
112
+ } else {
113
+ t5 = $[16];
114
+ }
115
+ let t6;
116
+ if ($[17] !== t) {
117
+ t6 = t("Filter devices");
118
+ $[17] = t;
119
+ $[18] = t6;
120
+ } else {
121
+ t6 = $[18];
122
+ }
123
+ let t7;
124
+ if ($[19] !== t) {
125
+ t7 = t("filter endpoint, user");
126
+ $[19] = t;
127
+ $[20] = t7;
128
+ } else {
129
+ t7 = $[20];
130
+ }
131
+ let t8;
132
+ if ($[21] !== search || $[22] !== t6 || $[23] !== t7) {
133
+ t8 = /* @__PURE__ */ jsxDEV(Input, {
134
+ "aria-label": t6,
135
+ className: "h-8 w-56",
136
+ "data-testid": "nt-search",
137
+ onChange: onSearchChange,
138
+ placeholder: t7,
139
+ value: search
140
+ }, void 0, false);
141
+ $[21] = search;
142
+ $[22] = t6;
143
+ $[23] = t7;
144
+ $[24] = t8;
145
+ } else {
146
+ t8 = $[24];
147
+ }
148
+ let t9;
149
+ if ($[25] !== t) {
150
+ t9 = t("Refresh");
151
+ $[25] = t;
152
+ $[26] = t9;
153
+ } else {
154
+ t9 = $[26];
155
+ }
156
+ let t10;
157
+ if ($[27] !== onRefresh || $[28] !== t9) {
158
+ t10 = /* @__PURE__ */ jsxDEV(Button, {
159
+ className: "ml-auto",
160
+ "data-testid": "nt-refresh",
161
+ onClick: onRefresh,
162
+ size: "sm",
163
+ type: "button",
164
+ variant: "outline",
165
+ children: t9
166
+ }, void 0, false);
167
+ $[27] = onRefresh;
168
+ $[28] = t9;
169
+ $[29] = t10;
170
+ } else {
171
+ t10 = $[29];
172
+ }
173
+ const t11 = devices.length > 0 && /* @__PURE__ */ jsxDEV(Badge, {
174
+ "data-testid": "nt-count",
175
+ variant: "secondary",
176
+ children: t("{count} devices", {
177
+ count: devices.length
178
+ })
179
+ }, void 0, false);
180
+ let t12;
181
+ if ($[30] !== t10 || $[31] !== t11 || $[32] !== t5 || $[33] !== t8) {
182
+ t12 = /* @__PURE__ */ jsxDEV("div", {
183
+ className: "flex flex-wrap items-center gap-2",
184
+ children: [t5, t8, t10, t11]
185
+ }, void 0, true);
186
+ $[30] = t10;
187
+ $[31] = t11;
188
+ $[32] = t5;
189
+ $[33] = t8;
190
+ $[34] = t12;
191
+ } else {
192
+ t12 = $[34];
193
+ }
194
+ let t13;
195
+ if ($[35] !== error || $[36] !== errorSource) {
196
+ t13 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
197
+ error: errorSource,
198
+ testId: "nt-error"
199
+ }, void 0, false);
200
+ $[35] = error;
201
+ $[36] = errorSource;
202
+ $[37] = t13;
203
+ } else {
204
+ t13 = $[37];
205
+ }
206
+ t1 = /* @__PURE__ */ jsxDEV("div", {
207
+ className: "flex flex-col gap-4",
208
+ "data-testid": "lunora-notifications",
209
+ children: [t12, t13, error === null && !isLoading && filtered.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
210
+ description: t("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),
211
+ icon: /* @__PURE__ */ jsxDEV("svg", {
212
+ "aria-hidden": "true",
213
+ fill: "none",
214
+ stroke: "currentColor",
215
+ strokeLinecap: "round",
216
+ strokeLinejoin: "round",
217
+ strokeWidth: 1.6,
218
+ viewBox: "0 0 24 24",
219
+ children: /* @__PURE__ */ jsxDEV("path", {
220
+ d: "M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"
221
+ }, void 0, false)
222
+ }, void 0, false),
223
+ testId: "nt-empty",
224
+ title: t("No registered devices.")
225
+ }, void 0, false), filtered.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
226
+ className: "overflow-hidden py-0",
227
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
228
+ className: "max-h-[30rem] overflow-auto px-0",
229
+ children: /* @__PURE__ */ jsxDEV(Table, {
230
+ "data-testid": "nt-table",
231
+ children: [/* @__PURE__ */ jsxDEV(TableHeader, {
232
+ children: /* @__PURE__ */ jsxDEV(TableRow, {
233
+ children: [/* @__PURE__ */ jsxDEV(TableHead, {
234
+ children: t("kind")
235
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
236
+ children: t("endpoint")
237
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
238
+ children: t("user")
239
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
240
+ children: t("last seen")
241
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
242
+ children: t("status")
243
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
244
+ children: t("error")
245
+ }, void 0, false)]
246
+ }, void 0, true)
247
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
248
+ children: filtered.map((device_0) => {
249
+ const target = deviceTarget(device_0);
250
+ return /* @__PURE__ */ jsxDEV(TableRow, {
251
+ "data-testid": "nt-row",
252
+ children: [/* @__PURE__ */ jsxDEV(TableCell, {
253
+ children: /* @__PURE__ */ jsxDEV(Badge, {
254
+ variant: "outline",
255
+ children: device_0.kind
256
+ }, void 0, false)
257
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
258
+ className: "max-w-[28ch] truncate font-mono text-xs",
259
+ title: target,
260
+ children: target
261
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
262
+ className: "max-w-[16ch] truncate font-mono text-xs",
263
+ children: device_0.userId ?? /* @__PURE__ */ jsxDEV("span", {
264
+ className: "text-muted-foreground",
265
+ children: "—"
266
+ }, void 0, false)
267
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
268
+ className: "text-muted-foreground tabular-nums",
269
+ children: formatTimestamp(device_0.lastSeenAt, "—")
270
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
271
+ children: /* @__PURE__ */ jsxDEV(Badge, {
272
+ "data-testid": `nt-status-${device_0.id}`,
273
+ variant: statusVariant(device_0.lastStatus),
274
+ children: device_0.lastStatus ?? t("n/a")
275
+ }, void 0, false)
276
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
277
+ className: "max-w-[28ch] truncate font-mono text-xs text-muted-foreground",
278
+ title: device_0.lastError ?? void 0,
279
+ children: device_0.lastError ?? /* @__PURE__ */ jsxDEV("span", {
280
+ className: "text-muted-foreground",
281
+ children: "—"
282
+ }, void 0, false)
283
+ }, void 0, false)]
284
+ }, device_0.id, true);
285
+ })
286
+ }, void 0, false)]
287
+ }, void 0, true)
288
+ }, void 0, false)
289
+ }, void 0, false)]
290
+ }, void 0, true);
291
+ $[1] = data?.subscriptions;
292
+ $[2] = error;
293
+ $[3] = errorSource;
294
+ $[4] = isLoading;
295
+ $[5] = kind;
296
+ $[6] = refetch;
297
+ $[7] = search;
298
+ $[8] = t;
299
+ $[9] = t1;
300
+ } else {
301
+ t1 = $[9];
302
+ }
303
+ return t1;
304
+ };
305
+
306
+ export { NotificationsPanel };
@@ -7,8 +7,8 @@ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
7
7
  import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
8
8
  import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
9
9
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
10
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
11
- import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-zwBoOv24.js';
10
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
11
+ import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
12
12
  import { jsxDEV } from 'react/jsx-dev-runtime';
13
13
 
14
14
  const GET_BOOKMARK = adminRef(ADMIN_FUNCTIONS.getPitrBookmark);
@@ -11,8 +11,8 @@ import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
11
11
  import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
12
12
  import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
13
13
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
14
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
15
- import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-zwBoOv24.js';
14
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
15
+ import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
16
16
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
17
17
  import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
18
18
  import { Download01Icon } from '@hugeicons/core-free-icons';
@@ -1,8 +1,8 @@
1
1
  import { c } from 'react/compiler-runtime';
2
- import { u as useAdminQuery } from '../packem_shared/use-admin-query-BGJ010yZ.js';
2
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
3
3
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
4
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
5
- import { A as AdvisorView } from '../packem_shared/advisor-view-1RaDWED7.js';
4
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
5
+ import { A as AdvisorView } from '../packem_shared/advisor-view-D95sN-wO.js';
6
6
  import { jsxDEV } from 'react/jsx-dev-runtime';
7
7
 
8
8
  const findingTitle = (t, finding) => ({
@@ -1,12 +1,12 @@
1
1
  import { c } from 'react/compiler-runtime';
2
2
  import 'react';
3
- import { E as ErrorAlert } from '../packem_shared/error-alert-vIPQoN3Y.js';
3
+ import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
4
4
  import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
5
5
  import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
6
6
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
7
- import { u as useAdminQuery } from '../packem_shared/use-admin-query-BGJ010yZ.js';
7
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
8
8
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { a as CLOUDFLARE_WORKERS_URL } from '../packem_shared/cf-links-SIbyi4Y1.js';
11
11
  import { jsxDEV } from 'react/jsx-dev-runtime';
12
12
 
@@ -1,17 +1,17 @@
1
1
  import { c } from 'react/compiler-runtime';
2
2
  import { useLunora } from '@lunora/react';
3
3
  import { useState, useRef, useEffect, useId } from 'react';
4
- import { S as SqlResultChart } from '../packem_shared/result-chart-DZradBAS.js';
4
+ import { S as SqlResultChart } from '../packem_shared/result-chart-Bf9mbCIo.js';
5
5
  import { ShardInput } from '../packem_shared/ShardInput-CZnpHILL.js';
6
6
  import { A as Alert } from '../packem_shared/alert-CdAET2K_.js';
7
7
  import { c as TableHead, a as TableHeader, b as TableRow, e as TableCell, d as TableBody, T as Table } from '../packem_shared/table-DsCa9Qp9.js';
8
8
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
9
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
10
10
  import { u as usePersistedList, n as newId, b as usePersistedValue } from '../packem_shared/browser-storage-L4gOP5gJ.js';
11
- import { f as fireAndForget, c as callOptions, a as adminRef, e as errorMessage } from '../packem_shared/internal-zwBoOv24.js';
11
+ import { f as fireAndForget, c as callOptions, a as adminRef, e as errorMessage } from '../packem_shared/internal-DzHCc2Rq.js';
12
12
  import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
13
- import { C as CellValue } from '../packem_shared/data-grid-C9I16KWr.js';
14
- import { E as ExportMenu } from '../packem_shared/grid-features-B_fZH4iQ.js';
13
+ import { C as CellValue } from '../packem_shared/data-grid-BywzWfek.js';
14
+ import { E as ExportMenu } from '../packem_shared/grid-features-ZOLhHKrR.js';
15
15
  import { c as cn } from '../packem_shared/utils-B05Dmz_H.js';
16
16
  import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
17
17
 
@@ -5,10 +5,10 @@ import { useRef, useState, useEffect } from 'react';
5
5
  import { T as TIER_META } from '../packem_shared/storage-tier-CL98eOvn.js';
6
6
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
7
7
  import { s as searchToDataView, d as dataViewToSearch } from '../packem_shared/data-view-params-Cd6yRVbv.js';
8
- import { f as fireAndForget } from '../packem_shared/internal-zwBoOv24.js';
8
+ import { f as fireAndForget } from '../packem_shared/internal-DzHCc2Rq.js';
9
9
  import { l as loadJsonArray, s as saveJson } from '../packem_shared/browser-storage-L4gOP5gJ.js';
10
- import { DataBrowser } from '../packem_shared/DataBrowser-CowupumK.js';
11
- import { GlobalDataBrowser } from '../packem_shared/GlobalDataBrowser-D8h1fTL1.js';
10
+ import { DataBrowser } from '../packem_shared/DataBrowser-obTn4sKX.js';
11
+ import { GlobalDataBrowser } from '../packem_shared/GlobalDataBrowser-BCaohHZ5.js';
12
12
  import { jsxDEV } from 'react/jsx-dev-runtime';
13
13
 
14
14
  const STORAGE_KEY = "lunora-studio-saved-queries";
@@ -1,14 +1,14 @@
1
1
  import { useState } from 'react';
2
- import { E as ErrorAlert } from '../packem_shared/error-alert-vIPQoN3Y.js';
2
+ import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
3
3
  import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
4
4
  import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
5
5
  import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
6
6
  import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
7
7
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
8
- import { u as useAdminQuery } from '../packem_shared/use-admin-query-BGJ010yZ.js';
8
+ import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
9
9
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
10
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C1LXrovV.js';
11
- import { i as formatTimestamp } from '../packem_shared/internal-zwBoOv24.js';
10
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
11
+ import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
12
12
  import { jsxDEV } from 'react/jsx-dev-runtime';
13
13
 
14
14
  const THREADS_TABLE = "agent_threads";
@@ -5,7 +5,7 @@ import { C as Card } from '../packem_shared/card-F2vH_aj2.js';
5
5
  import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
6
6
  import { T as Table, a as TableHeader, b as TableRow, d as TableBody, e as TableCell, c as TableHead } from '../packem_shared/table-DsCa9Qp9.js';
7
7
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
8
- import { e as errorMessage, f as fireAndForget, h as formatCell } from '../packem_shared/internal-zwBoOv24.js';
8
+ import { e as errorMessage, f as fireAndForget, h as formatCell } from '../packem_shared/internal-DzHCc2Rq.js';
9
9
  import { jsxDEV } from 'react/jsx-dev-runtime';
10
10
 
11
11
  const DEFAULT_DATASET = "ANALYTICS";