@burdenoff/microfe-bigconsole 2026.805.2 → 2026.812.1

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