@panoboard/core 1.1.5
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.
- package/dist/cache/cache.d.ts +11 -0
- package/dist/cache/cache.d.ts.map +1 -0
- package/dist/cache/cache.js +42 -0
- package/dist/cache/cache.js.map +1 -0
- package/dist/cache/client.d.ts +9 -0
- package/dist/cache/client.d.ts.map +1 -0
- package/dist/cache/client.js +63 -0
- package/dist/cache/client.js.map +1 -0
- package/dist/cache/index.d.ts +4 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +17 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/keys.d.ts +2 -0
- package/dist/cache/keys.d.ts.map +1 -0
- package/dist/cache/keys.js +26 -0
- package/dist/cache/keys.js.map +1 -0
- package/dist/components/DashboardCard.d.ts +15 -0
- package/dist/components/DashboardCard.d.ts.map +1 -0
- package/dist/components/DashboardCard.js +80 -0
- package/dist/components/DashboardCard.js.map +1 -0
- package/dist/components/DashboardShell.d.ts +11 -0
- package/dist/components/DashboardShell.d.ts.map +1 -0
- package/dist/components/DashboardShell.js +115 -0
- package/dist/components/DashboardShell.js.map +1 -0
- package/dist/components/EmptyState.d.ts +6 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState.js +29 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/ErrorPage.d.ts +14 -0
- package/dist/components/ErrorPage.d.ts.map +1 -0
- package/dist/components/ErrorPage.js +132 -0
- package/dist/components/ErrorPage.js.map +1 -0
- package/dist/components/FilterBar.d.ts +8 -0
- package/dist/components/FilterBar.d.ts.map +1 -0
- package/dist/components/FilterBar.js +70 -0
- package/dist/components/FilterBar.js.map +1 -0
- package/dist/components/PanelGrid.d.ts +9 -0
- package/dist/components/PanelGrid.d.ts.map +1 -0
- package/dist/components/PanelGrid.js +26 -0
- package/dist/components/PanelGrid.js.map +1 -0
- package/dist/components/PanelWrapper.d.ts +8 -0
- package/dist/components/PanelWrapper.d.ts.map +1 -0
- package/dist/components/PanelWrapper.js +154 -0
- package/dist/components/PanelWrapper.js.map +1 -0
- package/dist/components/filters/BooleanFilter.d.ts +8 -0
- package/dist/components/filters/BooleanFilter.d.ts.map +1 -0
- package/dist/components/filters/BooleanFilter.js +36 -0
- package/dist/components/filters/BooleanFilter.js.map +1 -0
- package/dist/components/filters/CalendarGrid.d.ts +8 -0
- package/dist/components/filters/CalendarGrid.d.ts.map +1 -0
- package/dist/components/filters/CalendarGrid.js +159 -0
- package/dist/components/filters/CalendarGrid.js.map +1 -0
- package/dist/components/filters/DateRangeFilter.d.ts +10 -0
- package/dist/components/filters/DateRangeFilter.d.ts.map +1 -0
- package/dist/components/filters/DateRangeFilter.js +80 -0
- package/dist/components/filters/DateRangeFilter.js.map +1 -0
- package/dist/components/filters/FilterChips.d.ts +8 -0
- package/dist/components/filters/FilterChips.d.ts.map +1 -0
- package/dist/components/filters/FilterChips.js +94 -0
- package/dist/components/filters/FilterChips.js.map +1 -0
- package/dist/components/filters/MultiSelectFilter.d.ts +17 -0
- package/dist/components/filters/MultiSelectFilter.d.ts.map +1 -0
- package/dist/components/filters/MultiSelectFilter.js +80 -0
- package/dist/components/filters/MultiSelectFilter.js.map +1 -0
- package/dist/components/filters/NumberFilter.d.ts +10 -0
- package/dist/components/filters/NumberFilter.d.ts.map +1 -0
- package/dist/components/filters/NumberFilter.js +47 -0
- package/dist/components/filters/NumberFilter.js.map +1 -0
- package/dist/components/filters/SelectFilter.d.ts +16 -0
- package/dist/components/filters/SelectFilter.d.ts.map +1 -0
- package/dist/components/filters/SelectFilter.js +71 -0
- package/dist/components/filters/SelectFilter.js.map +1 -0
- package/dist/components/filters/TextFilter.d.ts +8 -0
- package/dist/components/filters/TextFilter.d.ts.map +1 -0
- package/dist/components/filters/TextFilter.js +57 -0
- package/dist/components/filters/TextFilter.js.map +1 -0
- package/dist/components/filters/useDropdown.d.ts +7 -0
- package/dist/components/filters/useDropdown.d.ts.map +1 -0
- package/dist/components/filters/useDropdown.js +41 -0
- package/dist/components/filters/useDropdown.js.map +1 -0
- package/dist/components/filters/useFilterUpdate.d.ts +2 -0
- package/dist/components/filters/useFilterUpdate.d.ts.map +1 -0
- package/dist/components/filters/useFilterUpdate.js +30 -0
- package/dist/components/filters/useFilterUpdate.js.map +1 -0
- package/dist/components/index.d.ts +59 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +75 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/panels/AreaChart.d.ts +7 -0
- package/dist/components/panels/AreaChart.d.ts.map +1 -0
- package/dist/components/panels/AreaChart.js +88 -0
- package/dist/components/panels/AreaChart.js.map +1 -0
- package/dist/components/panels/BarChart.d.ts +7 -0
- package/dist/components/panels/BarChart.d.ts.map +1 -0
- package/dist/components/panels/BarChart.js +99 -0
- package/dist/components/panels/BarChart.js.map +1 -0
- package/dist/components/panels/BoxPlotChart.d.ts +7 -0
- package/dist/components/panels/BoxPlotChart.d.ts.map +1 -0
- package/dist/components/panels/BoxPlotChart.js +41 -0
- package/dist/components/panels/BoxPlotChart.js.map +1 -0
- package/dist/components/panels/BulletChart.d.ts +7 -0
- package/dist/components/panels/BulletChart.d.ts.map +1 -0
- package/dist/components/panels/BulletChart.js +46 -0
- package/dist/components/panels/BulletChart.js.map +1 -0
- package/dist/components/panels/BumpChart.d.ts +7 -0
- package/dist/components/panels/BumpChart.d.ts.map +1 -0
- package/dist/components/panels/BumpChart.js +38 -0
- package/dist/components/panels/BumpChart.js.map +1 -0
- package/dist/components/panels/CalendarHeatmap.d.ts +7 -0
- package/dist/components/panels/CalendarHeatmap.d.ts.map +1 -0
- package/dist/components/panels/CalendarHeatmap.js +41 -0
- package/dist/components/panels/CalendarHeatmap.js.map +1 -0
- package/dist/components/panels/ChartTooltip.d.ts +48 -0
- package/dist/components/panels/ChartTooltip.d.ts.map +1 -0
- package/dist/components/panels/ChartTooltip.js +129 -0
- package/dist/components/panels/ChartTooltip.js.map +1 -0
- package/dist/components/panels/DonutChart.d.ts +7 -0
- package/dist/components/panels/DonutChart.d.ts.map +1 -0
- package/dist/components/panels/DonutChart.js +40 -0
- package/dist/components/panels/DonutChart.js.map +1 -0
- package/dist/components/panels/FunnelChart.d.ts +7 -0
- package/dist/components/panels/FunnelChart.d.ts.map +1 -0
- package/dist/components/panels/FunnelChart.js +32 -0
- package/dist/components/panels/FunnelChart.js.map +1 -0
- package/dist/components/panels/HeatmapChart.d.ts +7 -0
- package/dist/components/panels/HeatmapChart.d.ts.map +1 -0
- package/dist/components/panels/HeatmapChart.js +41 -0
- package/dist/components/panels/HeatmapChart.js.map +1 -0
- package/dist/components/panels/IframePanel.d.ts +6 -0
- package/dist/components/panels/IframePanel.d.ts.map +1 -0
- package/dist/components/panels/IframePanel.js +5 -0
- package/dist/components/panels/IframePanel.js.map +1 -0
- package/dist/components/panels/ImagePanel.d.ts +7 -0
- package/dist/components/panels/ImagePanel.d.ts.map +1 -0
- package/dist/components/panels/ImagePanel.js +9 -0
- package/dist/components/panels/ImagePanel.js.map +1 -0
- package/dist/components/panels/LineChart.d.ts +7 -0
- package/dist/components/panels/LineChart.d.ts.map +1 -0
- package/dist/components/panels/LineChart.js +87 -0
- package/dist/components/panels/LineChart.js.map +1 -0
- package/dist/components/panels/ListPanel.d.ts +7 -0
- package/dist/components/panels/ListPanel.d.ts.map +1 -0
- package/dist/components/panels/ListPanel.js +24 -0
- package/dist/components/panels/ListPanel.js.map +1 -0
- package/dist/components/panels/MarkdownPanel.d.ts +7 -0
- package/dist/components/panels/MarkdownPanel.d.ts.map +1 -0
- package/dist/components/panels/MarkdownPanel.js +39 -0
- package/dist/components/panels/MarkdownPanel.js.map +1 -0
- package/dist/components/panels/MetricPanel.d.ts +7 -0
- package/dist/components/panels/MetricPanel.d.ts.map +1 -0
- package/dist/components/panels/MetricPanel.js +23 -0
- package/dist/components/panels/MetricPanel.js.map +1 -0
- package/dist/components/panels/PanelEmpty.d.ts +2 -0
- package/dist/components/panels/PanelEmpty.d.ts.map +1 -0
- package/dist/components/panels/PanelEmpty.js +27 -0
- package/dist/components/panels/PanelEmpty.js.map +1 -0
- package/dist/components/panels/PanelError.d.ts +7 -0
- package/dist/components/panels/PanelError.d.ts.map +1 -0
- package/dist/components/panels/PanelError.js +21 -0
- package/dist/components/panels/PanelError.js.map +1 -0
- package/dist/components/panels/PanelSkeleton.d.ts +6 -0
- package/dist/components/panels/PanelSkeleton.d.ts.map +1 -0
- package/dist/components/panels/PanelSkeleton.js +24 -0
- package/dist/components/panels/PanelSkeleton.js.map +1 -0
- package/dist/components/panels/PieChart.d.ts +7 -0
- package/dist/components/panels/PieChart.d.ts.map +1 -0
- package/dist/components/panels/PieChart.js +40 -0
- package/dist/components/panels/PieChart.js.map +1 -0
- package/dist/components/panels/RadarChart.d.ts +7 -0
- package/dist/components/panels/RadarChart.d.ts.map +1 -0
- package/dist/components/panels/RadarChart.js +50 -0
- package/dist/components/panels/RadarChart.js.map +1 -0
- package/dist/components/panels/RadialBarChart.d.ts +7 -0
- package/dist/components/panels/RadialBarChart.d.ts.map +1 -0
- package/dist/components/panels/RadialBarChart.js +49 -0
- package/dist/components/panels/RadialBarChart.js.map +1 -0
- package/dist/components/panels/SankeyChart.d.ts +7 -0
- package/dist/components/panels/SankeyChart.d.ts.map +1 -0
- package/dist/components/panels/SankeyChart.js +39 -0
- package/dist/components/panels/SankeyChart.js.map +1 -0
- package/dist/components/panels/ScatterChart.d.ts +7 -0
- package/dist/components/panels/ScatterChart.d.ts.map +1 -0
- package/dist/components/panels/ScatterChart.js +54 -0
- package/dist/components/panels/ScatterChart.js.map +1 -0
- package/dist/components/panels/StatPanel.d.ts +8 -0
- package/dist/components/panels/StatPanel.d.ts.map +1 -0
- package/dist/components/panels/StatPanel.js +40 -0
- package/dist/components/panels/StatPanel.js.map +1 -0
- package/dist/components/panels/StreamChart.d.ts +7 -0
- package/dist/components/panels/StreamChart.d.ts.map +1 -0
- package/dist/components/panels/StreamChart.js +54 -0
- package/dist/components/panels/StreamChart.js.map +1 -0
- package/dist/components/panels/SunburstChart.d.ts +7 -0
- package/dist/components/panels/SunburstChart.d.ts.map +1 -0
- package/dist/components/panels/SunburstChart.js +60 -0
- package/dist/components/panels/SunburstChart.js.map +1 -0
- package/dist/components/panels/TablePanel.d.ts +7 -0
- package/dist/components/panels/TablePanel.d.ts.map +1 -0
- package/dist/components/panels/TablePanel.js +79 -0
- package/dist/components/panels/TablePanel.js.map +1 -0
- package/dist/components/panels/TreemapChart.d.ts +7 -0
- package/dist/components/panels/TreemapChart.d.ts.map +1 -0
- package/dist/components/panels/TreemapChart.js +59 -0
- package/dist/components/panels/TreemapChart.js.map +1 -0
- package/dist/components/panels/VideoPanel.d.ts +15 -0
- package/dist/components/panels/VideoPanel.d.ts.map +1 -0
- package/dist/components/panels/VideoPanel.js +25 -0
- package/dist/components/panels/VideoPanel.js.map +1 -0
- package/dist/components/panels/WaffleChart.d.ts +7 -0
- package/dist/components/panels/WaffleChart.d.ts.map +1 -0
- package/dist/components/panels/WaffleChart.js +46 -0
- package/dist/components/panels/WaffleChart.js.map +1 -0
- package/dist/components/panels/index.d.ts +3 -0
- package/dist/components/panels/index.d.ts.map +1 -0
- package/dist/components/panels/index.js +60 -0
- package/dist/components/panels/index.js.map +1 -0
- package/dist/components/panels/nivo-theme.d.ts +95 -0
- package/dist/components/panels/nivo-theme.d.ts.map +1 -0
- package/dist/components/panels/nivo-theme.js +140 -0
- package/dist/components/panels/nivo-theme.js.map +1 -0
- package/dist/components/panels/semantic-colors.d.ts +7 -0
- package/dist/components/panels/semantic-colors.d.ts.map +1 -0
- package/dist/components/panels/semantic-colors.js +100 -0
- package/dist/components/panels/semantic-colors.js.map +1 -0
- package/dist/components/ui/Button.d.ts +9 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Button.js +40 -0
- package/dist/components/ui/Button.js.map +1 -0
- package/dist/components/ui/Tabs.d.ts +11 -0
- package/dist/components/ui/Tabs.d.ts.map +1 -0
- package/dist/components/ui/Tabs.js +28 -0
- package/dist/components/ui/Tabs.js.map +1 -0
- package/dist/connectors/bigquery.d.ts +26 -0
- package/dist/connectors/bigquery.d.ts.map +1 -0
- package/dist/connectors/bigquery.js +113 -0
- package/dist/connectors/bigquery.js.map +1 -0
- package/dist/connectors/index.d.ts +17 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +23 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/params.d.ts +15 -0
- package/dist/connectors/params.d.ts.map +1 -0
- package/dist/connectors/params.js +46 -0
- package/dist/connectors/params.js.map +1 -0
- package/dist/connectors/postgres.d.ts +29 -0
- package/dist/connectors/postgres.d.ts.map +1 -0
- package/dist/connectors/postgres.js +130 -0
- package/dist/connectors/postgres.js.map +1 -0
- package/dist/connectors/redshift-data.d.ts +25 -0
- package/dist/connectors/redshift-data.d.ts.map +1 -0
- package/dist/connectors/redshift-data.js +237 -0
- package/dist/connectors/redshift-data.js.map +1 -0
- package/dist/connectors/redshift.d.ts +29 -0
- package/dist/connectors/redshift.d.ts.map +1 -0
- package/dist/connectors/redshift.js +138 -0
- package/dist/connectors/redshift.js.map +1 -0
- package/dist/connectors/registry.d.ts +7 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +30 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/snowflake.d.ts +37 -0
- package/dist/connectors/snowflake.d.ts.map +1 -0
- package/dist/connectors/snowflake.js +181 -0
- package/dist/connectors/snowflake.js.map +1 -0
- package/dist/connectors/types.d.ts +41 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +15 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/connectors/url-parsers.d.ts +13 -0
- package/dist/connectors/url-parsers.d.ts.map +1 -0
- package/dist/connectors/url-parsers.js +95 -0
- package/dist/connectors/url-parsers.js.map +1 -0
- package/dist/connectors/url.d.ts +36 -0
- package/dist/connectors/url.d.ts.map +1 -0
- package/dist/connectors/url.js +139 -0
- package/dist/connectors/url.js.map +1 -0
- package/dist/filters/cascade.d.ts +13 -0
- package/dist/filters/cascade.d.ts.map +1 -0
- package/dist/filters/cascade.js +32 -0
- package/dist/filters/cascade.js.map +1 -0
- package/dist/filters/daterange.d.ts +8 -0
- package/dist/filters/daterange.d.ts.map +1 -0
- package/dist/filters/daterange.js +119 -0
- package/dist/filters/daterange.js.map +1 -0
- package/dist/filters/index.d.ts +7 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +18 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/filters/resolver.d.ts +3 -0
- package/dist/filters/resolver.d.ts.map +1 -0
- package/dist/filters/resolver.js +122 -0
- package/dist/filters/resolver.js.map +1 -0
- package/dist/filters/validation.d.ts +17 -0
- package/dist/filters/validation.d.ts.map +1 -0
- package/dist/filters/validation.js +84 -0
- package/dist/filters/validation.js.map +1 -0
- package/dist/formats.d.ts +4 -0
- package/dist/formats.d.ts.map +1 -0
- package/dist/formats.js +127 -0
- package/dist/formats.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/auth-provider.d.ts +22 -0
- package/dist/interfaces/auth-provider.d.ts.map +1 -0
- package/dist/interfaces/auth-provider.js +15 -0
- package/dist/interfaces/auth-provider.js.map +1 -0
- package/dist/interfaces/dashboard-store.d.ts +17 -0
- package/dist/interfaces/dashboard-store.d.ts.map +1 -0
- package/dist/interfaces/dashboard-store.js +15 -0
- package/dist/interfaces/dashboard-store.js.map +1 -0
- package/dist/interfaces/datasource-store.d.ts +6 -0
- package/dist/interfaces/datasource-store.d.ts.map +1 -0
- package/dist/interfaces/datasource-store.js +15 -0
- package/dist/interfaces/datasource-store.js.map +1 -0
- package/dist/interfaces/index.d.ts +4 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +15 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/locale/context.d.ts +6 -0
- package/dist/locale/context.d.ts.map +1 -0
- package/dist/locale/context.js +23 -0
- package/dist/locale/context.js.map +1 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +15 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/query/array-expansion.d.ts +5 -0
- package/dist/query/array-expansion.d.ts.map +1 -0
- package/dist/query/array-expansion.js +39 -0
- package/dist/query/array-expansion.js.map +1 -0
- package/dist/query/index.d.ts +8 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +20 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/pipeline.d.ts +27 -0
- package/dist/query/pipeline.d.ts.map +1 -0
- package/dist/query/pipeline.js +49 -0
- package/dist/query/pipeline.js.map +1 -0
- package/dist/query/strategy/http.d.ts +7 -0
- package/dist/query/strategy/http.d.ts.map +1 -0
- package/dist/query/strategy/http.js +26 -0
- package/dist/query/strategy/http.js.map +1 -0
- package/dist/query/strategy/index.d.ts +4 -0
- package/dist/query/strategy/index.d.ts.map +1 -0
- package/dist/query/strategy/index.js +32 -0
- package/dist/query/strategy/index.js.map +1 -0
- package/dist/query/strategy/sql.d.ts +7 -0
- package/dist/query/strategy/sql.d.ts.map +1 -0
- package/dist/query/strategy/sql.js +40 -0
- package/dist/query/strategy/sql.js.map +1 -0
- package/dist/query/strategy/types.d.ts +6 -0
- package/dist/query/strategy/types.d.ts.map +1 -0
- package/dist/query/strategy/types.js +15 -0
- package/dist/query/strategy/types.js.map +1 -0
- package/dist/query/template.d.ts +7 -0
- package/dist/query/template.d.ts.map +1 -0
- package/dist/query/template.js +36 -0
- package/dist/query/template.js.map +1 -0
- package/dist/schemas/config.d.ts +74 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +129 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/dashboard.d.ts +716 -0
- package/dist/schemas/dashboard.d.ts.map +1 -0
- package/dist/schemas/dashboard.js +314 -0
- package/dist/schemas/dashboard.js.map +1 -0
- package/dist/schemas/datasource.d.ts +252 -0
- package/dist/schemas/datasource.d.ts.map +1 -0
- package/dist/schemas/datasource.js +186 -0
- package/dist/schemas/datasource.js.map +1 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +18 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/theme.d.ts +36 -0
- package/dist/schemas/theme.d.ts.map +1 -0
- package/dist/schemas/theme.js +48 -0
- package/dist/schemas/theme.js.map +1 -0
- package/dist/startup/index.d.ts +3 -0
- package/dist/startup/index.d.ts.map +1 -0
- package/dist/startup/index.js +15 -0
- package/dist/startup/index.js.map +1 -0
- package/dist/startup/sql-lint.d.ts +13 -0
- package/dist/startup/sql-lint.d.ts.map +1 -0
- package/dist/startup/sql-lint.js +86 -0
- package/dist/startup/sql-lint.js.map +1 -0
- package/dist/theme/builtin.d.ts +5 -0
- package/dist/theme/builtin.d.ts.map +1 -0
- package/dist/theme/builtin.js +102 -0
- package/dist/theme/builtin.js.map +1 -0
- package/dist/theme/context.d.ts +7 -0
- package/dist/theme/context.d.ts.map +1 -0
- package/dist/theme/context.js +26 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +16 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/loader-export.d.ts +2 -0
- package/dist/theme/loader-export.d.ts.map +1 -0
- package/dist/theme/loader-export.js +15 -0
- package/dist/theme/loader-export.js.map +1 -0
- package/dist/theme/loader.d.ts +11 -0
- package/dist/theme/loader.d.ts.map +1 -0
- package/dist/theme/loader.js +60 -0
- package/dist/theme/loader.js.map +1 -0
- package/package.json +148 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Auth schemas
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
const passwordAuthSchema = z.object({
|
|
19
|
+
type: z.literal("password"),
|
|
20
|
+
user: z.string(),
|
|
21
|
+
password: z.string(),
|
|
22
|
+
});
|
|
23
|
+
const iamAuthSchema = z.object({
|
|
24
|
+
type: z.literal("iam"),
|
|
25
|
+
provider: z.enum(["aws", "gcp"]).optional(),
|
|
26
|
+
region: z.string().optional(),
|
|
27
|
+
username: z.string().optional(),
|
|
28
|
+
});
|
|
29
|
+
const adcAuthSchema = z.object({
|
|
30
|
+
type: z.literal("adc"),
|
|
31
|
+
});
|
|
32
|
+
const serviceAccountKeyAuthSchema = z.object({
|
|
33
|
+
type: z.literal("service-account-key"),
|
|
34
|
+
key_file: z.string().optional(),
|
|
35
|
+
key_json: z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
const sdkDefaultAuthSchema = z.object({
|
|
38
|
+
type: z.literal("sdk-default"),
|
|
39
|
+
});
|
|
40
|
+
const roleAuthSchema = z.object({
|
|
41
|
+
type: z.literal("role"),
|
|
42
|
+
role_arn: z.string().optional(),
|
|
43
|
+
});
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// SSL type shared by postgres / redshift
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
const sslSchema = z.union([z.boolean(), z.enum(["require", "prefer"])]);
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// Datasource type schemas
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
const postgresDatasourceSchema = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
type: z.literal("postgres"),
|
|
54
|
+
host: z.string(),
|
|
55
|
+
port: z.number().int().positive().default(5432),
|
|
56
|
+
database: z.string(),
|
|
57
|
+
ssl: sslSchema.default(false),
|
|
58
|
+
pool_size: z.number().int().positive().default(5),
|
|
59
|
+
auth: z.discriminatedUnion("type", [passwordAuthSchema, iamAuthSchema]),
|
|
60
|
+
});
|
|
61
|
+
const bigqueryDatasourceSchema = z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
type: z.literal("bigquery"),
|
|
64
|
+
project: z.string(),
|
|
65
|
+
dataset: z.string().optional(),
|
|
66
|
+
location: z.string().default("US"),
|
|
67
|
+
auth: z.discriminatedUnion("type", [
|
|
68
|
+
adcAuthSchema,
|
|
69
|
+
serviceAccountKeyAuthSchema,
|
|
70
|
+
]),
|
|
71
|
+
});
|
|
72
|
+
const redshiftDatasourceSchema = z.object({
|
|
73
|
+
id: z.string(),
|
|
74
|
+
type: z.literal("redshift"),
|
|
75
|
+
host: z.string(),
|
|
76
|
+
port: z.number().int().positive().default(5439),
|
|
77
|
+
database: z.string(),
|
|
78
|
+
ssl: sslSchema.default(false),
|
|
79
|
+
pool_size: z.number().int().positive().default(5),
|
|
80
|
+
auth: z.discriminatedUnion("type", [passwordAuthSchema, iamAuthSchema]),
|
|
81
|
+
});
|
|
82
|
+
const redshiftDataDatasourceSchema = z.object({
|
|
83
|
+
id: z.string(),
|
|
84
|
+
type: z.literal("redshift-data"),
|
|
85
|
+
cluster_identifier: z.string().optional(),
|
|
86
|
+
workgroup_name: z.string().optional(),
|
|
87
|
+
database: z.string(),
|
|
88
|
+
region: z.string(),
|
|
89
|
+
auth: z.discriminatedUnion("type", [sdkDefaultAuthSchema, roleAuthSchema]),
|
|
90
|
+
});
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
// URL auth schemas
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
const bearerAuthSchema = z.object({
|
|
95
|
+
type: z.literal("bearer"),
|
|
96
|
+
token: z.string(),
|
|
97
|
+
});
|
|
98
|
+
const basicAuthSchema = z.object({
|
|
99
|
+
type: z.literal("basic"),
|
|
100
|
+
user: z.string(),
|
|
101
|
+
password: z.string(),
|
|
102
|
+
});
|
|
103
|
+
const headerAuthSchema = z.object({
|
|
104
|
+
type: z.literal("header"),
|
|
105
|
+
headers: z.record(z.string(), z.string()),
|
|
106
|
+
});
|
|
107
|
+
const urlAuthSchema = z.discriminatedUnion("type", [
|
|
108
|
+
bearerAuthSchema,
|
|
109
|
+
basicAuthSchema,
|
|
110
|
+
headerAuthSchema,
|
|
111
|
+
]);
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// URL datasource
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
const urlDatasourceSchema = z.object({
|
|
116
|
+
id: z.string(),
|
|
117
|
+
type: z.literal("url"),
|
|
118
|
+
base_url: z.string().url(),
|
|
119
|
+
method: z.enum(["get", "post"]).default("get"),
|
|
120
|
+
request_body: z.string().optional(),
|
|
121
|
+
response_format: z
|
|
122
|
+
.enum(["panoboard", "array", "grafana", "datasette", "jsonl"])
|
|
123
|
+
.default("panoboard"),
|
|
124
|
+
timeout: z.number().int().positive().default(30000),
|
|
125
|
+
health_check_path: z.string().optional(),
|
|
126
|
+
auth: urlAuthSchema.optional(),
|
|
127
|
+
});
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
// Snowflake auth schemas
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
const snowflakePasswordAuthSchema = z.object({
|
|
132
|
+
type: z.literal("password"),
|
|
133
|
+
user: z.string(),
|
|
134
|
+
password: z.string(),
|
|
135
|
+
});
|
|
136
|
+
const snowflakeKeyPairAuthSchema = z.object({
|
|
137
|
+
type: z.literal("key-pair"),
|
|
138
|
+
user: z.string(),
|
|
139
|
+
private_key_file: z.string().optional(),
|
|
140
|
+
private_key: z.string().optional(),
|
|
141
|
+
passphrase: z.string().optional(),
|
|
142
|
+
});
|
|
143
|
+
// Note: z.discriminatedUnion requires ZodObject members, so we use z.union here
|
|
144
|
+
// since we need .refine() on the parent to validate private key presence.
|
|
145
|
+
const snowflakeAuthSchema = z.union([
|
|
146
|
+
snowflakePasswordAuthSchema,
|
|
147
|
+
snowflakeKeyPairAuthSchema,
|
|
148
|
+
]);
|
|
149
|
+
// ---------------------------------------------------------------------------
|
|
150
|
+
// Snowflake datasource
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
152
|
+
const snowflakeDatasourceSchema = z
|
|
153
|
+
.object({
|
|
154
|
+
id: z.string(),
|
|
155
|
+
type: z.literal("snowflake"),
|
|
156
|
+
account: z.string(),
|
|
157
|
+
warehouse: z.string(),
|
|
158
|
+
database: z.string(),
|
|
159
|
+
schema: z.string().optional(),
|
|
160
|
+
role: z.string().optional(),
|
|
161
|
+
auth: snowflakeAuthSchema,
|
|
162
|
+
})
|
|
163
|
+
.refine((d) => d.auth.type !== "key-pair" ||
|
|
164
|
+
d.auth.private_key_file ||
|
|
165
|
+
d.auth.private_key, {
|
|
166
|
+
message: "Key-pair auth requires either private_key_file or private_key",
|
|
167
|
+
path: ["auth"],
|
|
168
|
+
});
|
|
169
|
+
// ---------------------------------------------------------------------------
|
|
170
|
+
// Union and file schema
|
|
171
|
+
// ---------------------------------------------------------------------------
|
|
172
|
+
export const datasourceSchema = z
|
|
173
|
+
.discriminatedUnion("type", [
|
|
174
|
+
postgresDatasourceSchema,
|
|
175
|
+
bigqueryDatasourceSchema,
|
|
176
|
+
redshiftDatasourceSchema,
|
|
177
|
+
redshiftDataDatasourceSchema,
|
|
178
|
+
urlDatasourceSchema,
|
|
179
|
+
])
|
|
180
|
+
.or(snowflakeDatasourceSchema);
|
|
181
|
+
export const datasourcesFileSchema = z
|
|
182
|
+
.object({
|
|
183
|
+
datasources: z.array(datasourceSchema),
|
|
184
|
+
})
|
|
185
|
+
.strict();
|
|
186
|
+
//# sourceMappingURL=datasource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasource.js","sourceRoot":"","sources":["../../src/schemas/datasource.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACtB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CACvB,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;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,4BAA4B;IAC5B,mBAAmB;CACpB,CAAC;KACD,EAAE,CAAC,yBAAyB,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { dashboardSchema, filterSchema, panelSchema, anyPanelSchema, querySchema, type Dashboard, type Panel, type Filter, } from "./dashboard";
|
|
2
|
+
export { datasourceSchema, datasourcesFileSchema, type DatasourceDefinition, type DatasourcesFile, } from "./datasource";
|
|
3
|
+
export { configSchema, type Config } from "./config";
|
|
4
|
+
export { themeSchema, type Theme } from "./theme";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,cAAc,EACd,WAAW,EACX,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,MAAM,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export { dashboardSchema, filterSchema, panelSchema, anyPanelSchema, querySchema, } from "./dashboard";
|
|
15
|
+
export { datasourceSchema, datasourcesFileSchema, } from "./datasource";
|
|
16
|
+
export { configSchema } from "./config";
|
|
17
|
+
export { themeSchema } from "./theme";
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,cAAc,EACd,WAAW,GAIZ,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GAGtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAe,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const themeSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
surfaces: z.ZodObject<{
|
|
6
|
+
page: z.ZodString;
|
|
7
|
+
header: z.ZodString;
|
|
8
|
+
panel: z.ZodString;
|
|
9
|
+
panelBorder: z.ZodString;
|
|
10
|
+
panelHeader: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
typography: z.ZodObject<{
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
panelTitle: z.ZodString;
|
|
15
|
+
label: z.ZodString;
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
muted: z.ZodString;
|
|
18
|
+
link: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
filters: z.ZodObject<{
|
|
21
|
+
background: z.ZodString;
|
|
22
|
+
border: z.ZodString;
|
|
23
|
+
text: z.ZodString;
|
|
24
|
+
placeholder: z.ZodString;
|
|
25
|
+
focus: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
status: z.ZodObject<{
|
|
28
|
+
positive: z.ZodString;
|
|
29
|
+
negative: z.ZodString;
|
|
30
|
+
warning: z.ZodString;
|
|
31
|
+
neutral: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
palette: z.ZodArray<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type Theme = z.infer<typeof themeSchema>;
|
|
36
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/schemas/theme.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
export const themeSchema = z.object({
|
|
16
|
+
name: z.string(),
|
|
17
|
+
description: z.string().optional(),
|
|
18
|
+
surfaces: z.object({
|
|
19
|
+
page: z.string(),
|
|
20
|
+
header: z.string(),
|
|
21
|
+
panel: z.string(),
|
|
22
|
+
panelBorder: z.string(),
|
|
23
|
+
panelHeader: z.string(),
|
|
24
|
+
}),
|
|
25
|
+
typography: z.object({
|
|
26
|
+
title: z.string(),
|
|
27
|
+
panelTitle: z.string(),
|
|
28
|
+
label: z.string(),
|
|
29
|
+
value: z.string(),
|
|
30
|
+
muted: z.string(),
|
|
31
|
+
link: z.string(),
|
|
32
|
+
}),
|
|
33
|
+
filters: z.object({
|
|
34
|
+
background: z.string(),
|
|
35
|
+
border: z.string(),
|
|
36
|
+
text: z.string(),
|
|
37
|
+
placeholder: z.string(),
|
|
38
|
+
focus: z.string(),
|
|
39
|
+
}),
|
|
40
|
+
status: z.object({
|
|
41
|
+
positive: z.string(),
|
|
42
|
+
negative: z.string(),
|
|
43
|
+
warning: z.string(),
|
|
44
|
+
neutral: z.string(),
|
|
45
|
+
}),
|
|
46
|
+
palette: z.array(z.string()),
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/schemas/theme.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE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AQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/startup/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export { lintDashboardQueries } from "./sql-lint";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/startup/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Dashboard } from "../schemas/dashboard";
|
|
2
|
+
export interface SqlLintError {
|
|
3
|
+
dashboardSlug: string;
|
|
4
|
+
panelId: string;
|
|
5
|
+
error: string;
|
|
6
|
+
renderedSql: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Lint all panel queries across all dashboards.
|
|
10
|
+
* Returns an array of errors (empty = all clear).
|
|
11
|
+
*/
|
|
12
|
+
export declare function lintDashboardQueries(dashboards: Map<string, Dashboard>): SqlLintError[];
|
|
13
|
+
//# sourceMappingURL=sql-lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-lint.d.ts","sourceRoot":"","sources":["../../src/startup/sql-lint.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GACjC,YAAY,EAAE,CAgChB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Deep SQL lint — best-effort static analysis of panel queries.
|
|
16
|
+
*
|
|
17
|
+
* When `startup_checks.deep_sql_lint: true`, each dashboard panel query
|
|
18
|
+
* is rendered with the first allowlist value for each template var, then
|
|
19
|
+
* parsed with node-sql-parser to detect syntax errors.
|
|
20
|
+
*
|
|
21
|
+
* This is best-effort: not all dialect-specific SQL will parse correctly.
|
|
22
|
+
* Bind parameters (:name) are replaced with placeholder values before parsing.
|
|
23
|
+
*/
|
|
24
|
+
import { Parser } from "node-sql-parser";
|
|
25
|
+
import { renderTemplate } from "../query/template";
|
|
26
|
+
/**
|
|
27
|
+
* Lint all panel queries across all dashboards.
|
|
28
|
+
* Returns an array of errors (empty = all clear).
|
|
29
|
+
*/
|
|
30
|
+
export function lintDashboardQueries(dashboards) {
|
|
31
|
+
const parser = new Parser();
|
|
32
|
+
const errors = [];
|
|
33
|
+
for (const [slug, dashboard] of dashboards) {
|
|
34
|
+
for (const panel of dashboard.panels) {
|
|
35
|
+
if (!("query" in panel) || !panel.query)
|
|
36
|
+
continue;
|
|
37
|
+
const query = panel.query;
|
|
38
|
+
if (!("sql" in query) || !query.sql)
|
|
39
|
+
continue;
|
|
40
|
+
const renderedSql = renderSqlForLint(query.sql, "template_vars" in query
|
|
41
|
+
? query.template_vars
|
|
42
|
+
: undefined);
|
|
43
|
+
const sanitized = replaceBindParams(renderedSql);
|
|
44
|
+
try {
|
|
45
|
+
parser.astify(sanitized, { database: "PostgreSQL" });
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
errors.push({
|
|
49
|
+
dashboardSlug: slug,
|
|
50
|
+
panelId: panel.id,
|
|
51
|
+
error: err instanceof Error ? err.message : String(err),
|
|
52
|
+
renderedSql: sanitized,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return errors;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Render template vars using the first allowlist value for each.
|
|
61
|
+
*/
|
|
62
|
+
function renderSqlForLint(sql, templateVars) {
|
|
63
|
+
if (!templateVars || Object.keys(templateVars).length === 0) {
|
|
64
|
+
return sql;
|
|
65
|
+
}
|
|
66
|
+
const resolvedValues = {};
|
|
67
|
+
for (const [name, def] of Object.entries(templateVars)) {
|
|
68
|
+
resolvedValues[name] = def.value ?? def.allowlist[0] ?? name;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
return renderTemplate(sql, templateVars, resolvedValues, {});
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// If template rendering fails, return raw SQL
|
|
75
|
+
return sql;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Replace :bind_param placeholders with safe literal values
|
|
80
|
+
* so the SQL parser does not choke on them.
|
|
81
|
+
*/
|
|
82
|
+
function replaceBindParams(sql) {
|
|
83
|
+
// Replace :word tokens (but not :: type casts) with '1'
|
|
84
|
+
return sql.replace(/(?<!:):([a-zA-Z_]\w*)/g, "'1'");
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=sql-lint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-lint.js","sourceRoot":"","sources":["../../src/startup/sql-lint.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAoB,MAAM,mB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AAW,EACX,YAA0C;IAE1C,IAAI,CAAC,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5D,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,cAAc,GAA2B,EAAE,CAAC;IAClD,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACvD,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IAC/D,CAAC;IAED,IAAI,CAAC;QACH,OAAO,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,8CAA8C;QAC9C,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,GAAW;IACpC,wDAAwD;IACxD,OAAO,GAAG,CAAC,OAAO,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/theme/builtin.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,SAAS,EAAE,KA0CvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA0CxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAG/C,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export const darkTheme = {
|
|
15
|
+
name: "dark",
|
|
16
|
+
description: "The default theme. Cool slate surfaces with indigo accents create a focused, professional environment suited for operations centers and analytics dashboards.",
|
|
17
|
+
surfaces: {
|
|
18
|
+
page: "bg-[#101222]",
|
|
19
|
+
header: "bg-[#020617]",
|
|
20
|
+
panel: "bg-[#0f172a]",
|
|
21
|
+
panelBorder: "border-[#334155]",
|
|
22
|
+
panelHeader: "bg-[#1e293b]",
|
|
23
|
+
},
|
|
24
|
+
typography: {
|
|
25
|
+
title: "text-[#ffffff] text-2xl font-semibold",
|
|
26
|
+
panelTitle: "text-[#f1f5f9] text-sm font-medium",
|
|
27
|
+
label: "text-[#94a3b8] text-xs",
|
|
28
|
+
value: "text-[#ffffff] text-lg font-semibold",
|
|
29
|
+
muted: "text-[#64748b] text-sm",
|
|
30
|
+
link: "text-[#818cf8] hover:text-[#a5b4fc]",
|
|
31
|
+
},
|
|
32
|
+
filters: {
|
|
33
|
+
background: "bg-[#1e293b]",
|
|
34
|
+
border: "border-[#334155]",
|
|
35
|
+
text: "text-[#e2e8f0]",
|
|
36
|
+
placeholder: "placeholder-[#64748b]",
|
|
37
|
+
focus: "ring-[#6366f1]",
|
|
38
|
+
},
|
|
39
|
+
status: {
|
|
40
|
+
positive: "text-[#34d399]",
|
|
41
|
+
negative: "text-[#f87171]",
|
|
42
|
+
warning: "text-[#f59e0b]",
|
|
43
|
+
neutral: "text-[#94a3b8]",
|
|
44
|
+
},
|
|
45
|
+
palette: [
|
|
46
|
+
"#3b82f6",
|
|
47
|
+
"#10b981",
|
|
48
|
+
"#f59e0b",
|
|
49
|
+
"#ef4444",
|
|
50
|
+
"#8b5cf6",
|
|
51
|
+
"#06b6d4",
|
|
52
|
+
"#f97316",
|
|
53
|
+
"#ec4899",
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
export const lightTheme = {
|
|
57
|
+
name: "light",
|
|
58
|
+
description: "A clean, professional light theme with white surfaces and indigo accents. Ideal for bright environments, embedded product dashboards, and printed reports.",
|
|
59
|
+
surfaces: {
|
|
60
|
+
page: "bg-[#ffffff]",
|
|
61
|
+
header: "bg-[#ffffff]",
|
|
62
|
+
panel: "bg-[#f9fafb]",
|
|
63
|
+
panelBorder: "border-[#e5e7eb]",
|
|
64
|
+
panelHeader: "bg-[#f3f4f6]",
|
|
65
|
+
},
|
|
66
|
+
typography: {
|
|
67
|
+
title: "text-[#111827] text-2xl font-semibold",
|
|
68
|
+
panelTitle: "text-[#1f2937] text-sm font-medium",
|
|
69
|
+
label: "text-[#6b7280] text-xs",
|
|
70
|
+
value: "text-[#111827] text-lg font-semibold",
|
|
71
|
+
muted: "text-[#9ca3af] text-sm",
|
|
72
|
+
link: "text-[#4f46e5] hover:text-[#6366f1]",
|
|
73
|
+
},
|
|
74
|
+
filters: {
|
|
75
|
+
background: "bg-[#ffffff]",
|
|
76
|
+
border: "border-[#d1d5db]",
|
|
77
|
+
text: "text-[#111827]",
|
|
78
|
+
placeholder: "placeholder-[#9ca3af]",
|
|
79
|
+
focus: "ring-[#6366f1]",
|
|
80
|
+
},
|
|
81
|
+
status: {
|
|
82
|
+
positive: "text-[#059669]",
|
|
83
|
+
negative: "text-[#dc2626]",
|
|
84
|
+
warning: "text-[#d97706]",
|
|
85
|
+
neutral: "text-[#6b7280]",
|
|
86
|
+
},
|
|
87
|
+
palette: [
|
|
88
|
+
"#4f46e5",
|
|
89
|
+
"#6366f1",
|
|
90
|
+
"#818cf8",
|
|
91
|
+
"#0ea5e9",
|
|
92
|
+
"#10b981",
|
|
93
|
+
"#f59e0b",
|
|
94
|
+
"#ef4444",
|
|
95
|
+
"#a855f7",
|
|
96
|
+
],
|
|
97
|
+
};
|
|
98
|
+
export const builtinThemes = {
|
|
99
|
+
dark: darkTheme,
|
|
100
|
+
light: lightTheme,
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=builtin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/theme/builtin.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,MAAM;IACZ,WAAW,EACT,+JAA+J;IACjK,QAAQ,EAAE;QACR,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,cAAc;KAC5B;IACD,UAAU,EAAE;QACV,KAAK,EAAE,uCAAuC;QAC9C,UAAU,EAAE,oCAAoC;QAChD,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,sCAAsC;QAC7C,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,qCAAqC;KAC5C;IACD,OAAO,EAAE;QACP,UAAU,EAAE,cAAc;QAC1B,MAAM,EAAE,kBAAkB;QAC1B,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,uBAAuB;QACpC,KAAK,EAAE,gBAAgB;KACxB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,gBAAgB;QAC1B,QAAQ,EAAE,gBAAgB;QAC1B,OAAO,EAAE,gBAAgB;QACzB,OAAO,EAAE,gBAAgB;KAC1B;IACD,OAAO,EAAE;QACP,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,OAAO;IACb,WAAW,EACT,4JAA4J;IAC9J,QAAQ,EAAE;QACR,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,cAAc;KAC5B;IACD,UAAU,EAAE;QACV,KAAK,EAAE,uCAAuC;QAC9C,UAAU,EAAE,oCAAoC;QAChD,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,sCAAsC;QAC7C,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,qCAAqC;KAC5C;IACD,OAAO,EAAE;QACP,UAAU,EAAE,cAAc;QAC1B,MAAM,EAAE,kBAAkB;QAC1B,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,uBAAuB;QACpC,KAAK,EAAE,gBAAgB;KACxB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,gBAAgB;QAC1B,QAAQ,EAAE,gBAAgB;QAC1B,OAAO,EAAE,gBAAgB;QACzB,OAAO,EAAE,gBAAgB;KAC1B;IACD,OAAO,EAAE;QACP,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,UAAU;CAClB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Theme } from "../schemas/theme";
|
|
2
|
+
export declare function ThemeProvider({ theme, children, }: {
|
|
3
|
+
theme: Theme;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function useTheme(): Theme;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/theme/context.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI9C,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAIA;AAED,wBAAgB,QAAQ,IAAI,KAAK,CAIhC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2026 Mataki Labs LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
import { createContext, useContext } from "react";
|
|
16
|
+
const ThemeContext = createContext(null);
|
|
17
|
+
export function ThemeProvider({ theme, children, }) {
|
|
18
|
+
return (_jsx(ThemeContext.Provider, { value: theme, children: children }));
|
|
19
|
+
}
|
|
20
|
+
export function useTheme() {
|
|
21
|
+
const theme = useContext(ThemeContext);
|
|
22
|
+
if (!theme)
|
|
23
|
+
throw new Error("useTheme must be used within ThemeProvider");
|
|
24
|
+
return theme;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/theme/context.tsx"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,YAAY,GAAG,aAAa,CAAe,IAAI,CAAC,CAAC;AAEvD,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,GAIT;IACC,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CACxE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,MAAM,KAAK,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|