@burdenoff/microfe-bigconsole 2026.1103.7 → 2026.1103.9

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.
@@ -5,22 +5,24 @@ import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
5
5
  import { Section as r, SectionStack as i } from "../components/common/Section.js";
6
6
  import "../components/common/index.js";
7
7
  import a from "../hooks/useBigConsoleAnalytics.js";
8
- import { setActiveGenerationContext as ee } from "../assistant/generationContext.js";
9
- import { isNative as te, nativeImpact as o, nativeNotify as ne } from "../../utils/nativeBridge.js";
10
- import { generationApproval as s } from "../utils/generationApproval.js";
11
- import { isInsightsDraftDirty as re } from "../utils/insightsDraft.js";
12
- import { GeneratedFormattingReview as ie, GenerationExecutionStatus as ae } from "../components/insights/GeneratedFormattingReview.js";
8
+ import { setActiveGenerationContext as o } from "../assistant/generationContext.js";
9
+ import { isNative as ee, nativeImpact as s, nativeNotify as te } from "../../utils/nativeBridge.js";
10
+ import { generationApproval as c } from "../utils/generationApproval.js";
11
+ import { findParentGeneration as ne, splitSupersededGenerations as re } from "../utils/generationRevisions.js";
12
+ import { isInsightsDraftDirty as ie } from "../utils/insightsDraft.js";
13
+ import { PromptAnalysisPreview as ae } from "../components/insights/PromptAnalysisPreview.js";
14
+ import { GeneratedFormattingReview as oe, GenerationExecutionStatus as se } from "../components/insights/GeneratedFormattingReview.js";
13
15
  /* empty css */
14
- import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
15
- import { AlertCircle as oe, ArrowRight as f, Ban as se, CheckCircle as p, Clock as m, Eye as ce, History as le, Lightbulb as ue, Loader2 as h, RefreshCw as de, Sparkles as g, Trash2 as fe, Wand2 as _, X as pe, XCircle as v } from "lucide-react";
16
- import { AuroraBackground as me, GlassCard as he, GradientText as ge, IllustratedEmptyState as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
17
- import { useUnsavedChanges as ye } from "@burdenoff/fe-libs/shared/hooks";
18
- import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { useMutation as y, useQuery as xe } from "@apollo/client/react";
20
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
21
- import { gql as S } from "@apollo/client";
16
+ import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
17
+ import { AlertCircle as ce, ArrowRight as p, Ban as le, CheckCircle as m, Clock as h, Eye as ue, History as de, Lightbulb as fe, Loader2 as g, RefreshCw as pe, Sparkles as _, Trash2 as me, Wand2 as v, X as he, XCircle as y } from "lucide-react";
18
+ import { AuroraBackground as ge, GlassCard as _e, GradientText as ve, IllustratedEmptyState as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
19
+ import { useUnsavedChanges as xe } from "@burdenoff/fe-libs/shared/hooks";
20
+ import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { useMutation as b, useQuery as Ce } from "@apollo/client/react";
22
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
23
+ import { gql as C } from "@apollo/client";
22
24
  //#region src/bigconsole/pages/InsightsPage.tsx
23
- var Se = S`
25
+ var we = C`
24
26
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
25
27
  listPromptGenerations(status: $status, first: $first) {
26
28
  edges {
@@ -29,6 +31,7 @@ var Se = S`
29
31
  prompt
30
32
  status
31
33
  dashboardId
34
+ parentGenerationId
32
35
  generatedSpecDigest
33
36
  updatedAt
34
37
  errorMessage
@@ -64,7 +67,7 @@ var Se = S`
64
67
  totalCount
65
68
  }
66
69
  }
67
- `, Ce = S`
70
+ `, Te = C`
68
71
  query GetPromptSuggestions($category: String, $limit: Int) {
69
72
  getPromptSuggestions(category: $category, limit: $limit) {
70
73
  id
@@ -75,7 +78,7 @@ var Se = S`
75
78
  tags
76
79
  }
77
80
  }
78
- `, we = S`
81
+ `, Ee = C`
79
82
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
80
83
  generateDashboardFromPrompt(input: $input) {
81
84
  id
@@ -83,24 +86,24 @@ var Se = S`
83
86
  prompt
84
87
  }
85
88
  }
86
- `, Te = S`
89
+ `, De = C`
87
90
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
88
91
  createDashboardFromGeneration(input: $input) {
89
92
  id
90
93
  }
91
94
  }
92
- `, Ee = S`
95
+ `, Oe = C`
93
96
  mutation DeletePromptGeneration($generationId: ID!) {
94
97
  deletePromptGeneration(generationId: $generationId)
95
98
  }
96
- `, De = S`
99
+ `, ke = C`
97
100
  mutation CancelPromptGeneration($generationId: ID!) {
98
101
  cancelPromptGeneration(generationId: $generationId) {
99
102
  id
100
103
  status
101
104
  }
102
105
  }
103
- `, Oe = S`
106
+ `, Ae = C`
104
107
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
105
108
  regenerateDashboard(input: $input) {
106
109
  id
@@ -108,7 +111,7 @@ var Se = S`
108
111
  prompt
109
112
  }
110
113
  }
111
- `, ke = S`
114
+ `, je = C`
112
115
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
113
116
  refineGeneratedDashboard(input: $input) {
114
117
  id
@@ -116,11 +119,11 @@ var Se = S`
116
119
  prompt
117
120
  }
118
121
  }
