drizzle-cube 0.4.13 → 0.4.14

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 (116) hide show
  1. package/README.md +1 -0
  2. package/dist/adapters/express/index.cjs +6 -6
  3. package/dist/adapters/express/index.js +73 -72
  4. package/dist/adapters/fastify/index.cjs +5 -5
  5. package/dist/adapters/fastify/index.js +110 -109
  6. package/dist/adapters/{handler-CQkIwtxp.js → handler-DZnCbydH.js} +719 -272
  7. package/dist/adapters/handler-ZDYlokiM.cjs +25 -0
  8. package/dist/adapters/hono/index.cjs +6 -6
  9. package/dist/adapters/hono/index.js +121 -120
  10. package/dist/adapters/nextjs/index.cjs +5 -5
  11. package/dist/adapters/nextjs/index.js +92 -91
  12. package/dist/client/charts.js +67 -59
  13. package/dist/client/charts.js.map +1 -1
  14. package/dist/client/chunks/{RetentionCombinedChart-CEI8KQ3t.js → RetentionCombinedChart-CLq89aOJ.js} +2 -2
  15. package/dist/client/chunks/{RetentionCombinedChart-CEI8KQ3t.js.map → RetentionCombinedChart-CLq89aOJ.js.map} +1 -1
  16. package/dist/client/chunks/{analysis-builder-BMmWeFPr.js → analysis-builder-C5e52Z3p.js} +419 -411
  17. package/dist/client/chunks/analysis-builder-C5e52Z3p.js.map +1 -0
  18. package/dist/client/chunks/{analysis-builder-shared-D56zYeV0.js → analysis-builder-shared-EnM-8plh.js} +2 -2
  19. package/dist/client/chunks/{analysis-builder-shared-D56zYeV0.js.map → analysis-builder-shared-EnM-8plh.js.map} +1 -1
  20. package/dist/client/chunks/{chart-activity-grid-CE7xGFQo.js → chart-activity-grid-CPGcTSuh.js} +2 -2
  21. package/dist/client/chunks/{chart-activity-grid-CE7xGFQo.js.map → chart-activity-grid-CPGcTSuh.js.map} +1 -1
  22. package/dist/client/chunks/{chart-area-BJAgusst.js → chart-area-ByJQ7NZd.js} +3 -3
  23. package/dist/client/chunks/{chart-area-BJAgusst.js.map → chart-area-ByJQ7NZd.js.map} +1 -1
  24. package/dist/client/chunks/{chart-bar-Blypx8O4.js → chart-bar-dj14frMt.js} +2 -2
  25. package/dist/client/chunks/{chart-bar-Blypx8O4.js.map → chart-bar-dj14frMt.js.map} +1 -1
  26. package/dist/client/chunks/chart-box-plot-ZatBpatq.js +322 -0
  27. package/dist/client/chunks/chart-box-plot-ZatBpatq.js.map +1 -0
  28. package/dist/client/chunks/{chart-bubble-Bf42A1-B.js → chart-bubble-CemotLx-.js} +2 -2
  29. package/dist/client/chunks/{chart-bubble-Bf42A1-B.js.map → chart-bubble-CemotLx-.js.map} +1 -1
  30. package/dist/client/chunks/chart-candlestick-BIR4uGGt.js +269 -0
  31. package/dist/client/chunks/chart-candlestick-BIR4uGGt.js.map +1 -0
  32. package/dist/client/chunks/chart-config-box-plot-D_E_SSc2.js +38 -0
  33. package/dist/client/chunks/chart-config-box-plot-D_E_SSc2.js.map +1 -0
  34. package/dist/client/chunks/chart-config-candlestick-CRCpD43-.js +70 -0
  35. package/dist/client/chunks/chart-config-candlestick-CRCpD43-.js.map +1 -0
  36. package/dist/client/chunks/chart-config-gauge-CQx9w3d4.js +64 -0
  37. package/dist/client/chunks/chart-config-gauge-CQx9w3d4.js.map +1 -0
  38. package/dist/client/chunks/chart-config-measure-profile-ZYaMrtws.js +70 -0
  39. package/dist/client/chunks/chart-config-measure-profile-ZYaMrtws.js.map +1 -0
  40. package/dist/client/chunks/chart-config-waterfall-DTyXV_fo.js +60 -0
  41. package/dist/client/chunks/chart-config-waterfall-DTyXV_fo.js.map +1 -0
  42. package/dist/client/chunks/{chart-data-table-Ba_6tuJw.js → chart-data-table-D5G8nMnb.js} +2 -2
  43. package/dist/client/chunks/{chart-data-table-Ba_6tuJw.js.map → chart-data-table-D5G8nMnb.js.map} +1 -1
  44. package/dist/client/chunks/{chart-funnel-C9kenCpp.js → chart-funnel-dofnhD24.js} +2 -2
  45. package/dist/client/chunks/{chart-funnel-C9kenCpp.js.map → chart-funnel-dofnhD24.js.map} +1 -1
  46. package/dist/client/chunks/chart-gauge-CKJJ8m3b.js +374 -0
  47. package/dist/client/chunks/chart-gauge-CKJJ8m3b.js.map +1 -0
  48. package/dist/client/chunks/{chart-heat-map-CYGemyPB.js → chart-heat-map-BVuPUKHT.js} +2 -2
  49. package/dist/client/chunks/{chart-heat-map-CYGemyPB.js.map → chart-heat-map-BVuPUKHT.js.map} +1 -1
  50. package/dist/client/chunks/{chart-kpi-delta-D9XJoKuA.js → chart-kpi-delta-Dgg2eYRl.js} +3 -3
  51. package/dist/client/chunks/{chart-kpi-delta-D9XJoKuA.js.map → chart-kpi-delta-Dgg2eYRl.js.map} +1 -1
  52. package/dist/client/chunks/{chart-kpi-number-C29Vj2g8.js → chart-kpi-number-DkoO99c1.js} +2 -2
  53. package/dist/client/chunks/{chart-kpi-number-C29Vj2g8.js.map → chart-kpi-number-DkoO99c1.js.map} +1 -1
  54. package/dist/client/chunks/{chart-kpi-text-CgjjrurK.js → chart-kpi-text-1O6_lmz7.js} +3 -3
  55. package/dist/client/chunks/{chart-kpi-text-CgjjrurK.js.map → chart-kpi-text-1O6_lmz7.js.map} +1 -1
  56. package/dist/client/chunks/{chart-line-zi6olZet.js → chart-line-DzyZkugh.js} +3 -3
  57. package/dist/client/chunks/{chart-line-zi6olZet.js.map → chart-line-DzyZkugh.js.map} +1 -1
  58. package/dist/client/chunks/chart-measure-profile-C2IkBG3V.js +114 -0
  59. package/dist/client/chunks/chart-measure-profile-C2IkBG3V.js.map +1 -0
  60. package/dist/client/chunks/{chart-pie-C4SuxKSN.js → chart-pie-akbfRfb9.js} +2 -2
  61. package/dist/client/chunks/{chart-pie-C4SuxKSN.js.map → chart-pie-akbfRfb9.js.map} +1 -1
  62. package/dist/client/chunks/{chart-radar-BW3Z_-Ly.js → chart-radar-BaN-Kjww.js} +2 -2
  63. package/dist/client/chunks/{chart-radar-BW3Z_-Ly.js.map → chart-radar-BaN-Kjww.js.map} +1 -1
  64. package/dist/client/chunks/{chart-radial-bar-0Fa3aeP5.js → chart-radial-bar-DpptEL3s.js} +2 -2
  65. package/dist/client/chunks/{chart-radial-bar-0Fa3aeP5.js.map → chart-radial-bar-DpptEL3s.js.map} +1 -1
  66. package/dist/client/chunks/{chart-sankey-DBghfbg1.js → chart-sankey-CG-3hHmX.js} +2 -2
  67. package/dist/client/chunks/{chart-sankey-DBghfbg1.js.map → chart-sankey-CG-3hHmX.js.map} +1 -1
  68. package/dist/client/chunks/{chart-scatter-DOVu1TNq.js → chart-scatter-l_yTVxF3.js} +2 -2
  69. package/dist/client/chunks/{chart-scatter-DOVu1TNq.js.map → chart-scatter-l_yTVxF3.js.map} +1 -1
  70. package/dist/client/chunks/{chart-sunburst-LfNthFlZ.js → chart-sunburst-KhDcKhmZ.js} +2 -2
  71. package/dist/client/chunks/{chart-sunburst-LfNthFlZ.js.map → chart-sunburst-KhDcKhmZ.js.map} +1 -1
  72. package/dist/client/chunks/{chart-tree-map-DZtQPyWX.js → chart-tree-map-CBbiaBXV.js} +2 -2
  73. package/dist/client/chunks/{chart-tree-map-DZtQPyWX.js.map → chart-tree-map-CBbiaBXV.js.map} +1 -1
  74. package/dist/client/chunks/chart-waterfall-CX3vx_lI.js +191 -0
  75. package/dist/client/chunks/chart-waterfall-CX3vx_lI.js.map +1 -0
  76. package/dist/client/chunks/{charts-core-DmGfleFz.js → charts-core-CU9u_HtL.js} +2 -1
  77. package/dist/client/chunks/charts-core-CU9u_HtL.js.map +1 -0
  78. package/dist/client/chunks/{charts-loader-CH0_S06T.js → charts-loader-AW3T1nv5.js} +58 -42
  79. package/dist/client/chunks/charts-loader-AW3T1nv5.js.map +1 -0
  80. package/dist/client/chunks/{components-ClQziOcT.js → components-BkeSy9xv.js} +4 -4
  81. package/dist/client/chunks/components-BkeSy9xv.js.map +1 -0
  82. package/dist/client/components/AgenticNotebook/AgentChatPanel.d.ts +10 -0
  83. package/dist/client/components/AgenticNotebook/ChatMessage.d.ts +2 -0
  84. package/dist/client/components/AgenticNotebook/index.d.ts +11 -1
  85. package/dist/client/components/LoadingIndicator.d.ts +2 -2
  86. package/dist/client/components/charts/BoxPlotChart.config.d.ts +1 -7
  87. package/dist/client/components/charts/CandlestickChart.config.d.ts +5 -0
  88. package/dist/client/components/charts/CandlestickChart.d.ts +4 -0
  89. package/dist/client/components/charts/GaugeChart.config.d.ts +5 -0
  90. package/dist/client/components/charts/GaugeChart.d.ts +4 -0
  91. package/dist/client/components/charts/MeasureProfileChart.config.d.ts +5 -0
  92. package/dist/client/components/charts/MeasureProfileChart.d.ts +4 -0
  93. package/dist/client/components/charts/WaterfallChart.config.d.ts +5 -0
  94. package/dist/client/components/charts/WaterfallChart.d.ts +4 -0
  95. package/dist/client/components/charts/index.d.ts +4 -0
  96. package/dist/client/components.js +1 -1
  97. package/dist/client/hooks/useAgentChat.d.ts +20 -2
  98. package/dist/client/index.js +583 -522
  99. package/dist/client/index.js.map +1 -1
  100. package/dist/client/styles.css +1 -1
  101. package/dist/client/types.d.ts +19 -1
  102. package/dist/client/utils.js +4 -4
  103. package/dist/client-bundle-stats.html +1 -1
  104. package/dist/server/index.cjs +47 -45
  105. package/dist/server/index.d.ts +37 -0
  106. package/dist/server/index.js +1745 -1298
  107. package/package.json +4 -1
  108. package/dist/adapters/handler-dnkqpznh.cjs +0 -23
  109. package/dist/client/chunks/analysis-builder-BMmWeFPr.js.map +0 -1
  110. package/dist/client/chunks/chart-box-plot-Dja4LS3O.js +0 -313
  111. package/dist/client/chunks/chart-box-plot-Dja4LS3O.js.map +0 -1
  112. package/dist/client/chunks/chart-config-box-plot-D3DA7_pr.js +0 -85
  113. package/dist/client/chunks/chart-config-box-plot-D3DA7_pr.js.map +0 -1
  114. package/dist/client/chunks/charts-core-DmGfleFz.js.map +0 -1
  115. package/dist/client/chunks/charts-loader-CH0_S06T.js.map +0 -1
  116. package/dist/client/chunks/components-ClQziOcT.js.map +0 -1
