drizzle-cube 0.9.0 → 0.9.2
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/adapters/ActivityGridChart.config-BIHNNXe8.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-D8brFtkU.js +2 -0
- package/dist/adapters/AreaChart.config-BjBnqhrD.js +2 -0
- package/dist/adapters/AreaChart.config-hCYHwAaC.cjs +1 -0
- package/dist/adapters/BarChart.config-JWskLg7a.js +2 -0
- package/dist/adapters/BarChart.config-ldUoUV-V.cjs +1 -0
- package/dist/adapters/BoxPlotChart.config-DXgi-pWk.js +2 -0
- package/dist/adapters/BoxPlotChart.config-t7CU_SEB.cjs +1 -0
- package/dist/adapters/BubbleChart.config-BqNbgcs4.js +2 -0
- package/dist/adapters/BubbleChart.config-SRbrJWj2.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-CTqj07at.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-D-KaQpN1.js +2 -0
- package/dist/adapters/DataTable.config-4QtzEm2K.js +2 -0
- package/dist/adapters/DataTable.config-C4OZyZKL.cjs +1 -0
- package/dist/adapters/DotStripChart.config-CrwF5K67.cjs +1 -0
- package/dist/adapters/DotStripChart.config-tmdykLsT.js +2 -0
- package/dist/adapters/FunnelChart.config-Dk7bb3KU.cjs +1 -0
- package/dist/adapters/FunnelChart.config-Uah6h6t6.js +2 -0
- package/dist/adapters/GaugeChart.config-BGi82n3v.cjs +1 -0
- package/dist/adapters/GaugeChart.config-DIWl6xVG.js +2 -0
- package/dist/adapters/HeatMapChart.config-C1Wl6SHf.js +2 -0
- package/dist/adapters/HeatMapChart.config-CsA67rfc.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CBo61Kp9.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CgYK9zIF.js +2 -0
- package/dist/adapters/KpiNumber.config-BqQjoY4A.cjs +1 -0
- package/dist/adapters/KpiNumber.config-Dt8kOvIA.js +2 -0
- package/dist/adapters/KpiText.config-BE8HbXQ0.js +2 -0
- package/dist/adapters/KpiText.config-DaSbcfKE.cjs +1 -0
- package/dist/adapters/LineChart.config-CUPtbHNz.cjs +1 -0
- package/dist/adapters/LineChart.config-DHlctcYT.js +2 -0
- package/dist/adapters/MarkdownChart.config-B0T5A7dw.js +2 -0
- package/dist/adapters/MarkdownChart.config-iV60Icd3.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-CBCezRPr.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-CO9Cc3Ha.js +2 -0
- package/dist/adapters/PieChart.config-D6Ofc2h-.js +2 -0
- package/dist/adapters/PieChart.config-TOCX24yj.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-BfiCmXI7.js +2 -0
- package/dist/adapters/ProportionBarChart.config-Bh8_aieC.cjs +1 -0
- package/dist/adapters/RadarChart.config-BfWKUYv4.cjs +1 -0
- package/dist/adapters/RadarChart.config-x87UPfQH.js +2 -0
- package/dist/adapters/RadialBarChart.config-BGA-fVmo.js +2 -0
- package/dist/adapters/RadialBarChart.config-Bo3E1IWc.cjs +1 -0
- package/dist/adapters/RecordsTable.config-CKb4xY0c.cjs +1 -0
- package/dist/adapters/RecordsTable.config-KsPOo8YB.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DVDQBMW8.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DqfOBn6k.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-B7NVTM5_.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-tnd7N7g-.js +2 -0
- package/dist/adapters/SankeyChart.config-B1K4e0RA.js +2 -0
- package/dist/adapters/SankeyChart.config-I26Q_e5f.cjs +1 -0
- package/dist/adapters/ScatterChart.config-CMta6GGl.cjs +1 -0
- package/dist/adapters/ScatterChart.config-WwER0vgC.js +2 -0
- package/dist/adapters/SunburstChart.config-CBYye6Ez.js +2 -0
- package/dist/adapters/SunburstChart.config-DbC1AZCI.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-EcJf0Dzm.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-wNJWipDf.js +2 -0
- package/dist/adapters/WaterfallChart.config--d2EuVF-.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-CPJLjH4K.js +2 -0
- package/dist/adapters/{compiler-SBDjxyQ3.js → compiler-B4tLaYye.js} +10 -10
- package/dist/adapters/{compiler-BdVMQ3Xj.cjs → compiler-BYm93X_G.cjs} +5 -5
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-CSt8MGbw.cjs → core-BQEJzwTJ.cjs} +1 -1
- package/dist/adapters/{core-CXrxqh7l.js → core-CVDf8WNs.js} +2 -2
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +5 -5
- package/dist/adapters/{handler-Cppe-aqH.js → handler-Ck2X85KS.js} +170 -151
- package/dist/adapters/handler-MFn_eVcJ.cjs +16 -0
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-V1nZOil3.cjs +1 -0
- package/dist/adapters/mcp-app-html-sD7j035f.js +5 -0
- package/dist/adapters/mcp-app-html.cjs +1 -0
- package/dist/adapters/mcp-app-html.d.ts +25 -0
- package/dist/adapters/mcp-app-html.js +2 -0
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +21 -20
- package/dist/adapters/mcp-transport-BQxL1h2h.cjs +42 -0
- package/dist/adapters/mcp-transport-yJDy3T6W.js +758 -0
- package/dist/adapters/mcp-transport.d.ts +19 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-BIoIunc7.js → openai-B7EVH3cl.js} +2578 -1797
- package/dist/adapters/openai-BkD4iuG8.cjs +19 -0
- package/dist/adapters/{openai-62sEF0Ev.js → openai-DRFOtBUU.js} +1 -1
- package/dist/adapters/{openai-CaxNY6TC.cjs → openai-FjvP4Mek.cjs} +1 -1
- package/dist/adapters/{utils-C_RKaP0n.js → utils-BY3FDOmN.js} +8 -1
- package/dist/adapters/utils-BkdzL4m9.cjs +132 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/mcp-app-html.d.ts +25 -0
- package/dist/cjs/adapters/mcp-transport.d.ts +19 -2
- package/dist/cjs/client/charts/chartConfigs.d.ts +34 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
- package/dist/cjs/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
- package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
- package/dist/cjs/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
- package/dist/cjs/client/components/charts/MarkdownChart.d.ts +1 -1
- package/dist/cjs/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
- package/dist/cjs/client/components/charts/markdownTemplate.d.ts +92 -0
- package/dist/client/charts/chartConfigs.d.ts +34 -0
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-DjMGNTUa.js → DashboardEditModal-B8zIH0ja.js} +2529 -2368
- package/dist/client/chunks/DashboardEditModal-B8zIH0ja.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-EEtJyV1v.js → DotStripChart-BCgHGY0s.js} +4 -4
- package/dist/client/chunks/{DotStripChart-EEtJyV1v.js.map → DotStripChart-BCgHGY0s.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js → ProportionBarChart-DzdKxzr4.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js.map → ProportionBarChart-DzdKxzr4.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-DvMXV6F6.js → RecordsTable-kQfZ25Pz.js} +4 -4
- package/dist/client/chunks/{RecordsTable-DvMXV6F6.js.map → RecordsTable-kQfZ25Pz.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js → RetentionCombinedChart-CvddCEOk.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js.map → RetentionCombinedChart-CvddCEOk.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js → RetentionHeatmap-BURt-mfm.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js.map → RetentionHeatmap-BURt-mfm.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js → analysis-builder-C0hzThmQ.js} +1688 -1675
- package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js.map → analysis-builder-C0hzThmQ.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js → analysis-builder-shared-CQFcY6vA.js} +476 -476
- package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js.map → analysis-builder-shared-CQFcY6vA.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-UZIp9_2E.js → chart-activity-grid-aIyjUpbJ.js} +9 -2
- package/dist/client/chunks/chart-activity-grid-aIyjUpbJ.js.map +1 -0
- package/dist/client/chunks/{chart-area-CEBcvCcn.js → chart-area-DCCvp06H.js} +3 -3
- package/dist/client/chunks/{chart-area-CEBcvCcn.js.map → chart-area-DCCvp06H.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-DGh7cpU-.js → chart-bar-C8xQ15Aa.js} +3 -3
- package/dist/client/chunks/{chart-bar-DGh7cpU-.js.map → chart-bar-C8xQ15Aa.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js → chart-box-plot-DFMjBoL1.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js.map → chart-box-plot-DFMjBoL1.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-8uH_JKNt.js → chart-bubble-CavhSOT8.js} +2 -2
- package/dist/client/chunks/{chart-bubble-8uH_JKNt.js.map → chart-bubble-CavhSOT8.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-DogklMg1.js → chart-candlestick-BlJ6l-0-.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-DogklMg1.js.map → chart-candlestick-BlJ6l-0-.js.map} +1 -1
- package/dist/client/chunks/{chart-config-markdown-C5kBQOjP.js → chart-config-markdown-CK8PAWUg.js} +8 -3
- package/dist/client/chunks/chart-config-markdown-CK8PAWUg.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-CCvvgeG_.js → chart-data-table-Dfup1JpL.js} +426 -423
- package/dist/client/chunks/chart-data-table-Dfup1JpL.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-D2vGQhaz.js → chart-funnel-DqBD-oth.js} +2 -2
- package/dist/client/chunks/{chart-funnel-D2vGQhaz.js.map → chart-funnel-DqBD-oth.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DbU0rxqv.js → chart-gauge-Tr9BRoTo.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DbU0rxqv.js.map → chart-gauge-Tr9BRoTo.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-x6aQq91x.js → chart-heat-map-V200X1EP.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-x6aQq91x.js.map → chart-heat-map-V200X1EP.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js → chart-kpi-delta-DuXkAxKV.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js.map → chart-kpi-delta-DuXkAxKV.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js → chart-kpi-number-CzRaT5KF.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js.map → chart-kpi-number-CzRaT5KF.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js → chart-kpi-text-DxMl_C7M.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js.map → chart-kpi-text-DxMl_C7M.js.map} +1 -1
- package/dist/client/chunks/{chart-line-C4r44HWi.js → chart-line-rl9q-vom.js} +3 -3
- package/dist/client/chunks/{chart-line-C4r44HWi.js.map → chart-line-rl9q-vom.js.map} +1 -1
- package/dist/client/chunks/chart-markdown-DJq7fXKF.js +8622 -0
- package/dist/client/chunks/chart-markdown-DJq7fXKF.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js → chart-measure-profile-BDpkr55p.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js.map → chart-measure-profile-BDpkr55p.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-BHrPxga2.js → chart-pie-W4Mk0WFB.js} +3 -3
- package/dist/client/chunks/{chart-pie-BHrPxga2.js.map → chart-pie-W4Mk0WFB.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-I9sOFbG5.js → chart-radar-BXkMOUVC.js} +3 -3
- package/dist/client/chunks/{chart-radar-I9sOFbG5.js.map → chart-radar-BXkMOUVC.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js → chart-radial-bar-CSw1hCK2.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js.map → chart-radial-bar-CSw1hCK2.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-1qB7yWHq.js → chart-sankey-CXG8SeW3.js} +2 -2
- package/dist/client/chunks/{chart-sankey-1qB7yWHq.js.map → chart-sankey-CXG8SeW3.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-BHttSxcc.js → chart-scatter-BHp1yLvR.js} +3 -3
- package/dist/client/chunks/{chart-scatter-BHttSxcc.js.map → chart-scatter-BHp1yLvR.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js → chart-sunburst-CHgQCRCz.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js.map → chart-sunburst-CHgQCRCz.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js → chart-tree-map-YBAOj00L.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js.map → chart-tree-map-YBAOj00L.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-BN3B5luW.js → chart-waterfall-CSQ3xvUJ.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-BN3B5luW.js.map → chart-waterfall-CSQ3xvUJ.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DIneMirc.js → charts-core-ghjDtt0_.js} +2 -2
- package/dist/client/chunks/{charts-core-DIneMirc.js.map → charts-core-ghjDtt0_.js.map} +1 -1
- package/dist/client/chunks/charts-loader-B_ye_C5_.js +87 -0
- package/dist/client/chunks/{charts-loader-OHpTBq8c.js.map → charts-loader-B_ye_C5_.js.map} +1 -1
- package/dist/client/chunks/{dist-BPmPx7kz.js → dist-COqN0-Yj.js} +4 -4
- package/dist/client/chunks/{dist-BPmPx7kz.js.map → dist-COqN0-Yj.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-CiByP8VQ.js → exceljs.min-CdNVdwM3.js} +8 -11
- package/dist/client/chunks/{exceljs.min-CiByP8VQ.js.map → exceljs.min-CdNVdwM3.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-dk-kC0sL.js → nl-NL-CKdVNqSp.js} +8 -1
- package/dist/client/chunks/nl-NL-CKdVNqSp.js.map +1 -0
- package/dist/client/chunks/{schema-visualization-PYa578pV.js → schema-visualization-txYCG4v5.js} +4 -4
- package/dist/client/chunks/{schema-visualization-PYa578pV.js.map → schema-visualization-txYCG4v5.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js → useDirtyStateTracking-BUk23Wbh.js} +6 -6
- package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js.map → useDirtyStateTracking-BUk23Wbh.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-DORnTynt.js → useExplainAI-CGLroDBD.js} +5 -5
- package/dist/client/chunks/{useExplainAI-DORnTynt.js.map → useExplainAI-CGLroDBD.js.map} +1 -1
- package/dist/client/chunks/{vendor-DDo8nSGP.js → vendor-CApRxi77.js} +5 -6
- package/dist/client/chunks/{vendor-DDo8nSGP.js.map → vendor-CApRxi77.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
- package/dist/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
- package/dist/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
- package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
- package/dist/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
- package/dist/client/components/charts/MarkdownChart.d.ts +1 -1
- package/dist/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
- package/dist/client/components/charts/markdownTemplate.d.ts +92 -0
- package/dist/client/components.js +2 -2
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +409 -409
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +190 -132
- package/dist/server/index.cjs +17 -23
- package/dist/server/index.js +176 -147
- package/dist/server/openai-BWGYfr6Z.cjs +19 -0
- package/dist/server/{openai-nBhuSFd3.js → openai-Cap1nBuK.js} +1 -1
- package/dist/server/{openai-C1gLuR-0.js → openai-DW5TRMXE.js} +2577 -1796
- package/dist/server/{openai-rF50ZEiR.cjs → openai-G2EivP-n.cjs} +1 -1
- package/package.json +14 -3
- package/dist/adapters/ActivityGridChart.config-DfyZh3He.js +0 -2
- package/dist/adapters/ActivityGridChart.config-DgOwl51m.cjs +0 -1
- package/dist/adapters/AreaChart.config-BL_ZpMsg.js +0 -2
- package/dist/adapters/AreaChart.config-rc1phjmI.cjs +0 -1
- package/dist/adapters/BarChart.config-C6k4BxhM.cjs +0 -1
- package/dist/adapters/BarChart.config-CBACR7Z-.js +0 -2
- package/dist/adapters/BoxPlotChart.config-Bvg6yFn2.js +0 -2
- package/dist/adapters/BoxPlotChart.config-CAlLRM0v.cjs +0 -1
- package/dist/adapters/BubbleChart.config-22qXNskY.js +0 -2
- package/dist/adapters/BubbleChart.config-BkB3P6Bi.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DuZb-y6d.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-G78UbuwS.js +0 -2
- package/dist/adapters/DataTable.config-BXkpzOC2.js +0 -2
- package/dist/adapters/DataTable.config-CwPlSht6.cjs +0 -1
- package/dist/adapters/DotStripChart.config-Bw9Ww5zY.cjs +0 -1
- package/dist/adapters/DotStripChart.config-D5sbLAqA.js +0 -2
- package/dist/adapters/FunnelChart.config-CUs1rqN2.cjs +0 -1
- package/dist/adapters/FunnelChart.config-Cw9qrC2C.js +0 -2
- package/dist/adapters/GaugeChart.config-CjGtJVoO.cjs +0 -1
- package/dist/adapters/GaugeChart.config-F5SA5Oi3.js +0 -2
- package/dist/adapters/HeatMapChart.config-CvgmSiuY.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-DrvQrPHT.js +0 -2
- package/dist/adapters/KpiDelta.config-B-UJWdJ5.cjs +0 -1
- package/dist/adapters/KpiDelta.config-C00mTZYy.js +0 -2
- package/dist/adapters/KpiNumber.config-CB0kTeoV.cjs +0 -1
- package/dist/adapters/KpiNumber.config-D3CogH8j.js +0 -2
- package/dist/adapters/KpiText.config-B0LbKRCf.js +0 -2
- package/dist/adapters/KpiText.config-Dv4TNprC.cjs +0 -1
- package/dist/adapters/LineChart.config-CdONxSLL.js +0 -2
- package/dist/adapters/LineChart.config-DBHsfIYG.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-AYKXdpuw.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-CngxD_Lc.js +0 -2
- package/dist/adapters/MeasureProfileChart.config-B0a5sUk6.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-ByW5F1Ey.js +0 -2
- package/dist/adapters/PieChart.config-Csx1ctk4.js +0 -2
- package/dist/adapters/PieChart.config-Dfw66Xab.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-BaeYznc1.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-DCOizSVs.js +0 -2
- package/dist/adapters/RadarChart.config-AxQh97rB.js +0 -2
- package/dist/adapters/RadarChart.config-BjP-zEGW.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-D5EwyJ0G.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-DMaEJYM_.js +0 -2
- package/dist/adapters/RecordsTable.config-BdN0kZ8b.js +0 -2
- package/dist/adapters/RecordsTable.config-CWRvGDbi.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-BpciOTeX.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-CY8TDzuy.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-BZPRoVpF.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-YMZt-u-T.js +0 -2
- package/dist/adapters/SankeyChart.config-BdSA-Jlp.cjs +0 -1
- package/dist/adapters/SankeyChart.config-Dlgi5_DA.js +0 -2
- package/dist/adapters/ScatterChart.config-VJ0xG0Ak.cjs +0 -1
- package/dist/adapters/ScatterChart.config-oOd1Jplx.js +0 -2
- package/dist/adapters/SunburstChart.config-Cllhyjy4.js +0 -2
- package/dist/adapters/SunburstChart.config-DU11BAei.cjs +0 -1
- package/dist/adapters/TreeMapChart.config--EB8bQTo.js +0 -2
- package/dist/adapters/TreeMapChart.config-BPmMLBH1.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-E99Fl6uM.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-xz3DaoMQ.js +0 -2
- package/dist/adapters/handler-_u5krbOj.cjs +0 -26
- package/dist/adapters/mcp-transport-CpF7usmR.js +0 -754
- package/dist/adapters/mcp-transport-DXIfb0p-.cjs +0 -42
- package/dist/adapters/openai-EBTQKJnV.cjs +0 -19
- package/dist/adapters/utils-DXWQUJbD.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-DjMGNTUa.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-UZIp9_2E.js.map +0 -1
- package/dist/client/chunks/chart-config-markdown-C5kBQOjP.js.map +0 -1
- package/dist/client/chunks/chart-data-table-CCvvgeG_.js.map +0 -1
- package/dist/client/chunks/chart-markdown-b0qPZ617.js +0 -3926
- package/dist/client/chunks/chart-markdown-b0qPZ617.js.map +0 -1
- package/dist/client/chunks/charts-loader-OHpTBq8c.js +0 -87
- package/dist/client/chunks/nl-NL-dk-kC0sL.js.map +0 -1
- package/dist/server/openai-BmADmD1e.cjs +0 -19
package/dist/adapters/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-BkdzL4m9.cjs");exports.buildTransformedQuery=e.t,exports.calculateQueryComplexity=e.n,exports.formatCubeResponse=e.r,exports.formatErrorResponse=e.i,exports.formatMetaResponse=e.a,exports.formatSqlResponse=e.o,exports.formatSqlString=e.x,exports.generateRequestId=e.s,exports.getDatabaseType=e.c,exports.handleBatchRequest=e.l,exports.handleDiscover=e.p,exports.handleDryRun=e.u,exports.handleLoad=e.m,exports.handleSuggest=e.d,exports.handleValidate=e.f,exports.normalizeQueryFields=e.h;
|
package/dist/adapters/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m, x as h } from "./utils-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m, x as h } from "./utils-BY3FDOmN.js";
|
|
2
2
|
export { p as buildTransformedQuery, c as calculateQueryComplexity, d as formatCubeResponse, a as formatErrorResponse, e as formatMetaResponse, l as formatSqlResponse, h as formatSqlString, f as generateRequestId, t as getDatabaseType, o as handleBatchRequest, u as handleDiscover, m as handleDryRun, s as handleLoad, n as handleSuggest, r as handleValidate, i as normalizeQueryFields };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundled MCP App HTML — public subpath `drizzle-cube/mcp-app-html`.
|
|
3
|
+
*
|
|
4
|
+
* This is the ~2 MB single-file MCP App (React + charts, inlined by
|
|
5
|
+
* `vite-plugin-singlefile` → `src/mcp-app/generated-html.ts`). It is only ever
|
|
6
|
+
* needed when `mcp.app` is enabled and a client lists or reads the
|
|
7
|
+
* `ui://drizzle-cube/visualization.html` resource, so the MCP transport loads it
|
|
8
|
+
* with a dynamic `import()` at that moment rather than at adapter import time.
|
|
9
|
+
*
|
|
10
|
+
* **Invariant:** nothing reachable from the adapter entries (`hono`, `express`,
|
|
11
|
+
* `fastify`, `nextjs`, `core`, `utils`) may import this module — or
|
|
12
|
+
* `../mcp-app/generated-html.js` — statically. A static import drags the blob
|
|
13
|
+
* into every consumer's server bundle even with `mcp.enabled: false`
|
|
14
|
+
* (`tests/adapters/mcp-app-html-lazy.test.ts` guards this). The one deliberate
|
|
15
|
+
* static importer is `mcp-tools.ts` (`drizzle-cube/mcp`), whose `resources`
|
|
16
|
+
* array is synchronous public API.
|
|
17
|
+
*
|
|
18
|
+
* In the published build the transport's `import()` targets the bare specifier
|
|
19
|
+
* `drizzle-cube/mcp-app-html` (see `vite.config.adapters.ts`), so bundlers that
|
|
20
|
+
* count every emitted module against a size budget (e.g. wrangler for
|
|
21
|
+
* Cloudflare Workers) can alias it to a stub exporting `mcpAppHtml = ''` when the
|
|
22
|
+
* MCP App is not used.
|
|
23
|
+
*/
|
|
24
|
+
/** The bundled MCP App as a single HTML document. Empty string if not yet built. */
|
|
25
|
+
export declare const mcpAppHtml: string;
|
|
@@ -5,8 +5,25 @@ export type { McpAppConfig };
|
|
|
5
5
|
export { type MCPPrompt };
|
|
6
6
|
export declare const MCP_APP_RESOURCE_URI = "ui://drizzle-cube/visualization.html";
|
|
7
7
|
export declare const MCP_APP_MIME_TYPE = "text/html;profile=mcp-app";
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Inject the MCP App locale config into an MCP App HTML document. Pure: the
|
|
10
|
+
* HTML is passed in, so callers decide how (and whether) to load the blob.
|
|
11
|
+
* Returns `html` unchanged when it is empty (not yet built) or no config is given.
|
|
12
|
+
*/
|
|
13
|
+
export declare function injectMcpAppConfig(html: string, config?: McpAppConfig): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get the bundled MCP App HTML, optionally with locale config injected.
|
|
16
|
+
* Returns an empty string if the app is not yet built.
|
|
17
|
+
*
|
|
18
|
+
* The ~2 MB HTML blob is loaded with a dynamic `import()` on first use, never at
|
|
19
|
+
* module load: it is only wanted when `mcp.app` is on and a client actually
|
|
20
|
+
* lists/reads the visualization resource. Every adapter imports this module, so
|
|
21
|
+
* a static import here would put the blob in every consumer's server bundle
|
|
22
|
+
* even with `mcp.enabled: false`. In the published build the specifier is
|
|
23
|
+
* rewritten to `drizzle-cube/mcp-app-html`, which consumers may alias to a stub
|
|
24
|
+
* — see `mcp-app-html.ts`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getMcpAppHtml(config?: McpAppConfig): Promise<string>;
|
|
10
27
|
export type JsonRpcId = string | number | null | undefined;
|
|
11
28
|
export interface JsonRpcRequest {
|
|
12
29
|
jsonrpc: '2.0';
|
|
@@ -45,8 +45,35 @@ export interface DisplayOptionConfig {
|
|
|
45
45
|
value: any;
|
|
46
46
|
label: string;
|
|
47
47
|
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Which tab the option belongs on. Defaults to `display`.
|
|
50
|
+
*
|
|
51
|
+
* The Chart tab exists to answer "what feeds this chart", which for most
|
|
52
|
+
* types is the axis drop zones. A content-first chart has no zones, and its
|
|
53
|
+
* equivalent input is a display option — markdown's `content` being the case
|
|
54
|
+
* in point, which is its whole substance and wants the room. Marking it
|
|
55
|
+
* `chart` moves it there rather than leaving the tab empty and the editor
|
|
56
|
+
* squeezed into a sidebar.
|
|
57
|
+
*/
|
|
58
|
+
placement?: 'chart' | 'display';
|
|
48
59
|
/** Help text shown below the input */
|
|
49
60
|
description?: string;
|
|
61
|
+
/** Visible rows for a string option's textarea. Defaults to 8. */
|
|
62
|
+
rows?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Render a string option with syntax highlighting rather than as a plain
|
|
65
|
+
* textarea. Only `markdownTemplate` exists, colouring `{{ }}` expressions,
|
|
66
|
+
* `{% %}` tags and markdown headings.
|
|
67
|
+
*/
|
|
68
|
+
syntax?: 'markdownTemplate';
|
|
69
|
+
/**
|
|
70
|
+
* External reference for options whose full syntax cannot fit in help text.
|
|
71
|
+
* Rendered as a link after the description, so the panel can stay short
|
|
72
|
+
* instead of restating a whole template language badly.
|
|
73
|
+
*/
|
|
74
|
+
docsUrl?: string;
|
|
75
|
+
/** Label for the `docsUrl` link — a translation key, like `label`. */
|
|
76
|
+
docsLabel?: string;
|
|
50
77
|
/** Minimum value for number inputs */
|
|
51
78
|
min?: number;
|
|
52
79
|
/** Maximum value for number inputs */
|
|
@@ -54,6 +81,13 @@ export interface DisplayOptionConfig {
|
|
|
54
81
|
/** Step value for number inputs */
|
|
55
82
|
step?: number;
|
|
56
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Split display options by which tab renders them.
|
|
86
|
+
*
|
|
87
|
+
* Shared by the Chart and Display panels so the two cannot disagree and leave
|
|
88
|
+
* an option shown twice or not at all.
|
|
89
|
+
*/
|
|
90
|
+
export declare function optionsForPlacement(options: DisplayOptionConfig[] | undefined, placement: 'chart' | 'display'): DisplayOptionConfig[];
|
|
57
91
|
/**
|
|
58
92
|
* Whether a chart type can be rendered with the current query shape.
|
|
59
93
|
* Each chart's .config.ts declares its own `isAvailable` to keep requirements
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartType, ChartAxisConfig } from '../../types.js';
|
|
1
|
+
import { ChartType, ChartAxisConfig, ChartDisplayConfig, ColorPalette } from '../../types.js';
|
|
2
2
|
import { MetricItem, BreakdownItem } from './types.js';
|
|
3
3
|
import { ChartAvailabilityMap } from '../../shared/chartDefaults.js';
|
|
4
4
|
import { MetaResponse } from '../../shared/types.js';
|
|
@@ -13,6 +13,14 @@ interface AnalysisChartConfigPanelProps {
|
|
|
13
13
|
chartAvailability?: ChartAvailabilityMap;
|
|
14
14
|
onChartTypeChange: (type: ChartType) => void;
|
|
15
15
|
onChartConfigChange: (config: ChartAxisConfig) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Display config, for the options a chart asks to render here rather than on
|
|
18
|
+
* the Display tab — see `placement` on `DisplayOptionConfig`. Optional, since
|
|
19
|
+
* not every mount of this panel owns the display config.
|
|
20
|
+
*/
|
|
21
|
+
displayConfig?: ChartDisplayConfig;
|
|
22
|
+
colorPalette?: ColorPalette;
|
|
23
|
+
onDisplayConfigChange?: (config: ChartDisplayConfig) => void;
|
|
16
24
|
}
|
|
17
|
-
export default function AnalysisChartConfigPanel({ chartType, chartConfig, metrics, breakdowns, schema, chartAvailability, onChartTypeChange, onChartConfigChange }: AnalysisChartConfigPanelProps): import("react").JSX.Element;
|
|
25
|
+
export default function AnalysisChartConfigPanel({ chartType, chartConfig, metrics, breakdowns, schema, chartAvailability, onChartTypeChange, onChartConfigChange, displayConfig, colorPalette, onDisplayConfigChange }: AnalysisChartConfigPanelProps): import("react").JSX.Element;
|
|
18
26
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A textarea with syntax highlighting, for the markdown template field.
|
|
3
|
+
*
|
|
4
|
+
* A textarea cannot style its own contents, so the text is drawn twice: a
|
|
5
|
+
* coloured layer underneath, and the real textarea on top with transparent text
|
|
6
|
+
* and a visible caret. The two only stay aligned if they share every metric
|
|
7
|
+
* that affects layout — font, size, line height, padding, border, wrapping —
|
|
8
|
+
* so those live in one constant rather than on each element.
|
|
9
|
+
*/
|
|
10
|
+
interface TemplateEditorProps {
|
|
11
|
+
value: string;
|
|
12
|
+
onChange: (value: string) => void;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
rows?: number;
|
|
15
|
+
}
|
|
16
|
+
export default function TemplateEditor({ value, onChange, placeholder, rows }: TemplateEditorProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deliberately small tokenizer for the markdown template editor.
|
|
3
|
+
*
|
|
4
|
+
* highlight.js, which the debug panels use, has no Knap language and would need
|
|
5
|
+
* a whole grammar loaded to colour a template. The editor needs far less than a
|
|
6
|
+
* grammar: it has to tell prose from template code, and within template code
|
|
7
|
+
* tell a keyword from a variable, a filter, a literal and punctuation. That is
|
|
8
|
+
* a short list, so it is done directly and costs nothing to load.
|
|
9
|
+
*
|
|
10
|
+
* This colours text; it does not understand it. Diagnostics come from Knap's
|
|
11
|
+
* own parser via `findUnknownReferences`.
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateTokenKind = 'text' | 'heading' | 'delimiter' | 'keyword' | 'identifier' | 'filter' | 'string' | 'number' | 'operator';
|
|
14
|
+
export interface TemplateToken {
|
|
15
|
+
text: string;
|
|
16
|
+
kind: TemplateTokenKind;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Split template source into coloured runs.
|
|
20
|
+
*
|
|
21
|
+
* Every character of the input appears in exactly one token, in order, so the
|
|
22
|
+
* rendered layer lines up with the textarea character for character. An
|
|
23
|
+
* unterminated `{{` stays plain text rather than swallowing the rest of the
|
|
24
|
+
* document, which keeps the colouring stable while someone is mid-keystroke.
|
|
25
|
+
*/
|
|
26
|
+
export declare function tokenizeTemplate(source: string): TemplateToken[];
|
|
@@ -8,6 +8,18 @@ export interface ParsedPortletQuery {
|
|
|
8
8
|
serverFlowQuery: ServerFlowQuery | null;
|
|
9
9
|
serverRetentionQuery: ServerRetentionQuery | null;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether a portlet's query string asks for anything the engine could run.
|
|
13
|
+
*
|
|
14
|
+
* A chart type marked `skipQuery` does not *require* a query, but it may still
|
|
15
|
+
* carry one — a markdown portlet with a query renders its content as a data
|
|
16
|
+
* template. This decides which of the two it is.
|
|
17
|
+
*
|
|
18
|
+
* Everything unrunnable reads as "no query": an empty string, `{}` (what the
|
|
19
|
+
* agent writes for a text portlet), unparseable JSON, or a query whose members
|
|
20
|
+
* are all empty. The alternate formats count as runnable in their own right.
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasRunnableQuery(query: string): boolean;
|
|
11
23
|
export interface ParsePortletQueryParams {
|
|
12
24
|
query: string;
|
|
13
25
|
shouldSkipQuery: boolean;
|
|
@@ -6,6 +6,13 @@ export interface PortletRenderStateParams {
|
|
|
6
6
|
hasChartConfig: boolean;
|
|
7
7
|
hasMandatoryFields: boolean;
|
|
8
8
|
shouldSkipQuery: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the chart has something to show even with no rows — true for the
|
|
11
|
+
* content-first types, meaning those whose config sets `skipQuery`. A
|
|
12
|
+
* markdown narrative whose whole job is to say "no incidents this week" must
|
|
13
|
+
* survive an empty result rather than being replaced by the no-data view.
|
|
14
|
+
*/
|
|
15
|
+
rendersWithoutData: boolean;
|
|
9
16
|
eagerLoad: boolean;
|
|
10
17
|
isVisible: boolean;
|
|
11
18
|
isLoading: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ChartProps } from '../../types.js';
|
|
3
|
-
declare const MarkdownChart: React.MemoExoticComponent<({ displayConfig, height, colorPalette }: ChartProps) => React.JSX.Element | null>;
|
|
3
|
+
declare const MarkdownChart: React.MemoExoticComponent<({ data, displayConfig, queryObject, height, colorPalette }: ChartProps) => React.JSX.Element | null>;
|
|
4
4
|
export default MarkdownChart;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { CubeQuery } from '../../types.js';
|
|
3
|
+
import { MarkdownTemplateDiagnostic } from './markdownTemplate.js';
|
|
4
|
+
/** Body text size class for a fontSize setting. */
|
|
5
|
+
export declare function bodySizeClass(fontSize: string): string;
|
|
6
|
+
/** Text alignment class for an alignment setting. */
|
|
7
|
+
export declare function alignmentClass(alignment: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* markdown-to-jsx options for the chart's themed elements.
|
|
10
|
+
*
|
|
11
|
+
* The `sanitizer` is markdown-to-jsx's own, named rather than left implicit:
|
|
12
|
+
* template output can carry warehouse values into link and image destinations,
|
|
13
|
+
* so the protocol policy should be visible in our code.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildMarkdownOptions(accentColor: string, fontSize: string): {
|
|
16
|
+
sanitizer: (value: string) => string | null;
|
|
17
|
+
overrides: {
|
|
18
|
+
h1: {
|
|
19
|
+
props: {
|
|
20
|
+
className: string;
|
|
21
|
+
style: {
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
h2: {
|
|
27
|
+
props: {
|
|
28
|
+
className: string;
|
|
29
|
+
style: {
|
|
30
|
+
color: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
h3: {
|
|
35
|
+
props: {
|
|
36
|
+
className: string;
|
|
37
|
+
style: {
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
p: {
|
|
43
|
+
props: {
|
|
44
|
+
className: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
strong: {
|
|
48
|
+
props: {
|
|
49
|
+
className: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
em: {
|
|
53
|
+
props: {
|
|
54
|
+
className: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
a: {
|
|
58
|
+
props: {
|
|
59
|
+
className: string;
|
|
60
|
+
target: string;
|
|
61
|
+
rel: string;
|
|
62
|
+
style: {
|
|
63
|
+
color: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
code: {
|
|
68
|
+
props: {
|
|
69
|
+
className: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
pre: {
|
|
73
|
+
props: {
|
|
74
|
+
className: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
ul: {
|
|
78
|
+
props: {
|
|
79
|
+
className: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
ol: {
|
|
83
|
+
props: {
|
|
84
|
+
className: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
li: {
|
|
88
|
+
props: {
|
|
89
|
+
className: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
blockquote: {
|
|
93
|
+
props: {
|
|
94
|
+
className: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
hr: {
|
|
98
|
+
props: {
|
|
99
|
+
className: string;
|
|
100
|
+
style: {
|
|
101
|
+
height: string;
|
|
102
|
+
backgroundColor: string;
|
|
103
|
+
opacity: number;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
table: {
|
|
108
|
+
props: {
|
|
109
|
+
className: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
thead: {
|
|
113
|
+
props: {
|
|
114
|
+
className: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
th: {
|
|
118
|
+
props: {
|
|
119
|
+
className: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
td: {
|
|
123
|
+
props: {
|
|
124
|
+
className: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
tr: {
|
|
128
|
+
props: {
|
|
129
|
+
className: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
/** The accent stripe, on whichever side the config names. */
|
|
135
|
+
export declare function buildAccentBorderStyle(accentBorder: string, accentColor: string, transparentBackground: boolean): CSSProperties;
|
|
136
|
+
/** The palette colour at `index`, or the chart default. */
|
|
137
|
+
export declare function resolveAccentColor(colors: string[] | undefined, index: number): string;
|
|
138
|
+
/** Rows arrive as `unknown[]`; only plain objects can become template variables. */
|
|
139
|
+
export declare function toTemplateRows(data: unknown): Record<string, unknown>[];
|
|
140
|
+
export interface MarkdownTemplateState {
|
|
141
|
+
/** Whether the content is a template rather than literal markdown. */
|
|
142
|
+
isTemplate: boolean;
|
|
143
|
+
/** The rendered body, or null before the first async render lands. */
|
|
144
|
+
output: string | null;
|
|
145
|
+
errors: MarkdownTemplateDiagnostic[];
|
|
146
|
+
/** References that resolved to nothing, reported alongside the output. */
|
|
147
|
+
warnings: MarkdownTemplateDiagnostic[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Render the chart's content as a Knap template when a query is attached.
|
|
151
|
+
*
|
|
152
|
+
* A real query is what distinguishes the two modes, and it has to be the
|
|
153
|
+
* members rather than the object: several callers pass `{}` for "no query", and
|
|
154
|
+
* treating that as a template would silently reinterpret every text block.
|
|
155
|
+
*/
|
|
156
|
+
export declare function useMarkdownTemplate(content: string, data: unknown, queryObject: CubeQuery | undefined): MarkdownTemplateState;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knap template support for the markdown chart.
|
|
3
|
+
*
|
|
4
|
+
* A markdown portlet with a query renders its content as a Knap template rather
|
|
5
|
+
* than as literal markdown, so a dashboard can carry a written summary that is
|
|
6
|
+
* computed from live data instead of typed by hand.
|
|
7
|
+
*
|
|
8
|
+
* Knap resolves `a.b` as nested member access, so a cube-qualified result key
|
|
9
|
+
* such as `Employees.avgSalary` is unreachable from a `for` loop or from the
|
|
10
|
+
* `map` / `where` filters — those see a missing `Employees` object and yield
|
|
11
|
+
* nothing. Every row is therefore offered three ways:
|
|
12
|
+
*
|
|
13
|
+
* rows aliased keys (`employees_avg_salary`) — loops and arithmetic
|
|
14
|
+
* labelled human field labels as keys — `{{ labelled | table }}` headers
|
|
15
|
+
* data the raw dotted keys — `{{ data[0]["Employees.avgSalary"] }}`
|
|
16
|
+
*
|
|
17
|
+
* `first` and `last` exist because Knap's filters stringify on assignment:
|
|
18
|
+
* `{% set top = rows | sort:"x" %}` makes `top` a string, so a template cannot
|
|
19
|
+
* sort and then index. The query's own ordering has to be surfaced directly.
|
|
20
|
+
*/
|
|
21
|
+
/** One result field, in the three namings a template can address it by. */
|
|
22
|
+
export interface MarkdownTemplateField {
|
|
23
|
+
/** The raw cube-qualified key, e.g. `Employees.avgSalary`. */
|
|
24
|
+
key: string;
|
|
25
|
+
/** The template-safe alias, e.g. `employees_avg_salary`. */
|
|
26
|
+
alias: string;
|
|
27
|
+
/** The human-readable label, e.g. `Avg Salary`. */
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
30
|
+
/** The variables a markdown template is rendered against. */
|
|
31
|
+
export interface MarkdownTemplateContext {
|
|
32
|
+
rows: Record<string, unknown>[];
|
|
33
|
+
labelled: Record<string, unknown>[];
|
|
34
|
+
data: Record<string, unknown>[];
|
|
35
|
+
rowCount: number;
|
|
36
|
+
first: Record<string, unknown> | null;
|
|
37
|
+
last: Record<string, unknown> | null;
|
|
38
|
+
fields: MarkdownTemplateField[];
|
|
39
|
+
}
|
|
40
|
+
/** A rendered template, or the diagnostics explaining why it did not render. */
|
|
41
|
+
export interface MarkdownTemplateResult {
|
|
42
|
+
output: string;
|
|
43
|
+
errors: MarkdownTemplateDiagnostic[];
|
|
44
|
+
/**
|
|
45
|
+
* References the template makes that resolve to nothing. Knap renders an
|
|
46
|
+
* unknown name as an empty string, so a misspelt field produces a blank
|
|
47
|
+
* heading rather than any complaint — the failure is invisible at exactly the
|
|
48
|
+
* moment the author needs to see it.
|
|
49
|
+
*/
|
|
50
|
+
warnings: MarkdownTemplateDiagnostic[];
|
|
51
|
+
}
|
|
52
|
+
export interface MarkdownTemplateDiagnostic {
|
|
53
|
+
message: string;
|
|
54
|
+
line: number;
|
|
55
|
+
column: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Derive the template alias for a cube-qualified field key.
|
|
59
|
+
*
|
|
60
|
+
* `Employees.avgSalary` becomes `employees_avg_salary`. A key that would start
|
|
61
|
+
* with a digit is prefixed, since Knap identifiers cannot.
|
|
62
|
+
*/
|
|
63
|
+
export declare function aliasForField(key: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Build the template variables for a set of result rows.
|
|
66
|
+
*
|
|
67
|
+
* @param rows - raw result rows, as `resultSet.rawData()` returns them
|
|
68
|
+
* @param getFieldLabel - resolves a field key to its human label; pass the
|
|
69
|
+
* value of `useCubeFieldLabel()` so labels match the rest of the app
|
|
70
|
+
*/
|
|
71
|
+
export declare function buildTemplateContext(rows: Record<string, unknown>[], getFieldLabel?: (key: string) => string): MarkdownTemplateContext;
|
|
72
|
+
/**
|
|
73
|
+
* Find references that will silently render as nothing.
|
|
74
|
+
*
|
|
75
|
+
* Two mistakes account for nearly all of them: naming a variable the context
|
|
76
|
+
* does not provide, and reading a field off a row under a name that is not its
|
|
77
|
+
* alias. Both look identical in the output — a blank space where a value should
|
|
78
|
+
* be — so they are reported with the names that would have worked.
|
|
79
|
+
*/
|
|
80
|
+
export declare function findUnknownReferences(template: string, context: MarkdownTemplateContext): MarkdownTemplateDiagnostic[];
|
|
81
|
+
/**
|
|
82
|
+
* Check a template for syntax errors and unknown filters without rendering it.
|
|
83
|
+
* Synchronous, so an editor can show diagnostics as the author types.
|
|
84
|
+
*/
|
|
85
|
+
export declare function validateTemplate(template: string): MarkdownTemplateDiagnostic[];
|
|
86
|
+
/**
|
|
87
|
+
* Render a markdown template against result rows.
|
|
88
|
+
*
|
|
89
|
+
* Never throws. A broken template reports its diagnostics so the portlet can
|
|
90
|
+
* show them in place, rather than taking the dashboard down with it.
|
|
91
|
+
*/
|
|
92
|
+
export declare function renderMarkdownTemplate(template: string, context: MarkdownTemplateContext): Promise<MarkdownTemplateResult>;
|
|
@@ -45,8 +45,35 @@ export interface DisplayOptionConfig {
|
|
|
45
45
|
value: any;
|
|
46
46
|
label: string;
|
|
47
47
|
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Which tab the option belongs on. Defaults to `display`.
|
|
50
|
+
*
|
|
51
|
+
* The Chart tab exists to answer "what feeds this chart", which for most
|
|
52
|
+
* types is the axis drop zones. A content-first chart has no zones, and its
|
|
53
|
+
* equivalent input is a display option — markdown's `content` being the case
|
|
54
|
+
* in point, which is its whole substance and wants the room. Marking it
|
|
55
|
+
* `chart` moves it there rather than leaving the tab empty and the editor
|
|
56
|
+
* squeezed into a sidebar.
|
|
57
|
+
*/
|
|
58
|
+
placement?: 'chart' | 'display';
|
|
48
59
|
/** Help text shown below the input */
|
|
49
60
|
description?: string;
|
|
61
|
+
/** Visible rows for a string option's textarea. Defaults to 8. */
|
|
62
|
+
rows?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Render a string option with syntax highlighting rather than as a plain
|
|
65
|
+
* textarea. Only `markdownTemplate` exists, colouring `{{ }}` expressions,
|
|
66
|
+
* `{% %}` tags and markdown headings.
|
|
67
|
+
*/
|
|
68
|
+
syntax?: 'markdownTemplate';
|
|
69
|
+
/**
|
|
70
|
+
* External reference for options whose full syntax cannot fit in help text.
|
|
71
|
+
* Rendered as a link after the description, so the panel can stay short
|
|
72
|
+
* instead of restating a whole template language badly.
|
|
73
|
+
*/
|
|
74
|
+
docsUrl?: string;
|
|
75
|
+
/** Label for the `docsUrl` link — a translation key, like `label`. */
|
|
76
|
+
docsLabel?: string;
|
|
50
77
|
/** Minimum value for number inputs */
|
|
51
78
|
min?: number;
|
|
52
79
|
/** Maximum value for number inputs */
|
|
@@ -54,6 +81,13 @@ export interface DisplayOptionConfig {
|
|
|
54
81
|
/** Step value for number inputs */
|
|
55
82
|
step?: number;
|
|
56
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Split display options by which tab renders them.
|
|
86
|
+
*
|
|
87
|
+
* Shared by the Chart and Display panels so the two cannot disagree and leave
|
|
88
|
+
* an option shown twice or not at all.
|
|
89
|
+
*/
|
|
90
|
+
export declare function optionsForPlacement(options: DisplayOptionConfig[] | undefined, placement: 'chart' | 'display'): DisplayOptionConfig[];
|
|
57
91
|
/**
|
|
58
92
|
* Whether a chart type can be rendered with the current query shape.
|
|
59
93
|
* Each chart's .config.ts declares its own `isAvailable` to keep requirements
|
package/dist/client/charts.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { dt as e, ft as t, gt as n, ht as r, lt as i, mt as a, pt as o, t as s, ut as c } from "./chunks/chart-data-table-
|
|
2
|
-
import { d as l, l as u, s as d, u as f } from "./chunks/chart-activity-grid-
|
|
3
|
-
import { t as p } from "./chunks/chart-funnel-
|
|
4
|
-
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b } from "./chunks/charts-loader-
|
|
5
|
-
import { t as x } from "./chunks/chart-area-
|
|
1
|
+
import { dt as e, ft as t, gt as n, ht as r, lt as i, mt as a, pt as o, t as s, ut as c } from "./chunks/chart-data-table-Dfup1JpL.js";
|
|
2
|
+
import { d as l, l as u, s as d, u as f } from "./chunks/chart-activity-grid-aIyjUpbJ.js";
|
|
3
|
+
import { t as p } from "./chunks/chart-funnel-DqBD-oth.js";
|
|
4
|
+
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b } from "./chunks/charts-loader-B_ye_C5_.js";
|
|
5
|
+
import { t as x } from "./chunks/chart-area-DCCvp06H.js";
|
|
6
6
|
import { i as S } from "./chunks/utils-CToHkuhU.js";
|
|
7
|
-
import { t as C } from "./chunks/chart-bar-
|
|
8
|
-
import { t as w } from "./chunks/chart-line-
|
|
9
|
-
import { t as T } from "./chunks/chart-pie-
|
|
10
|
-
import { t as E } from "./chunks/chart-scatter-
|
|
11
|
-
import { t as D } from "./chunks/chart-radar-
|
|
12
|
-
import { t as O } from "./chunks/chart-radial-bar-
|
|
13
|
-
import { t as k } from "./chunks/chart-tree-map-
|
|
7
|
+
import { t as C } from "./chunks/chart-bar-C8xQ15Aa.js";
|
|
8
|
+
import { t as w } from "./chunks/chart-line-rl9q-vom.js";
|
|
9
|
+
import { t as T } from "./chunks/chart-pie-W4Mk0WFB.js";
|
|
10
|
+
import { t as E } from "./chunks/chart-scatter-BHp1yLvR.js";
|
|
11
|
+
import { t as D } from "./chunks/chart-radar-BXkMOUVC.js";
|
|
12
|
+
import { t as O } from "./chunks/chart-radial-bar-CSw1hCK2.js";
|
|
13
|
+
import { t as k } from "./chunks/chart-tree-map-YBAOj00L.js";
|
|
14
14
|
export { d as CHART_COLORS, u as CHART_MARGINS, s as DataTable, p as FunnelChart, b as LazyChart, f as NEGATIVE_COLOR, l as POSITIVE_COLOR, x as RechartsAreaChart, C as RechartsBarChart, w as RechartsLineChart, T as RechartsPieChart, D as RechartsRadarChart, O as RechartsRadialBarChart, E as RechartsScatterChart, k as RechartsTreeMapChart, i as clearChartConfigCache, S as formatChartData, g as getAvailableChartTypes, c as getChartConfigAsync, e as getChartConfigSync, v as getUnavailableChartTypes, t as isChartConfigLoaded, h as isChartTypeAvailable, m as isValidChartType, o as loadAllChartConfigs, _ as preloadChart, a as preloadChartConfig, r as preloadChartConfigs, y as preloadCharts, n as useChartConfig };
|