@burdenoff/microfe-bigconsole 2026.615.2 → 2026.616.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.
@@ -2,12 +2,12 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
3
  import { isNative as t, nativeImpact as n, nativeNotify as r } from "../../utils/nativeBridge.js";
4
4
  import { memo as i, useCallback as a, useEffect as o, useState as s } from "react";
5
- import { AlertCircle as c, ArrowRight as l, Ban as ee, CheckCircle as u, Clock as d, Eye as f, Loader2 as p, RefreshCw as m, Sparkles as h, Trash2 as te, Wand2 as g, X as ne, XCircle as _ } from "lucide-react";
6
- import { gql as v } from "@apollo/client";
7
- import { useMutation as y, useQuery as b } from "@apollo/client/react";
8
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
5
+ import { AlertCircle as c, ArrowRight as l, Ban as ee, CheckCircle as u, Clock as d, Eye as te, Loader2 as f, RefreshCw as ne, Sparkles as p, Trash2 as m, Wand2 as h, X as re, XCircle as g } from "lucide-react";
6
+ import { gql as _ } from "@apollo/client";
7
+ import { useMutation as v, useQuery as y } from "@apollo/client/react";
8
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
9
  //#region src/bigconsole/pages/InsightsPage.tsx
10
- var C = v`
10
+ var S = _`
11
11
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
12
12
  listPromptGenerations(status: $status, first: $first) {
13
13
  edges {
@@ -36,7 +36,7 @@ var C = v`
36
36
  totalCount
37
37
  }
38
38
  }
39
- `, re = v`
39
+ `, C = _`
40
40
  query GetPromptSuggestions($category: String, $limit: Int) {
41
41
  getPromptSuggestions(category: $category, limit: $limit) {
42
42
  id
@@ -47,7 +47,7 @@ var C = v`
47
47
  tags
48
48
  }
49
49
  }
50
- `, ie = v`
50
+ `, ie = _`
51
51
  mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
52
52
  generateDashboardFromPrompt(input: $input) {
53
53
  id
@@ -55,24 +55,24 @@ var C = v`
55
55
  prompt
56
56
  }
57
57
  }
58
- `, w = v`
58
+ `, ae = _`
59
59
  mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
60
60
  createDashboardFromGeneration(input: $input) {
61
61
  id
62
62
  }
63
63
  }
64
- `, T = v`
64
+ `, oe = _`
65
65
  mutation DeletePromptGeneration($generationId: ID!) {
66
66
  deletePromptGeneration(generationId: $generationId)
67
67
  }
68
- `, ae = v`
68
+ `, se = _`
69
69
  mutation CancelPromptGeneration($generationId: ID!) {
70
70
  cancelPromptGeneration(generationId: $generationId) {
71
71
  id
72
72
  status
73
73
  }
74
74
  }
75
- `, E = v`
75
+ `, w = _`
76
76
  mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
77
77
  regenerateDashboard(input: $input) {
78
78
  id
@@ -80,7 +80,7 @@ var C = v`
80
80
  prompt
81
81
  }
82
82
  }
83
- `, oe = v`
83
+ `, ce = _`
84
84
  mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