@@ -3,6 +3,16 @@ interface AgentChatPanelProps {
3
3
  agentEndpoint?: string;
4
4
  agentApiKey?: string;
5
5
  onClear?: () => void;
6
+ /** Called when the agent saves a dashboard. Presence enables the "Save as Dashboard" button. */
7
+ onDashboardSaved?: (data: {
8
+ title: string;
9
+ description?: string;
10
+ dashboardConfig: any;
11
+ }) => void;
12
+ /** Custom loading indicator for tool call spinners */
13
+ loadingComponent?: React.ReactNode;
14
+ /** Initial prompt to auto-send on mount */
15
+ initialPrompt?: string;
6
16
  }
7
17
  declare const AgentChatPanel: React.NamedExoticComponent<AgentChatPanelProps>;
8
18
  export default AgentChatPanel;
@@ -2,6 +2,8 @@ import { default as React } from 'react';
2
2
  import { ChatMessage as ChatMessageType } from '../../stores/notebookStore';
3
3
  interface ChatMessageProps {
4
4
  message: ChatMessageType;
5
+ /** Custom loading indicator for tool call spinners */
6
+ loadingComponent?: React.ReactNode;
5
7
  }
6
8
  declare const ChatMessage: React.NamedExoticComponent<ChatMessageProps>;
