@bonnard/react 0.1.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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +161 -0
  3. package/dist/bonnard-chart.d.ts +21 -0
  4. package/dist/bonnard-chart.d.ts.map +1 -0
  5. package/dist/charts/area-chart.d.ts +3 -0
  6. package/dist/charts/area-chart.d.ts.map +1 -0
  7. package/dist/charts/bar-chart.d.ts +3 -0
  8. package/dist/charts/bar-chart.d.ts.map +1 -0
  9. package/dist/charts/big-value.d.ts +3 -0
  10. package/dist/charts/big-value.d.ts.map +1 -0
  11. package/dist/charts/data-table.d.ts +3 -0
  12. package/dist/charts/data-table.d.ts.map +1 -0
  13. package/dist/charts/index.d.ts +7 -0
  14. package/dist/charts/index.d.ts.map +1 -0
  15. package/dist/charts/line-chart.d.ts +3 -0
  16. package/dist/charts/line-chart.d.ts.map +1 -0
  17. package/dist/charts/pie-chart.d.ts +3 -0
  18. package/dist/charts/pie-chart.d.ts.map +1 -0
  19. package/dist/context.d.ts +10 -0
  20. package/dist/context.d.ts.map +1 -0
  21. package/dist/dashboard/dashboard-viewer.d.ts +11 -0
  22. package/dist/dashboard/dashboard-viewer.d.ts.map +1 -0
  23. package/dist/dashboard/dashboard.d.ts +8 -0
  24. package/dist/dashboard/dashboard.d.ts.map +1 -0
  25. package/dist/dashboard/index.d.ts +6 -0
  26. package/dist/dashboard/index.d.ts.map +1 -0
  27. package/dist/dashboard/inputs/date-range-input.d.ts +10 -0
  28. package/dist/dashboard/inputs/date-range-input.d.ts.map +1 -0
  29. package/dist/dashboard/inputs/dropdown-input.d.ts +11 -0
  30. package/dist/dashboard/inputs/dropdown-input.d.ts.map +1 -0
  31. package/dist/dashboard/parser.d.ts +9 -0
  32. package/dist/dashboard/parser.d.ts.map +1 -0
  33. package/dist/dashboard/query-load.d.ts +13 -0
  34. package/dist/dashboard/query-load.d.ts.map +1 -0
  35. package/dist/dashboard.d.ts +8 -0
  36. package/dist/dashboard.d.ts.map +1 -0
  37. package/dist/dashboard.js +935 -0
  38. package/dist/data-table-DQKxzbS3.js +985 -0
  39. package/dist/hooks/use-dashboard.d.ts +8 -0
  40. package/dist/hooks/use-dashboard.d.ts.map +1 -0
  41. package/dist/hooks/use-query.d.ts +13 -0
  42. package/dist/hooks/use-query.d.ts.map +1 -0
  43. package/dist/index.d.ts +18 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +142 -0
  46. package/dist/lib/apply-inputs.d.ts +19 -0
  47. package/dist/lib/apply-inputs.d.ts.map +1 -0
  48. package/dist/lib/build-series.d.ts +33 -0
  49. package/dist/lib/build-series.d.ts.map +1 -0
  50. package/dist/lib/date-presets.d.ts +11 -0
  51. package/dist/lib/date-presets.d.ts.map +1 -0
  52. package/dist/lib/echarts-series.d.ts +22 -0
  53. package/dist/lib/echarts-series.d.ts.map +1 -0
  54. package/dist/lib/format-value.d.ts +16 -0
  55. package/dist/lib/format-value.d.ts.map +1 -0
  56. package/dist/lib/types.d.ts +104 -0
  57. package/dist/lib/types.d.ts.map +1 -0
  58. package/dist/provider.d.ts +12 -0
  59. package/dist/provider.d.ts.map +1 -0
  60. package/dist/styles/bonnard.css +68 -0
  61. package/dist/theme/chart-theme.d.ts +76 -0
  62. package/dist/theme/chart-theme.d.ts.map +1 -0
  63. package/dist/theme/use-chart-theme.d.ts +39 -0
  64. package/dist/theme/use-chart-theme.d.ts.map +1 -0
  65. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Bonnard (meal-inc)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # @bonnard/react
