@prismiq/react 0.2.0 → 0.2.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 (39) hide show
  1. package/dist/{ChatBubble-ARocmvZD.d.cts → ChatBubble-3mFpV7yX.d.ts} +4 -2
  2. package/dist/{ChatBubble-BN_CjIpk.d.ts → ChatBubble-CMkEupzn.d.cts} +4 -2
  3. package/dist/{DashboardDialog-Z-HypxmG.d.cts → DashboardDialog-DMmZ3bnf.d.cts} +1 -1
  4. package/dist/{DashboardDialog-UhUGXx2h.d.ts → DashboardDialog-RlcPkdMt.d.ts} +1 -1
  5. package/dist/charts/index.d.cts +2 -2
  6. package/dist/charts/index.d.ts +2 -2
  7. package/dist/{chunk-JBJ5LEAG.js → chunk-F6QYNQEW.js} +12 -4
  8. package/dist/chunk-F6QYNQEW.js.map +1 -0
  9. package/dist/{chunk-FKXCINUF.cjs → chunk-N6I3QOHG.cjs} +201 -193
  10. package/dist/chunk-N6I3QOHG.cjs.map +1 -0
  11. package/dist/{chunk-PG7QBH3G.cjs → chunk-NXXKG4GN.cjs} +50 -15
  12. package/dist/chunk-NXXKG4GN.cjs.map +1 -0
  13. package/dist/{chunk-GELI7MDZ.js → chunk-VEFYFB5H.js} +50 -15
  14. package/dist/chunk-VEFYFB5H.js.map +1 -0
  15. package/dist/components/index.cjs +56 -56
  16. package/dist/components/index.d.cts +2 -2
  17. package/dist/components/index.d.ts +2 -2
  18. package/dist/components/index.js +1 -1
  19. package/dist/dashboard/index.cjs +34 -34
  20. package/dist/dashboard/index.d.cts +3 -3
  21. package/dist/dashboard/index.d.ts +3 -3
  22. package/dist/dashboard/index.js +2 -2
  23. package/dist/export/index.d.cts +1 -1
  24. package/dist/export/index.d.ts +1 -1
  25. package/dist/{index-B8DelfpL.d.cts → index-BA2VUhgN.d.cts} +1 -1
  26. package/dist/{index-RbfYPQD_.d.ts → index-BPo89ZAj.d.ts} +1 -1
  27. package/dist/index.cjs +100 -100
  28. package/dist/index.d.cts +11 -8
  29. package/dist/index.d.ts +11 -8
  30. package/dist/index.js +4 -4
  31. package/dist/{types-ccB9Ps3k.d.cts → types-BaI6sSAG.d.cts} +20 -2
  32. package/dist/{types-ccB9Ps3k.d.ts → types-BaI6sSAG.d.ts} +20 -2
  33. package/dist/utils/index.d.cts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/chunk-FKXCINUF.cjs.map +0 -1
  37. package/dist/chunk-GELI7MDZ.js.map +0 -1
  38. package/dist/chunk-JBJ5LEAG.js.map +0 -1
  39. package/dist/chunk-PG7QBH3G.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, ReactElement, SVGAttributes, Component, ErrorInfo } from 'react';
3
- import { c as TableSchema, s as ColumnSchema, b as QueryTable, t as ColumnSelection, D as DatabaseSchema, F as FilterDefinition, v as FilterOperator, x as SortDefinition, A as AggregationType, Q as QueryResult, a as QueryDefinition, k as SavedQuery, o as ChatMessage } from './types-ccB9Ps3k.cjs';
3
+ import { c as TableSchema, t as ColumnSchema, b as QueryTable, u as ColumnSelection, D as DatabaseSchema, F as FilterDefinition, w as FilterOperator, y as SortDefinition, A as AggregationType, Q as QueryResult, a as QueryDefinition, k as SavedQuery, o as ChatMessage, p as WidgetContext } from './types-BaI6sSAG.js';
4
4
 
5
5
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
6
6
  /** Button visual style. */
@@ -1318,6 +1318,8 @@ interface ChatPanelProps {
1318
1318
  currentSql: string | null;
1319
1319
  /** Callback when the user wants to apply SQL to the editor. */
1320
1320
  onApplySql: (sql: string) => void;
1321
+ /** Optional widget context for targeted SQL generation. */
1322
+ widgetContext?: WidgetContext;
1321
1323
  }
