@burdenoff/microfe-bigconsole 2026.716.2 → 2026.716.3

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.
@@ -1,15 +1,16 @@
1
1
  import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
- import t from "../hooks/useBigConsoleAnalytics.js";
4
- import { isNative as n, nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
5
- import { memo as a, useCallback as o, useEffect as s, useState as c } from "react";
6
- import { AlertCircle as l, ArrowRight as u, Ban as d, CheckCircle as f, Clock as p, Eye as ee, Loader2 as m, RefreshCw as te, Sparkles as h, Trash2 as ne, Wand2 as g, X as re, XCircle as _ } from "lucide-react";
3
+ import { reportBigConsoleQuotaError as t } from "../utils/quota.js";
4
+ import n from "../hooks/useBigConsoleAnalytics.js";
5
+ import { isNative as r, nativeImpact as i, nativeNotify as a } from "../../utils/nativeBridge.js";
6
+ import { memo as o, useCallback as s, useEffect as c, useState as l } from "react";
7
+ import { AlertCircle as u, ArrowRight as d, Ban as ee, CheckCircle as f, Clock as p, Eye as te, Loader2 as m, RefreshCw as ne, Sparkles as h, Trash2 as re, Wand2 as g, X as ie, XCircle as _ } from "lucide-react";
7
8
  import { gql as v } from "@apollo/client";
8
9
  import { useMutation as y, useQuery as b } from "@apollo/client/react";
9
- import { AuroraBackground as ie, EmphasisPanel as ae, GlassCard as oe, GradientText as se, IllustratedEmptyState as ce } from "@burdenoff/fe-libs/ui";
10
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
10
+ import { AuroraBackground as ae, EmphasisPanel as oe, GlassCard as se, GradientText as ce, IllustratedEmptyState as x } from "@burdenoff/fe-libs/ui";
11
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
12
  //#region src/bigconsole/pages/InsightsPage.tsx
12
- var C = v`
13
+ var le = v`
13
14
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
14
15
  listPromptGenerations(status: $status, first: $first) {
15
16
  edges {
@@ -38,7 +39,7 @@ var C = v`
38
39
  totalCount
39
40
  }
40
41
  }
41
- `, le = v`
42
+ `, ue = v`
42
43
  query GetPromptSuggestions($category: String, $limit: Int) {
43
44
  getPromptSuggestions(category: $category, limit: $limit) {
44
45
  id
@@ -49,7 +50,7 @@ var C = v`
49
50
  tags
50
51
  }
51
52
  }
52
- `, ue = v`
53
+ `, de = v`
53
54
  mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
54
55
  generateDashboardFromPrompt(input: $input) {
55
56
  id
@@ -57,24 +58,24 @@ var C = v`
57
58
  prompt
58
59
  }
59
60
  }
60
- `, de = v`
61
+ `, fe = v`
61
62
  mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
62
63
  createDashboardFromGeneration(input: $input) {
63
64
  id
64
65
  }
65
66
  }
66
- `, fe = v`
67
+ `, pe = v`
67
68
  mutation DeletePromptGeneration($generationId: ID!) {
68
69
  deletePromptGeneration(generationId: $generationId)
69
70
  }
70
- `, pe = v`
71
+ `, me = v`
71
72
  mutation CancelPromptGeneration($generationId: ID!) {
72
73
  cancelPromptGeneration(generationId: $generationId) {
73
74
  id
74
75
  status
75
76
  }
76
77
  }
77
- `, me = v`
78
+ `, he = v`
78
79
  mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
79
80
  regenerateDashboard(input: $input) {
80
81
  id
@@ -82,7 +83,7 @@ var C = v`
82
83
  prompt
83
84
  }
84
85
  }
85
- `, he = v`
86
+ `, ge = v`
86
87
  mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