2
+
3
+ React components for embedding [Bonnard](https://www.bonnard.dev) charts and dashboards in any React app.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @bonnard/react @bonnard/sdk
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ### 1. Add the provider
14
+
15
+ ```tsx
16
+ import { BonnardProvider } from '@bonnard/react';
17
+ import '@bonnard/react/styles.css';
18
+
19
+ function App() {
20
+ return (
21
+ <BonnardProvider config={{ apiKey: 'bon_pk_...' }}>
22
+ <MyAnalyticsPage />
23
+ </BonnardProvider>
24
+ );
25
+ }
26
+ ```
27
+
28
+ ### 2. Render a chart
29
+
30
+ ```tsx
31
+ import { BarChart } from '@bonnard/react';
32
+
33
+ function RevenueByCategory() {
34
+ return (
35
+ <BarChart
36
+ title="Revenue by Category"
37
+ measures={['revenue']}
38
+ dimensions={['product_category']}
39
+ cube="orders"
40
+ />
41
+ );
42
+ }
43
+ ```
44
+
45
+ ### 3. Use the query hook
46
+
47
+ ```tsx
48
+ import { useBonnardQuery } from '@bonnard/react';
49
+
50
+ function OrderStats() {
51
+ const { data, loading, error } = useBonnardQuery({
52
+ query: {
53
+ cube: 'orders',
54
+ measures: ['revenue', 'count'],
55
+ dimensions: ['status'],
56
+ },
57
+ });
58
+
59
+ if (loading) return <p>Loading...</p>;
60
+ if (error) return <p>Error: {error}</p>;
61
+
62
+ return (
63
+ <ul>
64
+ {data?.map((row, i) => (
65
+ <li key={i}>{row.status}: ${row.revenue}</li>
66
+ ))}
67
+ </ul>
68
+ );
69
+ }
70
+ ```
71
+
72
+ ## Charts
73
+
74
+ All chart components accept data inline or query props:
75
+
76
+ | Component | Description |
77
+ |-----------|-------------|
78
+ | `<BarChart>` | Vertical or horizontal bar chart |
79
+ | `<LineChart>` | Line chart with optional time axis |
80
+ | `<AreaChart>` | Stacked or overlapping area chart |
81
+ | `<PieChart>` | Pie / donut chart |
82
+ | `<BigValue>` | Single KPI number with optional comparison |
83
+ | `<DataTable>` | Sortable, paginated data table |
84
+ | `<BonnardChart>` | Universal renderer — pass a `spec` object |
85
+
86
+ ## Dashboards
87
+
88
+ For rendering full dashboard layouts, use the dashboard sub-entry:
89
+
90
+ ```tsx
91
+ import { Dashboard } from '@bonnard/react/dashboard';
92
+
93
+ // From a saved dashboard
94
+ <Dashboard slug="sales-overview" />
95
+
96
+ // From markdown content
97
+ <Dashboard content={markdownString} />
98
+ ```
99
+
100
+ The dashboard entry adds parser dependencies (gray-matter, remark, rehype). Only import it if you need it — the main entry stays lightweight.
101
+
102
+ ## Theming
103
+
104
+ ### Dark mode
105
+
106
+ ```tsx
107
+ <BonnardProvider config={{ apiKey: '...' }} darkMode={true}>
108
+ ```
109
+
110
+ Options: `true`, `false`, or `'auto'` (default — uses `prefers-color-scheme`).
111
+
112
+ ### Custom colors
113
+
114
+ Override CSS custom properties to match your brand:
115
+
116
+ ```css
117
+ :root {
118
+ --bon-bg: #fafafa;
119
+ --bon-text: #1a1a1a;
120
+ --bon-border: #e0e0e0;
121
+ --bon-radius: 12px;
122
+ }
123
+ ```
124
+
125
+ ### Color palettes
126
+
127
+ ```tsx
128
+ <BonnardProvider config={{ apiKey: '...' }} palette="observable">
129
+ ```
130
+
131
+ Built-in palettes: `default`, `tableau`, `observable`, `metabase`. Or pass a custom array of hex colors.
132
+
133
+ ## API
134
+
135
+ ### `<BonnardProvider>`
136
+
137
+ | Prop | Type | Default | Description |
138
+ |------|------|---------|-------------|
139
+ | `config` | `BonnardConfig` | — | SDK config (`apiKey` or `fetchToken`) |
140
+ | `darkMode` | `boolean \| 'auto'` | `'auto'` | Dark mode control |
141
+ | `palette` | `PaletteName \| string[]` | `'tableau'` | Chart color palette |
142
+ | `chartHeight` | `number` | `320` | Default chart height in px |
143
+
144
+ ### `useBonnardQuery(options)`
145
+
146
+ | Option | Type | Description |
147
+ |--------|------|-------------|
148
+ | `query` | `QueryOptions` | Cube query (measures, dimensions, filters, etc.) |
149
+ | `skip` | `boolean` | Skip execution (for conditional queries) |
150
+
151
+ Returns `{ data, loading, error, refetch }`.
152
+
153
+ ## Links
154
+
155
+ - [Bonnard Docs](https://docs.bonnard.dev)
156
+ - [SDK Package](https://www.npmjs.com/package/@bonnard/sdk)
157
+ - [Discord](https://discord.com/invite/RQuvjGRz)
158
+
159
+ ## License
160
+
161
+ [MIT](./LICENSE)
@@ -0,0 +1,21 @@
1
+ import type { SeriesType } from './lib/types';
2
+ export interface BonnardChartSpec {
3
+ chartType: 'bar' | 'line' | 'area' | 'pie' | 'big_value' | 'table';
4
+ data: Record<string, unknown>[];
5
+ title?: string;
6
+ x?: string;
7
+ y?: string;
8
+ series?: string;
9
+ name?: string;
10
+ value?: string;
11
+ fmt?: string;
12
+ horizontal?: boolean;
13
+ type?: SeriesType;
14
+ columns?: string[];
15
+ rows?: number | 'all';
16
+ yFmt?: string;
17
+ }
18
+ export declare function BonnardChart({ spec }: {
19
+ spec: BonnardChartSpec;
20
+ }): import("react/jsx-runtime").JSX.Element | null;
21
+ //# sourceMappingURL=bonnard-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bonnard-chart.d.ts","sourceRoot":"","sources":["../src/bonnard-chart.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,OAAO,CAAC;IACnE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,kDAuEhE"}
@@ -0,0 +1,3 @@
1
+ import type { AxisChartProps } from '../lib/types';
2
+ export declare function AreaChart({ data, x, y, title, series, type, yFmt }: AxisChartProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=area-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-chart.d.ts","sourceRoot":"","sources":["../../src/charts/area-chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAenD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,cAAc,2CAyDlF"}
@@ -0,0 +1,3 @@
1
+ import type { BarChartProps } from '../lib/types';
2
+ export declare function BarChart({ data, x, y, title, horizontal, series, type, yFmt }: BarChartProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=bar-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-chart.d.ts","sourceRoot":"","sources":["../../src/charts/bar-chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAelD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,aAAa,2CA8D5F"}
@@ -0,0 +1,3 @@
1
+ import type { BigValueProps } from '../lib/types';
2
+ export declare function BigValue({ data, value, title, fmt }: BigValueProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=big-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"big-value.d.ts","sourceRoot":"","sources":["../../src/charts/big-value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,aAAa,kDA6ClE"}
@@ -0,0 +1,3 @@
1
+ import type { DataTableProps } from '../lib/types';
2
+ export declare function DataTable({ data, columns: explicitColumns, fmt, rows: rowsProp, queryLimit }: DataTableProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=data-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/charts/data-table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAiFnD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,cAAc,kDA2K5G"}
@@ -0,0 +1,7 @@
1
+ export { BigValue } from './big-value';
2
+ export { BarChart } from './bar-chart';
3
+ export { LineChart } from './line-chart';
4
+ export { AreaChart } from './area-chart';
5
+ export { PieChart } from './pie-chart';
6
+ export { DataTable } from './data-table';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AxisChartProps } from '../lib/types';
2
+ export declare function LineChart({ data, x, y, title, series, type, yFmt }: AxisChartProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=line-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-chart.d.ts","sourceRoot":"","sources":["../../src/charts/line-chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAenD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,cAAc,2CAyDlF"}
@@ -0,0 +1,3 @@
1
+ import type { PieChartProps } from '../lib/types';
2
+ export declare function PieChart({ data, name: nameField, value: valueField, title }: PieChartProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=pie-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pie-chart.d.ts","sourceRoot":"","sources":["../../src/charts/pie-chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,aAAa,2CAmD1F"}
@@ -0,0 +1,10 @@
1
+ import type { createClient } from '@bonnard/sdk';
2
+ export interface BonnardContextValue {
3
+ client: ReturnType<typeof createClient>;
4
+ isDark: boolean;
5
+ chartHeight: number;
6
+ palette: readonly string[];
7
+ }
8
+ export declare const BonnardContext: import("react").Context<BonnardContextValue | null>;
9
+ export declare function useBonnard(): BonnardContextValue;
10
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAE9E,wBAAgB,UAAU,IAAI,mBAAmB,CAMhD"}
@@ -0,0 +1,11 @@
1
+ interface DashboardViewerProps {
2
+ content: string;
3
+ initialSearchParams?: URLSearchParams;
4
+ onInputsChange?: (params: URLSearchParams) => void;
5
+ }
6
+ /**
7
+ * DashboardViewer — parses dashboard markdown and renders it.
8
+ */
9
+ export declare function DashboardViewer({ content, onInputsChange }: DashboardViewerProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=dashboard-viewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-viewer.d.ts","sourceRoot":"","sources":["../../src/dashboard/dashboard-viewer.tsx"],"names":[],"mappings":"AA0BA,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACpD;AAWD;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,oBAAoB,kDA2JhF"}
@@ -0,0 +1,8 @@
1
+ export interface DashboardProps {
2
+ slug?: string;
3
+ content?: string;
4
+ onInputsChange?: (params: URLSearchParams) => void;
5
+ className?: string;
6
+ }
7
+ export declare function Dashboard({ slug, content, onInputsChange, className }: DashboardProps): import("react/jsx-runtime").JSX.Element | null;
8
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/dashboard/dashboard.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,cAAc,kDAcrF"}
@@ -0,0 +1,6 @@
1
+ export { Dashboard } from './dashboard';
2
+ export type { DashboardProps } from './dashboard';
3
+ export { DashboardViewer } from './dashboard-viewer';
4
+ export { QueryLoad } from './query-load';
5
+ export { parseDashboard } from './parser';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { DateRangeInputState } from '../../lib/apply-inputs';
2
+ interface DateRangeInputProps {
3
+ name: string;
4
+ label?: string;
5
+ value: DateRangeInputState;
6
+ onInputChange: (name: string, value: DateRangeInputState) => void;
7
+ }
8
+ export declare function DateRangeInput({ name, label, value, onInputChange }: DateRangeInputProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=date-range-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-input.d.ts","sourceRoot":"","sources":["../../../src/dashboard/inputs/date-range-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,CAAC;IAC3B,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACnE;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,mBAAmB,2CAqCxF"}
@@ -0,0 +1,11 @@
1
+ interface DropdownInputProps {
2
+ name: string;
3
+ dimension: string;
4
+ label?: string;
5
+ data: Record<string, unknown>[];
6
+ value: string | null;
7
+ onInputChange: (name: string, value: string | null) => void;
8
+ }
9
+ export declare function DropdownInput({ name, dimension, label, data, value, onInputChange, }: DropdownInputProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=dropdown-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-input.d.ts","sourceRoot":"","sources":["../../../src/dashboard/inputs/dropdown-input.tsx"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC7D;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,KAAK,EACL,aAAa,GACd,EAAE,kBAAkB,2CA0CpB"}
@@ -0,0 +1,9 @@
1
+ import type { ParsedDashboard } from '../lib/types';
2
+ /**
3
+ * Parse a dashboard markdown string into structured output.
4
+ *
5
+ * Collects all validation errors and reports them together rather than
6
+ * failing on the first error (pattern from Evidence.dev).
7
+ */
8
+ export declare function parseDashboard(markdown: string): ParsedDashboard;
9
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/dashboard/parser.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,cAAc,CAAC;AA6CtB;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAuFhE"}
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ interface QueryLoadProps {
3
+ data: Record<string, unknown>[] | undefined;
4
+ loading: boolean;
5
+ error: string | undefined;
6
+ children: (data: Record<string, unknown>[]) => ReactNode;
7
+ }
8
+ /**
9
+ * QueryLoad — wraps chart components to handle loading / error / empty states.
10
+ */
11
+ export declare function QueryLoad({ data, loading, error, children }: QueryLoadProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=query-load.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-load.d.ts","sourceRoot":"","sources":["../../src/dashboard/query-load.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,SAAS,CAAC;CAC1D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAiE3E"}
@@ -0,0 +1,8 @@
1
+ export { Dashboard } from './dashboard/dashboard';
2
+ export type { DashboardProps } from './dashboard/dashboard';
3
+ export { DashboardViewer } from './dashboard/dashboard-viewer';
4
+ export { useDashboard } from './hooks/use-dashboard';
5
+ export type { UseDashboardResult } from './hooks/use-dashboard';
6
+ export { parseDashboard } from './dashboard/parser';
7
+ export type { ParsedDashboard, DashboardFrontmatter, DashboardQuery, DashboardSection, ComponentTag, ComponentType, DateRangePreset, } from './lib/types';
8
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,GAChB,MAAM,aAAa,CAAC"}