1322
1324
 
1323
1325
  /**
@@ -1327,7 +1329,7 @@ interface ChatPanelProps {
1327
1329
  * "Apply SQL" button, and input field.
1328
1330
  */
1329
1331
 
1330
- declare function ChatPanel({ currentSql, onApplySql }: ChatPanelProps): JSX.Element;
1332
+ declare function ChatPanel({ currentSql, onApplySql, widgetContext }: ChatPanelProps): JSX.Element;
1331
1333
 
1332
1334
  /**
1333
1335
  * Chat message bubble component.
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, ReactElement, SVGAttributes, Component, ErrorInfo } from 'react';
3
- import { c as TableSchema, s as ColumnSchema, b as QueryTable, t as ColumnSelection, D as DatabaseSchema, F as FilterDefinition, v as FilterOperator, x as SortDefinition, A as AggregationType, Q as QueryResult, a as QueryDefinition, k as SavedQuery, o as ChatMessage } from './types-ccB9Ps3k.js';
3
+ import { c as TableSchema, t as ColumnSchema, b as QueryTable, u as ColumnSelection, D as DatabaseSchema, F as FilterDefinition, w as FilterOperator, y as SortDefinition, A as AggregationType, Q as QueryResult, a as QueryDefinition, k as SavedQuery, o as ChatMessage, p as WidgetContext } from './types-BaI6sSAG.cjs';
4
4
 
5
5
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
6
6
  /** Button visual style. */
@@ -1318,6 +1318,8 @@ interface ChatPanelProps {
1318
1318
  currentSql: string | null;
1319
1319
  /** Callback when the user wants to apply SQL to the editor. */
1320
1320
  onApplySql: (sql: string) => void;
1321
+ /** Optional widget context for targeted SQL generation. */
1322
+ widgetContext?: WidgetContext;
1321
1323
  }
1322
1324
 
1323
1325
  /**
@@ -1327,7 +1329,7 @@ interface ChatPanelProps {
1327
1329
  * "Apply SQL" button, and input field.
1328
1330
  */
1329
1331
 
1330
- declare function ChatPanel({ currentSql, onApplySql }: ChatPanelProps): JSX.Element;
1332
+ declare function ChatPanel({ currentSql, onApplySql, widgetContext }: ChatPanelProps): JSX.Element;
1331
1333
 