119
- `, C = [
122
+ `, Me = [
120
123
  "PENDING",
121
124
  "PROCESSING",
122
125
  "GENERATING"
123
- ], Ae = 12, je = 8, Me = [
126
+ ], Ne = 12, Pe = 8, Fe = [
124
127
  {
125
128
  value: "MODERN",
126
129
  label: "Modern"
@@ -141,7 +144,7 @@ var Se = S`
141
144
  value: "VIBRANT",
142
145
  label: "Vibrant"
143
146
  }
144
- ], Ne = [
147
+ ], Ie = [
145
148
  {
146
149
  value: "GRID",
147
150
  label: "Grid"
@@ -166,13 +169,13 @@ var Se = S`
166
169
  value: "THREE_COLUMN",
167
170
  label: "Three column"
168
171
  }
169
- ], Pe = [
172
+ ], Le = [
170
173
  6,
171
174
  8,
172
175
  12,
173
176
  16,
174
177
  24
175
- ], Fe = [
178
+ ], Re = [
176
179
  4,
177
180
  6,
178
181
  8,
@@ -201,25 +204,25 @@ var Se = S`
201
204
  border: "1px solid transparent",
202
205
  backgroundColor: "var(--color-action-primary-bg)",
203
206
  color: "var(--color-action-primary-text)"
204
- }, Ie = {
207
+ }, ze = {
205
208
  ...w,
206
209
  border: "1px solid var(--color-status-warning-border)",
207
210
  backgroundColor: "transparent",
208
211
  color: "var(--color-status-warning-text)"
209
- }, D = {
212
+ }, Be = {
210
213
  ...w,
211
214
  minWidth: "var(--size-controlHeight-md)",
212
215
  padding: "0 var(--space-controlGap)",
213
216
  border: "1px solid var(--color-border-default)",
214
217
  backgroundColor: "transparent",
215
218
  color: "var(--color-status-error-text)"
216
- }, O = {
219
+ }, D = {
217
220
  display: "block",
218
221
  marginBottom: "2px",
219
222
  fontSize: "var(--font-size-body-sm)",
220
223
  fontWeight: "var(--font-weight-medium)",
221
224
  color: "var(--color-text-secondary)"
222
- }, k = {
225
+ }, O = {
223
226
  width: "100%",
224
227
  minHeight: "var(--size-controlHeight-md)",
225
228
  padding: "0 var(--space-controlGap)",
@@ -228,7 +231,7 @@ var Se = S`
228
231
  backgroundColor: "var(--color-bg-canvas)",
229
232
  color: "var(--color-text-primary)",
230
233
  fontSize: "var(--font-size-body-sm)"
231
- }, A = {
234
+ }, k = {
232
235
  display: "inline-flex",
233
236
  alignItems: "center",
234
237
  gap: "var(--space-iconGap)",
@@ -240,7 +243,7 @@ var Se = S`
240
243
  backgroundColor: "var(--color-bg-sunken)",
241
244
  color: "var(--color-text-secondary)"
242
245
  };
243
- function j(e) {
246
+ function A(e) {
244
247
  switch (e) {
245
248
  case "COMPLETED": return "success";
246
249
  case "FAILED": return "danger";
@@ -250,7 +253,7 @@ function j(e) {
250
253
  default: return "neutral";
251
254
  }
252
255
  }
253
- var M = {
256
+ var j = {
254
257
  success: {
255
258
  text: "var(--color-status-success-text)",
256
259
  bg: "var(--color-status-success-bgSubtle)",
@@ -272,36 +275,36 @@ var M = {
272
275
  border: "var(--color-border-subtle)"
273
276
  }
274
277
  };
275
- function Le(e) {
276
- let t = M[j(e)].text;
278
+ function Ve(e) {
279
+ let t = j[A(e)].text;
277
280
  switch (e) {
278
- case "COMPLETED": return /* @__PURE__ */ b(p, {
281
+ case "COMPLETED": return /* @__PURE__ */ x(m, {
279
282
  size: 14,
280
283
  style: { color: t },
281
284
  "aria-hidden": "true"
282
285
  });
283
286
  case "FAILED":
284
- case "CANCELLED": return /* @__PURE__ */ b(v, {
287
+ case "CANCELLED": return /* @__PURE__ */ x(y, {
285
288
  size: 14,
286
289
  style: { color: t },
287
290
  "aria-hidden": "true"
288
291
  });
289
292
  case "PENDING":
290
293
  case "PROCESSING":
291
- case "GENERATING": return /* @__PURE__ */ b(h, {
294
+ case "GENERATING": return /* @__PURE__ */ x(g, {
292
295
  size: 14,
293
296
  className: "animate-spin",
294
297
  style: { color: t },
295
298
  "aria-hidden": "true"
296
299
  });
297
- default: return /* @__PURE__ */ b(m, {
300
+ default: return /* @__PURE__ */ x(h, {
298
301
  size: 14,
299
302
  style: { color: t },
300
303
  "aria-hidden": "true"
301
304
  });
302
305
  }
303
306
  }
304
- function N(e, t) {
307
+ function M(e, t) {
305
308
  switch (e) {
306
309
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
307
310
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -312,44 +315,44 @@ function N(e, t) {
312
315
  default: return e;
313
316
  }
314
317
  }
315
- var Re = ({ status: e }) => {
316
- let { t } = be(), n = M[j(e)];
317
- return /* @__PURE__ */ x("span", {
318
+ var He = ({ status: e }) => {
319
+ let { t } = Se(), n = j[A(e)];
320
+ return /* @__PURE__ */ S("span", {
318
321
  "data-status": e,
319
322
  style: {
320
- ...A,
323
+ ...k,
321
324
  border: `1px solid ${n.border}`,
322
325
  backgroundColor: n.bg,
323
326
  color: n.text
324
327
  },
325
- children: [Le(e), N(e, t)]
328
+ children: [Ve(e), M(e, t)]
326
329
  });
327
330
  };
328
- function ze(e) {
329
- let t = M[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
331
+ function Ue(e) {
332
+ let t = j[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
330
333
  return {
331
- ...A,
334
+ ...k,
332
335
  border: `1px solid ${t.border}`,
333
336
  backgroundColor: t.bg,
334
337
  color: t.text
335
338
  };
336
339
  }
337
- function P(e) {
340
+ function N(e) {
338
341
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
339
342
  }
340
- function Be(e) {
343
+ function We(e) {
341
344
  let t = e?.toUpperCase();
342
345
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
343
346
  }
344
- var Ve = {
347
+ var Ge = {
345
348
  HIGH: "success",
346
349
  MEDIUM: "neutral",
347
350
  LOW: "danger"
348
351
  };
349
- function He(e) {
352
+ function Ke(e) {
350
353
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
351
354
  }
352
- function Ue(e, t) {
355
+ function qe(e, t) {
353
356
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
354
357
  return {
355
358
  "--proposal-column": r + 1,
@@ -358,10 +361,10 @@ function Ue(e, t) {
358
361
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
359
362
  };
360
363
  }
361
- function We(e) {
362
- let t = M[Ve[e]];
364
+ function Je(e) {
365
+ let t = j[Ge[e]];
363
366
  return {
364
- ...A,
367
+ ...k,
365
368
  padding: "0 var(--space-controlGap)",
366
369
  fontSize: "var(--font-size-xs)",
367
370
  fontWeight: "var(--font-weight-semibold)",
@@ -371,160 +374,160 @@ function We(e) {
371
374
  color: t.text
372
375
  };
373
376
  }
374
- var F = c(function() {
375
- let { t: c } = be(), p = e(), m = a(), [v, S] = d(""), [w, j] = d("MODERN"), [M, Le] = d("GRID"), [N, Ve] = d(Ae), [F, Ge] = d(je), [I, Ke] = d(!1), [qe, L] = d(null), [R, Je] = d(() => /* @__PURE__ */ new Set()), [z, B] = d(null), [V, H] = d(null), [U, W] = d("");
376
- ye({
377
+ var P = l(function() {
378
+ let { t: l } = Se(), m = e(), h = a(), [y, C] = f(""), [w, A] = f("MODERN"), [j, Ve] = f("GRID"), [M, Ge] = f(Ne), [P, Ye] = f(Pe), [F, Xe] = f(!1), [Ze, I] = f(null), [L, Qe] = f(() => /* @__PURE__ */ new Set()), [R, z] = f(null), [B, V] = f(null), [H, U] = f(""), [W, $e] = f(!1);
379
+ xe({
377
380
  id: "insights-prompt",
378
- label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
379
- dirty: re({
380
- promptText: v,
381
- isGenerating: I,
382
- refineOpen: V !== null,
383
- refineText: U,
384
- refineBusy: V !== null && R.has(V.id)
381
+ label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
382
+ dirty: ie({
383
+ promptText: y,
384
+ isGenerating: F,
385
+ refineOpen: B !== null,
386
+ refineText: H,
387
+ refineBusy: B !== null && L.has(B.id)
385
388
  })
386
- }), u(() => (ee(V?.id ?? z?.id ?? null), () => ee(null)), [V, z]);
387
- let G = l((e) => {
388
- Je((t) => new Set(t).add(e));
389
- }, []), K = l((e) => {
390
- Je((t) => {
389
+ }), d(() => (o(B?.id ?? R?.id ?? null), () => o(null)), [B, R]);
390
+ let G = u((e) => {
391
+ Qe((t) => new Set(t).add(e));
392
+ }, []), K = u((e) => {
393
+ Qe((t) => {
391
394
  let n = new Set(t);
392
395
  return n.delete(e), n;
393
396
  });
394
- }, []), { data: Ye, loading: Xe, error: q, refetch: J, startPolling: Ze, stopPolling: Y } = xe(Se, {
397
+ }, []), { data: et, loading: tt, error: q, refetch: J, startPolling: nt, stopPolling: Y } = Ce(we, {
395
398
  variables: { first: 20 },
396
399
  fetchPolicy: "cache-and-network"
397
- }), X = Ye?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: Qe, error: $e, refetch: et } = xe(Ce, { variables: { limit: 6 } }), [tt] = y(we), [nt] = y(Te), [rt] = y(Ee), [it] = y(De), [Z] = y(Oe), [at] = y(ke), Q = Ye?.listPromptGenerations?.edges?.map((e) => e.node) || [], ot = Qe?.getPromptSuggestions || [];
398
- u(() => (X || I ? Ze(2e3) : Y(), () => Y()), [
400
+ }), X = et?.listPromptGenerations?.edges?.some((e) => Me.includes(e.node.status)) ?? !1, { data: rt, error: it, refetch: at } = Ce(Te, { variables: { limit: 6 } }), [ot] = b(Ee), [st] = b(De), [ct] = b(Oe), [lt] = b(ke), [ut] = b(Ae), [dt] = b(je), Z = et?.listPromptGenerations?.edges?.map((e) => e.node) || [], ft = rt?.getPromptSuggestions || [], { current: pt, superseded: mt } = re(Z), Q = W ? Z : pt;
401
+ d(() => (X || F ? nt(2e3) : Y(), () => Y()), [
399
402
  X,
400
- I,
401
- Ze,
403
+ F,
404
+ nt,
402
405
  Y
403
- ]), u(() => {
404
- if (!z && !V) return;
406
+ ]), d(() => {
407
+ if (!R && !B) return;
405
408
  let e = (e) => {
406
- e.key === "Escape" && (B(null), H(null));
409
+ e.key === "Escape" && (z(null), V(null));
407
410
  };
408
411
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
409
- }, [z, V]);
410
- let st = l(async () => {
411
- if (!(!v.trim() || I)) {
412
- if (v.length > 2e3) {
413
- L(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
412
+ }, [R, B]);
413
+ let ht = u(async () => {
414
+ if (!(!y.trim() || F)) {
415
+ if (y.length > 2e3) {
416
+ I(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
414
417
  return;
415
418
  }
416
- L(null), Ke(!0);
419
+ I(null), Xe(!0);
417
420
  try {
418
- m("bigconsole.ai.generate_clicked", { maxWidgets: F });
419
- let e = await tt({ variables: { input: {
420
- prompt: v.trim(),
421
+ h("bigconsole.ai.generate_clicked", { maxWidgets: P });
422
+ let e = await ot({ variables: { input: {
423
+ prompt: y.trim(),
421
424
  styleType: w,
422
- layoutType: M,
423
- gridColumns: N,
424
- maxWidgets: F
425
+ layoutType: j,
426
+ gridColumns: M,
427
+ maxWidgets: P
425
428
  } } });
426
429
  if (t(e, "command")) return;
427
430
  let n = e.data?.generateDashboardFromPrompt?.id;
428
- n && m("bigconsole.ai.dashboard_generated", {
431
+ n && h("bigconsole.ai.dashboard_generated", {
429
432
  generationId: n,
430
- maxWidgets: F
431
- }), S(""), J();
433
+ maxWidgets: P
434
+ }), C(""), J();
432
435
  } catch (e) {
433
436
  if (t(e, "command")) return;
434
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
437
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
435
438
  } finally {
436
- Ke(!1);
439
+ Xe(!1);
437
440
  }
438
441
  }
439
442
  }, [
440
- m,
441
- v,
442
- I,
443
- tt,
443
+ h,
444
+ y,
445
+ F,
446
+ ot,
444
447
  J,
445
448
  w,
449
+ j,
446
450
  M,
447
- N,
448
- F,
449
- c
450
- ]), ct = l(async (e) => {
451
- L(null);
452
- let n = s(e);
451
+ P,
452
+ l
453
+ ]), gt = u(async (e) => {
454
+ I(null);
455
+ let n = c(e);
453
456
  if (n.kind === "view") {
454
- p(`/dashboards/${n.dashboardId}`);
457
+ m(`/dashboards/${n.dashboardId}`);
455
458
  return;
456
459
  }
457
460
  if (n.kind === "hold") {
458
- L(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
461
+ I(l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
459
462
  return;
460
463
  }
461
464
  let r = e.id;
462
465
  try {
463
- m("bigconsole.ai.create_dashboard_clicked", { generationId: r });
464
- let e = await nt({ variables: { input: n.input } });
466
+ h("bigconsole.ai.create_dashboard_clicked", { generationId: r });
467
+ let e = await st({ variables: { input: n.input } });
465
468
  if (t(e, "project")) return;
466
469
  let i = e.data?.createDashboardFromGeneration?.id;
467
- i && (m("bigconsole.ai.dashboard_created", {
470
+ i && (h("bigconsole.ai.dashboard_created", {
468
471
  generationId: r,
469
472
  dashboardId: i
470
- }), p(`/dashboards/${i}`));
473
+ }), m(`/dashboards/${i}`));
471
474
  } catch (e) {
472
475
  if (t(e, "project")) return;
473
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
476
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
474
477
  }
475
478
  }, [
476
- nt,
479
+ st,
480
+ h,
477
481
  m,
478
- p,
479
- c
480
- ]), lt = l(async (e) => {
481
- L(null);
482
+ l
483
+ ]), _t = u(async (e) => {
484
+ I(null);
482
485
  try {
483
- await rt({ variables: { generationId: e } }), te() && ne("success"), J();
486
+ await ct({ variables: { generationId: e } }), ee() && te("success"), J();
484
487
  } catch (e) {
485
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), te() && ne("error");
488
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && te("error");
486
489
  }
487
490
  }, [
488
- rt,
491
+ ct,
489
492
  J,
490
- c
491
- ]), ut = l(async (e) => {
492
- L(null), G(e);
493
+ l
494
+ ]), vt = u(async (e) => {
495
+ I(null), G(e);
493
496
  try {
494
- await it({ variables: { generationId: e } }), J();
497
+ await lt({ variables: { generationId: e } }), J();
495
498
  } catch (e) {
496
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
499
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
497
500
  } finally {
498
501
  K(e);
499
502
  }
500
503
  }, [
501
- it,
504
+ lt,
502
505
  J,
503
- c
504
- ]), dt = l(async (e) => {
505
- L(null), G(e);
506
+ l
507
+ ]), yt = u(async (e) => {
508
+ I(null), G(e);
506
509
  try {
507
- if (t(await Z({ variables: { input: { generationId: e } } }), "command")) return;
510
+ if (t(await ut({ variables: { input: { generationId: e } } }), "command")) return;
508
511
  J();
509
512
  } catch (e) {
510
513
  if (t(e, "command")) return;
511
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
514
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
512
515
  } finally {
513
516
  K(e);
514
517
  }
515
518
  }, [
516
- Z,
519
+ ut,
517
520
  J,
518
- c
519
- ]), ft = l(async () => {
520
- if (!V || !U.trim()) return;
521
- let e = V.id;
522
- L(null), G(e);
521
+ l
522
+ ]), bt = u(async () => {
523
+ if (!B || !H.trim()) return;
524
+ let e = B.id;
525
+ I(null), G(e);
523
526
  let n = !1;
524
527
  try {
525
- if (t(await at({ variables: { input: {
528
+ if (t(await dt({ variables: { input: {
526
529
  generationId: e,
527
- refinementPrompt: U.trim()
530
+ refinementPrompt: H.trim()
528
531
  } } }), "command")) {
529
532
  n = !0;
530
533
  return;
@@ -535,29 +538,29 @@ var F = c(function() {
535
538
  n = !0;
536
539
  return;
537
540
  }
538
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
541
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
539
542
  } finally {
540
- n && (H(null), W("")), K(e);
543
+ n && (V(null), U("")), K(e);
541
544
  }
542
545
  }, [
543
- V,
544
- U,
545
- at,
546
+ B,
547
+ H,
548
+ dt,
546
549
  J,
547
- c
548
- ]), pt = l((e) => {
549
- S(e);
550
- }, []), $ = z?.generatedSpec;
551
- return /* @__PURE__ */ x("div", {
550
+ l
551
+ ]), xt = u((e) => {
552
+ C(e);
553
+ }, []), $ = R?.generatedSpec;
554
+ return /* @__PURE__ */ S("div", {
552
555
  "data-tour": "bigconsole-ai-insights",
553
556
  className: "min-w-0",
554
557
  style: { backgroundColor: "var(--color-bg-canvas)" },
555
558
  children: [
556
- /* @__PURE__ */ x("header", {
559
+ /* @__PURE__ */ S("header", {
557
560
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
558
- children: [/* @__PURE__ */ b(me, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
561
+ children: [/* @__PURE__ */ x(ge, { intensity: "subtle" }), /* @__PURE__ */ x("div", {
559
562
  style: { padding: "var(--space-pagePadding)" },
560
- children: /* @__PURE__ */ x("div", {
563
+ children: /* @__PURE__ */ S("div", {
561
564
  style: {
562
565
  display: "flex",
563
566
  alignItems: "center",
@@ -565,7 +568,7 @@ var F = c(function() {
565
568
  flexWrap: "wrap",
566
569
  minWidth: 0
567
570
  },
568
- children: [/* @__PURE__ */ b("div", {
571
+ children: [/* @__PURE__ */ x("div", {
569
572
  style: {
570
573
  display: "flex",
571
574
  height: "var(--size-controlHeight-lg)",
@@ -576,90 +579,90 @@ var F = c(function() {
576
579
  borderRadius: "var(--radius-card)",
577
580
  backgroundColor: "var(--color-action-primary-bg)"
578
581
  },
579
- children: /* @__PURE__ */ b(g, { style: {
582
+ children: /* @__PURE__ */ x(_, { style: {
580
583
  height: "var(--size-icon-lg)",
581
584
  width: "var(--size-icon-lg)",
582
585
  color: "var(--color-action-primary-text)"
583
586
  } })
584
- }), /* @__PURE__ */ x("div", {
587
+ }), /* @__PURE__ */ S("div", {
585
588
  style: { minWidth: 0 },
586
- children: [/* @__PURE__ */ b("h1", {
589
+ children: [/* @__PURE__ */ x("h1", {
587
590
  className: "m-0 text-2xl font-bold text-text-primary",
588
- children: /* @__PURE__ */ b(ge, { children: c("bigconsole.insights.header.title", "AI Insights") })
589
- }), /* @__PURE__ */ b("p", {
591
+ children: /* @__PURE__ */ x(ve, { children: l("bigconsole.insights.header.title", "AI Insights") })
592
+ }), /* @__PURE__ */ x("p", {
590
593
  className: "m-0 text-sm text-text-secondary",
591
- children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
594
+ children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
592
595
  })]
593
596
  })]
594
597
  })
595
598
  })]
596
599
  }),
597
- /* @__PURE__ */ x("div", {
600
+ /* @__PURE__ */ S("div", {
598
601
  style: { padding: "var(--space-pagePadding)" },
599
- children: [/* @__PURE__ */ b(ve, {
602
+ children: [/* @__PURE__ */ x(be, {
600
603
  className: "mb-[var(--space-sectionGap)]",
601
604
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
602
- }), /* @__PURE__ */ x(i, { children: [
603
- qe && /* @__PURE__ */ b(r, {
605
+ }), /* @__PURE__ */ S(i, { children: [
606
+ Ze && /* @__PURE__ */ x(r, {
604
607
  headingLevel: 2,
605
608
  tone: "danger",
606
609
  padding: "compact",
607
610
  title: "That request did not go through",
608
- description: qe,
609
- icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" }),
611
+ description: Ze,
612
+ icon: /* @__PURE__ */ x(ce, { className: "h-icon-sm w-icon-sm" }),
610
613
  "data-testid": "insights-error",
611
- actions: /* @__PURE__ */ b("button", {
614
+ actions: /* @__PURE__ */ x("button", {
612
615
  type: "button",
613
- onClick: () => L(null),
614
- "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
616
+ onClick: () => I(null),
617
+ "aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
615
618
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
616
619
  style: T,
617
620
  children: "Dismiss"
618
621
  })
619
622
  }),
620
- (q || $e) && /* @__PURE__ */ b("div", {
623
+ (q || it) && /* @__PURE__ */ x("div", {
621
624
  role: "alert",
622
- children: /* @__PURE__ */ b(r, {
625
+ children: /* @__PURE__ */ x(r, {
623
626
  tone: "danger",
624
627
  padding: "compact",
625
628
  headingLevel: 2,
626
- title: c("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
627
- description: c("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
629
+ title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
630
+ description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
628
631
  "data-testid": "insights-load-error",
629
- actions: /* @__PURE__ */ x("button", {
632
+ actions: /* @__PURE__ */ S("button", {
630
633
  type: "button",
631
634
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
632
635
  style: T,
633
636
  onClick: () => {
634
- q && J().catch(() => void 0), $e && et().catch(() => void 0);
637
+ q && J().catch(() => void 0), it && at().catch(() => void 0);
635
638
  },
636
639
  children: [
637
- /* @__PURE__ */ b(de, {
640
+ /* @__PURE__ */ x(pe, {
638
641
  size: 14,
639
642
  "aria-hidden": "true"
640
643
  }),
641
644
  " ",
642
- c("bigconsole.insights.error.retry", "Retry")
645
+ l("bigconsole.insights.error.retry", "Retry")
643
646
  ]
644
647
  })
645
648
  })
646
649
  }),
647
- /* @__PURE__ */ b(r, {
650
+ /* @__PURE__ */ x(r, {
648
651
  id: "insights-prompt",
649
652
  emphasis: "primary",
650
653
  headingLevel: 2,
651
654
  title: "Describe your dashboard",
652
655
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
653
- icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" }),
656
+ icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" }),
654
657
  "data-testid": "insights-prompt",
655
- children: /* @__PURE__ */ x("div", {
658
+ children: /* @__PURE__ */ S("div", {
656
659
  style: {
657
660
  display: "flex",
658
661
  flexDirection: "column",
659
662
  gap: "var(--space-controlGap)"
660
663
  },
661
664
  children: [
662
- /* @__PURE__ */ b("label", {
665
+ /* @__PURE__ */ x("label", {
663
666
  htmlFor: "prompt-input",
664
667
  style: {
665
668
  display: "block",
@@ -667,13 +670,13 @@ var F = c(function() {
667
670
  fontWeight: "var(--font-weight-medium)",
668
671
  color: "var(--color-text-primary)"
669
672
  },
670
- children: c("bigconsole.insights.prompt.label", "Your prompt")
673
+ children: l("bigconsole.insights.prompt.label", "Your prompt")
671
674
  }),
672
- /* @__PURE__ */ b("textarea", {
675
+ /* @__PURE__ */ x("textarea", {
673
676
  id: "prompt-input",
674
- value: v,
675
- onChange: (e) => S(e.target.value),
676
- placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
677
+ value: y,
678
+ onChange: (e) => C(e.target.value),
679
+ placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
677
680
  rows: 3,
678
681
  maxLength: 2e3,
679
682
  className: n,
@@ -689,12 +692,12 @@ var F = c(function() {
689
692
  resize: "vertical"
690
693
  },
691
694
  onKeyDown: (e) => {
692
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), st());
695
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), ht());
693
696
  }
694
697
  }),
695
- /* @__PURE__ */ x("div", {
698
+ /* @__PURE__ */ S("div", {
696
699
  role: "group",
697
- "aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
700
+ "aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
698
701
  "data-testid": "insights-generation-options",
699
702
  style: {
700
703
  display: "grid",
@@ -702,69 +705,73 @@ var F = c(function() {
702
705
  gap: "var(--space-controlGap)"
703
706
  },
704
707
  children: [
705
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
708
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
706
709
  htmlFor: "prompt-style",
707
- style: O,
708
- children: c("bigconsole.insights.prompt.style", "Style")
709
- }), /* @__PURE__ */ b("select", {
710
+ style: D,
711
+ children: l("bigconsole.insights.prompt.style", "Style")
712
+ }), /* @__PURE__ */ x("select", {
710
713
  id: "prompt-style",
711
714
  value: w,
712
- onChange: (e) => j(e.target.value),
715
+ onChange: (e) => A(e.target.value),
713
716
  className: n,
714
- style: k,
715
- children: Me.map((e) => /* @__PURE__ */ b("option", {
717
+ style: O,
718
+ children: Fe.map((e) => /* @__PURE__ */ x("option", {
716
719
  value: e.value,
717
720
  children: e.label
718
721
  }, e.value))
719
722
  })] }),
720
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
723
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
721
724
  htmlFor: "prompt-layout",
722
- style: O,
723
- children: c("bigconsole.insights.prompt.layout", "Layout")
724
- }), /* @__PURE__ */ b("select", {
725
+ style: D,
726
+ children: l("bigconsole.insights.prompt.layout", "Layout")
727
+ }), /* @__PURE__ */ x("select", {
725
728
  id: "prompt-layout",
726
- value: M,
727
- onChange: (e) => Le(e.target.value),
729
+ value: j,
730
+ onChange: (e) => Ve(e.target.value),
728
731
  className: n,
729
- style: k,
730
- children: Ne.map((e) => /* @__PURE__ */ b("option", {
732
+ style: O,
733
+ children: Ie.map((e) => /* @__PURE__ */ x("option", {
731
734
  value: e.value,
732
735
  children: e.label
733
736
  }, e.value))
734
737
  })] }),
735
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
738
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
736
739
  htmlFor: "prompt-columns",
737
- style: O,
738
- children: c("bigconsole.insights.prompt.columns", "Columns")
739
- }), /* @__PURE__ */ b("select", {
740
+ style: D,
741
+ children: l("bigconsole.insights.prompt.columns", "Columns")
742
+ }), /* @__PURE__ */ x("select", {
740
743
  id: "prompt-columns",
741
- value: N,
742
- onChange: (e) => Ve(Number(e.target.value)),
744
+ value: M,
745
+ onChange: (e) => Ge(Number(e.target.value)),
743
746
  className: n,
744
- style: k,
745
- children: Pe.map((e) => /* @__PURE__ */ b("option", {
747
+ style: O,
748
+ children: Le.map((e) => /* @__PURE__ */ x("option", {
746
749
  value: e,
747
750
  children: e
748
751
  }, e))
749
752
  })] }),
750
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
753
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
751
754
  htmlFor: "prompt-max-widgets",
752
- style: O,
753
- children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
754
- }), /* @__PURE__ */ b("select", {
755
+ style: D,
756
+ children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
757
+ }), /* @__PURE__ */ x("select", {
755
758
  id: "prompt-max-widgets",
756
- value: F,
757
- onChange: (e) => Ge(Number(e.target.value)),
759
+ value: P,
760
+ onChange: (e) => Ye(Number(e.target.value)),
758
761
  className: n,
759
- style: k,
760
- children: Fe.map((e) => /* @__PURE__ */ b("option", {
762
+ style: O,
763
+ children: Re.map((e) => /* @__PURE__ */ x("option", {
761
764
  value: e,
762
765
  children: e
763
766
  }, e))
764
767
  })] })
765
768
  ]
766
769
  }),
767
- /* @__PURE__ */ x("div", {
770
+ /* @__PURE__ */ x(ae, {
771
+ prompt: y,
772
+ disabled: F
773
+ }),
774
+ /* @__PURE__ */ S("div", {
768
775
  style: {
769
776
  display: "flex",
770
777
  alignItems: "center",
@@ -773,7 +780,7 @@ var F = c(function() {
773
780
  borderTop: "1px solid var(--color-border-subtle)",
774
781
  paddingTop: "var(--space-controlGap)"
775
782
  },
776
- children: [/* @__PURE__ */ x("span", {
783
+ children: [/* @__PURE__ */ S("span", {
777
784
  style: {
778
785
  flex: "1 1 12rem",
779
786
  minWidth: 0,
@@ -781,51 +788,51 @@ var F = c(function() {
781
788
  color: "var(--color-text-muted)"
782
789
  },
783
790
  children: [
784
- c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
791
+ l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
785
792
  " · ",
786
- v.length,
793
+ y.length,
787
794
  "/2000"
788
795
  ]
789
- }), /* @__PURE__ */ x("button", {
796
+ }), /* @__PURE__ */ S("button", {
790
797
  type: "button",
791
- onClick: st,
792
- disabled: !v.trim() || I,
798
+ onClick: ht,
799
+ disabled: !y.trim() || F,
793
800
  className: n,
794
801
  style: {
795
802
  ...E,
796
803
  marginLeft: "auto",
797
- cursor: !v.trim() || I ? "not-allowed" : "pointer",
798
- opacity: !v.trim() || I ? .5 : 1
804
+ cursor: !y.trim() || F ? "not-allowed" : "pointer",
805
+ opacity: !y.trim() || F ? .5 : 1
799
806
  },
800
- children: [I ? /* @__PURE__ */ b(h, {
807
+ children: [F ? /* @__PURE__ */ x(g, {
801
808
  size: 16,
802
809
  className: "animate-spin",
803
810
  "aria-hidden": "true"
804
- }) : /* @__PURE__ */ b(g, {
811
+ }) : /* @__PURE__ */ x(_, {
805
812
  size: 16,
806
813
  "aria-hidden": "true"
807
- }), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
814
+ }), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
808
815
  })]
809
816
  })
810
817
  ]
811
818
  })
812
819
  }),
813
- ot.length > 0 && /* @__PURE__ */ b(r, {
820
+ ft.length > 0 && /* @__PURE__ */ x(r, {
814
821
  emphasis: "muted",
815
822
  headingLevel: 2,
816
- title: c("bigconsole.insights.suggestions.heading", "Starting points"),
823
+ title: l("bigconsole.insights.suggestions.heading", "Starting points"),
817
824
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
818
- icon: /* @__PURE__ */ b(ue, { className: "h-icon-sm w-icon-sm" }),
825
+ icon: /* @__PURE__ */ x(fe, { className: "h-icon-sm w-icon-sm" }),
819
826
  "data-testid": "insights-suggestions",
820
- children: /* @__PURE__ */ b("div", {
827
+ children: /* @__PURE__ */ x("div", {
821
828
  style: {
822
829
  display: "grid",
823
830
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
824
831
  gap: "var(--space-controlGap)"
825
832
  },
826
- children: ot.map((e) => /* @__PURE__ */ x("button", {
833
+ children: ft.map((e) => /* @__PURE__ */ S("button", {
827
834
  type: "button",
828
- onClick: () => pt(e.prompt),
835
+ onClick: () => xt(e.prompt),
829
836
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
830
837
  style: {
831
838
  textAlign: "left",
@@ -838,7 +845,7 @@ var F = c(function() {
838
845
  cursor: "pointer"
839
846
  },
840
847
  children: [
841
- /* @__PURE__ */ b("span", {
848
+ /* @__PURE__ */ x("span", {
842
849
  style: {
843
850
  display: "block",
844
851
  fontWeight: "var(--font-weight-medium)",
@@ -848,7 +855,7 @@ var F = c(function() {
848
855
  },
849
856
  children: e.title
850
857
  }),
851
- /* @__PURE__ */ b("span", {
858
+ /* @__PURE__ */ x("span", {
852
859
  style: {
853
860
  display: "block",
854
861
  fontSize: "var(--font-size-body-sm)",
@@ -857,15 +864,15 @@ var F = c(function() {
857
864
  },
858
865
  children: e.exampleDescription || e.prompt
859
866
  }),
860
- e.tags.length > 0 && /* @__PURE__ */ b("span", {
867
+ e.tags.length > 0 && /* @__PURE__ */ x("span", {
861
868
  style: {
862
869
  display: "flex",
863
870
  gap: "var(--space-iconGap)",
864
871
  marginTop: "var(--space-controlGap)",
865
872
  flexWrap: "wrap"
866
873
  },
867
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
868
- style: A,
874
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
875
+ style: k,
869
876
  children: e
870
877
  }, e))
871
878
  })
@@ -873,15 +880,15 @@ var F = c(function() {
873
880
  }, e.id))
874
881
  })
875
882
  }),
876
- /* @__PURE__ */ b(r, {
883
+ /* @__PURE__ */ x(r, {
877
884
  emphasis: "bare",
878
885
  padding: "none",
879
886
  headingLevel: 2,
880
- title: c("bigconsole.insights.generations.heading", "Recent generations"),
887
+ title: l("bigconsole.insights.generations.heading", "Recent generations"),
881
888
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
882
- icon: /* @__PURE__ */ b(le, { className: "h-icon-sm w-icon-sm" }),
883
- meta: Q.length > 0 ? /* @__PURE__ */ x("span", {
884
- style: A,
889
+ icon: /* @__PURE__ */ x(de, { className: "h-icon-sm w-icon-sm" }),
890
+ meta: Q.length > 0 ? /* @__PURE__ */ S("span", {
891
+ style: k,
885
892
  children: [
886
893
  Q.length,
887
894
  " generation",
@@ -889,13 +896,13 @@ var F = c(function() {
889
896
  ]
890
897
  }) : void 0,
891
898
  "data-testid": "insights-generations",
892
- children: Xe && Q.length === 0 ? /* @__PURE__ */ b(r, {
899
+ children: tt && Z.length === 0 ? /* @__PURE__ */ x(r, {
893
900
  emphasis: "muted",
894
901
  headingLevel: 3,
895
902
  "aria-label": "Loading generations",
896
903
  className: "min-h-[10rem]",
897
904
  "data-testid": "insights-generations-loading",
898
- children: /* @__PURE__ */ x("div", {
905
+ children: /* @__PURE__ */ S("div", {
899
906
  style: {
900
907
  display: "flex",
901
908
  minHeight: "8rem",
@@ -905,241 +912,258 @@ var F = c(function() {
905
912
  gap: "var(--space-controlGap)",
906
913
  color: "var(--color-text-muted)"
907
914
  },
908
- children: [/* @__PURE__ */ b(h, {
915
+ children: [/* @__PURE__ */ x(g, {
909
916
  size: 24,
910
917
  className: "animate-spin",
911
918
  "aria-hidden": "true"
912
- }), /* @__PURE__ */ b("p", {
919
+ }), /* @__PURE__ */ x("p", {
913
920
  style: { fontSize: "var(--font-size-body-sm)" },
914
- children: c("bigconsole.insights.generations.loading", "Loading generations…")
921
+ children: l("bigconsole.insights.generations.loading", "Loading generations…")
915
922
  })]
916
923
  })
917
- }) : Q.length === 0 && !I && !q ? /* @__PURE__ */ b(he, {
924
+ }) : Z.length === 0 && !F && !q ? /* @__PURE__ */ x(_e, {
918
925
  treatment: "insight",
919
926
  className: "border-[var(--color-border-seam)]",
920
- children: /* @__PURE__ */ b(_e, {
927
+ children: /* @__PURE__ */ x(ye, {
921
928
  illustration: "onboarding",
922
- title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
923
- description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
929
+ title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
930
+ description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
924
931
  })
925
- }) : /* @__PURE__ */ x("div", {
932
+ }) : /* @__PURE__ */ S("div", {
926
933
  className: "flex flex-col gap-list-gap",
927
- children: [I && !X && /* @__PURE__ */ b(r, {
928
- emphasis: "muted",
929
- tone: "info",
930
- padding: "compact",
931
- headingLevel: 3,
932
- title: "Sending your prompt…",
933
- description: "The new generation appears here as soon as the backend accepts it.",
934
- icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
935
- "data-testid": "insights-generation-pending"
936
- }), Q.map((e) => {
937
- let t = e.generatedSpec, i = R.has(e.id), a = C.includes(e.status);
938
- return /* @__PURE__ */ x(r, {
939
- emphasis: "standard",
934
+ children: [
935
+ F && !X && /* @__PURE__ */ x(r, {
936
+ emphasis: "muted",
937
+ tone: "info",
940
938
  padding: "compact",
941
939
  headingLevel: 3,
942
- title: t?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
943
- meta: /* @__PURE__ */ b(Re, { status: e.status }),
944
- description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
945
- "data-testid": "insights-generation-card",
946
- bodyClassName: "flex flex-col gap-control-gap",
947
- children: [
948
- t && /* @__PURE__ */ x("div", {
949
- style: {
950
- display: "flex",
951
- flexWrap: "wrap",
952
- gap: "var(--space-iconGap)"
953
- },
954
- children: [
955
- /* @__PURE__ */ x("span", {
956
- style: A,
957
- children: [
958
- P(t),
959
- " widget",
960
- P(t) === 1 ? "" : "s"
961
- ]
962
- }),
963
- /* @__PURE__ */ x("span", {
964
- style: A,
965
- children: [
966
- t.pages.length,
967
- " page",
968
- t.pages.length === 1 ? "" : "s"
969
- ]
970
- }),
971
- /* @__PURE__ */ x("span", {
972
- style: ze(t.overallConfidence),
973
- children: [Math.round(t.overallConfidence * 100), "% confidence"]
974
- })
975
- ]
976
- }),
977
- e.errorMessage && /* @__PURE__ */ b(r, {
978
- headingLevel: 4,
979
- tone: "danger",
980
- padding: "compact",
981
- title: "Generation failed",
982
- description: e.errorMessage,
983
- icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" })
984
- }),
985
- /* @__PURE__ */ x("div", {
986
- style: {
987
- display: "flex",
988
- flexWrap: "wrap",
989
- alignItems: "center",
990
- gap: "var(--space-controlGap)",
991
- borderTop: "1px solid var(--color-border-subtle)",
992
- paddingTop: "var(--space-controlGap)"
993
- },
994
- children: [
995
- a && /* @__PURE__ */ x("button", {
996
- type: "button",
997
- onClick: () => {
998
- o("medium"), ut(e.id);
999
- },
1000
- disabled: i,
1001
- title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1002
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1003
- style: {
1004
- ...Ie,
1005
- cursor: i ? "wait" : "pointer"
1006
- },
1007
- children: [
1008
- /* @__PURE__ */ b(se, {
1009
- size: 14,
1010
- "aria-hidden": "true"
1011
- }),
1012
- " ",
1013
- c("bigconsole.insights.actions.cancel", "Cancel")
1014
- ]
1015
- }),
1016
- e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1017
- type: "button",
1018
- onClick: () => B(e),
1019
- title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1020
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1021
- style: T,
1022
- children: [
1023
- /* @__PURE__ */ b(ce, {
1024
- size: 14,
1025
- "aria-hidden": "true"
1026
- }),
1027
- " ",
1028
- c("bigconsole.insights.actions.preview", "Preview")
1029
- ]
1030
- }),
1031
- e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1032
- type: "button",
1033
- onClick: () => {
1034
- H(e), W("");
1035
- },
1036
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1037
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1038
- style: T,
1039
- children: [
1040
- /* @__PURE__ */ b(_, {
1041
- size: 14,
1042
- "aria-hidden": "true"
1043
- }),
1044
- " ",
1045
- c("bigconsole.insights.actions.refine", "Refine")
1046
- ]
1047
- }),
1048
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1049
- type: "button",
1050
- onClick: () => {
1051
- o("medium"), dt(e.id);
1052
- },
1053
- disabled: i,
1054
- title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1055
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1056
- style: {
1057
- ...T,
1058
- cursor: i ? "wait" : "pointer"
1059
- },
1060
- children: [
1061
- /* @__PURE__ */ b(de, {
1062
- size: 14,
1063
- className: i ? "animate-spin" : "",
1064
- "aria-hidden": "true"
1065
- }),
1066
- " ",
1067
- c("bigconsole.insights.actions.regenerate", "Regenerate")
1068
- ]
1069
- }),
1070
- /* @__PURE__ */ x("div", {
1071
- style: {
1072
- display: "flex",
1073
- flexWrap: "wrap",
1074
- alignItems: "center",
1075
- gap: "var(--space-controlGap)",
1076
- marginLeft: "auto"
1077
- },
1078
- children: [
1079
- e.status === "COMPLETED" && s(e).kind === "hold" && /* @__PURE__ */ b("span", {
1080
- role: "status",
1081
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1082
- }),
1083
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1084
- type: "button",
1085
- onClick: () => ct(e),
1086
- disabled: s(e).kind !== "create",
1087
- title: s(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1088
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1089
- style: E,
1090
- children: [
1091
- c("bigconsole.insights.actions.create", "Create dashboard"),
1092
- " ",
1093
- /* @__PURE__ */ b(f, {
1094
- size: 14,
1095
- "aria-hidden": "true"
1096
- })
1097
- ]
1098
- }),
1099
- e.dashboardId && /* @__PURE__ */ x("button", {
1100
- type: "button",
1101
- onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1102
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1103
- style: T,
1104
- children: [
1105
- c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1106
- " ",
1107
- /* @__PURE__ */ b(f, {
940
+ title: "Sending your prompt…",
941
+ description: "The new generation appears here as soon as the backend accepts it.",
942
+ icon: /* @__PURE__ */ x(g, { className: "h-icon-sm w-icon-sm animate-spin" }),
943
+ "data-testid": "insights-generation-pending"
944
+ }),
945
+ Q.map((e) => {
946
+ let t = e.generatedSpec, i = ne(Z, e), a = L.has(e.id), o = Me.includes(e.status);
947
+ return /* @__PURE__ */ S(r, {
948
+ emphasis: "standard",
949
+ padding: "compact",
950
+ headingLevel: 3,
951
+ title: t?.name || (o ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
952
+ meta: /* @__PURE__ */ x(He, { status: e.status }),
953
+ description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
954
+ "data-testid": "insights-generation-card",
955
+ bodyClassName: "flex flex-col gap-control-gap",
956
+ children: [
957
+ t && /* @__PURE__ */ S("div", {
958
+ style: {
959
+ display: "flex",
960
+ flexWrap: "wrap",
961
+ gap: "var(--space-iconGap)"
962
+ },
963
+ children: [
964
+ e.parentGenerationId && /* @__PURE__ */ x("span", {
965
+ style: k,
966
+ "data-testid": "insights-generation-revision",
967
+ children: i ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: i.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
968
+ }),
969
+ /* @__PURE__ */ S("span", {
970
+ style: k,
971
+ children: [
972
+ N(t),
973
+ " widget",
974
+ N(t) === 1 ? "" : "s"
975
+ ]
976
+ }),
977
+ /* @__PURE__ */ S("span", {
978
+ style: k,
979
+ children: [
980
+ t.pages.length,
981
+ " page",
982
+ t.pages.length === 1 ? "" : "s"
983
+ ]
984
+ }),
985
+ /* @__PURE__ */ S("span", {
986
+ style: Ue(t.overallConfidence),
987
+ children: [Math.round(t.overallConfidence * 100), "% confidence"]
988
+ })
989
+ ]
990
+ }),
991
+ e.errorMessage && /* @__PURE__ */ x(r, {
992
+ headingLevel: 4,
993
+ tone: "danger",
994
+ padding: "compact",
995
+ title: "Generation failed",
996
+ description: e.errorMessage,
997
+ icon: /* @__PURE__ */ x(ce, { className: "h-icon-sm w-icon-sm" })
998
+ }),
999
+ /* @__PURE__ */ S("div", {
1000
+ style: {
1001
+ display: "flex",
1002
+ flexWrap: "wrap",
1003
+ alignItems: "center",
1004
+ gap: "var(--space-controlGap)",
1005
+ borderTop: "1px solid var(--color-border-subtle)",
1006
+ paddingTop: "var(--space-controlGap)"
1007
+ },
1008
+ children: [
1009
+ o && /* @__PURE__ */ S("button", {
1010
+ type: "button",
1011
+ onClick: () => {
1012
+ s("medium"), vt(e.id);
1013
+ },
1014
+ disabled: a,
1015
+ title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1016
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1017
+ style: {
1018
+ ...ze,
1019
+ cursor: a ? "wait" : "pointer"
1020
+ },
1021
+ children: [
1022
+ /* @__PURE__ */ x(le, {
1023
+ size: 14,
1024
+ "aria-hidden": "true"
1025
+ }),
1026
+ " ",
1027
+ l("bigconsole.insights.actions.cancel", "Cancel")
1028
+ ]
1029
+ }),
1030
+ e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1031
+ type: "button",
1032
+ onClick: () => z(e),
1033
+ title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1034
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1035
+ style: T,
1036
+ children: [
1037
+ /* @__PURE__ */ x(ue, {
1038
+ size: 14,
1039
+ "aria-hidden": "true"
1040
+ }),
1041
+ " ",
1042
+ l("bigconsole.insights.actions.preview", "Preview")
1043
+ ]
1044
+ }),
1045
+ e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1046
+ type: "button",
1047
+ onClick: () => {
1048
+ V(e), U("");
1049
+ },
1050
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1051
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1052
+ style: T,
1053
+ children: [
1054
+ /* @__PURE__ */ x(v, {
1055
+ size: 14,
1056
+ "aria-hidden": "true"
1057
+ }),
1058
+ " ",
1059
+ l("bigconsole.insights.actions.refine", "Refine")
1060
+ ]
1061
+ }),
1062
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
1063
+ type: "button",
1064
+ onClick: () => {
1065
+ s("medium"), yt(e.id);
1066
+ },
1067
+ disabled: a,
1068
+ title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1069
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1070
+ style: {
1071
+ ...T,
1072
+ cursor: a ? "wait" : "pointer"
1073
+ },
1074
+ children: [
1075
+ /* @__PURE__ */ x(pe, {
1076
+ size: 14,
1077
+ className: a ? "animate-spin" : "",
1078
+ "aria-hidden": "true"
1079
+ }),
1080
+ " ",
1081
+ l("bigconsole.insights.actions.regenerate", "Regenerate")
1082
+ ]
1083
+ }),
1084
+ /* @__PURE__ */ S("div", {
1085
+ style: {
1086
+ display: "flex",
1087
+ flexWrap: "wrap",
1088
+ alignItems: "center",
1089
+ gap: "var(--space-controlGap)",
1090
+ marginLeft: "auto"
1091
+ },
1092
+ children: [
1093
+ e.status === "COMPLETED" && c(e).kind === "hold" && /* @__PURE__ */ x("span", {
1094
+ role: "status",
1095
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1096
+ }),
1097
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
1098
+ type: "button",
1099
+ onClick: () => gt(e),
1100
+ disabled: c(e).kind !== "create",
1101
+ title: c(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1102
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1103
+ style: E,
1104
+ children: [
1105
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1106
+ " ",
1107
+ /* @__PURE__ */ x(p, {
1108
+ size: 14,
1109
+ "aria-hidden": "true"
1110
+ })
1111
+ ]
1112
+ }),
1113
+ e.dashboardId && /* @__PURE__ */ S("button", {
1114
+ type: "button",
1115
+ onClick: () => m(`/dashboards/${e.dashboardId ?? ""}`),
1116
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1117
+ style: T,
1118
+ children: [
1119
+ l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1120
+ " ",
1121
+ /* @__PURE__ */ x(p, {
1122
+ size: 14,
1123
+ "aria-hidden": "true"
1124
+ })
1125
+ ]
1126
+ }),
1127
+ /* @__PURE__ */ x("button", {
1128
+ type: "button",
1129
+ onClick: () => {
1130
+ s("medium"), _t(e.id);
1131
+ },
1132
+ title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1133
+ "aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1134
+ className: n,
1135
+ style: Be,
1136
+ children: /* @__PURE__ */ x(me, {
1108
1137
  size: 14,
1109
1138
  "aria-hidden": "true"
1110
1139
  })
1111
- ]
1112
- }),
1113
- /* @__PURE__ */ b("button", {
1114
- type: "button",
1115
- onClick: () => {
1116
- o("medium"), lt(e.id);
1117
- },
1118
- title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1119
- "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1120
- className: n,
1121
- style: D,
1122
- children: /* @__PURE__ */ b(fe, {
1123
- size: 14,
1124
- "aria-hidden": "true"
1125
1140
  })
1126
- })
1127
- ]
1128
- })
1129
- ]
1130
- })
1131
- ]
1132
- }, e.id);
1133
- })]
1141
+ ]
1142
+ })
1143
+ ]
1144
+ })
1145
+ ]
1146
+ }, e.id);
1147
+ }),
1148
+ mt.length > 0 && /* @__PURE__ */ x("button", {
1149
+ type: "button",
1150
+ onClick: () => $e((e) => !e),
1151
+ "aria-expanded": W,
1152
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1153
+ style: T,
1154
+ "data-testid": "insights-earlier-versions-toggle",
1155
+ children: W ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier version(s)", { count: mt.length })
1156
+ })
1157
+ ]
1134
1158
  })
1135
1159
  })
1136
1160
  ] })]
1137
1161
  }),
1138
- z && $ && /* @__PURE__ */ b("div", {
1162
+ R && $ && /* @__PURE__ */ x("div", {
1139
1163
  role: "dialog",
1140
1164
  "aria-modal": "true",
1141
- "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1142
- onClick: () => B(null),
1165
+ "aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1166
+ onClick: () => z(null),
1143
1167
  style: {
1144
1168
  position: "fixed",
1145
1169
  inset: 0,
@@ -1150,7 +1174,7 @@ var F = c(function() {
1150
1174
  justifyContent: "center",
1151
1175
  padding: "var(--space-pagePadding)"
1152
1176
  },
1153
- children: /* @__PURE__ */ x("div", {
1177
+ children: /* @__PURE__ */ S("div", {
1154
1178
  onClick: (e) => e.stopPropagation(),
1155
1179
  style: {
1156
1180
  display: "flex",
@@ -1164,7 +1188,7 @@ var F = c(function() {
1164
1188
  boxShadow: "var(--shadow-elevation-3)"
1165
1189
  },
1166
1190
  children: [
1167
- /* @__PURE__ */ x("div", {
1191
+ /* @__PURE__ */ S("div", {
1168
1192
  style: {
1169
1193
  display: "flex",
1170
1194
  justifyContent: "space-between",
@@ -1173,16 +1197,16 @@ var F = c(function() {
1173
1197
  padding: "var(--space-cardPadding)",
1174
1198
  borderBottom: "1px solid var(--color-border-subtle)"
1175
1199
  },
1176
- children: [/* @__PURE__ */ x("div", {
1200
+ children: [/* @__PURE__ */ S("div", {
1177
1201
  style: { minWidth: 0 },
1178
- children: [/* @__PURE__ */ b("h2", {
1202
+ children: [/* @__PURE__ */ x("h2", {
1179
1203
  style: {
1180
1204
  fontSize: "var(--font-size-heading-h4)",
1181
1205
  fontWeight: "var(--font-weight-semibold)",
1182
1206
  color: "var(--color-text-primary)"
1183
1207
  },
1184
1208
  children: $.name
1185
- }), $.description && /* @__PURE__ */ b("p", {
1209
+ }), $.description && /* @__PURE__ */ x("p", {
1186
1210
  style: {
1187
1211
  fontSize: "var(--font-size-body-sm)",
1188
1212
  color: "var(--color-text-secondary)",
@@ -1190,22 +1214,22 @@ var F = c(function() {
1190
1214
  },
1191
1215
  children: $.description
1192
1216
  })]
1193
- }), /* @__PURE__ */ b("button", {
1217
+ }), /* @__PURE__ */ x("button", {
1194
1218
  type: "button",
1195
- onClick: () => B(null),
1196
- "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1219
+ onClick: () => z(null),
1220
+ "aria-label": l("bigconsole.insights.preview.close", "Close preview"),
1197
1221
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1198
1222
  style: {
1199
- ...D,
1223
+ ...Be,
1200
1224
  color: "var(--color-text-muted)"
1201
1225
  },
1202
- children: /* @__PURE__ */ b(pe, {
1226
+ children: /* @__PURE__ */ x(he, {
1203
1227
  size: 18,
1204
1228
  "aria-hidden": "true"
1205
1229
  })
1206
1230
  })]
1207
1231
  }),
1208
- /* @__PURE__ */ x("div", {
1232
+ /* @__PURE__ */ S("div", {
1209
1233
  style: {
1210
1234
  flex: "1 1 auto",
1211
1235
  minHeight: 0,
@@ -1216,39 +1240,39 @@ var F = c(function() {
1216
1240
  gap: "var(--space-controlGap)"
1217
1241
  },
1218
1242
  children: [
1219
- /* @__PURE__ */ x("div", {
1243
+ /* @__PURE__ */ S("div", {
1220
1244
  style: {
1221
1245
  display: "flex",
1222
1246
  flexWrap: "wrap",
1223
1247
  gap: "var(--space-iconGap)"
1224
1248
  },
1225
1249
  children: [
1226
- /* @__PURE__ */ x("span", {
1227
- style: A,
1250
+ /* @__PURE__ */ S("span", {
1251
+ style: k,
1228
1252
  children: [
1229
- P($),
1253
+ N($),
1230
1254
  " widget",
1231
- P($) === 1 ? "" : "s"
1255
+ N($) === 1 ? "" : "s"
1232
1256
  ]
1233
1257
  }),
1234
- /* @__PURE__ */ x("span", {
1235
- style: A,
1258
+ /* @__PURE__ */ S("span", {
1259
+ style: k,
1236
1260
  children: [
1237
1261
  $.pages.length,
1238
1262
  " page",
1239
1263
  $.pages.length === 1 ? "" : "s"
1240
1264
  ]
1241
1265
  }),
1242
- /* @__PURE__ */ x("span", {
1243
- style: ze($.overallConfidence),
1266
+ /* @__PURE__ */ S("span", {
1267
+ style: Ue($.overallConfidence),
1244
1268
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1245
1269
  })
1246
1270
  ]
1247
1271
  }),
1248
- /* @__PURE__ */ b(ae, { metadata: z.processingMetadata }),
1249
- $.reasoning && /* @__PURE__ */ x("details", {
1272
+ /* @__PURE__ */ x(se, { metadata: R.processingMetadata }),
1273
+ $.reasoning && /* @__PURE__ */ S("details", {
1250
1274
  "data-testid": "preview-reasoning",
1251
- children: [/* @__PURE__ */ b("summary", {
1275
+ children: [/* @__PURE__ */ x("summary", {
1252
1276
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1253
1277
  style: {
1254
1278
  cursor: "pointer",
@@ -1257,8 +1281,8 @@ var F = c(function() {
1257
1281
  color: "var(--color-text-secondary)",
1258
1282
  borderRadius: "var(--radius-button)"
1259
1283
  },
1260
- children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1261
- }), /* @__PURE__ */ b("p", {
1284
+ children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1285
+ }), /* @__PURE__ */ x("p", {
1262
1286
  style: {
1263
1287
  marginTop: "var(--space-controlGap)",
1264
1288
  fontSize: "var(--font-size-body-sm)",
@@ -1268,44 +1292,44 @@ var F = c(function() {
1268
1292
  children: $.reasoning
1269
1293
  })]
1270
1294
  }),
1271
- $.pages.map((e, t) => /* @__PURE__ */ x(r, {
1295
+ $.pages.map((e, t) => /* @__PURE__ */ S(r, {
1272
1296
  emphasis: "muted",
1273
1297
  padding: "compact",
1274
1298
  headingLevel: 3,
1275
1299
  title: e.name,
1276
- meta: /* @__PURE__ */ x("span", {
1277
- style: A,
1300
+ meta: /* @__PURE__ */ S("span", {
1301
+ style: k,
1278
1302
  children: [
1279
1303
  e.widgets.length,
1280
1304
  " widget",
1281
1305
  e.widgets.length === 1 ? "" : "s"
1282
1306
  ]
1283
1307
  }),
1284
- children: [/* @__PURE__ */ x("p", {
1308
+ children: [/* @__PURE__ */ S("p", {
1285
1309
  style: {
1286
1310
  fontSize: "var(--font-size-body-sm)",
1287
1311
  color: "var(--color-text-secondary)",
1288
1312
  marginBottom: "var(--space-controlGap)"
1289
1313
  },
1290
1314
  children: [
1291
- c("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1315
+ l("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1292
1316
  " · ",
1293
1317
  e.gridColumns,
1294
1318
  " ",
1295
- c("bigconsole.insights.preview.columns", "columns"),
1319
+ l("bigconsole.insights.preview.columns", "columns"),
1296
1320
  " ·",
1297
1321
  " ",
1298
1322
  e.layout.toLowerCase().replaceAll("_", " ")
1299
1323
  ]
1300
- }), /* @__PURE__ */ b("div", {
1324
+ }), /* @__PURE__ */ x("div", {
1301
1325
  className: "insights-proposal-grid",
1302
- style: He(e.gridColumns),
1326
+ style: Ke(e.gridColumns),
1303
1327
  children: e.widgets.map((t, n) => {
1304
- let r = Be(t.confidence);
1305
- return /* @__PURE__ */ x("div", {
1328
+ let r = We(t.confidence);
1329
+ return /* @__PURE__ */ S("div", {
1306
1330
  className: "insights-proposal-widget",
1307
1331
  style: {
1308
- ...Ue(t.position, e.gridColumns),
1332
+ ...qe(t.position, e.gridColumns),
1309
1333
  display: "flex",
1310
1334
  flexDirection: "column",
1311
1335
  gap: "2px",
@@ -1315,7 +1339,7 @@ var F = c(function() {
1315
1339
  border: "1px solid var(--color-border-subtle)"
1316
1340
  },
1317
1341
  children: [
1318
- /* @__PURE__ */ x("div", {
1342
+ /* @__PURE__ */ S("div", {
1319
1343
  style: {
1320
1344
  display: "flex",
1321
1345
  flexWrap: "wrap",
@@ -1323,7 +1347,7 @@ var F = c(function() {
1323
1347
  gap: "var(--space-iconGap)"
1324
1348
  },
1325
1349
  children: [
1326
- /* @__PURE__ */ b("span", {
1350
+ /* @__PURE__ */ x("span", {
1327
1351
  style: {
1328
1352
  fontSize: "var(--font-size-body-sm)",
1329
1353
  fontWeight: "var(--font-weight-medium)",
@@ -1332,7 +1356,7 @@ var F = c(function() {
1332
1356
  },
1333
1357
  children: t.title
1334
1358
  }),
1335
- /* @__PURE__ */ b("span", {
1359
+ /* @__PURE__ */ x("span", {
1336
1360
  style: {
1337
1361
  fontSize: "var(--font-size-xs)",
1338
1362
  color: "var(--color-text-muted)"
@@ -1340,9 +1364,9 @@ var F = c(function() {
1340
1364
  "data-testid": "preview-widget-type",
1341
1365
  children: t.type
1342
1366
  }),
1343
- r && /* @__PURE__ */ b("span", {
1367
+ r && /* @__PURE__ */ x("span", {
1344
1368
  style: {
1345
- ...We(r),
1369
+ ...Je(r),
1346
1370
  marginLeft: "auto"
1347
1371
  },
1348
1372
  "data-testid": "preview-widget-confidence",
@@ -1350,7 +1374,7 @@ var F = c(function() {
1350
1374
  })
1351
1375
  ]
1352
1376
  }),
1353
- t.reasoning && /* @__PURE__ */ b("p", {
1377
+ t.reasoning && /* @__PURE__ */ x("p", {
1354
1378
  style: {
1355
1379
  margin: 0,
1356
1380
  fontSize: "var(--font-size-xs)",
@@ -1359,7 +1383,7 @@ var F = c(function() {
1359
1383
  },
1360
1384
  children: t.reasoning
1361
1385
  }),
1362
- /* @__PURE__ */ b(ie, { config: t.config })
1386
+ /* @__PURE__ */ x(oe, { config: t.config })
1363
1387
  ]
1364
1388
  }, n);
1365
1389
  })
@@ -1367,7 +1391,7 @@ var F = c(function() {
1367
1391
  }, t))
1368
1392
  ]
1369
1393
  }),
1370
- /* @__PURE__ */ x("div", {
1394
+ /* @__PURE__ */ S("div", {
1371
1395
  style: {
1372
1396
  display: "flex",
1373
1397
  justifyContent: "flex-end",
@@ -1377,56 +1401,56 @@ var F = c(function() {
1377
1401
  borderTop: "1px solid var(--color-border-subtle)"
1378
1402
  },
1379
1403
  children: [
1380
- /* @__PURE__ */ b("button", {
1404
+ /* @__PURE__ */ x("button", {
1381
1405
  type: "button",
1382
- onClick: () => B(null),
1406
+ onClick: () => z(null),
1383
1407
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1384
1408
  style: T,
1385
1409
  children: "Close"
1386
1410
  }),
1387
- z.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1411
+ R.status === "COMPLETED" && $ && /* @__PURE__ */ S("button", {
1388
1412
  type: "button",
1389
1413
  onClick: () => {
1390
- let e = z;
1391
- B(null), H(e), W("");
1414
+ let e = R;
1415
+ z(null), V(e), U("");
1392
1416
  },
1393
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1417
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1394
1418
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1395
1419
  style: T,
1396
1420
  children: [
1397
- /* @__PURE__ */ b(_, {
1421
+ /* @__PURE__ */ x(v, {
1398
1422
  size: 14,
1399
1423
  "aria-hidden": "true"
1400
1424
  }),
1401
1425
  " ",
1402
- c("bigconsole.insights.actions.refine", "Refine")
1426
+ l("bigconsole.insights.actions.refine", "Refine")
1403
1427
  ]
1404
1428
  }),
1405
- z.status === "COMPLETED" && s(z).kind === "hold" && /* @__PURE__ */ b("span", {
1429
+ R.status === "COMPLETED" && c(R).kind === "hold" && /* @__PURE__ */ x("span", {
1406
1430
  role: "status",
1407
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1431
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1408
1432
  }),
1409
- z.dashboardId && /* @__PURE__ */ b("button", {
1433
+ R.dashboardId && /* @__PURE__ */ x("button", {
1410
1434
  type: "button",
1411
1435
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1412
1436
  style: T,
1413
- onClick: () => p(`/dashboards/${z.dashboardId}`),
1414
- children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1437
+ onClick: () => m(`/dashboards/${R.dashboardId}`),
1438
+ children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
1415
1439
  }),
1416
- z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ x("button", {
1440
+ R.status === "COMPLETED" && !R.dashboardId && /* @__PURE__ */ S("button", {
1417
1441
  type: "button",
1418
- disabled: s(z).kind !== "create",
1419
- title: s(z).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1442
+ disabled: c(R).kind !== "create",
1443
+ title: c(R).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1420
1444
  onClick: () => {
1421
- let e = z;
1422
- B(null), ct(e);
1445
+ let e = R;
1446
+ z(null), gt(e);
1423
1447
  },
1424
1448
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1425
1449
  style: E,
1426
1450
  children: [
1427
- c("bigconsole.insights.actions.create", "Create dashboard"),
1451
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1428
1452
  " ",
1429
- /* @__PURE__ */ b(f, {
1453
+ /* @__PURE__ */ x(p, {
1430
1454
  size: 14,
1431
1455
  "aria-hidden": "true"
1432
1456
  })
@@ -1437,11 +1461,11 @@ var F = c(function() {
1437
1461
  ]
1438
1462
  })
1439
1463
  }),
1440
- V && /* @__PURE__ */ b("div", {
1464
+ B && /* @__PURE__ */ x("div", {
1441
1465
  role: "dialog",
1442
1466
  "aria-modal": "true",
1443
- "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1444
- onClick: () => H(null),
1467
+ "aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1468
+ onClick: () => V(null),
1445
1469
  style: {
1446
1470
  position: "fixed",
1447
1471
  inset: 0,
@@ -1452,7 +1476,7 @@ var F = c(function() {
1452
1476
  justifyContent: "center",
1453
1477
  padding: "var(--space-pagePadding)"
1454
1478
  },
1455
- children: /* @__PURE__ */ x("div", {
1479
+ children: /* @__PURE__ */ S("div", {
1456
1480
  onClick: (e) => e.stopPropagation(),
1457
1481
  style: {
1458
1482
  display: "flex",
@@ -1466,28 +1490,28 @@ var F = c(function() {
1466
1490
  boxShadow: "var(--shadow-elevation-3)"
1467
1491
  },
1468
1492
  children: [
1469
- /* @__PURE__ */ x("div", {
1493
+ /* @__PURE__ */ S("div", {
1470
1494
  style: {
1471
1495
  padding: "var(--space-cardPadding)",
1472
1496
  borderBottom: "1px solid var(--color-border-subtle)"
1473
1497
  },
1474
- children: [/* @__PURE__ */ b("h2", {
1498
+ children: [/* @__PURE__ */ x("h2", {
1475
1499
  style: {
1476
1500
  fontSize: "var(--font-size-heading-h4)",
1477
1501
  fontWeight: "var(--font-weight-semibold)",
1478
1502
  color: "var(--color-text-primary)"
1479
1503
  },
1480
- children: c("bigconsole.insights.refine.heading", "Refine dashboard")
1481
- }), /* @__PURE__ */ b("p", {
1504
+ children: l("bigconsole.insights.refine.heading", "Refine dashboard")
1505
+ }), /* @__PURE__ */ x("p", {
1482
1506
  style: {
1483
1507
  fontSize: "var(--font-size-body-sm)",
1484
1508
  color: "var(--color-text-secondary)",
1485
1509
  marginTop: 2
1486
1510
  },
1487
- children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1511
+ children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1488
1512
  })]
1489
1513
  }),
1490
- /* @__PURE__ */ x("div", {
1514
+ /* @__PURE__ */ S("div", {
1491
1515
  style: {
1492
1516
  flex: "1 1 auto",
1493
1517
  minHeight: 0,
@@ -1497,20 +1521,20 @@ var F = c(function() {
1497
1521
  flexDirection: "column",
1498
1522
  gap: "var(--space-controlGap)"
1499
1523
  },
1500
- children: [/* @__PURE__ */ b(r, {
1524
+ children: [/* @__PURE__ */ x(r, {
1501
1525
  emphasis: "muted",
1502
1526
  padding: "compact",
1503
1527
  headingLevel: 3,
1504
- title: V.generatedSpec?.name || "Current proposal",
1505
- description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1506
- icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1507
- }), /* @__PURE__ */ x("div", {
1528
+ title: B.generatedSpec?.name || "Current proposal",
1529
+ description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
1530
+ icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" })
1531
+ }), /* @__PURE__ */ S("div", {
1508
1532
  style: {
1509
1533
  display: "flex",
1510
1534
  flexDirection: "column",
1511
1535
  gap: "var(--space-controlGap)"
1512
1536
  },
1513
- children: [/* @__PURE__ */ b("label", {
1537
+ children: [/* @__PURE__ */ x("label", {
1514
1538
  htmlFor: "refine-input",
1515
1539
  style: {
1516
1540
  display: "block",
@@ -1519,13 +1543,13 @@ var F = c(function() {
1519
1543
  color: "var(--color-text-primary)"
1520
1544
  },
1521
1545
  children: "What should change?"
1522
- }), /* @__PURE__ */ b("textarea", {
1546
+ }), /* @__PURE__ */ x("textarea", {
1523
1547
  id: "refine-input",
1524
- value: U,
1525
- onChange: (e) => W(e.target.value),
1548
+ value: H,
1549
+ onChange: (e) => U(e.target.value),
1526
1550
  maxLength: 2e3,
1527
1551
  rows: 4,
1528
- placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1552
+ placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1529
1553
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1530
1554
  style: {
1531
1555
  width: "100%",
@@ -1541,7 +1565,7 @@ var F = c(function() {
1541
1565
  })]
1542
1566
  })]
1543
1567
  }),
1544
- /* @__PURE__ */ x("div", {
1568
+ /* @__PURE__ */ S("div", {
1545
1569
  style: {
1546
1570
  display: "flex",
1547
1571
  justifyContent: "flex-end",
@@ -1550,30 +1574,30 @@ var F = c(function() {
1550
1574
  padding: "var(--space-cardPadding)",
1551
1575
  borderTop: "1px solid var(--color-border-subtle)"
1552
1576
  },
1553
- children: [/* @__PURE__ */ b("button", {
1577
+ children: [/* @__PURE__ */ x("button", {
1554
1578
  type: "button",
1555
- onClick: () => H(null),
1579
+ onClick: () => V(null),
1556
1580
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1557
1581
  style: T,
1558
- children: c("bigconsole.insights.actions.cancel", "Cancel")
1559
- }), /* @__PURE__ */ x("button", {
1582
+ children: l("bigconsole.insights.actions.cancel", "Cancel")
1583
+ }), /* @__PURE__ */ S("button", {
1560
1584
  type: "button",
1561
- onClick: () => void ft(),
1562
- disabled: !U.trim() || R.has(V.id),
1585
+ onClick: () => void bt(),
1586
+ disabled: !H.trim() || L.has(B.id),
1563
1587
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1564
1588
  style: {
1565
1589
  ...E,
1566
- cursor: !U.trim() || R.has(V.id) ? "not-allowed" : "pointer",
1567
- opacity: U.trim() ? 1 : .6
1590
+ cursor: !H.trim() || L.has(B.id) ? "not-allowed" : "pointer",
1591
+ opacity: H.trim() ? 1 : .6
1568
1592
  },
1569
- children: [R.has(V.id) ? /* @__PURE__ */ b(h, {
1593
+ children: [L.has(B.id) ? /* @__PURE__ */ x(g, {
1570
1594
  size: 14,
1571
1595
  className: "animate-spin",
1572
1596
  "aria-hidden": "true"
1573
- }) : /* @__PURE__ */ b(_, {
1597
+ }) : /* @__PURE__ */ x(v, {
1574
1598
  size: 14,
1575
1599
  "aria-hidden": "true"
1576
- }), c("bigconsole.insights.refine.apply", "Apply refinement")]
1600
+ }), l("bigconsole.insights.refine.apply", "Apply refinement")]
1577
1601
  })]
1578
1602
  })
1579
1603
  ]
@@ -1583,4 +1607,4 @@ var F = c(function() {
1583
1607
  });
1584
1608
  });
1585
1609
  //#endregion
1586
- export { F as InsightsPage, F as default };
1610
+ export { P as InsightsPage, P as default };