87
88
  refineGeneratedDashboard(input: $input) {
88
89
  id
@@ -97,25 +98,25 @@ var C = v`
97
98
  ];
98
99
  function T(e) {
99
100
  switch (e) {
100
- case "COMPLETED": return /* @__PURE__ */ x(f, {
101
+ case "COMPLETED": return /* @__PURE__ */ S(f, {
101
102
  size: 16,
102
103
  className: "text-green-500"
103
104
  });
104
- case "FAILED": return /* @__PURE__ */ x(_, {
105
+ case "FAILED": return /* @__PURE__ */ S(_, {
105
106
  size: 16,
106
107
  className: "text-red-500"
107
108
  });
108
- case "CANCELLED": return /* @__PURE__ */ x(_, {
109
+ case "CANCELLED": return /* @__PURE__ */ S(_, {
109
110
  size: 16,
110
111
  className: "text-gray-400"
111
112
  });
112
113
  case "PENDING":
113
114
  case "PROCESSING":
114
- case "GENERATING": return /* @__PURE__ */ x(m, {
115
+ case "GENERATING": return /* @__PURE__ */ S(m, {
115
116
  size: 16,
116
117
  className: "text-blue-500 animate-spin"
117
118
  });
118
- default: return /* @__PURE__ */ x(p, {
119
+ default: return /* @__PURE__ */ S(p, {
119
120
  size: 16,
120
121
  className: "text-gray-400"
121
122
  });
@@ -132,31 +133,31 @@ function E(e) {
132
133
  default: return e;
133
134
  }
134
135
  }
135
- var D = a(function() {
136
- let a = e(), f = t(), [p, _] = c(""), [v, D] = c(!1), [O, k] = c(null), [A, j] = c(() => /* @__PURE__ */ new Set()), [M, N] = c(null), [P, F] = c(null), [I, L] = c(""), R = o((e) => {
136
+ var D = o(function() {
137
+ let o = e(), f = n(), [p, _] = l(""), [v, D] = l(!1), [O, k] = l(null), [A, j] = l(() => /* @__PURE__ */ new Set()), [M, N] = l(null), [P, F] = l(null), [I, L] = l(""), R = s((e) => {
137
138
  j((t) => new Set(t).add(e));
138
- }, []), z = o((e) => {
139
+ }, []), z = s((e) => {
139
140
  j((t) => {
140
141
  let n = new Set(t);
141
142
  return n.delete(e), n;
142
143
  });
143
- }, []), { data: B, loading: ge, refetch: V, startPolling: H, stopPolling: U } = b(C, {
144
+ }, []), { data: B, loading: _e, refetch: V, startPolling: H, stopPolling: U } = b(le, {
144
145
  variables: { first: 20 },
145
146
  fetchPolicy: "cache-and-network"
146
- }), W = B?.listPromptGenerations?.edges?.some((e) => w.includes(e.node.status)) ?? !1, { data: _e } = b(le, { variables: { limit: 6 } }), [G] = y(ue), [K] = y(de), [q] = y(fe), [J] = y(pe), [Y] = y(me), [X] = y(he), Z = B?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = _e?.getPromptSuggestions || [];
147
- s(() => (W || v ? H(2e3) : U(), () => U()), [
147
+ }), W = B?.listPromptGenerations?.edges?.some((e) => w.includes(e.node.status)) ?? !1, { data: ve } = b(ue, { variables: { limit: 6 } }), [G] = y(de), [K] = y(fe), [q] = y(pe), [J] = y(me), [Y] = y(he), [X] = y(ge), Z = B?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = ve?.getPromptSuggestions || [];
148
+ c(() => (W || v ? H(2e3) : U(), () => U()), [
148
149
  W,
149
150
  v,
150
151
  H,
151
152
  U
152
- ]), s(() => {
153
+ ]), c(() => {
153
154
  if (!M && !P) return;
154
155
  let e = (e) => {
155
156
  e.key === "Escape" && (N(null), F(null));
156
157
  };
157
158
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
158
159
  }, [M, P]);
159
- let $ = o(async () => {
160
+ let $ = s(async () => {
160
161
  if (!(!p.trim() || v)) {
161
162
  if (p.length > 2e3) {
162
163
  k("Prompt is too long (max 2000 characters).");
@@ -165,17 +166,20 @@ var D = a(function() {
165
166
  k(null), D(!0);
166
167
  try {
167
168
  f("bigconsole.ai.generate_clicked", { maxWidgets: 8 });
168
- let e = (await G({ variables: { input: {
169
+ let e = await G({ variables: { input: {
169
170
  prompt: p.trim(),
170
171
  styleType: "MODERN",
171
172
  layoutType: "GRID",
172
173
  maxWidgets: 8
173
- } } })).data?.generateDashboardFromPrompt?.id;
174
- e && f("bigconsole.ai.dashboard_generated", {
175
- generationId: e,
174
+ } } });
175
+ if (t(e, "command")) return;
176
+ let n = e.data?.generateDashboardFromPrompt?.id;
177
+ n && f("bigconsole.ai.dashboard_generated", {
178
+ generationId: n,
176
179
  maxWidgets: 8
177
180
  }), _(""), V();
178
181
  } catch (e) {
182
+ if (t(e, "command")) return;
179
183
  k(e instanceof Error ? e.message : "Failed to generate dashboard");
180
184
  } finally {
181
185
  D(!1);
@@ -187,30 +191,33 @@ var D = a(function() {
187
191
  v,
188
192
  G,
189
193
  V
190
- ]), ve = o(async (e) => {
194
+ ]), ye = s(async (e) => {
191
195
  k(null);
192
196
  try {
193
197
  f("bigconsole.ai.create_dashboard_clicked", { generationId: e });
194
- let t = (await K({ variables: { input: { generationId: e } } })).data?.createDashboardFromGeneration?.id;
195
- t && (f("bigconsole.ai.dashboard_created", {
198
+ let n = await K({ variables: { input: { generationId: e } } });
199
+ if (t(n, "project")) return;
200
+ let r = n.data?.createDashboardFromGeneration?.id;
201
+ r && (f("bigconsole.ai.dashboard_created", {
196
202
  generationId: e,
197
- dashboardId: t
198
- }), a(`/dashboards/${t}`));
203
+ dashboardId: r
204
+ }), o(`/dashboards/${r}`));
199
205
  } catch (e) {
206
+ if (t(e, "project")) return;
200
207
  k(e instanceof Error ? e.message : "Failed to create dashboard");
201
208
  }
202
209
  }, [
203
210
  K,
204
211
  f,
205
- a
206
- ]), ye = o(async (e) => {
212
+ o
213
+ ]), be = s(async (e) => {
207
214
  k(null);
208
215
  try {
209
- await q({ variables: { generationId: e } }), n() && i("success"), V();
216
+ await q({ variables: { generationId: e } }), r() && a("success"), V();
210
217
  } catch (e) {
211
- k(e instanceof Error ? e.message : "Failed to delete generation"), n() && i("error");
218
+ k(e instanceof Error ? e.message : "Failed to delete generation"), r() && a("error");
212
219
  }
213
- }, [q, V]), be = o(async (e) => {
220
+ }, [q, V]), xe = s(async (e) => {
214
221
  k(null), R(e);
215
222
  try {
216
223
  await J({ variables: { generationId: e } }), V();
@@ -219,73 +226,84 @@ var D = a(function() {
219
226
  } finally {
220
227
  z(e);
221
228
  }
222
- }, [J, V]), xe = o(async (e) => {
229
+ }, [J, V]), Se = s(async (e) => {
223
230
  k(null), R(e);
224
231
  try {
225
- await Y({ variables: { input: { generationId: e } } }), V();
232
+ if (t(await Y({ variables: { input: { generationId: e } } }), "command")) return;
233
+ V();
226
234
  } catch (e) {
235
+ if (t(e, "command")) return;
227
236
  k(e instanceof Error ? e.message : "Failed to regenerate dashboard");
228
237
  } finally {
229
238
  z(e);
230
239
  }
231
- }, [Y, V]), Se = o(async () => {
240
+ }, [Y, V]), Ce = s(async () => {
232
241
  if (!P || !I.trim()) return;
233
242
  let e = P.id;
234
243
  k(null), R(e);
244
+ let n = !1;
235
245
  try {
236
- await X({ variables: { input: {
246
+ if (t(await X({ variables: { input: {
237
247
  generationId: e,
238
248
  refinementPrompt: I.trim()
239
- } } }), F(null), L(""), V();
249
+ } } }), "command")) {
250
+ n = !0;
251
+ return;
252
+ }
253
+ n = !0, V();
240
254
  } catch (e) {
255
+ if (t(e, "command")) {
256
+ n = !0;
257
+ return;
258
+ }
241
259
  k(e instanceof Error ? e.message : "Failed to refine generation");
242
260
  } finally {
243
- z(e);
261
+ n && (F(null), L("")), z(e);
244
262
  }
245
263
  }, [
246
264
  P,
247
265
  I,
248
266
  X,
249
267
  V
250
- ]), Ce = o((e) => {
268
+ ]), we = s((e) => {
251
269
  _(e);
252
270
  }, []);
253
- return /* @__PURE__ */ S("div", {
271
+ return /* @__PURE__ */ C("div", {
254
272
  style: {
255
273
  minHeight: "100vh",
256
274
  backgroundColor: "var(--color-bg-canvas)"
257
275
  },
258
276
  children: [
259
- /* @__PURE__ */ S("div", {
277
+ /* @__PURE__ */ C("div", {
260
278
  style: {
261
279
  padding: "var(--space-pagePadding)",
262
280
  maxWidth: 960,
263
281
  margin: "0 auto"
264
282
  },
265
283
  children: [
266
- /* @__PURE__ */ S("div", {
284
+ /* @__PURE__ */ C("div", {
267
285
  className: "relative mb-[var(--space-sectionGap)] overflow-hidden rounded-card border border-border-seam bg-gloss-card p-6",
268
286
  children: [
269
- /* @__PURE__ */ x(ie, { intensity: "subtle" }),
270
- /* @__PURE__ */ S("div", {
287
+ /* @__PURE__ */ S(ae, { intensity: "subtle" }),
288
+ /* @__PURE__ */ C("div", {
271
289
  style: {
272
290
  display: "flex",
273
291
  alignItems: "center",
274
292
  gap: "var(--space-iconGap)"
275
293
  },
276
- children: [/* @__PURE__ */ x(h, {
294
+ children: [/* @__PURE__ */ S(h, {
277
295
  size: 24,
278
296
  style: { color: "var(--color-action-primary-bg)" }
279
- }), /* @__PURE__ */ x("h1", {
297
+ }), /* @__PURE__ */ S("h1", {
280
298
  style: {
281
299
  fontSize: "var(--font-size-heading-h4)",
282
300
  fontWeight: "var(--font-weight-bold)",
283
301
  color: "var(--color-text-primary)"
284
302
  },
285
- children: /* @__PURE__ */ x(se, { children: "AI Insights" })
303
+ children: /* @__PURE__ */ S(ce, { children: "AI Insights" })
286
304
  })]
287
305
  }),
288
- /* @__PURE__ */ x("p", {
306
+ /* @__PURE__ */ S("p", {
289
307
  style: {
290
308
  fontSize: "var(--font-size-body-md)",
291
309
  color: "var(--color-text-secondary)",
@@ -295,10 +313,10 @@ var D = a(function() {
295
313
  })
296
314
  ]
297
315
  }),
298
- /* @__PURE__ */ S(ae, {
316
+ /* @__PURE__ */ C(oe, {
299
317
  className: "mb-[var(--space-sectionGap)] p-[var(--space-cardPadding)]",
300
318
  children: [
301
- /* @__PURE__ */ x("label", {
319
+ /* @__PURE__ */ S("label", {
302
320
  htmlFor: "prompt-input",
303
321
  style: {
304
322
  display: "block",
@@ -309,7 +327,7 @@ var D = a(function() {
309
327
  },
310
328
  children: "Describe the dashboard you want to create"
311
329
  }),
312
- /* @__PURE__ */ x("textarea", {
330
+ /* @__PURE__ */ S("textarea", {
313
331
  id: "prompt-input",
314
332
  value: p,
315
333
  onChange: (e) => _(e.target.value),
@@ -331,7 +349,7 @@ var D = a(function() {
331
349
  e.key === "Enter" && (e.metaKey || e.ctrlKey) && $();
332
350
  }
333
351
  }),
334
- /* @__PURE__ */ S("div", {
352
+ /* @__PURE__ */ C("div", {
335
353
  style: {
336
354
  display: "flex",
337
355
  justifyContent: "space-between",
@@ -340,13 +358,13 @@ var D = a(function() {
340
358
  flexWrap: "wrap",
341
359
  gap: 8
342
360
  },
343
- children: [/* @__PURE__ */ x("span", {
361
+ children: [/* @__PURE__ */ S("span", {
344
362
  style: {
345
363
  fontSize: "var(--font-size-body-sm)",
346
364
  color: "var(--color-text-muted)"
347
365
  },
348
366
  children: "Press Ctrl+Enter to generate"
349
- }), /* @__PURE__ */ S("button", {
367
+ }), /* @__PURE__ */ C("button", {
350
368
  onClick: $,
351
369
  disabled: !p.trim() || v,
352
370
  style: {
@@ -363,15 +381,15 @@ var D = a(function() {
363
381
  cursor: !p.trim() || v ? "not-allowed" : "pointer",
364
382
  opacity: !p.trim() || v ? .5 : 1
365
383
  },
366
- children: [v ? /* @__PURE__ */ x(m, {
384
+ children: [v ? /* @__PURE__ */ S(m, {
367
385
  size: 16,
368
386
  className: "animate-spin"
369
- }) : /* @__PURE__ */ x(h, { size: 16 }), "Generate Dashboard"]
387
+ }) : /* @__PURE__ */ S(h, { size: 16 }), "Generate Dashboard"]
370
388
  })]
371
389
  })
372
390
  ]
373
391
  }),
374
- O && /* @__PURE__ */ S("div", {
392
+ O && /* @__PURE__ */ C("div", {
375
393
  style: {
376
394
  display: "flex",
377
395
  alignItems: "center",
@@ -385,14 +403,14 @@ var D = a(function() {
385
403
  color: "var(--color-status-error-text)",
386
404
  fontSize: "var(--font-size-body-sm)"
387
405
  },
388
- children: [/* @__PURE__ */ S("div", {
406
+ children: [/* @__PURE__ */ C("div", {
389
407
  style: {
390
408
  display: "flex",
391
409
  alignItems: "center",
392
410
  gap: 8
393
411
  },
394
- children: [/* @__PURE__ */ x(l, { size: 16 }), O]
395
- }), /* @__PURE__ */ x("button", {
412
+ children: [/* @__PURE__ */ S(u, { size: 16 }), O]
413
+ }), /* @__PURE__ */ S("button", {
396
414
  onClick: () => k(null),
397
415
  style: {
398
416
  background: "none",
@@ -406,9 +424,9 @@ var D = a(function() {
406
424
  children: "×"
407
425
  })]
408
426
  }),
409
- Q.length > 0 && /* @__PURE__ */ S("div", {
427
+ Q.length > 0 && /* @__PURE__ */ C("div", {
410
428
  style: { marginBottom: "var(--space-sectionGap)" },
411
- children: [/* @__PURE__ */ x("h2", {
429
+ children: [/* @__PURE__ */ S("h2", {
412
430
  style: {
413
431
  fontSize: "var(--font-size-body-md)",
414
432
  fontWeight: "var(--font-weight-semibold)",
@@ -416,14 +434,14 @@ var D = a(function() {
416
434
  marginBottom: 12
417
435
  },
418
436
  children: "Suggestions"
419
- }), /* @__PURE__ */ x("div", {
437
+ }), /* @__PURE__ */ S("div", {
420
438
  style: {
421
439
  display: "grid",
422
440
  gridTemplateColumns: "repeat(auto-fill, minmax(min(280px, 100%), 1fr))",
423
441
  gap: 12
424
442
  },
425
- children: Q.map((e) => /* @__PURE__ */ S("button", {
426
- onClick: () => Ce(e.prompt),
443
+ children: Q.map((e) => /* @__PURE__ */ C("button", {
444
+ onClick: () => we(e.prompt),
427
445
  style: {
428
446
  textAlign: "left",
429
447
  padding: 12,
@@ -433,7 +451,7 @@ var D = a(function() {
433
451
  cursor: "pointer"
434
452
  },
435
453
  children: [
436
- /* @__PURE__ */ x("div", {
454
+ /* @__PURE__ */ S("div", {
437
455
  style: {
438
456
  fontWeight: "var(--font-weight-medium)",
439
457
  fontSize: "var(--font-size-body-sm)",
@@ -442,7 +460,7 @@ var D = a(function() {
442
460
  },
443
461
  children: e.title
444
462
  }),
445
- /* @__PURE__ */ x("div", {
463
+ /* @__PURE__ */ S("div", {
446
464
  style: {
447
465
  fontSize: "var(--font-size-body-sm)",
448
466
  color: "var(--color-text-secondary)",
@@ -450,14 +468,14 @@ var D = a(function() {
450
468
  },
451
469
  children: e.exampleDescription || e.prompt.slice(0, 80)
452
470
  }),
453
- /* @__PURE__ */ x("div", {
471
+ /* @__PURE__ */ S("div", {
454
472
  style: {
455
473
  display: "flex",
456
474
  gap: 4,
457
475
  marginTop: 8,
458
476
  flexWrap: "wrap"
459
477
  },
460
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
478
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ S("span", {
461
479
  style: {
462
480
  fontSize: 11,
463
481
  padding: "2px 6px",
@@ -472,7 +490,7 @@ var D = a(function() {
472
490
  }, e.id))
473
491
  })]
474
492
  }),
475
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
493
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
476
494
  style: {
477
495
  fontSize: "var(--font-size-body-md)",
478
496
  fontWeight: "var(--font-weight-semibold)",
@@ -480,39 +498,39 @@ var D = a(function() {
480
498
  marginBottom: 12
481
499
  },
482
500
  children: "Recent Generations"
483
- }), ge && Z.length === 0 ? /* @__PURE__ */ S("div", {
501
+ }), _e && Z.length === 0 ? /* @__PURE__ */ C("div", {
484
502
  style: {
485
503
  textAlign: "center",
486
504
  padding: 40,
487
505
  color: "var(--color-text-muted)"
488
506
  },
489
- children: [/* @__PURE__ */ x(m, {
507
+ children: [/* @__PURE__ */ S(m, {
490
508
  size: 24,
491
509
  className: "animate-spin",
492
510
  style: { margin: "0 auto 8px" }
493
- }), /* @__PURE__ */ x("p", { children: "Loading generations..." })]
494
- }) : Z.length === 0 && !v ? /* @__PURE__ */ x(oe, {
511
+ }), /* @__PURE__ */ S("p", { children: "Loading generations..." })]
512
+ }) : Z.length === 0 && !v ? /* @__PURE__ */ S(se, {
495
513
  treatment: "insight",
496
514
  className: "border-border-seam",
497
- children: /* @__PURE__ */ x(ce, {
515
+ children: /* @__PURE__ */ S(x, {
498
516
  illustration: "onboarding",
499
517
  title: "No generations yet",
500
518
  description: "Describe a dashboard above to get started"
501
519
  })
502
- }) : /* @__PURE__ */ S("div", {
520
+ }) : /* @__PURE__ */ C("div", {
503
521
  style: {
504
522
  display: "flex",
505
523
  flexDirection: "column",
506
524
  gap: 12
507
525
  },
508
- children: [v && !W && /* @__PURE__ */ x("div", {
526
+ children: [v && !W && /* @__PURE__ */ S("div", {
509
527
  style: {
510
528
  padding: 16,
511
529
  borderRadius: "var(--radius-card)",
512
530
  border: "1px solid var(--color-border)",
513
531
  backgroundColor: "var(--color-bg-surface)"
514
532
  },
515
- children: /* @__PURE__ */ S("div", {
533
+ children: /* @__PURE__ */ C("div", {
516
534
  style: {
517
535
  display: "flex",
518
536
  alignItems: "center",
@@ -521,7 +539,7 @@ var D = a(function() {
521
539
  },
522
540
  children: [
523
541
  T("PROCESSING"),
524
- /* @__PURE__ */ x("span", {
542
+ /* @__PURE__ */ S("span", {
525
543
  style: {
526
544
  fontSize: "var(--font-size-body-sm)",
527
545
  fontWeight: "var(--font-weight-medium)",
@@ -529,7 +547,7 @@ var D = a(function() {
529
547
  },
530
548
  children: "Generating..."
531
549
  }),
532
- /* @__PURE__ */ x("span", {
550
+ /* @__PURE__ */ S("span", {
533
551
  style: {
534
552
  fontSize: 11,
535
553
  color: "var(--color-text-muted)",
@@ -541,14 +559,14 @@ var D = a(function() {
541
559
  })
542
560
  ]
543
561
  })
544
- }), Z.map((e) => /* @__PURE__ */ x("div", {
562
+ }), Z.map((e) => /* @__PURE__ */ S("div", {
545
563
  style: {
546
564
  padding: 16,
547
565
  borderRadius: "var(--radius-card)",
548
566
  border: "1px solid var(--color-border)",
549
567
  backgroundColor: "var(--color-bg-surface)"
550
568
  },
551
- children: /* @__PURE__ */ S("div", {
569
+ children: /* @__PURE__ */ C("div", {
552
570
  style: {
553
571
  display: "flex",
554
572
  justifyContent: "space-between",
@@ -556,13 +574,13 @@ var D = a(function() {
556
574
  flexWrap: "wrap",
557
575
  gap: 8
558
576
  },
559
- children: [/* @__PURE__ */ S("div", {
577
+ children: [/* @__PURE__ */ C("div", {
560
578
  style: {
561
579
  flex: "1 1 200px",
562
580
  minWidth: 0
563
581
  },
564
582
  children: [
565
- /* @__PURE__ */ S("div", {
583
+ /* @__PURE__ */ C("div", {
566
584
  style: {
567
585
  display: "flex",
568
586
  alignItems: "center",
@@ -572,7 +590,7 @@ var D = a(function() {
572
590
  },
573
591
  children: [
574
592
  T(e.status),
575
- /* @__PURE__ */ x("span", {
593
+ /* @__PURE__ */ S("span", {
576
594
  style: {
577
595
  fontSize: "var(--font-size-body-sm)",
578
596
  fontWeight: "var(--font-weight-medium)",
@@ -584,7 +602,7 @@ var D = a(function() {
584
602
  },
585
603
  children: e.generatedSpec?.name || "Generating..."
586
604
  }),
587
- /* @__PURE__ */ x("span", {
605
+ /* @__PURE__ */ S("span", {
588
606
  style: {
589
607
  fontSize: 11,
590
608
  color: "var(--color-text-muted)",
@@ -596,7 +614,7 @@ var D = a(function() {
596
614
  })
597
615
  ]
598
616
  }),
599
- /* @__PURE__ */ x("p", {
617
+ /* @__PURE__ */ S("p", {
600
618
  style: {
601
619
  fontSize: "var(--font-size-body-sm)",
602
620
  color: "var(--color-text-secondary)",
@@ -604,7 +622,7 @@ var D = a(function() {
604
622
  },
605
623
  children: e.prompt.length > 120 ? e.prompt.slice(0, 120) + "..." : e.prompt
606
624
  }),
607
- e.generatedSpec && /* @__PURE__ */ S("div", {
625
+ e.generatedSpec && /* @__PURE__ */ C("div", {
608
626
  style: {
609
627
  fontSize: 11,
610
628
  color: "var(--color-text-muted)"
@@ -620,7 +638,7 @@ var D = a(function() {
620
638
  "% confidence"
621
639
  ]
622
640
  }),
623
- e.errorMessage && /* @__PURE__ */ S("div", {
641
+ e.errorMessage && /* @__PURE__ */ C("div", {
624
642
  style: {
625
643
  display: "flex",
626
644
  alignItems: "center",
@@ -629,19 +647,19 @@ var D = a(function() {
629
647
  fontSize: "var(--font-size-body-sm)",
630
648
  color: "var(--color-status-error-text)"
631
649
  },
632
- children: [/* @__PURE__ */ x(l, { size: 14 }), e.errorMessage]
650
+ children: [/* @__PURE__ */ S(u, { size: 14 }), e.errorMessage]
633
651
  })
634
652
  ]
635
- }), /* @__PURE__ */ S("div", {
653
+ }), /* @__PURE__ */ C("div", {
636
654
  style: {
637
655
  display: "flex",
638
656
  gap: 8,
639
657
  flexWrap: "wrap"
640
658
  },
641
659
  children: [
642
- w.includes(e.status) && /* @__PURE__ */ S("button", {
660
+ w.includes(e.status) && /* @__PURE__ */ C("button", {
643
661
  onClick: () => {
644
- r("medium"), be(e.id);
662
+ i("medium"), xe(e.id);
645
663
  },
646
664
  disabled: A.has(e.id),
647
665
  title: "Cancel generation",
@@ -657,9 +675,9 @@ var D = a(function() {
657
675
  fontSize: "var(--font-size-body-sm)",
658
676
  cursor: A.has(e.id) ? "wait" : "pointer"
659
677
  },
660
- children: [/* @__PURE__ */ x(d, { size: 14 }), " Cancel"]
678
+ children: [/* @__PURE__ */ S(ee, { size: 14 }), " Cancel"]
661
679
  }),
662
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
680
+ e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ C("button", {
663
681
  onClick: () => N(e),
664
682
  title: "Preview proposed layout",
665
683
  style: {
@@ -674,9 +692,9 @@ var D = a(function() {
674
692
  fontSize: "var(--font-size-body-sm)",
675
693
  cursor: "pointer"
676
694
  },
677
- children: [/* @__PURE__ */ x(ee, { size: 14 }), " Preview"]
695
+ children: [/* @__PURE__ */ S(te, { size: 14 }), " Preview"]
678
696
  }),
679
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
697
+ e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ C("button", {
680
698
  onClick: () => {
681
699
  F(e), L("");
682
700
  },
@@ -693,11 +711,11 @@ var D = a(function() {
693
711
  fontSize: "var(--font-size-body-sm)",
694
712
  cursor: "pointer"
695
713
  },
696
- children: [/* @__PURE__ */ x(g, { size: 14 }), " Refine"]
714
+ children: [/* @__PURE__ */ S(g, { size: 14 }), " Refine"]
697
715
  }),
698
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
716
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ C("button", {
699
717
  onClick: () => {
700
- r("medium"), xe(e.id);
718
+ i("medium"), Se(e.id);
701
719
  },
702
720
  disabled: A.has(e.id),
703
721
  title: "Regenerate with the same prompt",
@@ -713,13 +731,13 @@ var D = a(function() {
713
731
  fontSize: "var(--font-size-body-sm)",
714
732
  cursor: A.has(e.id) ? "wait" : "pointer"
715
733
  },
716
- children: [/* @__PURE__ */ x(te, {
734
+ children: [/* @__PURE__ */ S(ne, {
717
735
  size: 14,
718
736
  className: A.has(e.id) ? "animate-spin" : ""
719
737
  }), " Regenerate"]
720
738
  }),
721
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
722
- onClick: () => ve(e.id),
739
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ C("button", {
740
+ onClick: () => ye(e.id),
723
741
  style: {
724
742
  display: "flex",
725
743
  alignItems: "center",
@@ -732,10 +750,10 @@ var D = a(function() {
732
750
  fontSize: "var(--font-size-body-sm)",
733
751
  cursor: "pointer"
734
752
  },
735
- children: ["Create ", /* @__PURE__ */ x(u, { size: 14 })]
753
+ children: ["Create ", /* @__PURE__ */ S(d, { size: 14 })]
736
754
  }),
737
- e.dashboardId && /* @__PURE__ */ S("button", {
738
- onClick: () => a(`/dashboards/${e.dashboardId}`),
755
+ e.dashboardId && /* @__PURE__ */ C("button", {
756
+ onClick: () => o(`/dashboards/${e.dashboardId}`),
739
757
  style: {
740
758
  display: "flex",
741
759
  alignItems: "center",
@@ -748,11 +766,11 @@ var D = a(function() {
748
766
  fontSize: "var(--font-size-body-sm)",
749
767
  cursor: "pointer"
750
768
  },
751
- children: ["View Dashboard ", /* @__PURE__ */ x(u, { size: 14 })]
769
+ children: ["View Dashboard ", /* @__PURE__ */ S(d, { size: 14 })]
752
770
  }),
753
- /* @__PURE__ */ x("button", {
771
+ /* @__PURE__ */ S("button", {
754
772
  onClick: () => {
755
- r("medium"), ye(e.id);
773
+ i("medium"), be(e.id);
756
774
  },
757
775
  title: "Delete generation",
758
776
  style: {
@@ -765,7 +783,7 @@ var D = a(function() {
765
783
  color: "var(--color-text-muted)",
766
784
  cursor: "pointer"
767
785
  },
768
- children: /* @__PURE__ */ x(ne, { size: 14 })
786
+ children: /* @__PURE__ */ S(re, { size: 14 })
769
787
  })
770
788
  ]
771
789
  })]
@@ -774,7 +792,7 @@ var D = a(function() {
774
792
  })] })
775
793
  ]
776
794
  }),
777
- M?.generatedSpec && /* @__PURE__ */ x("div", {
795
+ M?.generatedSpec && /* @__PURE__ */ S("div", {
778
796
  role: "dialog",
779
797
  "aria-modal": "true",
780
798
  "aria-label": "Generation preview",
@@ -789,7 +807,7 @@ var D = a(function() {
789
807
  justifyContent: "center",
790
808
  padding: "var(--space-pagePadding)"
791
809
  },
792
- children: /* @__PURE__ */ S("div", {
810
+ children: /* @__PURE__ */ C("div", {
793
811
  onClick: (e) => e.stopPropagation(),
794
812
  style: {
795
813
  width: "min(640px, 100%)",
@@ -802,7 +820,7 @@ var D = a(function() {
802
820
  padding: "var(--space-cardPadding)"
803
821
  },
804
822
  children: [
805
- /* @__PURE__ */ S("div", {
823
+ /* @__PURE__ */ C("div", {
806
824
  style: {
807
825
  display: "flex",
808
826
  justifyContent: "space-between",
@@ -810,15 +828,15 @@ var D = a(function() {
810
828
  gap: 8,
811
829
  marginBottom: "var(--space-controlGap)"
812
830
  },
813
- children: [/* @__PURE__ */ S("div", {
831
+ children: [/* @__PURE__ */ C("div", {
814
832
  style: { minWidth: 0 },
815
- children: [/* @__PURE__ */ x("h3", {
833
+ children: [/* @__PURE__ */ S("h3", {
816
834
  style: {
817
835
  fontSize: "var(--font-size-heading-h4)",
818
836
  fontWeight: "var(--font-weight-semibold)"
819
837
  },
820
838
  children: M.generatedSpec.name
821
- }), M.generatedSpec.description && /* @__PURE__ */ x("p", {
839
+ }), M.generatedSpec.description && /* @__PURE__ */ S("p", {
822
840
  style: {
823
841
  fontSize: "var(--font-size-body-sm)",
824
842
  color: "var(--color-text-muted)",
@@ -826,7 +844,7 @@ var D = a(function() {
826
844
  },
827
845
  children: M.generatedSpec.description
828
846
  })]
829
- }), /* @__PURE__ */ x("button", {
847
+ }), /* @__PURE__ */ S("button", {
830
848
  onClick: () => N(null),
831
849
  "aria-label": "Close preview",
832
850
  style: {
@@ -838,10 +856,10 @@ var D = a(function() {
838
856
  color: "var(--color-text-muted)",
839
857
  cursor: "pointer"
840
858
  },
841
- children: /* @__PURE__ */ x(re, { size: 18 })
859
+ children: /* @__PURE__ */ S(ie, { size: 18 })
842
860
  })]
843
861
  }),
844
- /* @__PURE__ */ S("div", {
862
+ /* @__PURE__ */ C("div", {
845
863
  style: {
846
864
  fontSize: 11,
847
865
  color: "var(--color-text-muted)",
@@ -858,9 +876,9 @@ var D = a(function() {
858
876
  "% confidence"
859
877
  ]
860
878
  }),
861
- M.generatedSpec.pages.map((e, t) => /* @__PURE__ */ S("div", {
879
+ M.generatedSpec.pages.map((e, t) => /* @__PURE__ */ C("div", {
862
880
  style: { marginBottom: "var(--space-controlGap)" },
863
- children: [/* @__PURE__ */ x("div", {
881
+ children: [/* @__PURE__ */ S("div", {
864
882
  style: {
865
883
  fontSize: "var(--font-size-body-sm)",
866
884
  fontWeight: "var(--font-weight-medium)",
@@ -868,13 +886,13 @@ var D = a(function() {
868
886
  marginBottom: 4
869
887
  },
870
888
  children: e.name
871
- }), /* @__PURE__ */ x("div", {
889
+ }), /* @__PURE__ */ S("div", {
872
890
  style: {
873
891
  display: "flex",
874
892
  flexWrap: "wrap",
875
893
  gap: 6
876
894
  },
877
- children: e.widgets.map((e, t) => /* @__PURE__ */ S("span", {
895
+ children: e.widgets.map((e, t) => /* @__PURE__ */ C("span", {
878
896
  style: {
879
897
  fontSize: 11,
880
898
  padding: "3px 8px",
@@ -893,7 +911,7 @@ var D = a(function() {
893
911
  ]
894
912
  })
895
913
  }),
896
- P && /* @__PURE__ */ x("div", {
914
+ P && /* @__PURE__ */ S("div", {
897
915
  role: "dialog",
898
916
  "aria-modal": "true",
899
917
  "aria-label": "Refine generation",
@@ -908,7 +926,7 @@ var D = a(function() {
908
926
  justifyContent: "center",
909
927
  padding: "var(--space-pagePadding)"
910
928
  },
911
- children: /* @__PURE__ */ S("div", {
929
+ children: /* @__PURE__ */ C("div", {
912
930
  onClick: (e) => e.stopPropagation(),
913
931
  style: {
914
932
  width: "min(520px, 100%)",
@@ -919,7 +937,7 @@ var D = a(function() {
919
937
  padding: "var(--space-cardPadding)"
920
938
  },
921
939
  children: [
922
- /* @__PURE__ */ x("h3", {
940
+ /* @__PURE__ */ S("h3", {
923
941
  style: {
924
942
  fontSize: "var(--font-size-heading-h4)",
925
943
  fontWeight: "var(--font-weight-semibold)",
@@ -927,7 +945,7 @@ var D = a(function() {
927
945
  },
928
946
  children: "Refine dashboard"
929
947
  }),
930
- /* @__PURE__ */ x("p", {
948
+ /* @__PURE__ */ S("p", {
931
949
  style: {
932
950
  fontSize: "var(--font-size-body-sm)",
933
951
  color: "var(--color-text-muted)",
@@ -935,7 +953,7 @@ var D = a(function() {
935
953
  },
936
954
  children: "Describe what to change — the AI keeps the existing spec and applies your instructions."
937
955
  }),
938
- /* @__PURE__ */ x("textarea", {
956
+ /* @__PURE__ */ S("textarea", {
939
957
  value: I,
940
958
  onChange: (e) => L(e.target.value),
941
959
  maxLength: 2e3,
@@ -953,14 +971,14 @@ var D = a(function() {
953
971
  marginBottom: "var(--space-controlGap)"
954
972
  }
955
973
  }),
956
- /* @__PURE__ */ S("div", {
974
+ /* @__PURE__ */ C("div", {
957
975
  style: {
958
976
  display: "flex",
959
977
  justifyContent: "flex-end",
960
978
  gap: 8,
961
979
  flexWrap: "wrap"
962
980
  },
963
- children: [/* @__PURE__ */ x("button", {
981
+ children: [/* @__PURE__ */ S("button", {
964
982
  onClick: () => F(null),
965
983
  style: {
966
984
  padding: "8px 16px",
@@ -972,8 +990,8 @@ var D = a(function() {
972
990
  cursor: "pointer"
973
991
  },
974
992
  children: "Cancel"
975
- }), /* @__PURE__ */ S("button", {
976
- onClick: () => void Se(),
993
+ }), /* @__PURE__ */ C("button", {
994
+ onClick: () => void Ce(),
977
995
  disabled: !I.trim() || A.has(P.id),
978
996
  style: {
979
997
  display: "flex",
@@ -988,10 +1006,10 @@ var D = a(function() {
988
1006
  cursor: !I.trim() || A.has(P.id) ? "not-allowed" : "pointer",
989
1007
  opacity: I.trim() ? 1 : .6
990
1008
  },
991
- children: [A.has(P.id) ? /* @__PURE__ */ x(m, {
1009
+ children: [A.has(P.id) ? /* @__PURE__ */ S(m, {
992
1010
  size: 14,
993
1011
  className: "animate-spin"
994
- }) : /* @__PURE__ */ x(g, { size: 14 }), "Apply refinement"]
1012
+ }) : /* @__PURE__ */ S(g, { size: 14 }), "Apply refinement"]
995
1013
  })]
996
1014
  })
997
1015
  ]