7
9
  export default ChatMessage;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  import { NotebookConfig } from '../../stores/notebookStore';
3
3
  import { ColorPalette } from '../../types';
4
4
  export interface AgenticNotebookProps {
@@ -14,8 +14,18 @@ export interface AgenticNotebookProps {
14
14
  onDirtyStateChange?: (isDirty: boolean) => void;
15
15
  /** Color palette for charts */
16
16
  colorPalette?: ColorPalette;
17
+ /** Called when the agent saves a dashboard. Presence enables the "Save as Dashboard" button. */
18
+ onDashboardSaved?: (data: {
19
+ title: string;
20
+ description?: string;
21
+ dashboardConfig: any;
22
+ }) => void;
23
+ /** Custom loading indicator for tool call spinners (defaults to LoadingIndicator) */
24
+ loadingComponent?: ReactNode;
17
25
  /** Additional CSS class name */
18
26
  className?: string;
27
+ /** Initial prompt to auto-send on mount */
28
+ initialPrompt?: string;
19
29
  }
20
30
  /**
21
31
  * AgenticNotebook - AI-powered data analysis notebook
@@ -8,8 +8,8 @@
8
8
  * custom loadingComponent prop.
9
9
  */
10
10
  export interface LoadingIndicatorProps {
11
- /** Size variant: 'sm' (24px), 'md' (32px), 'lg' (48px) */
12
- size?: 'sm' | 'md' | 'lg';
11
+ /** Size variant: 'xs' (12px), 'sm' (24px), 'md' (32px), 'lg' (48px) */
12
+ size?: 'xs' | 'sm' | 'md' | 'lg';
13
13
  /** Additional CSS classes */
14
14
  className?: string;
15
15
  }
@@ -1,11 +1,5 @@
1
1
  import { ChartTypeConfig } from '../../charts/chartConfigs';
2
2
  /**
3
- * Configuration for the box plot chart type.
4
- * Visualises the statistical distribution of a measure across groupings.
5
- *
6
- * Two modes:
7
- * - 5-measure: explicit min/q1/median/q3/max fields (displayConfig)
8
- * - 3-measure: avg + stddev + median fields (displayConfig), draws mean ± σ whiskers
9
- * - Auto: single yAxis measure shown as a point (degenerate box)
3
+ * Configuration for the box plot chart type
10
4
  */
11
5
  export declare const boxPlotChartConfig: ChartTypeConfig;
@@ -0,0 +1,5 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ /**
3
+ * Configuration for the candlestick chart type
4
+ */
5
+ export declare const candlestickChartConfig: ChartTypeConfig;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ declare const CandlestickChart: React.NamedExoticComponent<ChartProps>;
4
+ export default CandlestickChart;
@@ -0,0 +1,5 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ /**
3
+ * Configuration for the gauge chart type
4
+ */
5
+ export declare const gaugeChartConfig: ChartTypeConfig;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ declare const GaugeChart: React.NamedExoticComponent<ChartProps>;
4
+ export default GaugeChart;
@@ -0,0 +1,5 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ /**
3
+ * Configuration for the measure profile chart type
4
+ */
5
+ export declare const measureProfileChartConfig: ChartTypeConfig;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ declare const MeasureProfileChart: React.NamedExoticComponent<ChartProps>;
4
+ export default MeasureProfileChart;
@@ -0,0 +1,5 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ /**
3
+ * Configuration for the waterfall chart type
4
+ */
5
+ export declare const waterfallChartConfig: ChartTypeConfig;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ declare const WaterfallChart: React.NamedExoticComponent<ChartProps>;
4
+ export default WaterfallChart;
@@ -19,3 +19,7 @@ export { default as KpiDelta } from './KpiDelta';
19
19
  export { default as KpiText } from './KpiText';
20
20
  export { default as MarkdownChart } from './MarkdownChart';
21
21
  export { default as BoxPlotChart } from './BoxPlotChart';
22
+ export { default as WaterfallChart } from './WaterfallChart';
23
+ export { default as CandlestickChart } from './CandlestickChart';
24
+ export { default as MeasureProfileChart } from './MeasureProfileChart';
25
+ export { default as GaugeChart } from './GaugeChart';
@@ -1,4 +1,4 @@
1
- import { ab as e, a as t, A as o, g as r, b as i, M as l, c as d } from "./chunks/components-ClQziOcT.js";
1
+ import { ab as e, a as t, A as o, g as r, b as i, M as l, c as d } from "./chunks/components-BkeSy9xv.js";
2
2
  import { c as b, d as y, b as c, a as P, g, v as p } from "./chunks/index-CApFCBF9.js";
3
3
  export {
4
4
  e as AnalysisDisplayConfigPanel,
@@ -8,6 +8,12 @@ export interface UseAgentChatOptions {
8
8
  onAddPortlet: (data: PortletBlock) => void;
9
9
  /** Called when agent adds a markdown block to the notebook */
10
10
  onAddMarkdown: (data: MarkdownBlock) => void;
11
+ /** Called when the agent saves a dashboard configuration */
12
+ onDashboardSaved?: (data: {
13
+ title: string;
14
+ description?: string;
15
+ dashboardConfig: any;
16
+ }) => void;
11
17
  /** Called when streaming text arrives */
12
18
  onTextDelta: (text: string) => void;
13
19
  /** Called when a tool call starts */
@@ -21,9 +27,21 @@ export interface UseAgentChatOptions {
21
27
  /** Called on error */
22
28
  onError: (message: string) => void;
23
29
  }
30
+ /** Simplified message format for sending conversation history */
31
+ export interface AgentHistoryMessage {
32
+ role: 'user' | 'assistant';
33
+ content: string;
34
+ toolCalls?: Array<{
35
+ id: string;
36
+ name: string;
37
+ input?: unknown;
38
+ result?: unknown;
39
+ status: 'running' | 'complete' | 'error';
40
+ }>;
41
+ }
24
42
  export interface UseAgentChatResult {
25
- /** Send a message to the agent */
26
- sendMessage: (content: string, sessionId?: string | null) => Promise<void>;
43
+ /** Send a message to the agent, optionally with prior conversation history */
44
+ sendMessage: (content: string, sessionId?: string | null, history?: AgentHistoryMessage[]) => Promise<void>;
27
45
  /** Whether the agent is currently streaming */
28
46
  isStreaming: boolean;
29
47
  /** Abort the current stream */