@burdenoff/microfe-bigconsole 2026.805.3 → 2026.812.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/bigconsole/components/DrilldownDashboardRenderer.js +118 -106
  2. package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
  3. package/dist/bigconsole/components/DrilldownModal.js +54 -50
  4. package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
  5. package/dist/bigconsole/components/builder/BuilderCanvas.js +2 -2
  6. package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -1
  7. package/dist/bigconsole/components/builder/BuilderTopbar.js +3 -3
  8. package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -1
  9. package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +24 -25
  10. package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -1
  11. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +40 -29
  12. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -1
  13. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +135 -97
  14. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  15. package/dist/bigconsole/components/builder/inspector/GeneralSection.js +58 -44
  16. package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -1
  17. package/dist/bigconsole/components/common/Section.js +70 -0
  18. package/dist/bigconsole/components/common/Section.js.map +1 -0
  19. package/dist/bigconsole/components/common/index.js +2 -0
  20. package/dist/bigconsole/components/common/sectionStyles.js +42 -0
  21. package/dist/bigconsole/components/common/sectionStyles.js.map +1 -0
  22. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +209 -193
  23. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  24. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +213 -231
  25. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  26. package/dist/bigconsole/components/dashboard/DashboardGrid.js +12 -18
  27. package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
  28. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +109 -102
  29. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  30. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +81 -70
  31. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  32. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +125 -159
  33. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
  34. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +25 -23
  35. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
  36. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +3 -3
  37. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  38. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +5 -3
  39. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
  40. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +170 -284
  41. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  42. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +147 -151
  43. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  44. package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +45 -53
  45. package/dist/bigconsole/components/dashboard/LiveBoardBanner.js.map +1 -1
  46. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +157 -148
  47. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
  48. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +17 -8
  49. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
  50. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -95
  51. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
  52. package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +20 -18
  53. package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
  54. package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +26 -58
  55. package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -1
  56. package/dist/bigconsole/components/dashboard/WidgetPalette.js +307 -231
  57. package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
  58. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +29 -29
  59. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  60. package/dist/bigconsole/components/datasink/DataSinkCard.js +78 -79
  61. package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
  62. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +33 -34
  63. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
  64. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +79 -56
  65. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
  66. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +75 -65
  67. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
  68. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
  69. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
  70. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +20 -19
  71. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
  72. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +127 -171
  73. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js.map +1 -1
  74. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +263 -243
  75. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  76. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +65 -66
  77. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
  78. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +121 -127
  79. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
  80. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +33 -26
  81. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
  82. package/dist/bigconsole/components/datasink/SetupStateBadge.js +3 -3
  83. package/dist/bigconsole/components/datasink/SetupStateBadge.js.map +1 -1
  84. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +95 -95
  85. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
  86. package/dist/bigconsole/components/parser/DataSinkSelector.js +154 -123
  87. package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
  88. package/dist/bigconsole/components/parser/ExpressionEditor.js +3 -3
  89. package/dist/bigconsole/components/parser/ExpressionEditor.js.map +1 -1
  90. package/dist/bigconsole/components/parser/ImportParserDialog.js +235 -275
  91. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  92. package/dist/bigconsole/components/parser/ParserCard.js +133 -114
  93. package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
  94. package/dist/bigconsole/components/parser/ParserSelector.js +191 -174
  95. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  96. package/dist/bigconsole/components/parser/ParserStatusBadge.js +2 -2
  97. package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
  98. package/dist/bigconsole/components/parser/ParserTypeBadge.js +4 -4
  99. package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
  100. package/dist/bigconsole/components/pipeline/PipelineCard.js +134 -89
  101. package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
  102. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +77 -64
  103. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
  104. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +7 -10
  105. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
  106. package/dist/bigconsole/components/preview/AiPreviewContent.js +31 -32
  107. package/dist/bigconsole/components/preview/AiPreviewContent.js.map +1 -1
  108. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +152 -106
  109. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
  110. package/dist/bigconsole/components/preview/AiPreviewPanel.js +193 -152
  111. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  112. package/dist/bigconsole/components/preview/previewShared.js +41 -23
  113. package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
  114. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +342 -308
  115. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  116. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +262 -238
  117. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  118. package/dist/bigconsole/components/widgets/PropertiesPanel.js +783 -867
  119. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  120. package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +7 -5
  121. package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js.map +1 -1
  122. package/dist/bigconsole/components/widgets/WidgetHeader.js +7 -8
  123. package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
  124. package/dist/bigconsole/components/widgets/WidgetRegistry.js +4 -4
  125. package/dist/bigconsole/components/widgets/WidgetRegistry.js.map +1 -1
  126. package/dist/bigconsole/components/widgets/WidgetWrapper.js +8 -7
  127. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  128. package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
  129. package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js.map +1 -1
  130. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +2 -2
  131. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
  132. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +11 -5
  133. package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
  134. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +19 -15
  135. package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
  136. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +154 -102
  137. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
  138. package/dist/bigconsole/components/widgets/gauge/CircularGauge.js +36 -32
  139. package/dist/bigconsole/components/widgets/gauge/CircularGauge.js.map +1 -1
  140. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +85 -60
  141. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
  142. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +64 -35
  143. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
  144. package/dist/bigconsole/components/widgets/gauge/LinearGauge.js +46 -45
  145. package/dist/bigconsole/components/widgets/gauge/LinearGauge.js.map +1 -1
  146. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +35 -24
  147. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
  148. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +2 -2
  149. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
  150. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  151. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
  152. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +153 -90
  153. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
  154. package/dist/bigconsole/components/widgets/list/ListConfig.js +8 -2
  155. package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
  156. package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
  157. package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
  158. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
  159. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
  160. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +14 -4
  161. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
  162. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +112 -89
  163. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
  164. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +21 -13
  165. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
  166. package/dist/bigconsole/components/widgets/metric-card/index.js +4 -4
  167. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +3 -3
  168. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
  169. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +34 -25
  170. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
  171. package/dist/bigconsole/components/widgets/progress/ProgressWidget.js +129 -114
  172. package/dist/bigconsole/components/widgets/progress/ProgressWidget.js.map +1 -1
  173. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +3 -3
  174. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
  175. package/dist/bigconsole/components/widgets/states/EmptyState.js +6 -4
  176. package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
  177. package/dist/bigconsole/components/widgets/states/ErrorState.js +7 -5
  178. package/dist/bigconsole/components/widgets/states/ErrorState.js.map +1 -1
  179. package/dist/bigconsole/components/widgets/states/LoadingState.js +5 -4
  180. package/dist/bigconsole/components/widgets/states/LoadingState.js.map +1 -1
  181. package/dist/bigconsole/components/widgets/table/TableConfig.js +10 -4
  182. package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
  183. package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
  184. package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
  185. package/dist/bigconsole/components/widgets/table/TableWidget.js +1 -1
  186. package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
  187. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
  188. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
  189. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
  190. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
  191. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
  192. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
  193. package/dist/bigconsole/components/widgets/utils/targetProgress.js +13 -0
  194. package/dist/bigconsole/components/widgets/utils/targetProgress.js.map +1 -0
  195. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +112 -85
  196. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
  197. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +28 -20
  198. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  199. package/dist/bigconsole/components/workflow/WorkflowCard.js +92 -77
  200. package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
  201. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +70 -51
  202. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
  203. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +16 -17
  204. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js.map +1 -1
  205. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +6 -4
  206. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
  207. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +360 -338
  208. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  209. package/dist/bigconsole/hooks/useModalFocusTrap.js +53 -0
  210. package/dist/bigconsole/hooks/useModalFocusTrap.js.map +1 -0
  211. package/dist/bigconsole/pages/DashboardBuilderPage.js +209 -203
  212. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  213. package/dist/bigconsole/pages/DashboardViewPage.js +126 -120
  214. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  215. package/dist/bigconsole/pages/DashboardsPage.js +838 -800
  216. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  217. package/dist/bigconsole/pages/DataParsersPage.js +263 -315
  218. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  219. package/dist/bigconsole/pages/DataSinkBuilderPage.js +301 -341
  220. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  221. package/dist/bigconsole/pages/DataSinkViewPage.js +346 -339
  222. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  223. package/dist/bigconsole/pages/DataSinksPage.js +356 -458
  224. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  225. package/dist/bigconsole/pages/DataSourcesPage.js +7 -2
  226. package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
  227. package/dist/bigconsole/pages/HomePage.js +186 -193
  228. package/dist/bigconsole/pages/HomePage.js.map +1 -1
  229. package/dist/bigconsole/pages/InsightsPage.js +887 -740
  230. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  231. package/dist/bigconsole/pages/ParserBuilderPage.js +679 -637
  232. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  233. package/dist/bigconsole/pages/ParserViewPage.js +368 -342
  234. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  235. package/dist/bigconsole/pages/PipelineBuilderPage.js +537 -444
  236. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  237. package/dist/bigconsole/pages/PipelineViewPage.js +412 -377
  238. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  239. package/dist/bigconsole/pages/PipelinesPage.js +248 -298
  240. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  241. package/dist/bigconsole/pages/WidgetDemoPage.js +251 -153
  242. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  243. package/dist/bigconsole/pages/WorkflowViewPage.js +381 -371
  244. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  245. package/dist/bigconsole/pages/WorkflowsPage.js +171 -286
  246. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  247. package/package.json +1 -1