85
85
  refineGeneratedDashboard(input: $input) {
86
86
  id
@@ -88,38 +88,38 @@ var C = v`
88
88
  prompt
89
89
  }
90
90
  }
91
- `, D = [
91
+ `, T = [
92
92
  "PENDING",
93
93
  "PROCESSING",
94
94
  "GENERATING"
95
95
  ];
96
- function se(e) {
96
+ function E(e) {
97
97
  switch (e) {
98
- case "COMPLETED": return /* @__PURE__ */ x(u, {
98
+ case "COMPLETED": return /* @__PURE__ */ b(u, {
99
99
  size: 16,
100
100
  className: "text-green-500"
101
101
  });
102
- case "FAILED": return /* @__PURE__ */ x(_, {
102
+ case "FAILED": return /* @__PURE__ */ b(g, {
103
103
  size: 16,
104
104
  className: "text-red-500"
105
105
  });
106
- case "CANCELLED": return /* @__PURE__ */ x(_, {
106
+ case "CANCELLED": return /* @__PURE__ */ b(g, {
107
107
  size: 16,
108
108
  className: "text-gray-400"
109
109
  });
110
110
  case "PENDING":
111
111
  case "PROCESSING":
112
- case "GENERATING": return /* @__PURE__ */ x(p, {
112
+ case "GENERATING": return /* @__PURE__ */ b(f, {
113
113
  size: 16,
114
114
  className: "text-blue-500 animate-spin"
115
115
  });
116
- default: return /* @__PURE__ */ x(d, {
116
+ default: return /* @__PURE__ */ b(d, {
117
117
  size: 16,
118
118
  className: "text-gray-400"
119
119
  });
120
120
  }
121
121
  }
122
- function O(e) {
122
+ function D(e) {
123
123
  switch (e) {
124
124
  case "COMPLETED": return "Completed";
125
125
  case "FAILED": return "Failed";
@@ -130,136 +130,135 @@ function O(e) {
130
130
  default: return e;
131
131
  }
132
132
  }
133
- var k = i(function() {
134
- let i = e(), [u, d] = s(""), [_, v] = s(!1), [k, A] = s(null), [j, M] = s(() => /* @__PURE__ */ new Set()), [N, P] = s(null), [F, I] = s(null), [L, R] = s(""), z = a((e) => {
135
- M((t) => new Set(t).add(e));
136
- }, []), B = a((e) => {
137
- M((t) => {
133
+ var O = i(function() {
134
+ let i = e(), [u, d] = s(""), [g, _] = s(!1), [O, k] = s(null), [A, j] = s(() => /* @__PURE__ */ new Set()), [M, N] = s(null), [P, F] = s(null), [I, L] = s(""), R = a((e) => {
135
+ j((t) => new Set(t).add(e));
136
+ }, []), z = a((e) => {
137
+ j((t) => {
138
138
  let n = new Set(t);
139
139
  return n.delete(e), n;
140
140
  });
141
- }, []), { data: V, loading: H, refetch: U } = b(C, {
141
+ }, []), { data: B, loading: le, refetch: V, startPolling: H, stopPolling: U } = y(S, {
142
142
  variables: { first: 20 },
143
143
  fetchPolicy: "cache-and-network"
144
- }), { data: W } = b(re, { variables: { limit: 6 } }), [G] = y(ie), [K] = y(w), [q] = y(T), [J] = y(ae), [Y] = y(E), [X] = y(oe), Z = V?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = W?.getPromptSuggestions || [];
145
- o(() => {
146
- if (!Z.some((e) => D.includes(e.status))) return;
147
- let e = setInterval(() => {
148
- U();
149
- }, 3e3);
150
- return () => clearInterval(e);
151
- }, [Z, U]), o(() => {
152
- if (!N && !F) return;
144
+ }), W = B?.listPromptGenerations?.edges?.some((e) => T.includes(e.node.status)) ?? !1, { data: ue } = y(C, { variables: { limit: 6 } }), [G] = v(ie), [K] = v(ae), [q] = v(oe), [J] = v(se), [Y] = v(w), [X] = v(ce), Z = B?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = ue?.getPromptSuggestions || [];
145
+ o(() => (W || g ? H(2e3) : U(), () => U()), [
146
+ W,
147
+ g,
148
+ H,
149
+ U
150
+ ]), o(() => {
151
+ if (!M && !P) return;
153
152
  let e = (e) => {
154
- e.key === "Escape" && (P(null), I(null));
153
+ e.key === "Escape" && (N(null), F(null));
155
154
  };
156
155
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
157
- }, [N, F]);
156
+ }, [M, P]);
158
157
  let $ = a(async () => {
159
- if (!(!u.trim() || _)) {
158
+ if (!(!u.trim() || g)) {
160
159
  if (u.length > 2e3) {
161
- A("Prompt is too long (max 2000 characters).");
160
+ k("Prompt is too long (max 2000 characters).");
162
161
  return;
163
162
  }
164
- A(null), v(!0);
163
+ k(null), _(!0);
165
164
  try {
166
165
  await G({ variables: { input: {
167
166
  prompt: u.trim(),
168
167
  styleType: "MODERN",
169
168
  layoutType: "GRID",
170
169
  maxWidgets: 8
171
- } } }), d(""), U();
170
+ } } }), d(""), V();
172
171
  } catch (e) {
173
- A(e instanceof Error ? e.message : "Failed to generate dashboard");
172
+ k(e instanceof Error ? e.message : "Failed to generate dashboard");
174
173
  } finally {
175
- v(!1);
174
+ _(!1);
176
175
  }
177
176
  }
178
177
  }, [
179
178
  u,
180
- _,
179
+ g,
181
180
  G,
182
- U
183
- ]), ce = a(async (e) => {
184
- A(null);
181
+ V
182
+ ]), de = a(async (e) => {
183
+ k(null);
185
184
  try {
186
185
  let t = (await K({ variables: { input: { generationId: e } } })).data?.createDashboardFromGeneration?.id;
187
186
  t && i(`/dashboards/${t}`);
188
187
  } catch (e) {
189
- A(e instanceof Error ? e.message : "Failed to create dashboard");
188
+ k(e instanceof Error ? e.message : "Failed to create dashboard");
190
189
  }
191
- }, [K, i]), le = a(async (e) => {
192
- A(null);
190
+ }, [K, i]), fe = a(async (e) => {
191
+ k(null);
193
192
  try {
194
- await q({ variables: { generationId: e } }), t() && r("success"), U();
193
+ await q({ variables: { generationId: e } }), t() && r("success"), V();
195
194
  } catch (e) {
196
- A(e instanceof Error ? e.message : "Failed to delete generation"), t() && r("error");
195
+ k(e instanceof Error ? e.message : "Failed to delete generation"), t() && r("error");
197
196
  }
198
- }, [q, U]), ue = a(async (e) => {
199
- A(null), z(e);
197
+ }, [q, V]), pe = a(async (e) => {
198
+ k(null), R(e);
200
199
  try {
201
- await J({ variables: { generationId: e } }), U();
200
+ await J({ variables: { generationId: e } }), V();
202
201
  } catch (e) {
203
- A(e instanceof Error ? e.message : "Failed to cancel generation");
202
+ k(e instanceof Error ? e.message : "Failed to cancel generation");
204
203
  } finally {
205
- B(e);
204
+ z(e);
206
205
  }
207
- }, [J, U]), de = a(async (e) => {
208
- A(null), z(e);
206
+ }, [J, V]), me = a(async (e) => {
207
+ k(null), R(e);
209
208
  try {
210
- await Y({ variables: { input: { generationId: e } } }), U();
209
+ await Y({ variables: { input: { generationId: e } } }), V();
211
210
  } catch (e) {
212
- A(e instanceof Error ? e.message : "Failed to regenerate dashboard");
211
+ k(e instanceof Error ? e.message : "Failed to regenerate dashboard");
213
212
  } finally {
214
- B(e);
213
+ z(e);
215
214
  }
216
- }, [Y, U]), fe = a(async () => {
217
- if (!F || !L.trim()) return;
218
- let e = F.id;
219
- A(null), z(e);
215
+ }, [Y, V]), he = a(async () => {
216
+ if (!P || !I.trim()) return;
217
+ let e = P.id;
218
+ k(null), R(e);
220
219
  try {
221
220
  await X({ variables: { input: {
222
221
  generationId: e,
223
- refinementPrompt: L.trim()
224
- } } }), I(null), R(""), U();
222
+ refinementPrompt: I.trim()
223
+ } } }), F(null), L(""), V();
225
224
  } catch (e) {
226
- A(e instanceof Error ? e.message : "Failed to refine generation");
225
+ k(e instanceof Error ? e.message : "Failed to refine generation");
227
226
  } finally {
228
- B(e);
227
+ z(e);
229
228
  }
230
229
  }, [
231
- F,
232
- L,
230
+ P,
231
+ I,
233
232
  X,
234
- U
235
- ]), pe = a((e) => {
233
+ V
234
+ ]), ge = a((e) => {
236
235
  d(e);
237
236
  }, []);
238
- return /* @__PURE__ */ S("div", {
237
+ return /* @__PURE__ */ x("div", {
239
238
  style: {
240
239
  minHeight: "100vh",
241
240
  backgroundColor: "var(--color-bg-canvas)"
242
241
  },
243
242
  children: [
244
- /* @__PURE__ */ S("div", {
243
+ /* @__PURE__ */ x("div", {
245
244
  style: {
246
245
  padding: "var(--space-pagePadding)",
247
246
  maxWidth: 960,
248
247
  margin: "0 auto"
249
248
  },
250
249
  children: [
251
- /* @__PURE__ */ S("div", {
250
+ /* @__PURE__ */ x("div", {
252
251
  style: { marginBottom: "var(--space-sectionGap)" },
253
- children: [/* @__PURE__ */ S("div", {
252
+ children: [/* @__PURE__ */ x("div", {
254
253
  style: {
255
254
  display: "flex",
256
255
  alignItems: "center",
257
256
  gap: "var(--space-iconGap)"
258
257
  },
259
- children: [/* @__PURE__ */ x(h, {
258
+ children: [/* @__PURE__ */ b(p, {
260
259
  size: 24,
261
260
  style: { color: "var(--color-action-primary-bg)" }
262
- }), /* @__PURE__ */ x("h1", {
261
+ }), /* @__PURE__ */ b("h1", {
263
262
  style: {
264
263
  fontSize: "var(--font-size-heading-h4)",
265
264
  fontWeight: "var(--font-weight-bold)",
@@ -267,7 +266,7 @@ var k = i(function() {
267
266
  },
268
267
  children: "AI Insights"
269
268
  })]
270
- }), /* @__PURE__ */ x("p", {
269
+ }), /* @__PURE__ */ b("p", {
271
270
  style: {
272
271
  fontSize: "var(--font-size-body-md)",
273
272
  color: "var(--color-text-secondary)",
@@ -276,7 +275,7 @@ var k = i(function() {
276
275
  children: "Generate dashboards from natural language prompts"
277
276
  })]
278
277
  }),
279
- /* @__PURE__ */ S("div", {
278
+ /* @__PURE__ */ x("div", {
280
279
  style: {
281
280
  backgroundColor: "var(--color-bg-surface)",
282
281
  border: "1px solid var(--color-border)",
@@ -285,7 +284,7 @@ var k = i(function() {
285
284
  marginBottom: "var(--space-sectionGap)"
286
285
  },
287
286
  children: [
288
- /* @__PURE__ */ x("label", {
287
+ /* @__PURE__ */ b("label", {
289
288
  htmlFor: "prompt-input",
290
289
  style: {
291
290
  display: "block",
@@ -296,7 +295,7 @@ var k = i(function() {
296
295
  },
297
296
  children: "Describe the dashboard you want to create"
298
297
  }),
299
- /* @__PURE__ */ x("textarea", {
298
+ /* @__PURE__ */ b("textarea", {
300
299
  id: "prompt-input",
301
300
  value: u,
302
301
  onChange: (e) => d(e.target.value),
@@ -318,7 +317,7 @@ var k = i(function() {
318
317
  e.key === "Enter" && (e.metaKey || e.ctrlKey) && $();
319
318
  }
320
319
  }),
321
- /* @__PURE__ */ S("div", {
320
+ /* @__PURE__ */ x("div", {
322
321
  style: {
323
322
  display: "flex",
324
323
  justifyContent: "space-between",
@@ -327,15 +326,15 @@ var k = i(function() {
327
326
  flexWrap: "wrap",
328
327
  gap: 8
329
328
  },
330
- children: [/* @__PURE__ */ x("span", {
329
+ children: [/* @__PURE__ */ b("span", {
331
330
  style: {
332
331
  fontSize: "var(--font-size-body-sm)",
333
332
  color: "var(--color-text-muted)"
334
333
  },
335
334
  children: "Press Ctrl+Enter to generate"
336
- }), /* @__PURE__ */ S("button", {
335
+ }), /* @__PURE__ */ x("button", {
337
336
  onClick: $,
338
- disabled: !u.trim() || _,
337
+ disabled: !u.trim() || g,
339
338
  style: {
340
339
  display: "flex",
341
340
  alignItems: "center",
@@ -347,18 +346,18 @@ var k = i(function() {
347
346
  fontWeight: "var(--font-weight-medium)",
348
347
  fontSize: "var(--font-size-body-sm)",
349
348
  border: "none",
350
- cursor: !u.trim() || _ ? "not-allowed" : "pointer",
351
- opacity: !u.trim() || _ ? .5 : 1
349
+ cursor: !u.trim() || g ? "not-allowed" : "pointer",
350
+ opacity: !u.trim() || g ? .5 : 1
352
351
  },
353
- children: [_ ? /* @__PURE__ */ x(p, {
352
+ children: [g ? /* @__PURE__ */ b(f, {
354
353
  size: 16,
355
354
  className: "animate-spin"
356
- }) : /* @__PURE__ */ x(h, { size: 16 }), "Generate Dashboard"]
355
+ }) : /* @__PURE__ */ b(p, { size: 16 }), "Generate Dashboard"]
357
356
  })]
358
357
  })
359
358
  ]
360
359
  }),
361
- k && /* @__PURE__ */ S("div", {
360
+ O && /* @__PURE__ */ x("div", {
362
361
  style: {
363
362
  display: "flex",
364
363
  alignItems: "center",
@@ -372,15 +371,15 @@ var k = i(function() {
372
371
  color: "var(--color-status-error-text)",
373
372
  fontSize: "var(--font-size-body-sm)"
374
373
  },
375
- children: [/* @__PURE__ */ S("div", {
374
+ children: [/* @__PURE__ */ x("div", {
376
375
  style: {
377
376
  display: "flex",
378
377
  alignItems: "center",
379
378
  gap: 8
380
379
  },
381
- children: [/* @__PURE__ */ x(c, { size: 16 }), k]
382
- }), /* @__PURE__ */ x("button", {
383
- onClick: () => A(null),
380
+ children: [/* @__PURE__ */ b(c, { size: 16 }), O]
381
+ }), /* @__PURE__ */ b("button", {
382
+ onClick: () => k(null),
384
383
  style: {
385
384
  background: "none",
386
385
  border: "none",
@@ -393,9 +392,9 @@ var k = i(function() {
393
392
  children: "×"
394
393
  })]
395
394
  }),
396
- Q.length > 0 && /* @__PURE__ */ S("div", {
395
+ Q.length > 0 && /* @__PURE__ */ x("div", {
397
396
  style: { marginBottom: "var(--space-sectionGap)" },
398
- children: [/* @__PURE__ */ x("h2", {
397
+ children: [/* @__PURE__ */ b("h2", {
399
398
  style: {
400
399
  fontSize: "var(--font-size-body-md)",
401
400
  fontWeight: "var(--font-weight-semibold)",
@@ -403,14 +402,14 @@ var k = i(function() {
403
402
  marginBottom: 12
404
403
  },
405
404
  children: "Suggestions"
406
- }), /* @__PURE__ */ x("div", {
405
+ }), /* @__PURE__ */ b("div", {
407
406
  style: {
408
407
  display: "grid",
409
408
  gridTemplateColumns: "repeat(auto-fill, minmax(min(280px, 100%), 1fr))",
410
409
  gap: 12
411
410
  },
412
- children: Q.map((e) => /* @__PURE__ */ S("button", {
413
- onClick: () => pe(e.prompt),
411
+ children: Q.map((e) => /* @__PURE__ */ x("button", {
412
+ onClick: () => ge(e.prompt),
414
413
  style: {
415
414
  textAlign: "left",
416
415
  padding: 12,
@@ -420,7 +419,7 @@ var k = i(function() {
420
419
  cursor: "pointer"
421
420
  },
422
421
  children: [
423
- /* @__PURE__ */ x("div", {
422
+ /* @__PURE__ */ b("div", {
424
423
  style: {
425
424
  fontWeight: "var(--font-weight-medium)",
426
425
  fontSize: "var(--font-size-body-sm)",
@@ -429,7 +428,7 @@ var k = i(function() {
429
428
  },
430
429
  children: e.title
431
430
  }),
432
- /* @__PURE__ */ x("div", {
431
+ /* @__PURE__ */ b("div", {
433
432
  style: {
434
433
  fontSize: "var(--font-size-body-sm)",
435
434
  color: "var(--color-text-secondary)",
@@ -437,14 +436,14 @@ var k = i(function() {
437
436
  },
438
437
  children: e.exampleDescription || e.prompt.slice(0, 80)
439
438
  }),
440
- /* @__PURE__ */ x("div", {
439
+ /* @__PURE__ */ b("div", {
441
440
  style: {
442
441
  display: "flex",
443
442
  gap: 4,
444
443
  marginTop: 8,
445
444
  flexWrap: "wrap"
446
445
  },
447
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
446
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
448
447
  style: {
449
448
  fontSize: 11,
450
449
  padding: "2px 6px",
@@ -459,7 +458,7 @@ var k = i(function() {
459
458
  }, e.id))
460
459
  })]
461
460
  }),
462
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
461
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h2", {
463
462
  style: {
464
463
  fontSize: "var(--font-size-body-md)",
465
464
  fontWeight: "var(--font-weight-semibold)",
@@ -467,18 +466,18 @@ var k = i(function() {
467
466
  marginBottom: 12
468
467
  },
469
468
  children: "Recent Generations"
470
- }), H && Z.length === 0 ? /* @__PURE__ */ S("div", {
469
+ }), le && Z.length === 0 ? /* @__PURE__ */ x("div", {
471
470
  style: {
472
471
  textAlign: "center",
473
472
  padding: 40,
474
473
  color: "var(--color-text-muted)"
475
474
  },
476
- children: [/* @__PURE__ */ x(p, {
475
+ children: [/* @__PURE__ */ b(f, {
477
476
  size: 24,
478
477
  className: "animate-spin",
479
478
  style: { margin: "0 auto 8px" }
480
- }), /* @__PURE__ */ x("p", { children: "Loading generations..." })]
481
- }) : Z.length === 0 ? /* @__PURE__ */ S("div", {
479
+ }), /* @__PURE__ */ b("p", { children: "Loading generations..." })]
480
+ }) : Z.length === 0 && !g ? /* @__PURE__ */ x("div", {
482
481
  style: {
483
482
  textAlign: "center",
484
483
  padding: 40,
@@ -487,21 +486,21 @@ var k = i(function() {
487
486
  borderRadius: "var(--radius-card)"
488
487
  },
489
488
  children: [
490
- /* @__PURE__ */ x(h, {
489
+ /* @__PURE__ */ b(p, {
491
490
  size: 32,
492
491
  style: {
493
492
  color: "var(--color-text-muted)",
494
493
  margin: "0 auto 8px"
495
494
  }
496
495
  }),
497
- /* @__PURE__ */ x("p", {
496
+ /* @__PURE__ */ b("p", {
498
497
  style: {
499
498
  color: "var(--color-text-secondary)",
500
499
  fontWeight: "var(--font-weight-medium)"
501
500
  },
502
501
  children: "No generations yet"
503
502
  }),
504
- /* @__PURE__ */ x("p", {
503
+ /* @__PURE__ */ b("p", {
505
504
  style: {
506
505
  color: "var(--color-text-muted)",
507
506
  fontSize: "var(--font-size-body-sm)",
@@ -516,14 +515,50 @@ var k = i(function() {
516
515
  flexDirection: "column",
517
516
  gap: 12
518
517
  },
519
- children: Z.map((e) => /* @__PURE__ */ x("div", {
518
+ children: [g && !W && /* @__PURE__ */ b("div", {
519
+ style: {
520
+ padding: 16,
521
+ borderRadius: "var(--radius-card)",
522
+ border: "1px solid var(--color-border)",
523
+ backgroundColor: "var(--color-bg-surface)"
524
+ },
525
+ children: /* @__PURE__ */ x("div", {
526
+ style: {
527
+ display: "flex",
528
+ alignItems: "center",
529
+ gap: 8,
530
+ minWidth: 0
531
+ },
532
+ children: [
533
+ E("PROCESSING"),
534
+ /* @__PURE__ */ b("span", {
535
+ style: {
536
+ fontSize: "var(--font-size-body-sm)",
537
+ fontWeight: "var(--font-weight-medium)",
538
+ color: "var(--color-text-primary)"
539
+ },
540
+ children: "Generating..."
541
+ }),
542
+ /* @__PURE__ */ b("span", {
543
+ style: {
544
+ fontSize: 11,
545
+ color: "var(--color-text-muted)",
546
+ padding: "2px 6px",
547
+ borderRadius: 4,
548
+ backgroundColor: "var(--color-bg-sunken)"
549
+ },
550
+ children: D("PROCESSING")
551
+ })
552
+ ]
553
+ })
554
+ }), Z.map((e) => /* @__PURE__ */ b("div", {
520
555
  style: {
521
556
  padding: 16,
522
557
  borderRadius: "var(--radius-card)",
523
558
  border: "1px solid var(--color-border)",
524
559
  backgroundColor: "var(--color-bg-surface)"
525
560
  },
526
- children: /* @__PURE__ */ S("div", {
561
+ children: /* @__PURE__ */ x("div", {
527
562
  style: {
528
563
  display: "flex",
529
564
  justifyContent: "space-between",
@@ -531,13 +566,13 @@ var k = i(function() {
531
566
  flexWrap: "wrap",
532
567
  gap: 8
533
568
  },
534
- children: [/* @__PURE__ */ S("div", {
569
+ children: [/* @__PURE__ */ x("div", {
535
570
  style: {
536
571
  flex: "1 1 200px",
537
572
  minWidth: 0
538
573
  },
539
574
  children: [
540
- /* @__PURE__ */ S("div", {
575
+ /* @__PURE__ */ x("div", {
541
576
  style: {
542
577
  display: "flex",
543
578
  alignItems: "center",
@@ -546,8 +581,8 @@ var k = i(function() {
546
581
  minWidth: 0
547
582
  },
548
583
  children: [
549
- se(e.status),
550
- /* @__PURE__ */ x("span", {
584
+ E(e.status),
585
+ /* @__PURE__ */ b("span", {
551
586
  style: {
552
587
  fontSize: "var(--font-size-body-sm)",
553
588
  fontWeight: "var(--font-weight-medium)",
@@ -559,7 +594,7 @@ var k = i(function() {
559
594
  },
560
595
  children: e.generatedSpec?.name || "Generating..."
561
596
  }),
562
- /* @__PURE__ */ x("span", {
597
+ /* @__PURE__ */ b("span", {
563
598
  style: {
564
599
  fontSize: 11,
565
600
  color: "var(--color-text-muted)",
@@ -567,11 +602,11 @@ var k = i(function() {
567
602
  borderRadius: 4,
568
603
  backgroundColor: "var(--color-bg-sunken)"
569
604
  },
570
- children: O(e.status)
605
+ children: D(e.status)
571
606
  })
572
607
  ]
573
608
  }),
574
- /* @__PURE__ */ x("p", {
609
+ /* @__PURE__ */ b("p", {
575
610
  style: {
576
611
  fontSize: "var(--font-size-body-sm)",
577
612
  color: "var(--color-text-secondary)",
@@ -579,7 +614,7 @@ var k = i(function() {
579
614
  },
580
615
  children: e.prompt.length > 120 ? e.prompt.slice(0, 120) + "..." : e.prompt
581
616
  }),
582
- e.generatedSpec && /* @__PURE__ */ S("div", {
617
+ e.generatedSpec && /* @__PURE__ */ x("div", {
583
618
  style: {
584
619
  fontSize: 11,
585
620
  color: "var(--color-text-muted)"
@@ -595,7 +630,7 @@ var k = i(function() {
595
630
  "% confidence"
596
631
  ]
597
632
  }),
598
- e.errorMessage && /* @__PURE__ */ S("div", {
633
+ e.errorMessage && /* @__PURE__ */ x("div", {
599
634
  style: {
600
635
  display: "flex",
601
636
  alignItems: "center",
@@ -604,21 +639,21 @@ var k = i(function() {
604
639
  fontSize: "var(--font-size-body-sm)",
605
640
  color: "var(--color-status-error-text)"
606
641
  },
607
- children: [/* @__PURE__ */ x(c, { size: 14 }), e.errorMessage]
642
+ children: [/* @__PURE__ */ b(c, { size: 14 }), e.errorMessage]
608
643
  })
609
644
  ]
610
- }), /* @__PURE__ */ S("div", {
645
+ }), /* @__PURE__ */ x("div", {
611
646
  style: {
612
647
  display: "flex",
613
648
  gap: 8,
614
649
  flexWrap: "wrap"
615
650
  },
616
651
  children: [
617
- D.includes(e.status) && /* @__PURE__ */ S("button", {
652
+ T.includes(e.status) && /* @__PURE__ */ x("button", {
618
653
  onClick: () => {
619
- n("medium"), ue(e.id);
654
+ n("medium"), pe(e.id);
620
655
  },
621
- disabled: j.has(e.id),
656
+ disabled: A.has(e.id),
622
657
  title: "Cancel generation",
623
658
  style: {
624
659
  display: "flex",
@@ -630,12 +665,12 @@ var k = i(function() {
630
665
  backgroundColor: "transparent",
631
666
  color: "var(--color-status-warning-text)",
632
667
  fontSize: "var(--font-size-body-sm)",
633
- cursor: j.has(e.id) ? "wait" : "pointer"
668
+ cursor: A.has(e.id) ? "wait" : "pointer"
634
669
  },
635
- children: [/* @__PURE__ */ x(ee, { size: 14 }), " Cancel"]
670
+ children: [/* @__PURE__ */ b(ee, { size: 14 }), " Cancel"]
636
671
  }),
637
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
638
- onClick: () => P(e),
672
+ e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ x("button", {
673
+ onClick: () => N(e),
639
674
  title: "Preview proposed layout",
640
675
  style: {
641
676
  display: "flex",
@@ -649,11 +684,11 @@ var k = i(function() {
649
684
  fontSize: "var(--font-size-body-sm)",
650
685
  cursor: "pointer"
651
686
  },
652
- children: [/* @__PURE__ */ x(f, { size: 14 }), " Preview"]
687
+ children: [/* @__PURE__ */ b(te, { size: 14 }), " Preview"]
653
688
  }),
654
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
689
+ e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ x("button", {
655
690
  onClick: () => {
656
- I(e), R("");
691
+ F(e), L("");
657
692
  },
658
693
  title: "Refine with instructions",
659
694
  style: {
@@ -668,13 +703,13 @@ var k = i(function() {
668
703
  fontSize: "var(--font-size-body-sm)",
669
704
  cursor: "pointer"
670
705
  },
671
- children: [/* @__PURE__ */ x(g, { size: 14 }), " Refine"]
706
+ children: [/* @__PURE__ */ b(h, { size: 14 }), " Refine"]
672
707
  }),
673
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
708
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
674
709
  onClick: () => {
675
- n("medium"), de(e.id);
710
+ n("medium"), me(e.id);
676
711
  },
677
- disabled: j.has(e.id),
712
+ disabled: A.has(e.id),
678
713
  title: "Regenerate with the same prompt",
679
714
  style: {
680
715
  display: "flex",
@@ -686,15 +721,15 @@ var k = i(function() {
686
721
  backgroundColor: "transparent",
687
722
  color: "var(--color-text-primary)",
688
723
  fontSize: "var(--font-size-body-sm)",
689
- cursor: j.has(e.id) ? "wait" : "pointer"
724
+ cursor: A.has(e.id) ? "wait" : "pointer"
690
725
  },
691
- children: [/* @__PURE__ */ x(m, {
726
+ children: [/* @__PURE__ */ b(ne, {
692
727
  size: 14,
693
- className: j.has(e.id) ? "animate-spin" : ""
728
+ className: A.has(e.id) ? "animate-spin" : ""
694
729
  }), " Regenerate"]
695
730
  }),
696
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
697
- onClick: () => ce(e.id),
731
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
732
+ onClick: () => de(e.id),
698
733
  style: {
699
734
  display: "flex",
700
735
  alignItems: "center",
@@ -707,9 +742,9 @@ var k = i(function() {
707
742
  fontSize: "var(--font-size-body-sm)",
708
743
  cursor: "pointer"
709
744
  },
710
- children: ["Create ", /* @__PURE__ */ x(l, { size: 14 })]
745
+ children: ["Create ", /* @__PURE__ */ b(l, { size: 14 })]
711
746
  }),
712
- e.dashboardId && /* @__PURE__ */ S("button", {
747
+ e.dashboardId && /* @__PURE__ */ x("button", {
713
748
  onClick: () => i(`/dashboards/${e.dashboardId}`),
714
749
  style: {
715
750
  display: "flex",
@@ -723,11 +758,11 @@ var k = i(function() {
723
758
  fontSize: "var(--font-size-body-sm)",
724
759
  cursor: "pointer"
725
760
  },
726
- children: ["View Dashboard ", /* @__PURE__ */ x(l, { size: 14 })]
761
+ children: ["View Dashboard ", /* @__PURE__ */ b(l, { size: 14 })]
727
762
  }),
728
- /* @__PURE__ */ x("button", {
763
+ /* @__PURE__ */ b("button", {
729
764
  onClick: () => {
730
- n("medium"), le(e.id);
765
+ n("medium"), fe(e.id);
731
766
  },
732
767
  title: "Delete generation",
733
768
  style: {
@@ -740,20 +775,20 @@ var k = i(function() {
740
775
  color: "var(--color-text-muted)",
741
776
  cursor: "pointer"
742
777
  },
743
- children: /* @__PURE__ */ x(te, { size: 14 })
778
+ children: /* @__PURE__ */ b(m, { size: 14 })
744
779
  })
745
780
  ]
746
781
  })]
747
782
  })
748
- }, e.id))
783
+ }, e.id))]
749
784
  })] })
750
785
  ]
751
786
  }),
752
- N?.generatedSpec && /* @__PURE__ */ x("div", {
787
+ M?.generatedSpec && /* @__PURE__ */ b("div", {
753
788
  role: "dialog",
754
789
  "aria-modal": "true",
755
790
  "aria-label": "Generation preview",
756
- onClick: () => P(null),
791
+ onClick: () => N(null),
757
792
  style: {
758
793
  position: "fixed",
759
794
  inset: 0,
@@ -764,7 +799,7 @@ var k = i(function() {
764
799
  justifyContent: "center",
765
800
  padding: "var(--space-pagePadding)"
766
801
  },
767
- children: /* @__PURE__ */ S("div", {
802
+ children: /* @__PURE__ */ x("div", {
768
803
  onClick: (e) => e.stopPropagation(),
769
804
  style: {
770
805
  width: "min(640px, 100%)",
@@ -777,7 +812,7 @@ var k = i(function() {
777
812
  padding: "var(--space-cardPadding)"
778
813
  },
779
814
  children: [
780
- /* @__PURE__ */ S("div", {
815
+ /* @__PURE__ */ x("div", {
781
816
  style: {
782
817
  display: "flex",
783
818
  justifyContent: "space-between",
@@ -785,24 +820,24 @@ var k = i(function() {
785
820
  gap: 8,
786
821
  marginBottom: "var(--space-controlGap)"
787
822
  },
788
- children: [/* @__PURE__ */ S("div", {
823
+ children: [/* @__PURE__ */ x("div", {
789
824
  style: { minWidth: 0 },
790
- children: [/* @__PURE__ */ x("h3", {
825
+ children: [/* @__PURE__ */ b("h3", {
791
826
  style: {
792
827
  fontSize: "var(--font-size-heading-h4)",
793
828
  fontWeight: "var(--font-weight-semibold)"
794
829
  },
795
- children: N.generatedSpec.name
796
- }), N.generatedSpec.description && /* @__PURE__ */ x("p", {
830
+ children: M.generatedSpec.name
831
+ }), M.generatedSpec.description && /* @__PURE__ */ b("p", {
797
832
  style: {
798
833
  fontSize: "var(--font-size-body-sm)",
799
834
  color: "var(--color-text-muted)",
800
835
  marginTop: 2
801
836
  },
802
- children: N.generatedSpec.description
837
+ children: M.generatedSpec.description
803
838
  })]
804
- }), /* @__PURE__ */ x("button", {
805
- onClick: () => P(null),
839
+ }), /* @__PURE__ */ b("button", {
840
+ onClick: () => N(null),
806
841
  "aria-label": "Close preview",
807
842
  style: {
808
843
  display: "flex",
@@ -813,29 +848,29 @@ var k = i(function() {
813
848
  color: "var(--color-text-muted)",
814
849
  cursor: "pointer"
815
850
  },
816
- children: /* @__PURE__ */ x(ne, { size: 18 })
851
+ children: /* @__PURE__ */ b(re, { size: 18 })
817
852
  })]
818
853
  }),
819
- /* @__PURE__ */ S("div", {
854
+ /* @__PURE__ */ x("div", {
820
855
  style: {
821
856
  fontSize: 11,
822
857
  color: "var(--color-text-muted)",
823
858
  marginBottom: "var(--space-controlGap)"
824
859
  },
825
860
  children: [
826
- N.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
861
+ M.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
827
862
  " widgets across",
828
863
  " ",
829
- N.generatedSpec.pages.length,
864
+ M.generatedSpec.pages.length,
830
865
  " page(s) ·",
831
866
  " ",
832
- Math.round(N.generatedSpec.overallConfidence * 100),
867
+ Math.round(M.generatedSpec.overallConfidence * 100),
833
868
  "% confidence"
834
869
  ]
835
870
  }),
836
- N.generatedSpec.pages.map((e, t) => /* @__PURE__ */ S("div", {
871
+ M.generatedSpec.pages.map((e, t) => /* @__PURE__ */ x("div", {
837
872
  style: { marginBottom: "var(--space-controlGap)" },
838
- children: [/* @__PURE__ */ x("div", {
873
+ children: [/* @__PURE__ */ b("div", {
839
874
  style: {
840
875
  fontSize: "var(--font-size-body-sm)",
841
876
  fontWeight: "var(--font-weight-medium)",
@@ -843,13 +878,13 @@ var k = i(function() {
843
878
  marginBottom: 4
844
879
  },
845
880
  children: e.name
846
- }), /* @__PURE__ */ x("div", {
881
+ }), /* @__PURE__ */ b("div", {
847
882
  style: {
848
883
  display: "flex",
849
884
  flexWrap: "wrap",
850
885
  gap: 6
851
886
  },
852
- children: e.widgets.map((e, t) => /* @__PURE__ */ S("span", {
887
+ children: e.widgets.map((e, t) => /* @__PURE__ */ x("span", {
853
888
  style: {
854
889
  fontSize: 11,
855
890
  padding: "3px 8px",
@@ -868,11 +903,11 @@ var k = i(function() {
868
903
  ]
869
904
  })
870
905
  }),
871
- F && /* @__PURE__ */ x("div", {
906
+ P && /* @__PURE__ */ b("div", {
872
907
  role: "dialog",
873
908
  "aria-modal": "true",
874
909
  "aria-label": "Refine generation",
875
- onClick: () => I(null),
910
+ onClick: () => F(null),
876
911
  style: {
877
912
  position: "fixed",
878
913
  inset: 0,
@@ -883,7 +918,7 @@ var k = i(function() {
883
918
  justifyContent: "center",
884
919
  padding: "var(--space-pagePadding)"
885
920
  },
886
- children: /* @__PURE__ */ S("div", {
921
+ children: /* @__PURE__ */ x("div", {
887
922
  onClick: (e) => e.stopPropagation(),
888
923
  style: {
889
924
  width: "min(520px, 100%)",
@@ -894,7 +929,7 @@ var k = i(function() {
894
929
  padding: "var(--space-cardPadding)"
895
930
  },
896
931
  children: [
897
- /* @__PURE__ */ x("h3", {
932
+ /* @__PURE__ */ b("h3", {
898
933
  style: {
899
934
  fontSize: "var(--font-size-heading-h4)",
900
935
  fontWeight: "var(--font-weight-semibold)",
@@ -902,7 +937,7 @@ var k = i(function() {
902
937
  },
903
938
  children: "Refine dashboard"
904
939
  }),
905
- /* @__PURE__ */ x("p", {
940
+ /* @__PURE__ */ b("p", {
906
941
  style: {
907
942
  fontSize: "var(--font-size-body-sm)",
908
943
  color: "var(--color-text-muted)",
@@ -910,9 +945,9 @@ var k = i(function() {
910
945
  },
911
946
  children: "Describe what to change — the AI keeps the existing spec and applies your instructions."
912
947
  }),
913
- /* @__PURE__ */ x("textarea", {
914
- value: L,
915
- onChange: (e) => R(e.target.value),
948
+ /* @__PURE__ */ b("textarea", {
949
+ value: I,
950
+ onChange: (e) => L(e.target.value),
916
951
  maxLength: 2e3,
917
952
  rows: 4,
918
953
  placeholder: "e.g., Add a revenue-by-region map and remove the duplicate KPI cards",
@@ -928,15 +963,15 @@ var k = i(function() {
928
963
  marginBottom: "var(--space-controlGap)"
929
964
  }
930
965
  }),
931
- /* @__PURE__ */ S("div", {
966
+ /* @__PURE__ */ x("div", {
932
967
  style: {
933
968
  display: "flex",
934
969
  justifyContent: "flex-end",
935
970
  gap: 8,
936
971
  flexWrap: "wrap"
937
972
  },
938
- children: [/* @__PURE__ */ x("button", {
939
- onClick: () => I(null),
973
+ children: [/* @__PURE__ */ b("button", {
974
+ onClick: () => F(null),
940
975
  style: {
941
976
  padding: "8px 16px",
942
977
  borderRadius: "var(--radius-button)",
@@ -947,9 +982,9 @@ var k = i(function() {
947
982
  cursor: "pointer"
948
983
  },
949
984
  children: "Cancel"
950
- }), /* @__PURE__ */ S("button", {
951
- onClick: () => void fe(),
952
- disabled: !L.trim() || j.has(F.id),
985
+ }), /* @__PURE__ */ x("button", {
986
+ onClick: () => void he(),
987
+ disabled: !I.trim() || A.has(P.id),
953
988
  style: {
954
989
  display: "flex",
955
990
  alignItems: "center",
@@ -960,13 +995,13 @@ var k = i(function() {
960
995
  backgroundColor: "var(--color-action-primary-bg)",
961
996
  color: "var(--color-action-primary-text)",
962
997
  fontSize: "var(--font-size-body-sm)",
963
- cursor: !L.trim() || j.has(F.id) ? "not-allowed" : "pointer",
964
- opacity: L.trim() ? 1 : .6
998
+ cursor: !I.trim() || A.has(P.id) ? "not-allowed" : "pointer",
999
+ opacity: I.trim() ? 1 : .6
965
1000
  },
966
- children: [j.has(F.id) ? /* @__PURE__ */ x(p, {
1001
+ children: [A.has(P.id) ? /* @__PURE__ */ b(f, {
967
1002
  size: 14,
968
1003
  className: "animate-spin"
969
- }) : /* @__PURE__ */ x(g, { size: 14 }), "Apply refinement"]
1004
+ }) : /* @__PURE__ */ b(h, { size: 14 }), "Apply refinement"]
970
1005
  })]
971
1006
  })
972
1007
  ]
@@ -976,6 +1011,6 @@ var k = i(function() {
976
1011
  });
977
1012
  });
978
1013
  //#endregion
979
- export { k as InsightsPage, k as default };
1014
+ export { O as InsightsPage, O as default };
980
1015
 
981
1016
  //# sourceMappingURL=InsightsPage.js.map