1332
1334
  /**
1333
1335
  * Chat message bubble component.
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
- import { a as QueryDefinition, Q as QueryResult, D as DatabaseSchema, e as Dashboard$2, f as DashboardCreate, g as DashboardUpdate } from './types-ccB9Ps3k.cjs';
3
+ import { a as QueryDefinition, Q as QueryResult, D as DatabaseSchema, e as Dashboard$2, f as DashboardCreate, g as DashboardUpdate } from './types-BaI6sSAG.cjs';
4
4
 
5
5
  /**
6
6
  * Dashboard type definitions for Prismiq.
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
- import { a as QueryDefinition, Q as QueryResult, D as DatabaseSchema, e as Dashboard$2, f as DashboardCreate, g as DashboardUpdate } from './types-ccB9Ps3k.js';
3
+ import { a as QueryDefinition, Q as QueryResult, D as DatabaseSchema, e as Dashboard$2, f as DashboardCreate, g as DashboardUpdate } from './types-BaI6sSAG.js';
4
4
 
5
5
  /**
6
6
  * Dashboard type definitions for Prismiq.
@@ -1,2 +1,2 @@
1
- export { A as AreaChart, c as AreaChartProps, d as AxisFormat, B as BarChart, e as BarChartProps, f as BaseChartProps, g as ChartClickParams, C as ChartDataOptions, h as ChartDataPoint, b as ChartDataResult, i as ChartSeries, j as ChartSuggestion, k as ChartType, E as EChartWrapper, l as EChartWrapperProps, L as LegendPosition, m as LineChart, n as LineChartProps, M as MetricCard, o as MetricCardProps, p as PieChart, q as PieChartProps, R as ReferenceLineConfig, S as ScatterChart, r as ScatterChartProps, s as Sparkline, t as SparklineProps, u as TrendConfig, v as TrendIndicator, w as TrendIndicatorProps, U as adjustColorOpacity, x as applyThemeToOption, y as createChartTheme, V as createEmptyStateGraphic, z as createGradientColor, W as createMarkLines, F as dataPointsToChartData, G as formatAxisLabel, H as formatCompact, I as formatMetricValue, J as getChartColors, K as isChartDataEmpty, X as isQueryResult, N as queryResultToChartData, O as suggestChartType, Q as toChartData } from '../index-B8DelfpL.cjs';
2
- import '../types-ccB9Ps3k.cjs';
1
+ export { A as AreaChart, c as AreaChartProps, d as AxisFormat, B as BarChart, e as BarChartProps, f as BaseChartProps, g as ChartClickParams, C as ChartDataOptions, h as ChartDataPoint, b as ChartDataResult, i as ChartSeries, j as ChartSuggestion, k as ChartType, E as EChartWrapper, l as EChartWrapperProps, L as LegendPosition, m as LineChart, n as LineChartProps, M as MetricCard, o as MetricCardProps, p as PieChart, q as PieChartProps, R as ReferenceLineConfig, S as ScatterChart, r as ScatterChartProps, s as Sparkline, t as SparklineProps, u as TrendConfig, v as TrendIndicator, w as TrendIndicatorProps, U as adjustColorOpacity, x as applyThemeToOption, y as createChartTheme, V as createEmptyStateGraphic, z as createGradientColor, W as createMarkLines, F as dataPointsToChartData, G as formatAxisLabel, H as formatCompact, I as formatMetricValue, J as getChartColors, K as isChartDataEmpty, X as isQueryResult, N as queryResultToChartData, O as suggestChartType, Q as toChartData } from '../index-BA2VUhgN.cjs';
2
+ import '../types-BaI6sSAG.cjs';
@@ -1,2 +1,2 @@
1
- export { A as AreaChart, c as AreaChartProps, d as AxisFormat, B as BarChart, e as BarChartProps, f as BaseChartProps, g as ChartClickParams, C as ChartDataOptions, h as ChartDataPoint, b as ChartDataResult, i as ChartSeries, j as ChartSuggestion, k as ChartType, E as EChartWrapper, l as EChartWrapperProps, L as LegendPosition, m as LineChart, n as LineChartProps, M as MetricCard, o as MetricCardProps, p as PieChart, q as PieChartProps, R as ReferenceLineConfig, S as ScatterChart, r as ScatterChartProps, s as Sparkline, t as SparklineProps, u as TrendConfig, v as TrendIndicator, w as TrendIndicatorProps, U as adjustColorOpacity, x as applyThemeToOption, y as createChartTheme, V as createEmptyStateGraphic, z as createGradientColor, W as createMarkLines, F as dataPointsToChartData, G as formatAxisLabel, H as formatCompact, I as formatMetricValue, J as getChartColors, K as isChartDataEmpty, X as isQueryResult, N as queryResultToChartData, O as suggestChartType, Q as toChartData } from '../index-RbfYPQD_.js';
2
- import '../types-ccB9Ps3k.js';
1
+ export { A as AreaChart, c as AreaChartProps, d as AxisFormat, B as BarChart, e as BarChartProps, f as BaseChartProps, g as ChartClickParams, C as ChartDataOptions, h as ChartDataPoint, b as ChartDataResult, i as ChartSeries, j as ChartSuggestion, k as ChartType, E as EChartWrapper, l as EChartWrapperProps, L as LegendPosition, m as LineChart, n as LineChartProps, M as MetricCard, o as MetricCardProps, p as PieChart, q as PieChartProps, R as ReferenceLineConfig, S as ScatterChart, r as ScatterChartProps, s as Sparkline, t as SparklineProps, u as TrendConfig, v as TrendIndicator, w as TrendIndicatorProps, U as adjustColorOpacity, x as applyThemeToOption, y as createChartTheme, V as createEmptyStateGraphic, z as createGradientColor, W as createMarkLines, F as dataPointsToChartData, G as formatAxisLabel, H as formatCompact, I as formatMetricValue, J as getChartColors, K as isChartDataEmpty, X as isQueryResult, N as queryResultToChartData, O as suggestChartType, Q as toChartData } from '../index-BPo89ZAj.js';
2
+ import '../types-BaI6sSAG.js';
@@ -1,5 +1,5 @@
1
1
  import { ScatterChart, PieChart, AreaChart, LineChart, BarChart, MetricCard } from './chunk-FQ23KG6G.js';
2
- import { Dropdown, DropdownItem, Icon, DropdownSeparator, Button, Skeleton, EmptyState, Dialog, Input, Checkbox, DialogFooter, useAnalytics, useCrossFilterOptional, useDebouncedLayoutSave, AutoSaveIndicator, ResultsTable, CrossFilterProvider, useLLMStatus, Tooltip, QueryBuilder, SavedQueryPicker, SchemaExplorer, CustomSQLEditor, ChatPanel, useSchema, Select, CollapsibleSection, ColorPaletteSelector, FilterBuilder, TableSelector, JoinBuilder, TimeSeriesConfig, CalculatedFieldBuilder } from './chunk-GELI7MDZ.js';
2
+ import { Dropdown, DropdownItem, Icon, DropdownSeparator, Button, Skeleton, EmptyState, Dialog, Input, Checkbox, DialogFooter, useAnalytics, useCrossFilterOptional, useDebouncedLayoutSave, AutoSaveIndicator, ResultsTable, CrossFilterProvider, useLLMStatus, Tooltip, QueryBuilder, SavedQueryPicker, SchemaExplorer, CustomSQLEditor, ChatPanel, useSchema, Select, CollapsibleSection, ColorPaletteSelector, FilterBuilder, TableSelector, JoinBuilder, TimeSeriesConfig, CalculatedFieldBuilder } from './chunk-VEFYFB5H.js';
3
3
  import { useTheme } from './chunk-T6STUE7E.js';
4
4
  import { formatRelativeTime, createDateFormatters, pivotQueryResult, parseMarkdownSafe, parseColumnRef } from './chunk-LBE6GIBC.js';
5
5
  import { createContext, forwardRef, useState, useEffect, useCallback, useRef, useMemo, useContext } from 'react';
@@ -5522,6 +5522,13 @@ function WidgetEditorPage({
5522
5522
  }))
5523
5523
  );
5524
5524
  }, [schema]);
5525
+ const widgetContext = useMemo(() => ({
5526
+ widget_type: type,
5527
+ x_axis: config.x_axis,
5528
+ y_axis: config.y_axis,
5529
+ series_column: config.series_column,
5530
+ last_error: previewError?.message
5531
+ }), [type, config.x_axis, config.y_axis, config.series_column, previewError]);
5525
5532
  const containerStyle = {
5526
5533
  display: "flex",
5527
5534
  flexDirection: "column",
@@ -6181,7 +6188,8 @@ function WidgetEditorPage({
6181
6188
  ChatPanel,
6182
6189
  {
6183
6190
  currentSql: rawSql || null,
6184
- onApplySql: handleApplySql
6191
+ onApplySql: handleApplySql,
6192
+ widgetContext
6185
6193
  }
6186
6194
  ) })
6187
6195
  ] })
@@ -7758,5 +7766,5 @@ var DashboardDialog = forwardRef(
7758
7766
  );
7759
7767
 
7760
7768
  export { Dashboard, DashboardCard, DashboardContext, DashboardDialog, DashboardEditor, DashboardLayout, DashboardList, DashboardProvider, DateRangeFilter, EditableDashboardLayout, EditorToolbar, FilterBar, LazyWidget, MultiSelectFilter, SelectFilter, TextFilter, Widget, WidgetContainer, WidgetContent, WidgetEditor, WidgetEditorPage, WidgetHeader, WidgetPalette, WidgetPlaceholder, WidgetPreview, WidgetTypeSelector, useAutoRefresh, useDashboard, useDashboardFilters, useFullscreen, useWidget, useWidgetVisibility };
7761
- //# sourceMappingURL=chunk-JBJ5LEAG.js.map
7762
- //# sourceMappingURL=chunk-JBJ5LEAG.js.map
7769
+ //# sourceMappingURL=chunk-F6QYNQEW.js.map
7770
+ //# sourceMappingURL=chunk-F6QYNQEW.js.map