@@ -1,17 +1,20 @@
1
1
  import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
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";
8
- import { gql as v } from "@apollo/client";
9
- import { useMutation as y, useQuery as b } from "@apollo/client/react";
10
- import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { AuroraBackground as oe, EmphasisPanel as se, GlassCard as ce, GradientText as le, IllustratedEmptyState as ue } from "@burdenoff/fe-libs/ui";
12
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
3
+ import { SECTION_FOCUS_RING as t } from "../components/common/sectionStyles.js";
4
+ import { Section as n, SectionStack as r } from "../components/common/Section.js";
5
+ import "../components/common/index.js";
6
+ import { reportBigConsoleQuotaError as i } from "../utils/quota.js";
7
+ import a from "../hooks/useBigConsoleAnalytics.js";
8
+ import { isNative as o, nativeImpact as s, nativeNotify as c } from "../../utils/nativeBridge.js";
9
+ import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
10
+ import { AlertCircle as p, ArrowRight as m, Ban as ee, CheckCircle as h, Clock as g, Eye as te, History as ne, Lightbulb as re, Loader2 as _, RefreshCw as ie, Sparkles as v, Trash2 as ae, Wand2 as y, X as oe, XCircle as b } from "lucide-react";
11
+ import { gql as x } from "@apollo/client";
12
+ import { useMutation as S, useQuery as C } from "@apollo/client/react";
13
+ import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { AuroraBackground as ce, GlassCard as le, GradientText as ue, IllustratedEmptyState as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
15
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
13
16
  //#region src/bigconsole/pages/InsightsPage.tsx
14
- var de = v`
17
+ var pe = x`
15
18
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
16
19
  listPromptGenerations(status: $status, first: $first) {
17
20
  edges {
@@ -40,7 +43,7 @@ var de = v`
40
43
  totalCount
41
44
  }
42
45
  }
43
- `, fe = v`
46
+ `, me = x`
44
47
  query GetPromptSuggestions($category: String, $limit: Int) {
45
48
  getPromptSuggestions(category: $category, limit: $limit) {
46
49
  id
@@ -51,7 +54,7 @@ var de = v`
51
54
  tags
52
55
  }
53
56
  }
54
- `, pe = v`
57
+ `, he = x`
55
58
  mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
56
59
  generateDashboardFromPrompt(input: $input) {
57
60
  id
@@ -59,24 +62,24 @@ var de = v`
59
62
  prompt
60
63
  }
61
64
  }
62
- `, me = v`
65
+ `, ge = x`
63
66
  mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
64
67
  createDashboardFromGeneration(input: $input) {
65
68
  id
66
69
  }
67
70
  }
68
- `, he = v`
71
+ `, _e = x`
69
72
  mutation DeletePromptGeneration($generationId: ID!) {
70
73
  deletePromptGeneration(generationId: $generationId)
71
74
  }
72
- `, ge = v`
75
+ `, ve = x`
73
76
  mutation CancelPromptGeneration($generationId: ID!) {
74
77
  cancelPromptGeneration(generationId: $generationId) {
75
78
  id
76
79
  status
77
80
  }
78
81
  }
79
- `, _e = v`
82
+ `, ye = x`
80
83
  mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
81
84
  regenerateDashboard(input: $input) {
82
85
  id
@@ -84,7 +87,7 @@ var de = v`
84
87
  prompt
85
88
  }
86
89
  }
87
- `, ve = v`
90
+ `, be = x`
88
91
  mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
89
92
  refineGeneratedDashboard(input: $input) {
90
93
  id
@@ -92,38 +95,118 @@ var de = v`
92
95
  prompt
93
96
  }
94
97
  }
95
- `, C = [
98
+ `, E = [
96
99
  "PENDING",
97
100
  "PROCESSING",
98
101
  "GENERATING"
99
- ];
100
- function w(e) {
102
+ ], D = {
103
+ display: "inline-flex",
104
+ alignItems: "center",
105
+ justifyContent: "center",
106
+ gap: "var(--space-iconGap)",
107
+ minHeight: "var(--size-controlHeight-md)",
108
+ padding: "0 var(--space-formGap)",
109
+ borderRadius: "var(--radius-button)",
110
+ fontSize: "var(--font-size-body-sm)",
111
+ fontWeight: "var(--font-weight-medium)",
112
+ lineHeight: 1.2,
113
+ cursor: "pointer"
114
+ }, O = {
115
+ ...D,
116
+ border: "1px solid var(--color-border-default)",
117
+ backgroundColor: "transparent",
118
+ color: "var(--color-text-primary)"
119
+ }, k = {
120
+ ...D,
121
+ border: "1px solid transparent",
122
+ backgroundColor: "var(--color-action-primary-bg)",
123
+ color: "var(--color-action-primary-text)"
124
+ }, xe = {
125
+ ...D,
126
+ border: "1px solid var(--color-status-warning-border)",
127
+ backgroundColor: "transparent",
128
+ color: "var(--color-status-warning-text)"
129
+ }, A = {
130
+ ...D,
131
+ minWidth: "var(--size-controlHeight-md)",
132
+ padding: "0 var(--space-controlGap)",
133
+ border: "1px solid var(--color-border-default)",
134
+ backgroundColor: "transparent",
135
+ color: "var(--color-status-error-text)"
136
+ }, j = {
137
+ display: "inline-flex",
138
+ alignItems: "center",
139
+ gap: "var(--space-iconGap)",
140
+ padding: "2px var(--space-controlGap)",
141
+ borderRadius: "var(--radius-pill)",
142
+ fontSize: "var(--font-size-body-sm)",
143
+ fontWeight: "var(--font-weight-medium)",
144
+ border: "1px solid var(--color-border-subtle)",
145
+ backgroundColor: "var(--color-bg-sunken)",
146
+ color: "var(--color-text-secondary)"
147
+ };
148
+ function M(e) {
101
149
  switch (e) {
102
- case "COMPLETED": return /* @__PURE__ */ x(f, {
103
- size: 16,
104
- className: "text-green-500"
105
- });
106
- case "FAILED": return /* @__PURE__ */ x(_, {
107
- size: 16,
108
- className: "text-red-500"
150
+ case "COMPLETED": return "success";
151
+ case "FAILED": return "danger";
152
+ case "PENDING":
153
+ case "PROCESSING":
154
+ case "GENERATING": return "info";
155
+ default: return "neutral";
156
+ }
157
+ }
158
+ var N = {
159
+ success: {
160
+ text: "var(--color-status-success-text)",
161
+ bg: "var(--color-status-success-bgSubtle)",
162
+ border: "var(--color-status-success-border)"
163
+ },
164
+ danger: {
165
+ text: "var(--color-status-error-text)",
166
+ bg: "var(--color-status-error-bgSubtle)",
167
+ border: "var(--color-status-error-border)"
168
+ },
169
+ info: {
170
+ text: "var(--color-status-info-text)",
171
+ bg: "var(--color-status-info-bgSubtle)",
172
+ border: "var(--color-status-info-border)"
173
+ },
174
+ neutral: {
175
+ text: "var(--color-text-secondary)",
176
+ bg: "var(--color-bg-sunken)",
177
+ border: "var(--color-border-subtle)"
178
+ }
179
+ };
180
+ function P(e) {
181
+ let t = N[M(e)].text;
182
+ switch (e) {
183
+ case "COMPLETED": return /* @__PURE__ */ w(h, {
184
+ size: 14,
185
+ style: { color: t },
186
+ "aria-hidden": "true"
109
187
  });
110
- case "CANCELLED": return /* @__PURE__ */ x(_, {
111
- size: 16,
112
- className: "text-gray-400"
188
+ case "FAILED":
189
+ case "CANCELLED": return /* @__PURE__ */ w(b, {
190
+ size: 14,
191
+ style: { color: t },
192
+ "aria-hidden": "true"
113
193
  });
114
194
  case "PENDING":
115
195
  case "PROCESSING":
116
- case "GENERATING": return /* @__PURE__ */ x(m, {
117
- size: 16,
118
- className: "text-blue-500 animate-spin"
196
+ case "GENERATING": return /* @__PURE__ */ w(_, {
197
+ size: 14,
198
+ className: "animate-spin",
199
+ style: { color: t },
200
+ "aria-hidden": "true"
119
201
  });
120
- default: return /* @__PURE__ */ x(p, {
121
- size: 16,
122
- className: "text-gray-400"
202
+ default: return /* @__PURE__ */ w(g, {
203
+ size: 14,
204
+ style: { color: t },
205
+ "aria-hidden": "true"
123
206
  });
124
207
  }
125
208
  }
126
- function T(e, t) {
209
+ function F(e, t) {
127
210
  switch (e) {
128
211
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
129
212
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -134,704 +217,667 @@ function T(e, t) {
134
217
  default: return e;
135
218
  }
136
219
  }
137
- var E = o(function() {
138
- let { t: o } = ae(), f = e(), p = n(), [_, v] = l(""), [E, 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) => {
139
- j((t) => new Set(t).add(e));
140
- }, []), z = s((e) => {
141
- j((t) => {
220
+ var Se = ({ status: e }) => {
221
+ let { t } = se(), n = N[M(e)];
222
+ return /* @__PURE__ */ T("span", {
223
+ "data-status": e,
224
+ style: {
225
+ ...j,
226
+ border: `1px solid ${n.border}`,
227
+ backgroundColor: n.bg,
228
+ color: n.text
229
+ },
230
+ children: [P(e), F(e, t)]
231
+ });
232
+ };
233
+ function I(e) {
234
+ let t = N[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
235
+ return {
236
+ ...j,
237
+ border: `1px solid ${t.border}`,
238
+ backgroundColor: t.bg,
239
+ color: t.text
240
+ };
241
+ }
242
+ function L(e) {
243
+ return e.pages.reduce((e, t) => e + t.widgets.length, 0);
244
+ }
245
+ var R = l(function() {
246
+ let { t: l } = se(), h = e(), g = a(), [b, x] = f(""), [D, M] = f(!1), [N, P] = f(null), [F, R] = f(() => /* @__PURE__ */ new Set()), [z, B] = f(null), [V, H] = f(null), [U, W] = f(""), G = u((e) => {
247
+ R((t) => new Set(t).add(e));
248
+ }, []), K = u((e) => {
249
+ R((t) => {
142
250
  let n = new Set(t);
143
251
  return n.delete(e), n;
144
252
  });
145
- }, []), { data: B, loading: ye, refetch: V, startPolling: H, stopPolling: U } = b(de, {
253
+ }, []), { data: Ce, loading: we, refetch: q, startPolling: Te, stopPolling: J } = C(pe, {
146
254
  variables: { first: 20 },
147
255
  fetchPolicy: "cache-and-network"
148
- }), W = B?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: be } = b(fe, { variables: { limit: 6 } }), [G] = y(pe), [K] = y(me), [q] = y(he), [J] = y(ge), [Y] = y(_e), [X] = y(ve), Z = B?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = be?.getPromptSuggestions || [];
149
- c(() => (W || E ? H(2e3) : U(), () => U()), [
150
- W,
151
- E,
152
- H,
153
- U
154
- ]), c(() => {
155
- if (!M && !P) return;
256
+ }), Y = Ce?.listPromptGenerations?.edges?.some((e) => E.includes(e.node.status)) ?? !1, { data: Ee } = C(me, { variables: { limit: 6 } }), [De] = S(he), [Oe] = S(ge), [ke] = S(_e), [Ae] = S(ve), [X] = S(ye), [je] = S(be), Z = Ce?.listPromptGenerations?.edges?.map((e) => e.node) || [], Me = Ee?.getPromptSuggestions || [];
257
+ d(() => (Y || D ? Te(2e3) : J(), () => J()), [
258
+ Y,
259
+ D,
260
+ Te,
261
+ J
262
+ ]), d(() => {
263
+ if (!z && !V) return;
156
264
  let e = (e) => {
157
- e.key === "Escape" && (N(null), F(null));
265
+ e.key === "Escape" && (B(null), H(null));
158
266
  };
159
267
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
160
- }, [M, P]);
161
- let $ = s(async () => {
162
- if (!(!_.trim() || E)) {
163
- if (_.length > 2e3) {
164
- k(o("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
268
+ }, [z, V]);
269
+ let Ne = u(async () => {
270
+ if (!(!b.trim() || D)) {
271
+ if (b.length > 2e3) {
272
+ P(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
165
273
  return;
166
274
  }
167
- k(null), D(!0);
275
+ P(null), M(!0);
168
276
  try {
169
- p("bigconsole.ai.generate_clicked", { maxWidgets: 8 });
170
- let e = await G({ variables: { input: {
171
- prompt: _.trim(),
277
+ g("bigconsole.ai.generate_clicked", { maxWidgets: 8 });
278
+ let e = await De({ variables: { input: {
279
+ prompt: b.trim(),
172
280
  styleType: "MODERN",
173
281
  layoutType: "GRID",
174
282
  maxWidgets: 8
175
283
  } } });
176
- if (t(e, "command")) return;
177
- let n = e.data?.generateDashboardFromPrompt?.id;
178
- n && p("bigconsole.ai.dashboard_generated", {
179
- generationId: n,
284
+ if (i(e, "command")) return;
285
+ let t = e.data?.generateDashboardFromPrompt?.id;
286
+ t && g("bigconsole.ai.dashboard_generated", {
287
+ generationId: t,
180
288
  maxWidgets: 8
181
- }), v(""), V();
289
+ }), x(""), q();
182
290
  } catch (e) {
183
- if (t(e, "command")) return;
184
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
291
+ if (i(e, "command")) return;
292
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
185
293
  } finally {
186
- D(!1);
294
+ M(!1);
187
295
  }
188
296
  }
189
297
  }, [
190
- p,
191
- _,
192
- E,
193
- G,
194
- V,
195
- o
196
- ]), xe = s(async (e) => {
197
- k(null);
298
+ g,
299
+ b,
300
+ D,
301
+ De,
302
+ q,
303
+ l
304
+ ]), Q = u(async (e) => {
305
+ P(null);
198
306
  try {
199
- p("bigconsole.ai.create_dashboard_clicked", { generationId: e });
200
- let n = await K({ variables: { input: { generationId: e } } });
201
- if (t(n, "project")) return;
202
- let r = n.data?.createDashboardFromGeneration?.id;
203
- r && (p("bigconsole.ai.dashboard_created", {
307
+ g("bigconsole.ai.create_dashboard_clicked", { generationId: e });
308
+ let t = await Oe({ variables: { input: { generationId: e } } });
309
+ if (i(t, "project")) return;
310
+ let n = t.data?.createDashboardFromGeneration?.id;
311
+ n && (g("bigconsole.ai.dashboard_created", {
204
312
  generationId: e,
205
- dashboardId: r
206
- }), f(`/dashboards/${r}`));
313
+ dashboardId: n
314
+ }), h(`/dashboards/${n}`));
207
315
  } catch (e) {
208
- if (t(e, "project")) return;
209
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
316
+ if (i(e, "project")) return;
317
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
210
318
  }
211
319
  }, [
212
- K,
213
- p,
214
- f,
215
- o
216
- ]), Se = s(async (e) => {
217
- k(null);
320
+ Oe,
321
+ g,
322
+ h,
323
+ l
324
+ ]), Pe = u(async (e) => {
325
+ P(null);
218
326
  try {
219
- await q({ variables: { generationId: e } }), r() && a("success"), V();
327
+ await ke({ variables: { generationId: e } }), o() && c("success"), q();
220
328
  } catch (e) {
221
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), r() && a("error");
329
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), o() && c("error");
222
330
  }
223
331
  }, [
332
+ ke,
224
333
  q,
225
- V,
226
- o
227
- ]), Ce = s(async (e) => {
228
- k(null), R(e);
334
+ l
335
+ ]), Fe = u(async (e) => {
336
+ P(null), G(e);
229
337
  try {
230
- await J({ variables: { generationId: e } }), V();
338
+ await Ae({ variables: { generationId: e } }), q();
231
339
  } catch (e) {
232
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
340
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
233
341
  } finally {
234
- z(e);
342
+ K(e);
235
343
  }
236
344
  }, [
237
- J,
238
- V,
239
- o
240
- ]), we = s(async (e) => {
241
- k(null), R(e);
345
+ Ae,
346
+ q,
347
+ l
348
+ ]), Ie = u(async (e) => {
349
+ P(null), G(e);
242
350
  try {
243
- if (t(await Y({ variables: { input: { generationId: e } } }), "command")) return;
244
- V();
351
+ if (i(await X({ variables: { input: { generationId: e } } }), "command")) return;
352
+ q();
245
353
  } catch (e) {
246
- if (t(e, "command")) return;
247
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
354
+ if (i(e, "command")) return;
355
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
248
356
  } finally {
249
- z(e);
357
+ K(e);
250
358
  }
251
359
  }, [
252
- Y,
253
- V,
254
- o
255
- ]), Te = s(async () => {
256
- if (!P || !I.trim()) return;
257
- let e = P.id;
258
- k(null), R(e);
259
- let n = !1;
360
+ X,
361
+ q,
362
+ l
363
+ ]), Le = u(async () => {
364
+ if (!V || !U.trim()) return;
365
+ let e = V.id;
366
+ P(null), G(e);
367
+ let t = !1;
260
368
  try {
261
- if (t(await X({ variables: { input: {
369
+ if (i(await je({ variables: { input: {
262
370
  generationId: e,
263
- refinementPrompt: I.trim()
371
+ refinementPrompt: U.trim()
264
372
  } } }), "command")) {
265
- n = !0;
373
+ t = !0;
266
374
  return;
267
375
  }
268
- n = !0, V();
376
+ t = !0, q();
269
377
  } catch (e) {
270
- if (t(e, "command")) {
271
- n = !0;
378
+ if (i(e, "command")) {
379
+ t = !0;
272
380
  return;
273
381
  }
274
- k(e instanceof Error ? e.message : o("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
382
+ P(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
275
383
  } finally {
276
- n && (F(null), L("")), z(e);
384
+ t && (H(null), W("")), K(e);
277
385
  }
278
386
  }, [
279
- P,
280
- I,
281
- X,
282
387
  V,
283
- o
284
- ]), Ee = s((e) => {
285
- v(e);
286
- }, []);
287
- return /* @__PURE__ */ S("div", {
288
- style: {
289
- minHeight: "100vh",
290
- backgroundColor: "var(--color-bg-canvas)"
291
- },
388
+ U,
389
+ je,
390
+ q,
391
+ l
392
+ ]), Re = u((e) => {
393
+ x(e);
394
+ }, []), $ = z?.generatedSpec;
395
+ return /* @__PURE__ */ T("div", {
396
+ className: "min-w-0",
397
+ style: { backgroundColor: "var(--color-bg-canvas)" },
292
398
  children: [
293
- /* @__PURE__ */ S("div", {
294
- style: {
295
- padding: "var(--space-pagePadding)",
296
- maxWidth: 960,
297
- margin: "0 auto"
298
- },
299
- children: [
300
- /* @__PURE__ */ S("div", {
301
- className: "relative mb-[var(--space-sectionGap)] overflow-hidden rounded-card border border-border-seam bg-gloss-card p-6",
302
- children: [
303
- /* @__PURE__ */ x(oe, { intensity: "subtle" }),
304
- /* @__PURE__ */ S("div", {
305
- style: {
306
- display: "flex",
307
- alignItems: "center",
308
- gap: "var(--space-iconGap)"
309
- },
310
- children: [/* @__PURE__ */ x(h, {
311
- size: 24,
312
- style: { color: "var(--color-action-primary-bg)" }
313
- }), /* @__PURE__ */ x("h1", {
314
- style: {
315
- fontSize: "var(--font-size-heading-h4)",
316
- fontWeight: "var(--font-weight-bold)",
317
- color: "var(--color-text-primary)"
318
- },
319
- children: /* @__PURE__ */ x(le, { children: o("bigconsole.insights.header.title", "AI Insights") })
320
- })]
321
- }),
322
- /* @__PURE__ */ x("p", {
323
- style: {
324
- fontSize: "var(--font-size-body-md)",
325
- color: "var(--color-text-secondary)",
326
- marginTop: 4
327
- },
328
- children: o("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
329
- })
330
- ]
331
- }),
332
- /* @__PURE__ */ S(se, {
333
- className: "mb-[var(--space-sectionGap)] p-[var(--space-cardPadding)]",
334
- children: [
335
- /* @__PURE__ */ x("label", {
336
- htmlFor: "prompt-input",
337
- style: {
338
- display: "block",
339
- fontSize: "var(--font-size-body-sm)",
340
- fontWeight: "var(--font-weight-medium)",
341
- color: "var(--color-text-primary)",
342
- marginBottom: 8
343
- },
344
- children: o("bigconsole.insights.prompt.label", "Describe the dashboard you want to create")
345
- }),
346
- /* @__PURE__ */ x("textarea", {
347
- id: "prompt-input",
348
- value: _,
349
- onChange: (e) => v(e.target.value),
350
- placeholder: o("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
351
- rows: 3,
352
- maxLength: 2e3,
353
- style: {
354
- width: "100%",
355
- padding: "8px 12px",
356
- borderRadius: "var(--radius-button)",
357
- border: "1px solid var(--color-border)",
358
- backgroundColor: "var(--color-bg-canvas)",
359
- color: "var(--color-text-primary)",
360
- fontSize: "var(--font-size-body-md)",
361
- resize: "vertical",
362
- outline: "none"
363
- },
364
- onKeyDown: (e) => {
365
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && $();
366
- }
367
- }),
368
- /* @__PURE__ */ S("div", {
369
- style: {
370
- display: "flex",
371
- justifyContent: "space-between",
372
- alignItems: "center",
373
- marginTop: 8,
374
- flexWrap: "wrap",
375
- gap: 8
376
- },
377
- children: [/* @__PURE__ */ x("span", {
378
- style: {
379
- fontSize: "var(--font-size-body-sm)",
380
- color: "var(--color-text-muted)"
381
- },
382
- children: o("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate")
383
- }), /* @__PURE__ */ S("button", {
384
- onClick: $,
385
- disabled: !_.trim() || E,
386
- style: {
387
- display: "flex",
388
- alignItems: "center",
389
- gap: 8,
390
- padding: "8px 16px",
391
- borderRadius: "var(--radius-button)",
392
- backgroundColor: "var(--color-action-primary-bg)",
393
- color: "var(--color-action-primary-text)",
394
- fontWeight: "var(--font-weight-medium)",
395
- fontSize: "var(--font-size-body-sm)",
396
- border: "none",
397
- cursor: !_.trim() || E ? "not-allowed" : "pointer",
398
- opacity: !_.trim() || E ? .5 : 1
399
- },
400
- children: [E ? /* @__PURE__ */ x(m, {
401
- size: 16,
402
- className: "animate-spin"
403
- }) : /* @__PURE__ */ x(h, { size: 16 }), o("bigconsole.insights.prompt.generateButton", "Generate Dashboard")]
404
- })]
405
- })
406
- ]
407
- }),
408
- O && /* @__PURE__ */ S("div", {
399
+ /* @__PURE__ */ T("header", {
400
+ className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
401
+ children: [/* @__PURE__ */ w(ce, { intensity: "subtle" }), /* @__PURE__ */ w("div", {
402
+ style: { padding: "var(--space-pagePadding)" },
403
+ children: /* @__PURE__ */ T("div", {
409
404
  style: {
410
405
  display: "flex",
411
406
  alignItems: "center",
412
- justifyContent: "space-between",
413
- gap: 8,
414
- padding: "10px 16px",
415
- marginBottom: "var(--space-sectionGap)",
416
- borderRadius: "var(--radius-card)",
417
- border: "1px solid var(--color-status-error-text)",
418
- backgroundColor: "var(--color-bg-surface)",
419
- color: "var(--color-status-error-text)",
420
- fontSize: "var(--font-size-body-sm)"
407
+ gap: "var(--space-formGap)",
408
+ flexWrap: "wrap",
409
+ minWidth: 0
421
410
  },
422
- children: [/* @__PURE__ */ S("div", {
411
+ children: [/* @__PURE__ */ w("div", {
423
412
  style: {
424
413
  display: "flex",
414
+ height: "var(--size-controlHeight-lg)",
415
+ width: "var(--size-controlHeight-lg)",
416
+ flexShrink: 0,
425
417
  alignItems: "center",
426
- gap: 8
427
- },
428
- children: [/* @__PURE__ */ x(u, { size: 16 }), O]
429
- }), /* @__PURE__ */ x("button", {
430
- onClick: () => k(null),
431
- style: {
432
- background: "none",
433
- border: "none",
434
- color: "var(--color-status-error-text)",
435
- cursor: "pointer",
436
- fontSize: "var(--font-size-body-md)",
437
- padding: "0 4px"
418
+ justifyContent: "center",
419
+ borderRadius: "var(--radius-card)",
420
+ backgroundColor: "var(--color-action-primary-bg)"
438
421
  },
439
- "aria-label": o("bigconsole.insights.error.dismiss", "Dismiss error"),
440
- children: "×"
422
+ children: /* @__PURE__ */ w(v, { style: {
423
+ height: "var(--size-icon-lg)",
424
+ width: "var(--size-icon-lg)",
425
+ color: "var(--color-action-primary-text)"
426
+ } })
427
+ }), /* @__PURE__ */ T("div", {
428
+ style: { minWidth: 0 },
429
+ children: [/* @__PURE__ */ w("h1", {
430
+ className: "m-0 text-2xl font-bold text-text-primary",
431
+ children: /* @__PURE__ */ w(ue, { children: l("bigconsole.insights.header.title", "AI Insights") })
432
+ }), /* @__PURE__ */ w("p", {
433
+ className: "m-0 text-sm text-text-secondary",
434
+ children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
435
+ })]
441
436
  })]
437
+ })
438
+ })]
439
+ }),
440
+ /* @__PURE__ */ T("div", {
441
+ style: { padding: "var(--space-pagePadding)" },
442
+ children: [/* @__PURE__ */ w(fe, {
443
+ className: "mb-[var(--space-sectionGap)]",
444
+ 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."
445
+ }), /* @__PURE__ */ T(r, { children: [
446
+ N && /* @__PURE__ */ w(n, {
447
+ headingLevel: 2,
448
+ tone: "danger",
449
+ padding: "compact",
450
+ title: "That request did not go through",
451
+ description: N,
452
+ icon: /* @__PURE__ */ w(p, { className: "h-icon-sm w-icon-sm" }),
453
+ "data-testid": "insights-error",
454
+ actions: /* @__PURE__ */ w("button", {
455
+ type: "button",
456
+ onClick: () => P(null),
457
+ "aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
458
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
459
+ style: O,
460
+ children: "Dismiss"
461
+ })
442
462
  }),
443
- Q.length > 0 && /* @__PURE__ */ S("div", {
444
- style: { marginBottom: "var(--space-sectionGap)" },
445
- children: [/* @__PURE__ */ x("h2", {
463
+ /* @__PURE__ */ w(n, {
464
+ id: "insights-prompt",
465
+ emphasis: "primary",
466
+ headingLevel: 2,
467
+ title: "Describe your dashboard",
468
+ description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
469
+ icon: /* @__PURE__ */ w(v, { className: "h-icon-sm w-icon-sm" }),
470
+ "data-testid": "insights-prompt",
471
+ children: /* @__PURE__ */ T("div", {
446
472
  style: {
447
- fontSize: "var(--font-size-body-md)",
448
- fontWeight: "var(--font-weight-semibold)",
449
- color: "var(--color-text-primary)",
450
- marginBottom: 12
473
+ display: "flex",
474
+ flexDirection: "column",
475
+ gap: "var(--space-controlGap)"
451
476
  },
452
- children: o("bigconsole.insights.suggestions.heading", "Suggestions")
453
- }), /* @__PURE__ */ x("div", {
477
+ children: [
478
+ /* @__PURE__ */ w("label", {
479
+ htmlFor: "prompt-input",
480
+ style: {
481
+ display: "block",
482
+ fontSize: "var(--font-size-body-sm)",
483
+ fontWeight: "var(--font-weight-medium)",
484
+ color: "var(--color-text-primary)"
485
+ },
486
+ children: l("bigconsole.insights.prompt.label", "Your prompt")
487
+ }),
488
+ /* @__PURE__ */ w("textarea", {
489
+ id: "prompt-input",
490
+ value: b,
491
+ onChange: (e) => x(e.target.value),
492
+ placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
493
+ rows: 3,
494
+ maxLength: 2e3,
495
+ className: t,
496
+ style: {
497
+ width: "100%",
498
+ maxWidth: "100%",
499
+ padding: "var(--space-controlGap) var(--space-formGap)",
500
+ borderRadius: "var(--radius-input)",
501
+ border: "1px solid var(--color-border-default)",
502
+ backgroundColor: "var(--color-bg-canvas)",
503
+ color: "var(--color-text-primary)",
504
+ fontSize: "var(--font-size-body-md)",
505
+ resize: "vertical"
506
+ },
507
+ onKeyDown: (e) => {
508
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && Ne();
509
+ }
510
+ }),
511
+ /* @__PURE__ */ T("div", {
512
+ style: {
513
+ display: "flex",
514
+ alignItems: "center",
515
+ flexWrap: "wrap",
516
+ gap: "var(--space-controlGap)",
517
+ borderTop: "1px solid var(--color-border-subtle)",
518
+ paddingTop: "var(--space-controlGap)"
519
+ },
520
+ children: [/* @__PURE__ */ T("span", {
521
+ style: {
522
+ flex: "1 1 12rem",
523
+ minWidth: 0,
524
+ fontSize: "var(--font-size-body-sm)",
525
+ color: "var(--color-text-muted)"
526
+ },
527
+ children: [
528
+ l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
529
+ " · ",
530
+ b.length,
531
+ "/2000"
532
+ ]
533
+ }), /* @__PURE__ */ T("button", {
534
+ type: "button",
535
+ onClick: Ne,
536
+ disabled: !b.trim() || D,
537
+ className: t,
538
+ style: {
539
+ ...k,
540
+ marginLeft: "auto",
541
+ cursor: !b.trim() || D ? "not-allowed" : "pointer",
542
+ opacity: !b.trim() || D ? .5 : 1
543
+ },
544
+ children: [D ? /* @__PURE__ */ w(_, {
545
+ size: 16,
546
+ className: "animate-spin",
547
+ "aria-hidden": "true"
548
+ }) : /* @__PURE__ */ w(v, {
549
+ size: 16,
550
+ "aria-hidden": "true"
551
+ }), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
552
+ })]
553
+ })
554
+ ]
555
+ })
556
+ }),
557
+ Me.length > 0 && /* @__PURE__ */ w(n, {
558
+ emphasis: "muted",
559
+ headingLevel: 2,
560
+ title: l("bigconsole.insights.suggestions.heading", "Starting points"),
561
+ description: "Pick one to drop it into the prompt box above, then edit it before generating.",
562
+ icon: /* @__PURE__ */ w(re, { className: "h-icon-sm w-icon-sm" }),
563
+ "data-testid": "insights-suggestions",
564
+ children: /* @__PURE__ */ w("div", {
454
565
  style: {
455
566
  display: "grid",
456
- gridTemplateColumns: "repeat(auto-fill, minmax(min(280px, 100%), 1fr))",
457
- gap: 12
567
+ gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
568
+ gap: "var(--space-controlGap)"
458
569
  },
459
- children: Q.map((e) => /* @__PURE__ */ S("button", {
460
- onClick: () => Ee(e.prompt),
570
+ children: Me.map((e) => /* @__PURE__ */ T("button", {
571
+ type: "button",
572
+ onClick: () => Re(e.prompt),
573
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
461
574
  style: {
462
575
  textAlign: "left",
463
- padding: 12,
576
+ minWidth: 0,
577
+ minHeight: "var(--size-controlHeight-lg)",
578
+ padding: "var(--space-controlGap)",
464
579
  borderRadius: "var(--radius-card)",
465
- border: "1px solid var(--color-border)",
580
+ border: "1px solid var(--color-border-subtle)",
466
581
  backgroundColor: "var(--color-bg-surface)",
467
582
  cursor: "pointer"
468
583
  },
469
584
  children: [
470
- /* @__PURE__ */ x("div", {
585
+ /* @__PURE__ */ w("span", {
471
586
  style: {
587
+ display: "block",
472
588
  fontWeight: "var(--font-weight-medium)",
473
589
  fontSize: "var(--font-size-body-sm)",
474
590
  color: "var(--color-text-primary)",
475
- marginBottom: 4
591
+ marginBottom: "var(--space-iconGap)"
476
592
  },
477
593
  children: e.title
478
594
  }),
479
- /* @__PURE__ */ x("div", {
595
+ /* @__PURE__ */ w("span", {
480
596
  style: {
597
+ display: "block",
481
598
  fontSize: "var(--font-size-body-sm)",
482
599
  color: "var(--color-text-secondary)",
483
600
  lineHeight: 1.4
484
601
  },
485
- children: e.exampleDescription || e.prompt.slice(0, 80)
602
+ children: e.exampleDescription || e.prompt
486
603
  }),
487
- /* @__PURE__ */ x("div", {
604
+ e.tags.length > 0 && /* @__PURE__ */ w("span", {
488
605
  style: {
489
606
  display: "flex",
490
- gap: 4,
491
- marginTop: 8,
607
+ gap: "var(--space-iconGap)",
608
+ marginTop: "var(--space-controlGap)",
492
609
  flexWrap: "wrap"
493
610
  },
494
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
495
- style: {
496
- fontSize: 11,
497
- padding: "2px 6px",
498
- borderRadius: 4,
499
- backgroundColor: "var(--color-bg-sunken)",
500
- color: "var(--color-text-muted)"
501
- },
611
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ w("span", {
612
+ style: j,
502
613
  children: e
503
614
  }, e))
504
615
  })
505
616
  ]
506
617
  }, e.id))
507
- })]
508
- }),
509
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
510
- style: {
511
- fontSize: "var(--font-size-body-md)",
512
- fontWeight: "var(--font-weight-semibold)",
513
- color: "var(--color-text-primary)",
514
- marginBottom: 12
515
- },
516
- children: o("bigconsole.insights.generations.heading", "Recent Generations")
517
- }), ye && Z.length === 0 ? /* @__PURE__ */ S("div", {
518
- style: {
519
- textAlign: "center",
520
- padding: 40,
521
- color: "var(--color-text-muted)"
522
- },
523
- children: [/* @__PURE__ */ x(m, {
524
- size: 24,
525
- className: "animate-spin",
526
- style: { margin: "0 auto 8px" }
527
- }), /* @__PURE__ */ x("p", { children: o("bigconsole.insights.generations.loading", "Loading generations...") })]
528
- }) : Z.length === 0 && !E ? /* @__PURE__ */ x(ce, {
529
- treatment: "insight",
530
- className: "border-border-seam",
531
- children: /* @__PURE__ */ x(ue, {
532
- illustration: "onboarding",
533
- title: o("bigconsole.insights.generations.emptyTitle", "No generations yet"),
534
- description: o("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
535
618
  })
536
- }) : /* @__PURE__ */ S("div", {
537
- style: {
538
- display: "flex",
539
- flexDirection: "column",
540
- gap: 12
541
- },
542
- children: [E && !W && /* @__PURE__ */ x("div", {
543
- style: {
544
- padding: 16,
545
- borderRadius: "var(--radius-card)",
546
- border: "1px solid var(--color-border)",
547
- backgroundColor: "var(--color-bg-surface)"
548
- },
549
- children: /* @__PURE__ */ S("div", {
619
+ }),
620
+ /* @__PURE__ */ w(n, {
621
+ emphasis: "bare",
622
+ padding: "none",
623
+ headingLevel: 2,
624
+ title: l("bigconsole.insights.generations.heading", "Recent generations"),
625
+ description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
626
+ icon: /* @__PURE__ */ w(ne, { className: "h-icon-sm w-icon-sm" }),
627
+ meta: Z.length > 0 ? /* @__PURE__ */ T("span", {
628
+ style: j,
629
+ children: [
630
+ Z.length,
631
+ " generation",
632
+ Z.length === 1 ? "" : "s"
633
+ ]
634
+ }) : void 0,
635
+ "data-testid": "insights-generations",
636
+ children: we && Z.length === 0 ? /* @__PURE__ */ w(n, {
637
+ emphasis: "muted",
638
+ headingLevel: 3,
639
+ "aria-label": "Loading generations",
640
+ className: "min-h-[10rem]",
641
+ "data-testid": "insights-generations-loading",
642
+ children: /* @__PURE__ */ T("div", {
550
643
  style: {
551
644
  display: "flex",
645
+ minHeight: "8rem",
646
+ flexDirection: "column",
552
647
  alignItems: "center",
553
- gap: 8,
554
- minWidth: 0
648
+ justifyContent: "center",
649
+ gap: "var(--space-controlGap)",
650
+ color: "var(--color-text-muted)"
555
651
  },
556
- children: [
557
- w("PROCESSING"),
558
- /* @__PURE__ */ x("span", {
559
- style: {
560
- fontSize: "var(--font-size-body-sm)",
561
- fontWeight: "var(--font-weight-medium)",
562
- color: "var(--color-text-primary)"
563
- },
564
- children: o("bigconsole.insights.generations.generating", "Generating...")
565
- }),
566
- /* @__PURE__ */ x("span", {
567
- style: {
568
- fontSize: 11,
569
- color: "var(--color-text-muted)",
570
- padding: "2px 6px",
571
- borderRadius: 4,
572
- backgroundColor: "var(--color-bg-sunken)"
573
- },
574
- children: T("PROCESSING", o)
575
- })
576
- ]
652
+ children: [/* @__PURE__ */ w(_, {
653
+ size: 24,
654
+ className: "animate-spin",
655
+ "aria-hidden": "true"
656
+ }), /* @__PURE__ */ w("p", {
657
+ style: { fontSize: "var(--font-size-body-sm)" },
658
+ children: l("bigconsole.insights.generations.loading", "Loading generations…")
659
+ })]
577
660
  })
578
- }), Z.map((e) => /* @__PURE__ */ x("div", {
579
- style: {
580
- padding: 16,
581
- borderRadius: "var(--radius-card)",
582
- border: "1px solid var(--color-border)",
583
- backgroundColor: "var(--color-bg-surface)"
584
- },
585
- children: /* @__PURE__ */ S("div", {
586
- style: {
587
- display: "flex",
588
- justifyContent: "space-between",
589
- alignItems: "flex-start",
590
- flexWrap: "wrap",
591
- gap: 8
592
- },
593
- children: [/* @__PURE__ */ S("div", {
594
- style: {
595
- flex: "1 1 200px",
596
- minWidth: 0
597
- },
661
+ }) : Z.length === 0 && !D ? /* @__PURE__ */ w(le, {
662
+ treatment: "insight",
663
+ className: "border-[var(--color-border-seam)]",
664
+ children: /* @__PURE__ */ w(de, {
665
+ illustration: "onboarding",
666
+ title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
667
+ description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
668
+ })
669
+ }) : /* @__PURE__ */ T("div", {
670
+ className: "flex flex-col gap-list-gap",
671
+ children: [D && !Y && /* @__PURE__ */ w(n, {
672
+ emphasis: "muted",
673
+ tone: "info",
674
+ padding: "compact",
675
+ headingLevel: 3,
676
+ title: "Sending your prompt…",
677
+ description: "The new generation appears here as soon as the backend accepts it.",
678
+ icon: /* @__PURE__ */ w(_, { className: "h-icon-sm w-icon-sm animate-spin" }),
679
+ "data-testid": "insights-generation-pending"
680
+ }), Z.map((e) => {
681
+ let r = e.generatedSpec, i = F.has(e.id), a = E.includes(e.status);
682
+ return /* @__PURE__ */ T(n, {
683
+ emphasis: "standard",
684
+ padding: "compact",
685
+ headingLevel: 3,
686
+ title: r?.name || (a ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
687
+ meta: /* @__PURE__ */ w(Se, { status: e.status }),
688
+ description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
689
+ "data-testid": "insights-generation-card",
690
+ bodyClassName: "flex flex-col gap-control-gap",
598
691
  children: [
599
- /* @__PURE__ */ S("div", {
692
+ r && /* @__PURE__ */ T("div", {
600
693
  style: {
601
694
  display: "flex",
602
- alignItems: "center",
603
- gap: 8,
604
- marginBottom: 4,
605
- minWidth: 0
695
+ flexWrap: "wrap",
696
+ gap: "var(--space-iconGap)"
606
697
  },
607
698
  children: [
608
- w(e.status),
609
- /* @__PURE__ */ x("span", {
610
- style: {
611
- fontSize: "var(--font-size-body-sm)",
612
- fontWeight: "var(--font-weight-medium)",
613
- color: "var(--color-text-primary)",
614
- minWidth: 0,
615
- overflow: "hidden",
616
- textOverflow: "ellipsis",
617
- whiteSpace: "nowrap"
618
- },
619
- children: e.generatedSpec?.name || o("bigconsole.insights.generations.generating", "Generating...")
699
+ /* @__PURE__ */ T("span", {
700
+ style: j,
701
+ children: [
702
+ L(r),
703
+ " widget",
704
+ L(r) === 1 ? "" : "s"
705
+ ]
620
706
  }),
621
- /* @__PURE__ */ x("span", {
622
- style: {
623
- fontSize: 11,
624
- color: "var(--color-text-muted)",
625
- padding: "2px 6px",
626
- borderRadius: 4,
627
- backgroundColor: "var(--color-bg-sunken)"
628
- },
629
- children: T(e.status, o)
707
+ /* @__PURE__ */ T("span", {
708
+ style: j,
709
+ children: [
710
+ r.pages.length,
711
+ " page",
712
+ r.pages.length === 1 ? "" : "s"
713
+ ]
714
+ }),
715
+ /* @__PURE__ */ T("span", {
716
+ style: I(r.overallConfidence),
717
+ children: [Math.round(r.overallConfidence * 100), "% confidence"]
630
718
  })
631
719
  ]
632
720
  }),
633
- /* @__PURE__ */ x("p", {
634
- style: {
635
- fontSize: "var(--font-size-body-sm)",
636
- color: "var(--color-text-secondary)",
637
- marginBottom: 4
638
- },
639
- children: e.prompt.length > 120 ? e.prompt.slice(0, 120) + "..." : e.prompt
721
+ e.errorMessage && /* @__PURE__ */ w(n, {
722
+ headingLevel: 4,
723
+ tone: "danger",
724
+ padding: "compact",
725
+ title: "Generation failed",
726
+ description: e.errorMessage,
727
+ icon: /* @__PURE__ */ w(p, { className: "h-icon-sm w-icon-sm" })
640
728
  }),
641
- e.generatedSpec && /* @__PURE__ */ x("div", {
642
- style: {
643
- fontSize: 11,
644
- color: "var(--color-text-muted)"
645
- },
646
- children: o("bigconsole.insights.generations.summary", "{{widgets}} widgets across {{pages}} page(s) · {{confidence}}% confidence", {
647
- widgets: e.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
648
- pages: e.generatedSpec.pages.length,
649
- confidence: Math.round(e.generatedSpec.overallConfidence * 100)
650
- })
651
- }),
652
- e.errorMessage && /* @__PURE__ */ S("div", {
653
- style: {
654
- display: "flex",
655
- alignItems: "center",
656
- gap: 4,
657
- marginTop: 4,
658
- fontSize: "var(--font-size-body-sm)",
659
- color: "var(--color-status-error-text)"
660
- },
661
- children: [/* @__PURE__ */ x(u, { size: 14 }), e.errorMessage]
662
- })
663
- ]
664
- }), /* @__PURE__ */ S("div", {
665
- style: {
666
- display: "flex",
667
- gap: 8,
668
- flexWrap: "wrap"
669
- },
670
- children: [
671
- C.includes(e.status) && /* @__PURE__ */ S("button", {
672
- onClick: () => {
673
- i("medium"), Ce(e.id);
674
- },
675
- disabled: A.has(e.id),
676
- title: o("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
677
- style: {
678
- display: "flex",
679
- alignItems: "center",
680
- gap: 4,
681
- padding: "6px 12px",
682
- borderRadius: "var(--radius-button)",
683
- border: "1px solid var(--color-border)",
684
- backgroundColor: "transparent",
685
- color: "var(--color-status-warning-text)",
686
- fontSize: "var(--font-size-body-sm)",
687
- cursor: A.has(e.id) ? "wait" : "pointer"
688
- },
689
- children: [
690
- /* @__PURE__ */ x(ee, { size: 14 }),
691
- " ",
692
- o("bigconsole.insights.actions.cancel", "Cancel")
693
- ]
694
- }),
695
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
696
- onClick: () => N(e),
697
- title: o("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
698
- style: {
699
- display: "flex",
700
- alignItems: "center",
701
- gap: 4,
702
- padding: "6px 12px",
703
- borderRadius: "var(--radius-button)",
704
- border: "1px solid var(--color-border)",
705
- backgroundColor: "transparent",
706
- color: "var(--color-text-primary)",
707
- fontSize: "var(--font-size-body-sm)",
708
- cursor: "pointer"
709
- },
710
- children: [
711
- /* @__PURE__ */ x(te, { size: 14 }),
712
- " ",
713
- o("bigconsole.insights.actions.preview", "Preview")
714
- ]
715
- }),
716
- e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
717
- onClick: () => {
718
- F(e), L("");
719
- },
720
- title: o("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
721
- style: {
722
- display: "flex",
723
- alignItems: "center",
724
- gap: 4,
725
- padding: "6px 12px",
726
- borderRadius: "var(--radius-button)",
727
- border: "1px solid var(--color-border)",
728
- backgroundColor: "transparent",
729
- color: "var(--color-text-primary)",
730
- fontSize: "var(--font-size-body-sm)",
731
- cursor: "pointer"
732
- },
733
- children: [
734
- /* @__PURE__ */ x(g, { size: 14 }),
735
- " ",
736
- o("bigconsole.insights.actions.refine", "Refine")
737
- ]
738
- }),
739
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
740
- onClick: () => {
741
- i("medium"), we(e.id);
742
- },
743
- disabled: A.has(e.id),
744
- title: o("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
729
+ /* @__PURE__ */ T("div", {
745
730
  style: {
746
731
  display: "flex",
732
+ flexWrap: "wrap",
747
733
  alignItems: "center",
748
- gap: 4,
749
- padding: "6px 12px",
750
- borderRadius: "var(--radius-button)",
751
- border: "1px solid var(--color-border)",
752
- backgroundColor: "transparent",
753
- color: "var(--color-text-primary)",
754
- fontSize: "var(--font-size-body-sm)",
755
- cursor: A.has(e.id) ? "wait" : "pointer"
734
+ gap: "var(--space-controlGap)",
735
+ borderTop: "1px solid var(--color-border-subtle)",
736
+ paddingTop: "var(--space-controlGap)"
756
737
  },
757
738
  children: [
758
- /* @__PURE__ */ x(ne, {
759
- size: 14,
760
- className: A.has(e.id) ? "animate-spin" : ""
739
+ a && /* @__PURE__ */ T("button", {
740
+ type: "button",
741
+ onClick: () => {
742
+ s("medium"), Fe(e.id);
743
+ },
744
+ disabled: i,
745
+ title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
746
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
747
+ style: {
748
+ ...xe,
749
+ cursor: i ? "wait" : "pointer"
750
+ },
751
+ children: [
752
+ /* @__PURE__ */ w(ee, {
753
+ size: 14,
754
+ "aria-hidden": "true"
755
+ }),
756
+ " ",
757
+ l("bigconsole.insights.actions.cancel", "Cancel")
758
+ ]
761
759
  }),
762
- " ",
763
- o("bigconsole.insights.actions.regenerate", "Regenerate")
764
- ]
765
- }),
766
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
767
- onClick: () => xe(e.id),
768
- style: {
769
- display: "flex",
770
- alignItems: "center",
771
- gap: 4,
772
- padding: "6px 12px",
773
- borderRadius: "var(--radius-button)",
774
- backgroundColor: "var(--color-action-primary-bg)",
775
- color: "var(--color-action-primary-text)",
776
- border: "none",
777
- fontSize: "var(--font-size-body-sm)",
778
- cursor: "pointer"
779
- },
780
- children: [
781
- o("bigconsole.insights.actions.create", "Create"),
782
- " ",
783
- /* @__PURE__ */ x(d, { size: 14 })
784
- ]
785
- }),
786
- e.dashboardId && /* @__PURE__ */ S("button", {
787
- onClick: () => f(`/dashboards/${e.dashboardId}`),
788
- style: {
789
- display: "flex",
790
- alignItems: "center",
791
- gap: 4,
792
- padding: "6px 12px",
793
- borderRadius: "var(--radius-button)",
794
- border: "1px solid var(--color-border)",
795
- backgroundColor: "transparent",
796
- color: "var(--color-text-primary)",
797
- fontSize: "var(--font-size-body-sm)",
798
- cursor: "pointer"
799
- },
800
- children: [
801
- o("bigconsole.insights.actions.viewDashboard", "View Dashboard"),
802
- " ",
803
- /* @__PURE__ */ x(d, { size: 14 })
760
+ e.status === "COMPLETED" && r && /* @__PURE__ */ T("button", {
761
+ type: "button",
762
+ onClick: () => B(e),
763
+ title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
764
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
765
+ style: O,
766
+ children: [
767
+ /* @__PURE__ */ w(te, {
768
+ size: 14,
769
+ "aria-hidden": "true"
770
+ }),
771
+ " ",
772
+ l("bigconsole.insights.actions.preview", "Preview")
773
+ ]
774
+ }),
775
+ e.status === "COMPLETED" && r && /* @__PURE__ */ T("button", {
776
+ type: "button",
777
+ onClick: () => {
778
+ H(e), W("");
779
+ },
780
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
781
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
782
+ style: O,
783
+ children: [
784
+ /* @__PURE__ */ w(y, {
785
+ size: 14,
786
+ "aria-hidden": "true"
787
+ }),
788
+ " ",
789
+ l("bigconsole.insights.actions.refine", "Refine")
790
+ ]
791
+ }),
792
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ T("button", {
793
+ type: "button",
794
+ onClick: () => {
795
+ s("medium"), Ie(e.id);
796
+ },
797
+ disabled: i,
798
+ title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
799
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
800
+ style: {
801
+ ...O,
802
+ cursor: i ? "wait" : "pointer"
803
+ },
804
+ children: [
805
+ /* @__PURE__ */ w(ie, {
806
+ size: 14,
807
+ className: i ? "animate-spin" : "",
808
+ "aria-hidden": "true"
809
+ }),
810
+ " ",
811
+ l("bigconsole.insights.actions.regenerate", "Regenerate")
812
+ ]
813
+ }),
814
+ /* @__PURE__ */ T("div", {
815
+ style: {
816
+ display: "flex",
817
+ flexWrap: "wrap",
818
+ alignItems: "center",
819
+ gap: "var(--space-controlGap)",
820
+ marginLeft: "auto"
821
+ },
822
+ children: [
823
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ T("button", {
824
+ type: "button",
825
+ onClick: () => Q(e.id),
826
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
827
+ style: k,
828
+ children: [
829
+ l("bigconsole.insights.actions.create", "Create dashboard"),
830
+ " ",
831
+ /* @__PURE__ */ w(m, {
832
+ size: 14,
833
+ "aria-hidden": "true"
834
+ })
835
+ ]
836
+ }),
837
+ e.dashboardId && /* @__PURE__ */ T("button", {
838
+ type: "button",
839
+ onClick: () => h(`/dashboards/${e.dashboardId ?? ""}`),
840
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
841
+ style: O,
842
+ children: [
843
+ l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
844
+ " ",
845
+ /* @__PURE__ */ w(m, {
846
+ size: 14,
847
+ "aria-hidden": "true"
848
+ })
849
+ ]
850
+ }),
851
+ /* @__PURE__ */ w("button", {
852
+ type: "button",
853
+ onClick: () => {
854
+ s("medium"), Pe(e.id);
855
+ },
856
+ title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
857
+ "aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
858
+ className: t,
859
+ style: A,
860
+ children: /* @__PURE__ */ w(ae, {
861
+ size: 14,
862
+ "aria-hidden": "true"
863
+ })
864
+ })
865
+ ]
866
+ })
804
867
  ]
805
- }),
806
- /* @__PURE__ */ x("button", {
807
- onClick: () => {
808
- i("medium"), Se(e.id);
809
- },
810
- title: o("bigconsole.insights.actions.deleteTitle", "Delete generation"),
811
- style: {
812
- display: "flex",
813
- alignItems: "center",
814
- padding: 6,
815
- borderRadius: "var(--radius-button)",
816
- border: "1px solid var(--color-border)",
817
- backgroundColor: "transparent",
818
- color: "var(--color-text-muted)",
819
- cursor: "pointer"
820
- },
821
- children: /* @__PURE__ */ x(re, { size: 14 })
822
868
  })
823
869
  ]
824
- })]
825
- })
826
- }, e.id))]
827
- })] })
828
- ]
870
+ }, e.id);
871
+ })]
872
+ })
873
+ })
874
+ ] })]
829
875
  }),
830
- M?.generatedSpec && /* @__PURE__ */ x("div", {
876
+ z && $ && /* @__PURE__ */ w("div", {
831
877
  role: "dialog",
832
878
  "aria-modal": "true",
833
- "aria-label": o("bigconsole.insights.preview.ariaLabel", "Generation preview"),
834
- onClick: () => N(null),
879
+ "aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
880
+ onClick: () => B(null),
835
881
  style: {
836
882
  position: "fixed",
837
883
  inset: 0,
@@ -842,110 +888,173 @@ var E = o(function() {
842
888
  justifyContent: "center",
843
889
  padding: "var(--space-pagePadding)"
844
890
  },
845
- children: /* @__PURE__ */ S("div", {
891
+ children: /* @__PURE__ */ T("div", {
846
892
  onClick: (e) => e.stopPropagation(),
847
893
  style: {
894
+ display: "flex",
895
+ flexDirection: "column",
896
+ minHeight: 0,
848
897
  width: "min(640px, 100%)",
849
- maxHeight: "80vh",
850
- overflowY: "auto",
898
+ maxHeight: "calc(100dvh - 2 * var(--space-pagePadding))",
851
899
  backgroundColor: "var(--color-bg-surface)",
852
900
  borderRadius: "var(--radius-card)",
853
- border: "1px solid var(--color-border)",
854
- boxShadow: "var(--shadow-elevation-3)",
855
- padding: "var(--space-cardPadding)"
901
+ border: "1px solid var(--color-border-default)",
902
+ boxShadow: "var(--shadow-elevation-3)"
856
903
  },
857
904
  children: [
858
- /* @__PURE__ */ S("div", {
905
+ /* @__PURE__ */ T("div", {
859
906
  style: {
860
907
  display: "flex",
861
908
  justifyContent: "space-between",
862
909
  alignItems: "flex-start",
863
- gap: 8,
864
- marginBottom: "var(--space-controlGap)"
910
+ gap: "var(--space-controlGap)",
911
+ padding: "var(--space-cardPadding)",
912
+ borderBottom: "1px solid var(--color-border-subtle)"
865
913
  },
866
- children: [/* @__PURE__ */ S("div", {
914
+ children: [/* @__PURE__ */ T("div", {
867
915
  style: { minWidth: 0 },
868
- children: [/* @__PURE__ */ x("h3", {
916
+ children: [/* @__PURE__ */ w("h2", {
869
917
  style: {
870
918
  fontSize: "var(--font-size-heading-h4)",
871
- fontWeight: "var(--font-weight-semibold)"
919
+ fontWeight: "var(--font-weight-semibold)",
920
+ color: "var(--color-text-primary)"
872
921
  },
873
- children: M.generatedSpec.name
874
- }), M.generatedSpec.description && /* @__PURE__ */ x("p", {
922
+ children: $.name
923
+ }), $.description && /* @__PURE__ */ w("p", {
875
924
  style: {
876
925
  fontSize: "var(--font-size-body-sm)",
877
- color: "var(--color-text-muted)",
926
+ color: "var(--color-text-secondary)",
878
927
  marginTop: 2
879
928
  },
880
- children: M.generatedSpec.description
929
+ children: $.description
881
930
  })]
882
- }), /* @__PURE__ */ x("button", {
883
- onClick: () => N(null),
884
- "aria-label": o("bigconsole.insights.preview.close", "Close preview"),
931
+ }), /* @__PURE__ */ w("button", {
932
+ type: "button",
933
+ onClick: () => B(null),
934
+ "aria-label": l("bigconsole.insights.preview.close", "Close preview"),
935
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
885
936
  style: {
886
- display: "flex",
887
- padding: 4,
888
- borderRadius: "var(--radius-button)",
889
- border: "none",
890
- backgroundColor: "transparent",
891
- color: "var(--color-text-muted)",
892
- cursor: "pointer"
937
+ ...A,
938
+ color: "var(--color-text-muted)"
893
939
  },
894
- children: /* @__PURE__ */ x(ie, { size: 18 })
940
+ children: /* @__PURE__ */ w(oe, {
941
+ size: 18,
942
+ "aria-hidden": "true"
943
+ })
895
944
  })]
896
945
  }),
897
- /* @__PURE__ */ x("div", {
946
+ /* @__PURE__ */ T("div", {
898
947
  style: {
899
- fontSize: 11,
900
- color: "var(--color-text-muted)",
901
- marginBottom: "var(--space-controlGap)"
948
+ flex: "1 1 auto",
949
+ minHeight: 0,
950
+ overflowY: "auto",
951
+ padding: "var(--space-cardPadding)",
952
+ display: "flex",
953
+ flexDirection: "column",
954
+ gap: "var(--space-controlGap)"
902
955
  },
903
- children: o("bigconsole.insights.generations.summary", "{{widgets}} widgets across {{pages}} page(s) · {{confidence}}% confidence", {
904
- widgets: M.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
905
- pages: M.generatedSpec.pages.length,
906
- confidence: Math.round(M.generatedSpec.overallConfidence * 100)
907
- })
908
- }),
909
- M.generatedSpec.pages.map((e, t) => /* @__PURE__ */ S("div", {
910
- style: { marginBottom: "var(--space-controlGap)" },
911
- children: [/* @__PURE__ */ x("div", {
912
- style: {
913
- fontSize: "var(--font-size-body-sm)",
914
- fontWeight: "var(--font-weight-medium)",
915
- color: "var(--color-text-primary)",
916
- marginBottom: 4
917
- },
918
- children: e.name
919
- }), /* @__PURE__ */ x("div", {
956
+ children: [/* @__PURE__ */ T("div", {
920
957
  style: {
921
958
  display: "flex",
922
959
  flexWrap: "wrap",
923
- gap: 6
960
+ gap: "var(--space-iconGap)"
924
961
  },
925
- children: e.widgets.map((e, t) => /* @__PURE__ */ S("span", {
926
- style: {
927
- fontSize: 11,
928
- padding: "3px 8px",
929
- borderRadius: "var(--radius-pill)",
930
- backgroundColor: "var(--color-bg-sunken)",
931
- color: "var(--color-text-secondary)"
932
- },
962
+ children: [
963
+ /* @__PURE__ */ T("span", {
964
+ style: j,
965
+ children: [
966
+ L($),
967
+ " widget",
968
+ L($) === 1 ? "" : "s"
969
+ ]
970
+ }),
971
+ /* @__PURE__ */ T("span", {
972
+ style: j,
973
+ children: [
974
+ $.pages.length,
975
+ " page",
976
+ $.pages.length === 1 ? "" : "s"
977
+ ]
978
+ }),
979
+ /* @__PURE__ */ T("span", {
980
+ style: I($.overallConfidence),
981
+ children: [Math.round($.overallConfidence * 100), "% confidence"]
982
+ })
983
+ ]
984
+ }), $.pages.map((e, t) => /* @__PURE__ */ w(n, {
985
+ emphasis: "muted",
986
+ padding: "compact",
987
+ headingLevel: 3,
988
+ title: e.name,
989
+ meta: /* @__PURE__ */ T("span", {
990
+ style: j,
933
991
  children: [
934
- e.title,
935
- " · ",
936
- e.type
992
+ e.widgets.length,
993
+ " widget",
994
+ e.widgets.length === 1 ? "" : "s"
937
995
  ]
938
- }, t))
996
+ }),
997
+ children: /* @__PURE__ */ w("div", {
998
+ style: {
999
+ display: "flex",
1000
+ flexWrap: "wrap",
1001
+ gap: "var(--space-iconGap)"
1002
+ },
1003
+ children: e.widgets.map((e, t) => /* @__PURE__ */ T("span", {
1004
+ style: {
1005
+ ...j,
1006
+ backgroundColor: "var(--color-bg-surface)",
1007
+ color: "var(--color-text-primary)"
1008
+ },
1009
+ children: [e.title, /* @__PURE__ */ w("span", {
1010
+ style: { color: "var(--color-text-muted)" },
1011
+ children: e.type
1012
+ })]
1013
+ }, t))
1014
+ })
1015
+ }, t))]
1016
+ }),
1017
+ /* @__PURE__ */ T("div", {
1018
+ style: {
1019
+ display: "flex",
1020
+ justifyContent: "flex-end",
1021
+ flexWrap: "wrap",
1022
+ gap: "var(--space-controlGap)",
1023
+ padding: "var(--space-cardPadding)",
1024
+ borderTop: "1px solid var(--color-border-subtle)"
1025
+ },
1026
+ children: [/* @__PURE__ */ w("button", {
1027
+ type: "button",
1028
+ onClick: () => B(null),
1029
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1030
+ style: O,
1031
+ children: "Close"
1032
+ }), z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ T("button", {
1033
+ type: "button",
1034
+ onClick: () => {
1035
+ let e = z.id;
1036
+ B(null), Q(e);
1037
+ },
1038
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1039
+ style: k,
1040
+ children: [
1041
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1042
+ " ",
1043
+ /* @__PURE__ */ w(m, {
1044
+ size: 14,
1045
+ "aria-hidden": "true"
1046
+ })
1047
+ ]
939
1048
  })]
940
- }, t))
1049
+ })
941
1050
  ]
942
1051
  })
943
1052
  }),
944
- P && /* @__PURE__ */ x("div", {
1053
+ V && /* @__PURE__ */ w("div", {
945
1054
  role: "dialog",
946
1055
  "aria-modal": "true",
947
- "aria-label": o("bigconsole.insights.refine.ariaLabel", "Refine generation"),
948
- onClick: () => F(null),
1056
+ "aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1057
+ onClick: () => H(null),
949
1058
  style: {
950
1059
  position: "fixed",
951
1060
  inset: 0,
@@ -956,90 +1065,128 @@ var E = o(function() {
956
1065
  justifyContent: "center",
957
1066
  padding: "var(--space-pagePadding)"
958
1067
  },
959
- children: /* @__PURE__ */ S("div", {
1068
+ children: /* @__PURE__ */ T("div", {
960
1069
  onClick: (e) => e.stopPropagation(),
961
1070
  style: {
1071
+ display: "flex",
1072
+ flexDirection: "column",
1073
+ minHeight: 0,
962
1074
  width: "min(520px, 100%)",
1075
+ maxHeight: "calc(100dvh - 2 * var(--space-pagePadding))",
963
1076
  backgroundColor: "var(--color-bg-surface)",
964
1077
  borderRadius: "var(--radius-card)",
965
- border: "1px solid var(--color-border)",
966
- boxShadow: "var(--shadow-elevation-3)",
967
- padding: "var(--space-cardPadding)"
1078
+ border: "1px solid var(--color-border-default)",
1079
+ boxShadow: "var(--shadow-elevation-3)"
968
1080
  },
969
1081
  children: [
970
- /* @__PURE__ */ x("h3", {
1082
+ /* @__PURE__ */ T("div", {
971
1083
  style: {
972
- fontSize: "var(--font-size-heading-h4)",
973
- fontWeight: "var(--font-weight-semibold)",
974
- marginBottom: 4
1084
+ padding: "var(--space-cardPadding)",
1085
+ borderBottom: "1px solid var(--color-border-subtle)"
975
1086
  },
976
- children: o("bigconsole.insights.refine.heading", "Refine dashboard")
1087
+ children: [/* @__PURE__ */ w("h2", {
1088
+ style: {
1089
+ fontSize: "var(--font-size-heading-h4)",
1090
+ fontWeight: "var(--font-weight-semibold)",
1091
+ color: "var(--color-text-primary)"
1092
+ },
1093
+ children: l("bigconsole.insights.refine.heading", "Refine dashboard")
1094
+ }), /* @__PURE__ */ w("p", {
1095
+ style: {
1096
+ fontSize: "var(--font-size-body-sm)",
1097
+ color: "var(--color-text-secondary)",
1098
+ marginTop: 2
1099
+ },
1100
+ children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1101
+ })]
977
1102
  }),
978
- /* @__PURE__ */ x("p", {
1103
+ /* @__PURE__ */ T("div", {
979
1104
  style: {
980
- fontSize: "var(--font-size-body-sm)",
981
- color: "var(--color-text-muted)",
982
- marginBottom: "var(--space-controlGap)"
1105
+ flex: "1 1 auto",
1106
+ minHeight: 0,
1107
+ overflowY: "auto",
1108
+ padding: "var(--space-cardPadding)",
1109
+ display: "flex",
1110
+ flexDirection: "column",
1111
+ gap: "var(--space-controlGap)"
983
1112
  },
984
- children: o("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
985
- }),
986
- /* @__PURE__ */ x("textarea", {
987
- value: I,
988
- onChange: (e) => L(e.target.value),
989
- maxLength: 2e3,
990
- rows: 4,
991
- placeholder: o("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
992
- style: {
993
- width: "100%",
994
- resize: "vertical",
995
- padding: "var(--space-inputPadding, 8px)",
996
- borderRadius: "var(--radius-input)",
997
- border: "1px solid var(--color-border)",
998
- backgroundColor: "var(--color-bg-canvas)",
999
- color: "var(--color-text-primary)",
1000
- fontSize: "var(--font-size-body-sm)",
1001
- marginBottom: "var(--space-controlGap)"
1002
- }
1113
+ children: [/* @__PURE__ */ w(n, {
1114
+ emphasis: "muted",
1115
+ padding: "compact",
1116
+ headingLevel: 3,
1117
+ title: V.generatedSpec?.name || "Current proposal",
1118
+ description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1119
+ icon: /* @__PURE__ */ w(v, { className: "h-icon-sm w-icon-sm" })
1120
+ }), /* @__PURE__ */ T("div", {
1121
+ style: {
1122
+ display: "flex",
1123
+ flexDirection: "column",
1124
+ gap: "var(--space-controlGap)"
1125
+ },
1126
+ children: [/* @__PURE__ */ w("label", {
1127
+ htmlFor: "refine-input",
1128
+ style: {
1129
+ display: "block",
1130
+ fontSize: "var(--font-size-body-sm)",
1131
+ fontWeight: "var(--font-weight-medium)",
1132
+ color: "var(--color-text-primary)"
1133
+ },
1134
+ children: "What should change?"
1135
+ }), /* @__PURE__ */ w("textarea", {
1136
+ id: "refine-input",
1137
+ value: U,
1138
+ onChange: (e) => W(e.target.value),
1139
+ maxLength: 2e3,
1140
+ rows: 4,
1141
+ placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1142
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1143
+ style: {
1144
+ width: "100%",
1145
+ maxWidth: "100%",
1146
+ resize: "vertical",
1147
+ padding: "var(--space-controlGap) var(--space-formGap)",
1148
+ borderRadius: "var(--radius-input)",
1149
+ border: "1px solid var(--color-border-default)",
1150
+ backgroundColor: "var(--color-bg-canvas)",
1151
+ color: "var(--color-text-primary)",
1152
+ fontSize: "var(--font-size-body-md)"
1153
+ }
1154
+ })]
1155
+ })]
1003
1156
  }),
1004
- /* @__PURE__ */ S("div", {
1157
+ /* @__PURE__ */ T("div", {
1005
1158
  style: {
1006
1159
  display: "flex",
1007
1160
  justifyContent: "flex-end",
1008
- gap: 8,
1009
- flexWrap: "wrap"
1161
+ flexWrap: "wrap",
1162
+ gap: "var(--space-controlGap)",
1163
+ padding: "var(--space-cardPadding)",
1164
+ borderTop: "1px solid var(--color-border-subtle)"
1010
1165
  },
1011
- children: [/* @__PURE__ */ x("button", {
1012
- onClick: () => F(null),
1166
+ children: [/* @__PURE__ */ w("button", {
1167
+ type: "button",
1168
+ onClick: () => H(null),
1169
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1170
+ style: O,
1171
+ children: l("bigconsole.insights.actions.cancel", "Cancel")
1172
+ }), /* @__PURE__ */ T("button", {
1173
+ type: "button",
1174
+ onClick: () => void Le(),
1175
+ disabled: !U.trim() || F.has(V.id),
1176
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1013
1177
  style: {
1014
- padding: "8px 16px",
1015
- borderRadius: "var(--radius-button)",
1016
- border: "1px solid var(--color-border)",
1017
- backgroundColor: "transparent",
1018
- color: "var(--color-text-primary)",
1019
- fontSize: "var(--font-size-body-sm)",
1020
- cursor: "pointer"
1021
- },
1022
- children: o("bigconsole.insights.actions.cancel", "Cancel")
1023
- }), /* @__PURE__ */ S("button", {
1024
- onClick: () => void Te(),
1025
- disabled: !I.trim() || A.has(P.id),
1026
- style: {
1027
- display: "flex",
1028
- alignItems: "center",
1029
- gap: 6,
1030
- padding: "8px 16px",
1031
- borderRadius: "var(--radius-button)",
1032
- border: "none",
1033
- backgroundColor: "var(--color-action-primary-bg)",
1034
- color: "var(--color-action-primary-text)",
1035
- fontSize: "var(--font-size-body-sm)",
1036
- cursor: !I.trim() || A.has(P.id) ? "not-allowed" : "pointer",
1037
- opacity: I.trim() ? 1 : .6
1178
+ ...k,
1179
+ cursor: !U.trim() || F.has(V.id) ? "not-allowed" : "pointer",
1180
+ opacity: U.trim() ? 1 : .6
1038
1181
  },
1039
- children: [A.has(P.id) ? /* @__PURE__ */ x(m, {
1182
+ children: [F.has(V.id) ? /* @__PURE__ */ w(_, {
1183
+ size: 14,
1184
+ className: "animate-spin",
1185
+ "aria-hidden": "true"
1186
+ }) : /* @__PURE__ */ w(y, {
1040
1187
  size: 14,
1041
- className: "animate-spin"
1042
- }) : /* @__PURE__ */ x(g, { size: 14 }), o("bigconsole.insights.refine.apply", "Apply refinement")]
1188
+ "aria-hidden": "true"
1189
+ }), l("bigconsole.insights.refine.apply", "Apply refinement")]
1043
1190
  })]
1044
1191
  })
1045
1192
  ]
@@ -1049,6 +1196,6 @@ var E = o(function() {
1049
1196
  });
1050
1197
  });
1051
1198
  //#endregion
1052
- export { E as InsightsPage, E as default };
1199
+ export { R as InsightsPage, R as default };
1053
1200
 
1054
1201
  //# sourceMappingURL=InsightsPage.js.map