@tetrascience-npm/tetrascience-react-ui 0.7.0 → 1.0.0
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/README.md +58 -4
- package/dist/ai/attachments.cjs +2 -0
- package/dist/ai/attachments.cjs.map +1 -0
- package/dist/ai/attachments.js +224 -0
- package/dist/ai/attachments.js.map +1 -0
- package/dist/ai/chain-of-thought.cjs +2 -0
- package/dist/ai/chain-of-thought.cjs.map +1 -0
- package/dist/ai/chain-of-thought.js +145 -0
- package/dist/ai/chain-of-thought.js.map +1 -0
- package/dist/ai/confirmation.cjs +2 -0
- package/dist/ai/confirmation.cjs.map +1 -0
- package/dist/ai/confirmation.js +109 -0
- package/dist/ai/confirmation.js.map +1 -0
- package/dist/ai/context.cjs +2 -0
- package/dist/ai/context.cjs.map +1 -0
- package/dist/ai/context.js +267 -0
- package/dist/ai/context.js.map +1 -0
- package/dist/ai/conversation.cjs +4 -0
- package/dist/ai/conversation.cjs.map +1 -0
- package/dist/ai/conversation.js +108 -0
- package/dist/ai/conversation.js.map +1 -0
- package/dist/ai/inline-citation.cjs +2 -0
- package/dist/ai/inline-citation.cjs.map +1 -0
- package/dist/ai/inline-citation.js +182 -0
- package/dist/ai/inline-citation.js.map +1 -0
- package/dist/ai/message.cjs +2 -0
- package/dist/ai/message.cjs.map +1 -0
- package/dist/ai/message.js +237 -0
- package/dist/ai/message.js.map +1 -0
- package/dist/ai/model-selector.cjs +2 -0
- package/dist/ai/model-selector.cjs.map +1 -0
- package/dist/ai/model-selector.js +77 -0
- package/dist/ai/model-selector.js.map +1 -0
- package/dist/ai/prompt-input.cjs +2 -0
- package/dist/ai/prompt-input.cjs.map +1 -0
- package/dist/ai/prompt-input.js +776 -0
- package/dist/ai/prompt-input.js.map +1 -0
- package/dist/ai/queue.cjs +2 -0
- package/dist/ai/queue.cjs.map +1 -0
- package/dist/ai/queue.js +209 -0
- package/dist/ai/queue.js.map +1 -0
- package/dist/ai/reasoning.cjs +2 -0
- package/dist/ai/reasoning.cjs.map +1 -0
- package/dist/ai/reasoning.js +129 -0
- package/dist/ai/reasoning.js.map +1 -0
- package/dist/ai/shimmer.cjs +2 -0
- package/dist/ai/shimmer.cjs.map +1 -0
- package/dist/ai/shimmer.js +49 -0
- package/dist/ai/shimmer.js.map +1 -0
- package/dist/ai/sources.cjs +2 -0
- package/dist/ai/sources.cjs.map +1 -0
- package/dist/ai/sources.js +54 -0
- package/dist/ai/sources.js.map +1 -0
- package/dist/ai/speech-input.cjs +2 -0
- package/dist/ai/speech-input.cjs.map +1 -0
- package/dist/ai/speech-input.js +123 -0
- package/dist/ai/speech-input.js.map +1 -0
- package/dist/ai/stream-status.cjs +2 -0
- package/dist/ai/stream-status.cjs.map +1 -0
- package/dist/ai/stream-status.js +108 -0
- package/dist/ai/stream-status.js.map +1 -0
- package/dist/ai/suggestion.cjs +2 -0
- package/dist/ai/suggestion.cjs.map +1 -0
- package/dist/ai/suggestion.js +38 -0
- package/dist/ai/suggestion.js.map +1 -0
- package/dist/ai/task.cjs +2 -0
- package/dist/ai/task.cjs.map +1 -0
- package/dist/ai/task.js +101 -0
- package/dist/ai/task.js.map +1 -0
- package/dist/ai/tool.cjs +2 -0
- package/dist/ai/tool.cjs.map +1 -0
- package/dist/ai/tool.js +139 -0
- package/dist/ai/tool.js.map +1 -0
- package/dist/charts/AreaPlot.cjs +2 -0
- package/dist/charts/AreaPlot.cjs.map +1 -0
- package/dist/charts/AreaPlot.js +5 -0
- package/dist/charts/AreaPlot.js.map +1 -0
- package/dist/charts/BarChart.cjs +2 -0
- package/dist/charts/BarChart.cjs.map +1 -0
- package/dist/charts/BarChart.js +5 -0
- package/dist/charts/BarChart.js.map +1 -0
- package/dist/charts/BoxPlot.cjs +2 -0
- package/dist/charts/BoxPlot.cjs.map +1 -0
- package/dist/charts/BoxPlot.js +5 -0
- package/dist/charts/BoxPlot.js.map +1 -0
- package/dist/charts/ChartTooltip.cjs +2 -0
- package/dist/charts/ChartTooltip.cjs.map +1 -0
- package/dist/charts/ChartTooltip.js +8 -0
- package/dist/charts/ChartTooltip.js.map +1 -0
- package/dist/charts/Chromatogram.cjs +2 -0
- package/dist/charts/Chromatogram.cjs.map +1 -0
- package/dist/charts/Chromatogram.js +5 -0
- package/dist/charts/Chromatogram.js.map +1 -0
- package/dist/charts/Electropherogram.cjs +2 -0
- package/dist/charts/Electropherogram.cjs.map +1 -0
- package/dist/charts/Electropherogram.js +5 -0
- package/dist/charts/Electropherogram.js.map +1 -0
- package/dist/charts/Histogram.cjs +2 -0
- package/dist/charts/Histogram.cjs.map +1 -0
- package/dist/charts/Histogram.js +5 -0
- package/dist/charts/Histogram.js.map +1 -0
- package/dist/charts/LinePlot.cjs +2 -0
- package/dist/charts/LinePlot.cjs.map +1 -0
- package/dist/charts/LinePlot.js +5 -0
- package/dist/charts/LinePlot.js.map +1 -0
- package/dist/charts/PieChart.cjs +2 -0
- package/dist/charts/PieChart.cjs.map +1 -0
- package/dist/charts/PieChart.js +5 -0
- package/dist/charts/PieChart.js.map +1 -0
- package/dist/charts/PlateMap.cjs +2 -0
- package/dist/charts/PlateMap.cjs.map +1 -0
- package/dist/charts/PlateMap.js +5 -0
- package/dist/charts/PlateMap.js.map +1 -0
- package/dist/charts/ScatterPlot.cjs +2 -0
- package/dist/charts/ScatterPlot.cjs.map +1 -0
- package/dist/charts/ScatterPlot.js +5 -0
- package/dist/charts/ScatterPlot.js.map +1 -0
- package/dist/charts/ScatterPlotInteractive.cjs +2 -0
- package/dist/charts/ScatterPlotInteractive.cjs.map +1 -0
- package/dist/charts/ScatterPlotInteractive.js +14 -0
- package/dist/charts/ScatterPlotInteractive.js.map +1 -0
- package/dist/charts/StackedChromatogram.cjs +2 -0
- package/dist/charts/StackedChromatogram.cjs.map +1 -0
- package/dist/charts/StackedChromatogram.js +7 -0
- package/dist/charts/StackedChromatogram.js.map +1 -0
- package/dist/components/ai/attachments.d.ts +54 -0
- package/dist/components/ai/chain-of-thought.d.ts +56 -0
- package/dist/components/ai/confirmation.d.ts +47 -0
- package/dist/components/ai/context.d.ts +40 -0
- package/dist/components/ai/conversation.d.ts +23 -0
- package/dist/components/ai/inline-citation.d.ts +38 -0
- package/dist/components/ai/message.d.ts +37 -0
- package/dist/components/ai/model-selector.d.ts +36 -0
- package/dist/components/ai/prompt-input.d.ts +158 -0
- package/dist/components/ai/queue.d.ts +72 -0
- package/dist/components/ai/reasoning.d.ts +26 -0
- package/dist/components/ai/shimmer.d.ts +17 -0
- package/dist/components/ai/sources.d.ts +12 -0
- package/dist/components/ai/speech-input.d.ts +54 -0
- package/dist/components/ai/stream-status.d.ts +66 -0
- package/dist/components/ai/streamdown-code-plugin.cjs +2 -0
- package/dist/components/ai/streamdown-code-plugin.cjs.map +1 -0
- package/dist/components/ai/streamdown-code-plugin.d.ts +2 -0
- package/dist/components/ai/streamdown-code-plugin.js +42 -0
- package/dist/components/ai/streamdown-code-plugin.js.map +1 -0
- package/dist/components/ai/streamdown-plugins.cjs +2 -0
- package/dist/components/ai/streamdown-plugins.cjs.map +1 -0
- package/dist/components/ai/streamdown-plugins.d.ts +2 -0
- package/dist/components/ai/streamdown-plugins.js +14 -0
- package/dist/components/ai/streamdown-plugins.js.map +1 -0
- package/dist/components/ai/suggestion.d.ts +9 -0
- package/dist/components/ai/task.d.ts +16 -0
- package/dist/components/ai/tool.d.ts +33 -0
- package/dist/components/ai/use-streamdown-plugins.cjs +2 -0
- package/dist/components/ai/use-streamdown-plugins.cjs.map +1 -0
- package/dist/components/ai/use-streamdown-plugins.d.ts +8 -0
- package/dist/components/ai/use-streamdown-plugins.js +25 -0
- package/dist/components/ai/use-streamdown-plugins.js.map +1 -0
- package/dist/components/charts/AreaPlot/AreaPlot.cjs +2 -0
- package/dist/components/charts/AreaPlot/AreaPlot.cjs.map +1 -0
- package/dist/components/charts/AreaPlot/AreaPlot.d.ts +39 -0
- package/dist/components/charts/AreaPlot/AreaPlot.js +270 -0
- package/dist/components/charts/AreaPlot/AreaPlot.js.map +1 -0
- package/dist/components/charts/AreaPlot/index.d.ts +2 -0
- package/dist/components/charts/BarChart/BarChart.cjs +2 -0
- package/dist/components/charts/BarChart/BarChart.cjs.map +1 -0
- package/dist/components/charts/BarChart/BarChart.d.ts +44 -0
- package/dist/components/charts/BarChart/BarChart.js +219 -0
- package/dist/components/charts/BarChart/BarChart.js.map +1 -0
- package/dist/components/charts/BarChart/index.d.ts +2 -0
- package/dist/components/charts/BoxPlot/BoxPlot.cjs +2 -0
- package/dist/components/charts/BoxPlot/BoxPlot.cjs.map +1 -0
- package/dist/components/charts/BoxPlot/BoxPlot.d.ts +33 -0
- package/dist/components/charts/BoxPlot/BoxPlot.js +208 -0
- package/dist/components/charts/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/components/charts/BoxPlot/index.d.ts +2 -0
- package/dist/components/charts/ChartTooltip/ChartTooltip.cjs +1 -1
- package/dist/components/charts/ChartTooltip/ChartTooltip.cjs.map +1 -1
- package/dist/components/charts/ChartTooltip/ChartTooltip.d.ts +71 -0
- package/dist/components/charts/ChartTooltip/ChartTooltip.js +22 -22
- package/dist/components/charts/ChartTooltip/ChartTooltip.js.map +1 -1
- package/dist/components/charts/ChartTooltip/index.d.ts +2 -0
- package/dist/components/charts/ChartTooltip/lines.d.ts +54 -0
- package/dist/components/charts/Chromatogram/Chromatogram.cjs +1 -1
- package/dist/components/charts/Chromatogram/Chromatogram.cjs.map +1 -1
- package/dist/components/charts/Chromatogram/Chromatogram.d.ts +5 -0
- package/dist/components/charts/Chromatogram/Chromatogram.js +232 -170
- package/dist/components/charts/Chromatogram/Chromatogram.js.map +1 -1
- package/dist/components/charts/Chromatogram/annotations.cjs +2 -0
- package/dist/components/charts/Chromatogram/annotations.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/annotations.d.ts +50 -0
- package/dist/components/charts/Chromatogram/annotations.js +137 -0
- package/dist/components/charts/Chromatogram/annotations.js.map +1 -0
- package/dist/components/charts/Chromatogram/boundaryMarkers.cjs +2 -0
- package/dist/components/charts/Chromatogram/boundaryMarkers.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/boundaryMarkers.d.ts +14 -0
- package/dist/components/charts/Chromatogram/boundaryMarkers.js +34 -0
- package/dist/components/charts/Chromatogram/boundaryMarkers.js.map +1 -0
- package/dist/components/charts/Chromatogram/constants.cjs +2 -0
- package/dist/components/charts/Chromatogram/constants.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/constants.d.ts +46 -0
- package/dist/components/charts/Chromatogram/constants.js +36 -0
- package/dist/components/charts/Chromatogram/constants.js.map +1 -0
- package/dist/components/charts/Chromatogram/dataProcessing.cjs +2 -0
- package/dist/components/charts/Chromatogram/dataProcessing.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/dataProcessing.d.ts +49 -0
- package/dist/components/charts/Chromatogram/dataProcessing.js +90 -0
- package/dist/components/charts/Chromatogram/dataProcessing.js.map +1 -0
- package/dist/components/charts/Chromatogram/index.d.ts +2 -0
- package/dist/components/charts/Chromatogram/peakDetection.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/peakDetection.d.ts +33 -0
- package/dist/components/charts/Chromatogram/peakDetection.js.map +1 -0
- package/dist/components/charts/Chromatogram/plotBuilder.cjs +2 -0
- package/dist/components/charts/Chromatogram/plotBuilder.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/plotBuilder.d.ts +58 -0
- package/dist/components/charts/Chromatogram/plotBuilder.js +216 -0
- package/dist/components/charts/Chromatogram/plotBuilder.js.map +1 -0
- package/dist/components/charts/Chromatogram/regionOverlays.cjs +2 -0
- package/dist/components/charts/Chromatogram/regionOverlays.cjs.map +1 -0
- package/dist/components/charts/Chromatogram/regionOverlays.d.ts +9 -0
- package/dist/components/charts/Chromatogram/regionOverlays.js +26 -0
- package/dist/components/charts/Chromatogram/regionOverlays.js.map +1 -0
- package/dist/components/charts/Chromatogram/types.d.ts +258 -0
- package/dist/components/charts/Electropherogram/Electropherogram.cjs +2 -0
- package/dist/components/charts/Electropherogram/Electropherogram.cjs.map +1 -0
- package/dist/components/charts/Electropherogram/Electropherogram.d.ts +22 -0
- package/dist/components/charts/Electropherogram/Electropherogram.js +180 -0
- package/dist/components/charts/Electropherogram/Electropherogram.js.map +1 -0
- package/dist/components/charts/Electropherogram/index.d.ts +2 -0
- package/dist/components/charts/Histogram/Histogram.cjs +1 -1
- package/dist/components/charts/Histogram/Histogram.cjs.map +1 -1
- package/dist/components/charts/Histogram/Histogram.d.ts +36 -0
- package/dist/components/charts/Histogram/Histogram.js +107 -108
- package/dist/components/charts/Histogram/Histogram.js.map +1 -1
- package/dist/components/charts/Histogram/index.d.ts +2 -0
- package/dist/components/charts/LinePlot/LinePlot.cjs +2 -0
- package/dist/components/charts/LinePlot/LinePlot.cjs.map +1 -0
- package/dist/components/charts/LinePlot/LinePlot.d.ts +45 -0
- package/dist/components/charts/LinePlot/LinePlot.js +224 -0
- package/dist/components/charts/LinePlot/LinePlot.js.map +1 -0
- package/dist/components/charts/LinePlot/index.d.ts +2 -0
- package/dist/components/charts/PieChart/PieChart.cjs +1 -1
- package/dist/components/charts/PieChart/PieChart.cjs.map +1 -1
- package/dist/components/charts/PieChart/PieChart.d.ts +20 -0
- package/dist/components/charts/PieChart/PieChart.js +62 -61
- package/dist/components/charts/PieChart/PieChart.js.map +1 -1
- package/dist/components/charts/PieChart/index.d.ts +2 -0
- package/dist/components/charts/PlateMap/PlateMap.cjs +1 -1
- package/dist/components/charts/PlateMap/PlateMap.cjs.map +1 -1
- package/dist/components/charts/PlateMap/PlateMap.d.ts +29 -0
- package/dist/components/charts/PlateMap/PlateMap.js +246 -242
- package/dist/components/charts/PlateMap/PlateMap.js.map +1 -1
- package/dist/components/charts/PlateMap/constants.d.ts +75 -0
- package/dist/components/charts/PlateMap/index.d.ts +2 -0
- package/dist/components/charts/PlateMap/types.d.ts +322 -0
- package/dist/components/charts/PlateMap/utils.d.ts +133 -0
- package/dist/components/charts/ScatterPlot/ScatterPlot.cjs +2 -0
- package/dist/components/charts/ScatterPlot/ScatterPlot.cjs.map +1 -0
- package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +43 -0
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +252 -0
- package/dist/components/charts/ScatterPlot/ScatterPlot.js.map +1 -0
- package/dist/components/charts/ScatterPlot/index.d.ts +2 -0
- package/dist/components/charts/ScatterPlotInteractive/ScatterPlotInteractive.cjs +2 -0
- package/dist/components/charts/ScatterPlotInteractive/ScatterPlotInteractive.cjs.map +1 -0
- package/dist/components/charts/ScatterPlotInteractive/ScatterPlotInteractive.d.ts +25 -0
- package/dist/components/charts/ScatterPlotInteractive/ScatterPlotInteractive.js +215 -0
- package/dist/components/charts/ScatterPlotInteractive/ScatterPlotInteractive.js.map +1 -0
- package/dist/components/charts/ScatterPlotInteractive/constants.cjs +2 -0
- package/dist/components/charts/ScatterPlotInteractive/constants.cjs.map +1 -0
- package/dist/components/charts/ScatterPlotInteractive/constants.d.ts +50 -0
- package/dist/components/charts/ScatterPlotInteractive/constants.js +38 -0
- package/dist/components/charts/ScatterPlotInteractive/constants.js.map +1 -0
- package/dist/components/charts/ScatterPlotInteractive/index.d.ts +3 -0
- package/dist/components/charts/ScatterPlotInteractive/types.d.ts +226 -0
- package/dist/components/charts/ScatterPlotInteractive/utils.cjs +2 -0
- package/dist/components/charts/ScatterPlotInteractive/utils.cjs.map +1 -0
- package/dist/components/charts/ScatterPlotInteractive/utils.d.ts +72 -0
- package/dist/components/charts/ScatterPlotInteractive/utils.js +261 -0
- package/dist/components/charts/ScatterPlotInteractive/utils.js.map +1 -0
- package/dist/components/charts/StackedChromatogram/StackedChromatogram.cjs +2 -0
- package/dist/components/charts/StackedChromatogram/StackedChromatogram.cjs.map +1 -0
- package/dist/components/charts/StackedChromatogram/StackedChromatogram.d.ts +3 -0
- package/dist/components/charts/StackedChromatogram/StackedChromatogram.js +40 -0
- package/dist/components/charts/StackedChromatogram/StackedChromatogram.js.map +1 -0
- package/dist/components/charts/StackedChromatogram/index.d.ts +3 -0
- package/dist/components/charts/StackedChromatogram/transforms.cjs +2 -0
- package/dist/components/charts/StackedChromatogram/transforms.cjs.map +1 -0
- package/dist/components/charts/StackedChromatogram/transforms.d.ts +9 -0
- package/dist/components/charts/StackedChromatogram/transforms.js +31 -0
- package/dist/components/charts/StackedChromatogram/transforms.js.map +1 -0
- package/dist/components/charts/StackedChromatogram/types.d.ts +26 -0
- package/dist/components/charts/plotly-loader.cjs +2 -0
- package/dist/components/charts/plotly-loader.cjs.map +1 -0
- package/dist/components/charts/plotly-loader.d.ts +29 -0
- package/dist/components/charts/plotly-loader.js +22 -0
- package/dist/components/charts/plotly-loader.js.map +1 -0
- package/dist/components/composed/AssistantLayout/AssistantLayout.cjs +2 -0
- package/dist/components/composed/AssistantLayout/AssistantLayout.cjs.map +1 -0
- package/dist/components/composed/AssistantLayout/AssistantLayout.d.ts +63 -0
- package/dist/components/composed/AssistantLayout/AssistantLayout.js +142 -0
- package/dist/components/composed/AssistantLayout/AssistantLayout.js.map +1 -0
- package/dist/components/composed/AssistantLayout/dockLayout.cjs +2 -0
- package/dist/components/composed/AssistantLayout/dockLayout.cjs.map +1 -0
- package/dist/components/composed/AssistantLayout/dockLayout.d.ts +15 -0
- package/dist/components/composed/AssistantLayout/dockLayout.js +10 -0
- package/dist/components/composed/AssistantLayout/dockLayout.js.map +1 -0
- package/dist/components/composed/AssistantLayout/index.d.ts +3 -0
- package/dist/components/composed/Chat/Chat.cjs +1 -1
- package/dist/components/composed/Chat/Chat.cjs.map +1 -1
- package/dist/components/composed/Chat/Chat.d.ts +35 -0
- package/dist/components/composed/Chat/Chat.js +28 -28
- package/dist/components/composed/Chat/Chat.js.map +1 -1
- package/dist/components/composed/Chat/index.d.ts +2 -0
- package/dist/components/composed/ConfirmDialog/ConfirmDialog.cjs +1 -1
- package/dist/components/composed/ConfirmDialog/ConfirmDialog.cjs.map +1 -1
- package/dist/components/composed/ConfirmDialog/ConfirmDialog.d.ts +23 -0
- package/dist/components/composed/ConfirmDialog/ConfirmDialog.js +33 -29
- package/dist/components/composed/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/components/composed/ConfirmDialog/index.d.ts +1 -0
- package/dist/components/composed/DataAppShell/CollapseButton.cjs +2 -0
- package/dist/components/composed/DataAppShell/CollapseButton.cjs.map +1 -0
- package/dist/components/composed/DataAppShell/CollapseButton.d.ts +23 -0
- package/dist/components/composed/DataAppShell/CollapseButton.js +42 -0
- package/dist/components/composed/DataAppShell/CollapseButton.js.map +1 -0
- package/dist/components/composed/DataAppShell/DataAppShell.cjs +1 -1
- package/dist/components/composed/DataAppShell/DataAppShell.cjs.map +1 -1
- package/dist/components/composed/DataAppShell/DataAppShell.d.ts +88 -0
- package/dist/components/composed/DataAppShell/DataAppShell.js +350 -328
- package/dist/components/composed/DataAppShell/DataAppShell.js.map +1 -1
- package/dist/components/composed/DataAppShell/PrimaryNav.cjs +2 -0
- package/dist/components/composed/DataAppShell/PrimaryNav.cjs.map +1 -0
- package/dist/components/composed/DataAppShell/PrimaryNav.d.ts +64 -0
- package/dist/components/composed/DataAppShell/PrimaryNav.js +268 -0
- package/dist/components/composed/DataAppShell/PrimaryNav.js.map +1 -0
- package/dist/components/composed/DataAppShell/RightPanel.cjs +2 -0
- package/dist/components/composed/DataAppShell/RightPanel.cjs.map +1 -0
- package/dist/components/composed/DataAppShell/RightPanel.d.ts +95 -0
- package/dist/components/composed/DataAppShell/RightPanel.js +282 -0
- package/dist/components/composed/DataAppShell/RightPanel.js.map +1 -0
- package/dist/components/composed/DataAppShell/SecondaryNav.cjs +2 -0
- package/dist/components/composed/DataAppShell/SecondaryNav.cjs.map +1 -0
- package/dist/components/composed/DataAppShell/SecondaryNav.d.ts +63 -0
- package/dist/components/composed/DataAppShell/SecondaryNav.js +364 -0
- package/dist/components/composed/DataAppShell/SecondaryNav.js.map +1 -0
- package/dist/components/composed/DataAppShell/ShellContext.cjs +2 -0
- package/dist/components/composed/DataAppShell/ShellContext.cjs.map +1 -0
- package/dist/components/composed/DataAppShell/ShellContext.d.ts +20 -0
- package/dist/components/composed/DataAppShell/ShellContext.js +23 -0
- package/dist/components/composed/DataAppShell/ShellContext.js.map +1 -0
- package/dist/components/composed/DataAppShell/index.d.ts +12 -0
- package/dist/components/composed/EmptyState/EmptyState.d.ts +12 -0
- package/dist/components/composed/EmptyState/index.d.ts +2 -0
- package/dist/components/composed/FormPatterns/FormSection.cjs +1 -1
- package/dist/components/composed/FormPatterns/FormSection.cjs.map +1 -1
- package/dist/components/composed/FormPatterns/FormSection.d.ts +7 -0
- package/dist/components/composed/FormPatterns/FormSection.js +2 -2
- package/dist/components/composed/FormPatterns/index.d.ts +1 -0
- package/dist/components/composed/MoleculeStructure/MoleculeStructure.cjs +2 -0
- package/dist/components/composed/MoleculeStructure/MoleculeStructure.cjs.map +1 -0
- package/dist/components/composed/MoleculeStructure/MoleculeStructure.d.ts +43 -0
- package/dist/components/composed/MoleculeStructure/MoleculeStructure.js +87 -0
- package/dist/components/composed/MoleculeStructure/MoleculeStructure.js.map +1 -0
- package/dist/components/composed/MoleculeStructure/index.d.ts +3 -0
- package/dist/components/composed/MoleculeStructure/rdkit-loader.cjs +2 -0
- package/dist/components/composed/MoleculeStructure/rdkit-loader.cjs.map +1 -0
- package/dist/components/composed/MoleculeStructure/rdkit-loader.d.ts +104 -0
- package/dist/components/composed/MoleculeStructure/rdkit-loader.js +89 -0
- package/dist/components/composed/MoleculeStructure/rdkit-loader.js.map +1 -0
- package/dist/components/composed/MoleculeStructure/use-rdkit.cjs +2 -0
- package/dist/components/composed/MoleculeStructure/use-rdkit.cjs.map +1 -0
- package/dist/components/composed/MoleculeStructure/use-rdkit.d.ts +29 -0
- package/dist/components/composed/MoleculeStructure/use-rdkit.js +19 -0
- package/dist/components/composed/MoleculeStructure/use-rdkit.js.map +1 -0
- package/dist/components/composed/PlateMapEditor/ManifestFilterPopover.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/ManifestFilterPopover.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/ManifestFilterPopover.d.ts +12 -0
- package/dist/components/composed/PlateMapEditor/ManifestFilterPopover.js +21 -21
- package/dist/components/composed/PlateMapEditor/ManifestFilterPopover.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapActionsMenu.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapActionsMenu.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapActionsMenu.d.ts +22 -0
- package/dist/components/composed/PlateMapEditor/PlateMapActionsMenu.js +34 -34
- package/dist/components/composed/PlateMapEditor/PlateMapActionsMenu.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.d.ts +106 -0
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.js +2 -2
- package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapForm.d.ts +30 -0
- package/dist/components/composed/PlateMapEditor/PlateMapForm.js +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.d.ts +64 -0
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.js +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapManifest.d.ts +29 -0
- package/dist/components/composed/PlateMapEditor/PlateMapPlateSelector.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapPlateSelector.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapPlateSelector.d.ts +19 -0
- package/dist/components/composed/PlateMapEditor/PlateMapPlateSelector.js +11 -11
- package/dist/components/composed/PlateMapEditor/PlateMapPlateSelector.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlatePaintGrid.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlatePaintGrid.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlatePaintGrid.d.ts +73 -0
- package/dist/components/composed/PlateMapEditor/PlatePaintGrid.js +1 -1
- package/dist/components/composed/PlateMapEditor/PlatePaintGrid.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateZoomControl.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateZoomControl.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateZoomControl.d.ts +12 -0
- package/dist/components/composed/PlateMapEditor/PlateZoomControl.js +2 -2
- package/dist/components/composed/PlateMapEditor/TemplateIOPanel.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/TemplateIOPanel.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/TemplateIOPanel.d.ts +13 -0
- package/dist/components/composed/PlateMapEditor/TemplateIOPanel.js +4 -4
- package/dist/components/composed/PlateMapEditor/WellLegend.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/WellLegend.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/WellLegend.d.ts +21 -0
- package/dist/components/composed/PlateMapEditor/WellLegend.js +24 -12
- package/dist/components/composed/PlateMapEditor/WellLegend.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/WellManifestTable.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/WellManifestTable.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/WellManifestTable.d.ts +46 -0
- package/dist/components/composed/PlateMapEditor/WellManifestTable.js +10 -10
- package/dist/components/composed/PlateMapEditor/WellManifestTable.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/WellMetadataForm.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/WellMetadataForm.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/WellMetadataForm.d.ts +17 -0
- package/dist/components/composed/PlateMapEditor/WellMetadataForm.js +7 -7
- package/dist/components/composed/PlateMapEditor/autoFill.d.ts +26 -0
- package/dist/components/composed/PlateMapEditor/csvPlateTriage.d.ts +4 -0
- package/dist/components/composed/PlateMapEditor/helpers.d.ts +2 -0
- package/dist/components/composed/PlateMapEditor/index.d.ts +31 -0
- package/dist/components/composed/PlateMapEditor/types.d.ts +137 -0
- package/dist/components/composed/PlateMapEditor/wellGrid.d.ts +12 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.d.ts +32 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.utils.d.ts +86 -0
- package/dist/components/composed/ProcessFlow/index.d.ts +1 -0
- package/dist/components/composed/RichListItem/RichListItem.cjs +1 -1
- package/dist/components/composed/RichListItem/RichListItem.cjs.map +1 -1
- package/dist/components/composed/RichListItem/RichListItem.d.ts +22 -0
- package/dist/components/composed/RichListItem/RichListItem.js +2 -2
- package/dist/components/composed/RichListItem/index.d.ts +2 -0
- package/dist/components/composed/StatCard/StatCard.cjs +1 -1
- package/dist/components/composed/StatCard/StatCard.cjs.map +1 -1
- package/dist/components/composed/StatCard/StatCard.d.ts +11 -0
- package/dist/components/composed/StatCard/StatCard.js +1 -1
- package/dist/components/composed/StatCard/index.d.ts +1 -0
- package/dist/components/composed/TdpSearch/TdpSearch.cjs +1 -1
- package/dist/components/composed/TdpSearch/TdpSearch.cjs.map +1 -1
- package/dist/components/composed/TdpSearch/TdpSearch.d.ts +21 -0
- package/dist/components/composed/TdpSearch/TdpSearch.js +14 -13
- package/dist/components/composed/TdpSearch/TdpSearch.mocks.d.ts +5 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.cjs +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultFilters.cjs.map +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultFilters.d.ts +3 -0
- package/dist/components/composed/TdpSearch/components/DefaultFilters.js +4 -4
- package/dist/components/composed/TdpSearch/components/DefaultFilters.js.map +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultResults.cjs +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultResults.cjs.map +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultResults.d.ts +3 -0
- package/dist/components/composed/TdpSearch/components/DefaultResults.js +2 -2
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.cjs +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.cjs.map +1 -1
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.d.ts +3 -0
- package/dist/components/composed/TdpSearch/components/DefaultSearchBar.js +2 -2
- package/dist/components/composed/TdpSearch/constants.d.ts +3 -0
- package/dist/components/composed/TdpSearch/hooks/useSearch.d.ts +2 -0
- package/dist/components/composed/TdpSearch/hooks/useTdpCredentials.d.ts +14 -0
- package/dist/components/composed/TdpSearch/index.d.ts +3 -0
- package/dist/components/composed/TdpSearch/types.d.ts +128 -0
- package/dist/components/composed/TdpSearch/utils.d.ts +3 -0
- package/dist/components/composed/TopBar/TopBar.cjs +2 -0
- package/dist/components/composed/TopBar/TopBar.cjs.map +1 -0
- package/dist/components/composed/TopBar/TopBar.d.ts +25 -0
- package/dist/components/composed/TopBar/TopBar.js +56 -0
- package/dist/components/composed/TopBar/TopBar.js.map +1 -0
- package/dist/components/composed/TopBar/index.d.ts +2 -0
- package/dist/components/composed/UserMenu/UserMenu.cjs +2 -0
- package/dist/components/composed/UserMenu/UserMenu.cjs.map +1 -0
- package/dist/components/composed/UserMenu/UserMenu.d.ts +53 -0
- package/dist/components/composed/UserMenu/UserMenu.js +99 -0
- package/dist/components/composed/UserMenu/UserMenu.js.map +1 -0
- package/dist/components/composed/UserMenu/index.d.ts +2 -0
- package/dist/components/composed/tdp-link.d.ts +110 -0
- package/dist/components/composed/tdp-url.d.ts +68 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/banner.d.ts +19 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/calendar.d.ts +10 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/carousel.d.ts +28 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/code-block.d.ts +45 -0
- package/dist/components/ui/code-editor.d.ts +18 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/combobox.d.ts +24 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/data-table/data-table-column-toggle.cjs +1 -1
- package/dist/components/ui/data-table/data-table-column-toggle.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table-column-toggle.d.ts +6 -0
- package/dist/components/ui/data-table/data-table-column-toggle.js +71 -63
- package/dist/components/ui/data-table/data-table-column-toggle.js.map +1 -1
- package/dist/components/ui/data-table/data-table-filter.cjs +1 -1
- package/dist/components/ui/data-table/data-table-filter.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table-filter.d.ts +9 -0
- package/dist/components/ui/data-table/data-table-filter.js +26 -25
- package/dist/components/ui/data-table/data-table-filter.js.map +1 -1
- package/dist/components/ui/data-table/data-table-group.cjs +1 -1
- package/dist/components/ui/data-table/data-table-group.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table-group.d.ts +9 -0
- package/dist/components/ui/data-table/data-table-group.js +18 -17
- package/dist/components/ui/data-table/data-table-group.js.map +1 -1
- package/dist/components/ui/data-table/data-table-pagination.cjs +1 -1
- package/dist/components/ui/data-table/data-table-pagination.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table-pagination.d.ts +7 -0
- package/dist/components/ui/data-table/data-table-pagination.js +16 -16
- package/dist/components/ui/data-table/data-table-pagination.js.map +1 -1
- package/dist/components/ui/data-table/data-table.cjs +1 -1
- package/dist/components/ui/data-table/data-table.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table.d.ts +82 -0
- package/dist/components/ui/data-table/data-table.js +191 -190
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/data-table/index.d.ts +5 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/resizable.d.ts +25 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/snippet.d.ts +18 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts +6 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/table.d.ts +22 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tetra-molecule-icon.d.ts +11 -0
- package/dist/components/ui/tetrascience-icon.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toggle-group.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/composed/AssistantLayout.cjs +2 -0
- package/dist/composed/AssistantLayout.cjs.map +1 -0
- package/dist/composed/AssistantLayout.js +10 -0
- package/dist/composed/AssistantLayout.js.map +1 -0
- package/dist/composed/Chat.cjs +2 -0
- package/dist/composed/Chat.cjs.map +1 -0
- package/dist/composed/Chat.js +5 -0
- package/dist/composed/Chat.js.map +1 -0
- package/dist/composed/ConfirmDialog.cjs +2 -0
- package/dist/composed/ConfirmDialog.cjs.map +1 -0
- package/dist/composed/ConfirmDialog.js +5 -0
- package/dist/composed/ConfirmDialog.js.map +1 -0
- package/dist/composed/DataAppShell.cjs +2 -0
- package/dist/composed/DataAppShell.cjs.map +1 -0
- package/dist/composed/DataAppShell.js +22 -0
- package/dist/composed/DataAppShell.js.map +1 -0
- package/dist/composed/EmptyState.cjs +2 -0
- package/dist/composed/EmptyState.cjs.map +1 -0
- package/dist/composed/EmptyState.js +5 -0
- package/dist/composed/EmptyState.js.map +1 -0
- package/dist/composed/FormPatterns.cjs +2 -0
- package/dist/composed/FormPatterns.cjs.map +1 -0
- package/dist/composed/FormPatterns.js +5 -0
- package/dist/composed/FormPatterns.js.map +1 -0
- package/dist/composed/MoleculeStructure.cjs +2 -0
- package/dist/composed/MoleculeStructure.cjs.map +1 -0
- package/dist/composed/MoleculeStructure.js +11 -0
- package/dist/composed/MoleculeStructure.js.map +1 -0
- package/dist/composed/PlateMapEditor.cjs +2 -0
- package/dist/composed/PlateMapEditor.cjs.map +1 -0
- package/dist/composed/PlateMapEditor.js +45 -0
- package/dist/composed/PlateMapEditor.js.map +1 -0
- package/dist/composed/ProcessFlow.cjs +2 -0
- package/dist/composed/ProcessFlow.cjs.map +1 -0
- package/dist/composed/ProcessFlow.js +7 -0
- package/dist/composed/ProcessFlow.js.map +1 -0
- package/dist/composed/RichListItem.cjs +2 -0
- package/dist/composed/RichListItem.cjs.map +1 -0
- package/dist/composed/RichListItem.js +6 -0
- package/dist/composed/RichListItem.js.map +1 -0
- package/dist/composed/StatCard.cjs +2 -0
- package/dist/composed/StatCard.cjs.map +1 -0
- package/dist/composed/StatCard.js +5 -0
- package/dist/composed/StatCard.js.map +1 -0
- package/dist/composed/TdpSearch.cjs +2 -0
- package/dist/composed/TdpSearch.cjs.map +1 -0
- package/dist/composed/TdpSearch.js +8 -0
- package/dist/composed/TdpSearch.js.map +1 -0
- package/dist/composed/TopBar.cjs +2 -0
- package/dist/composed/TopBar.cjs.map +1 -0
- package/dist/composed/TopBar.js +6 -0
- package/dist/composed/TopBar.js.map +1 -0
- package/dist/composed/UserMenu.cjs +2 -0
- package/dist/composed/UserMenu.cjs.map +1 -0
- package/dist/composed/UserMenu.js +7 -0
- package/dist/composed/UserMenu.js.map +1 -0
- package/dist/composed/tdp-link.cjs +2 -0
- package/dist/composed/tdp-link.cjs.map +1 -0
- package/dist/composed/tdp-link.js +84 -0
- package/dist/composed/tdp-link.js.map +1 -0
- package/dist/composed/tdp-url.cjs.map +1 -0
- package/dist/composed/tdp-url.js.map +1 -0
- package/dist/hooks/use-code-editor-theme.d.ts +34 -0
- package/dist/hooks/use-element-size.d.ts +25 -0
- package/dist/hooks/use-is-dark.d.ts +12 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-plotly-theme.cjs +1 -1
- package/dist/hooks/use-plotly-theme.cjs.map +1 -1
- package/dist/hooks/use-plotly-theme.d.ts +49 -0
- package/dist/hooks/use-plotly-theme.js +4 -3
- package/dist/hooks/use-plotly-theme.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +102 -4404
- package/dist/index.js +698 -659
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/jest-setup.cjs +4 -0
- package/dist/jest-setup.cjs.map +1 -0
- package/dist/jest-setup.d.ts +106 -0
- package/dist/jest-setup.js +218 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/lib/shiki.cjs +2 -0
- package/dist/lib/shiki.cjs.map +1 -0
- package/dist/lib/shiki.d.ts +32 -0
- package/dist/lib/shiki.js +72 -0
- package/dist/lib/shiki.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/server/auth/JwtTokenManager.cjs +1 -1
- package/dist/server/auth/JwtTokenManager.cjs.map +1 -1
- package/dist/server/auth/JwtTokenManager.d.ts +113 -0
- package/dist/server/auth/JwtTokenManager.js +44 -21
- package/dist/server/auth/JwtTokenManager.js.map +1 -1
- package/dist/server/auth/index.d.ts +5 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/providers/AthenaProvider.cjs +1 -1
- package/dist/server/providers/AthenaProvider.cjs.map +1 -1
- package/dist/server/providers/AthenaProvider.d.ts +75 -0
- package/dist/server/providers/DatabricksProvider.cjs +1 -1
- package/dist/server/providers/DatabricksProvider.cjs.map +1 -1
- package/dist/server/providers/DatabricksProvider.d.ts +38 -0
- package/dist/server/providers/SnowflakeProvider.cjs +1 -1
- package/dist/server/providers/SnowflakeProvider.cjs.map +1 -1
- package/dist/server/providers/SnowflakeProvider.d.ts +36 -0
- package/dist/server/providers/buildProvider.d.ts +39 -0
- package/dist/server/providers/entries/athena.d.ts +24 -0
- package/dist/server/providers/entries/databricks.d.ts +25 -0
- package/dist/server/providers/entries/snowflake.d.ts +25 -0
- package/dist/server/providers/exceptions.d.ts +36 -0
- package/dist/server/providers/getProviderConfigurations.d.ts +45 -0
- package/dist/server/providers/index.d.ts +31 -0
- package/dist/server/providers/providerDiscovery.d.ts +81 -0
- package/dist/server/providers/types.d.ts +145 -0
- package/dist/server/search/TdpSearchManager.d.ts +40 -0
- package/dist/server/search/index.d.ts +5 -0
- package/dist/server.d.ts +17 -540
- package/dist/ui/accordion.cjs +2 -0
- package/dist/ui/accordion.cjs.map +1 -0
- package/dist/ui/accordion.js +83 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.cjs +2 -0
- package/dist/ui/alert-dialog.cjs.map +1 -0
- package/dist/ui/alert-dialog.js +181 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.cjs +2 -0
- package/dist/ui/alert.cjs.map +1 -0
- package/dist/ui/alert.js +81 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.cjs.map +1 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.cjs +2 -0
- package/dist/ui/avatar.cjs.map +1 -0
- package/dist/ui/avatar.js +107 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.cjs +2 -0
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.js +47 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/banner.cjs +2 -0
- package/dist/ui/banner.cjs.map +1 -0
- package/dist/ui/banner.js +80 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/breadcrumb.cjs +2 -0
- package/dist/ui/breadcrumb.cjs.map +1 -0
- package/dist/ui/breadcrumb.js +118 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button-group.cjs +2 -0
- package/dist/ui/button-group.cjs.map +1 -0
- package/dist/ui/button-group.js +77 -0
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button.cjs +2 -0
- package/dist/ui/button.cjs.map +1 -0
- package/dist/ui/button.js +57 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.cjs +2 -0
- package/dist/ui/calendar.cjs.map +1 -0
- package/dist/ui/calendar.js +174 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.cjs +2 -0
- package/dist/ui/card.cjs.map +1 -0
- package/dist/ui/card.js +102 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.cjs +2 -0
- package/dist/ui/carousel.cjs.map +1 -0
- package/dist/ui/carousel.js +179 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.cjs +2 -0
- package/dist/ui/checkbox.cjs.map +1 -0
- package/dist/ui/checkbox.js +35 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/code-block.cjs +4 -0
- package/dist/ui/code-block.cjs.map +1 -0
- package/dist/ui/code-block.js +324 -0
- package/dist/ui/code-block.js.map +1 -0
- package/dist/ui/code-editor.cjs +2 -0
- package/dist/ui/code-editor.cjs.map +1 -0
- package/dist/ui/code-editor.js +106 -0
- package/dist/ui/code-editor.js.map +1 -0
- package/dist/ui/collapsible.cjs.map +1 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/combobox.cjs +2 -0
- package/dist/ui/combobox.cjs.map +1 -0
- package/dist/ui/combobox.js +285 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/command.cjs +2 -0
- package/dist/ui/command.cjs.map +1 -0
- package/dist/ui/command.js +178 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.cjs +2 -0
- package/dist/ui/context-menu.cjs.map +1 -0
- package/dist/ui/context-menu.js +236 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/data-table.cjs +2 -0
- package/dist/ui/data-table.cjs.map +1 -0
- package/dist/ui/data-table.js +16 -0
- package/dist/ui/data-table.js.map +1 -0
- package/dist/ui/dialog.cjs +2 -0
- package/dist/ui/dialog.cjs.map +1 -0
- package/dist/ui/dialog.js +165 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.cjs +2 -0
- package/dist/ui/dropdown-menu.cjs.map +1 -0
- package/dist/ui/dropdown-menu.js +260 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/field.cjs +2 -0
- package/dist/ui/field.cjs.map +1 -0
- package/dist/ui/field.js +210 -0
- package/dist/ui/field.js.map +1 -0
- package/dist/ui/hover-card.cjs +2 -0
- package/dist/ui/hover-card.cjs.map +1 -0
- package/dist/ui/hover-card.js +39 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/input-group.cjs +2 -0
- package/dist/ui/input-group.cjs.map +1 -0
- package/dist/ui/input-group.js +145 -0
- package/dist/ui/input-group.js.map +1 -0
- package/dist/ui/input.cjs +2 -0
- package/dist/ui/input.cjs.map +1 -0
- package/dist/ui/input.js +20 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/item.cjs +2 -0
- package/dist/ui/item.cjs.map +1 -0
- package/dist/ui/item.js +199 -0
- package/dist/ui/item.js.map +1 -0
- package/dist/ui/kbd.cjs +2 -0
- package/dist/ui/kbd.cjs.map +1 -0
- package/dist/ui/kbd.js +30 -0
- package/dist/ui/kbd.js.map +1 -0
- package/dist/ui/label.cjs +2 -0
- package/dist/ui/label.cjs.map +1 -0
- package/dist/ui/label.js +23 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/menubar.cjs +2 -0
- package/dist/ui/menubar.cjs.map +1 -0
- package/dist/ui/menubar.js +256 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.cjs +2 -0
- package/dist/ui/navigation-menu.cjs.map +1 -0
- package/dist/ui/navigation-menu.js +164 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/popover.cjs +2 -0
- package/dist/ui/popover.cjs.map +1 -0
- package/dist/ui/popover.js +45 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/radio-group.cjs +2 -0
- package/dist/ui/radio-group.cjs.map +1 -0
- package/dist/ui/radio-group.js +45 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.cjs +2 -0
- package/dist/ui/resizable.cjs.map +1 -0
- package/dist/ui/resizable.js +58 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.cjs +2 -0
- package/dist/ui/scroll-area.cjs.map +1 -0
- package/dist/ui/scroll-area.js +61 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.cjs +2 -0
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.js +184 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.cjs +2 -0
- package/dist/ui/separator.cjs.map +1 -0
- package/dist/ui/separator.js +27 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.cjs +2 -0
- package/dist/ui/sheet.cjs.map +1 -0
- package/dist/ui/sheet.js +137 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.cjs +2 -0
- package/dist/ui/sidebar.cjs.map +1 -0
- package/dist/ui/sidebar.js +579 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.cjs +2 -0
- package/dist/ui/skeleton.cjs.map +1 -0
- package/dist/ui/skeleton.js +24 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.cjs +2 -0
- package/dist/ui/slider.cjs.map +1 -0
- package/dist/ui/slider.js +61 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.cjs +2 -0
- package/dist/ui/sonner.cjs.map +1 -0
- package/dist/ui/sonner.js +52 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.cjs +2 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.js +39 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.cjs +2 -0
- package/dist/ui/switch.cjs.map +1 -0
- package/dist/ui/switch.js +32 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.cjs +2 -0
- package/dist/ui/table.cjs.map +1 -0
- package/dist/ui/table.js +153 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.cjs +2 -0
- package/dist/ui/tabs.cjs.map +1 -0
- package/dist/ui/tabs.js +92 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/tetra-molecule-icon.cjs +2 -0
- package/dist/ui/tetra-molecule-icon.cjs.map +1 -0
- package/dist/ui/tetra-molecule-icon.js +50 -0
- package/dist/ui/tetra-molecule-icon.js.map +1 -0
- package/dist/ui/tetrascience-icon.cjs +2 -0
- package/dist/ui/tetrascience-icon.cjs.map +1 -0
- package/dist/ui/tetrascience-icon.js +47 -0
- package/dist/ui/tetrascience-icon.js.map +1 -0
- package/dist/ui/textarea.cjs +2 -0
- package/dist/ui/textarea.cjs.map +1 -0
- package/dist/ui/textarea.js +19 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toggle-group.cjs +2 -0
- package/dist/ui/toggle-group.cjs.map +1 -0
- package/dist/ui/toggle-group.js +81 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.cjs +2 -0
- package/dist/ui/toggle.cjs.map +1 -0
- package/dist/ui/toggle.js +44 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.cjs +2 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.js +56 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/utils/colors.d.ts +50 -0
- package/package.json +137 -24
- package/dist/athena.d.ts +0 -167
- package/dist/components/ai/attachments.cjs +0 -2
- package/dist/components/ai/attachments.cjs.map +0 -1
- package/dist/components/ai/attachments.js +0 -224
- package/dist/components/ai/attachments.js.map +0 -1
- package/dist/components/ai/chain-of-thought.cjs +0 -2
- package/dist/components/ai/chain-of-thought.cjs.map +0 -1
- package/dist/components/ai/chain-of-thought.js +0 -145
- package/dist/components/ai/chain-of-thought.js.map +0 -1
- package/dist/components/ai/confirmation.cjs +0 -2
- package/dist/components/ai/confirmation.cjs.map +0 -1
- package/dist/components/ai/confirmation.js +0 -109
- package/dist/components/ai/confirmation.js.map +0 -1
- package/dist/components/ai/context.cjs +0 -2
- package/dist/components/ai/context.cjs.map +0 -1
- package/dist/components/ai/context.js +0 -266
- package/dist/components/ai/context.js.map +0 -1
- package/dist/components/ai/conversation.cjs +0 -4
- package/dist/components/ai/conversation.cjs.map +0 -1
- package/dist/components/ai/conversation.js +0 -108
- package/dist/components/ai/conversation.js.map +0 -1
- package/dist/components/ai/inline-citation.cjs +0 -2
- package/dist/components/ai/inline-citation.cjs.map +0 -1
- package/dist/components/ai/inline-citation.js +0 -182
- package/dist/components/ai/inline-citation.js.map +0 -1
- package/dist/components/ai/message.cjs +0 -2
- package/dist/components/ai/message.cjs.map +0 -1
- package/dist/components/ai/message.js +0 -237
- package/dist/components/ai/message.js.map +0 -1
- package/dist/components/ai/model-selector.cjs +0 -2
- package/dist/components/ai/model-selector.cjs.map +0 -1
- package/dist/components/ai/model-selector.js +0 -77
- package/dist/components/ai/model-selector.js.map +0 -1
- package/dist/components/ai/prompt-input.cjs +0 -2
- package/dist/components/ai/prompt-input.cjs.map +0 -1
- package/dist/components/ai/prompt-input.js +0 -774
- package/dist/components/ai/prompt-input.js.map +0 -1
- package/dist/components/ai/queue.cjs +0 -2
- package/dist/components/ai/queue.cjs.map +0 -1
- package/dist/components/ai/queue.js +0 -209
- package/dist/components/ai/queue.js.map +0 -1
- package/dist/components/ai/reasoning.cjs +0 -2
- package/dist/components/ai/reasoning.cjs.map +0 -1
- package/dist/components/ai/reasoning.js +0 -129
- package/dist/components/ai/reasoning.js.map +0 -1
- package/dist/components/ai/shimmer.cjs +0 -2
- package/dist/components/ai/shimmer.cjs.map +0 -1
- package/dist/components/ai/shimmer.js +0 -49
- package/dist/components/ai/shimmer.js.map +0 -1
- package/dist/components/ai/sources.cjs +0 -2
- package/dist/components/ai/sources.cjs.map +0 -1
- package/dist/components/ai/sources.js +0 -54
- package/dist/components/ai/sources.js.map +0 -1
- package/dist/components/ai/speech-input.cjs +0 -2
- package/dist/components/ai/speech-input.cjs.map +0 -1
- package/dist/components/ai/speech-input.js +0 -123
- package/dist/components/ai/speech-input.js.map +0 -1
- package/dist/components/ai/stream-status.cjs +0 -2
- package/dist/components/ai/stream-status.cjs.map +0 -1
- package/dist/components/ai/stream-status.js +0 -106
- package/dist/components/ai/stream-status.js.map +0 -1
- package/dist/components/ai/suggestion.cjs +0 -2
- package/dist/components/ai/suggestion.cjs.map +0 -1
- package/dist/components/ai/suggestion.js +0 -38
- package/dist/components/ai/suggestion.js.map +0 -1
- package/dist/components/ai/task.cjs +0 -2
- package/dist/components/ai/task.cjs.map +0 -1
- package/dist/components/ai/task.js +0 -94
- package/dist/components/ai/task.js.map +0 -1
- package/dist/components/ai/tool.cjs +0 -2
- package/dist/components/ai/tool.cjs.map +0 -1
- package/dist/components/ai/tool.js +0 -143
- package/dist/components/ai/tool.js.map +0 -1
- package/dist/components/charts/AreaGraph/AreaGraph.cjs +0 -2
- package/dist/components/charts/AreaGraph/AreaGraph.cjs.map +0 -1
- package/dist/components/charts/AreaGraph/AreaGraph.js +0 -271
- package/dist/components/charts/AreaGraph/AreaGraph.js.map +0 -1
- package/dist/components/charts/BarGraph/BarGraph.cjs +0 -2
- package/dist/components/charts/BarGraph/BarGraph.cjs.map +0 -1
- package/dist/components/charts/BarGraph/BarGraph.js +0 -220
- package/dist/components/charts/BarGraph/BarGraph.js.map +0 -1
- package/dist/components/charts/Boxplot/Boxplot.cjs +0 -2
- package/dist/components/charts/Boxplot/Boxplot.cjs.map +0 -1
- package/dist/components/charts/Boxplot/Boxplot.js +0 -209
- package/dist/components/charts/Boxplot/Boxplot.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.cjs +0 -2
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.js +0 -227
- package/dist/components/charts/ChromatogramChart/ChromatogramChart.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/annotations.cjs +0 -2
- package/dist/components/charts/ChromatogramChart/annotations.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/annotations.js +0 -73
- package/dist/components/charts/ChromatogramChart/annotations.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.cjs +0 -2
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.js +0 -34
- package/dist/components/charts/ChromatogramChart/boundaryMarkers.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/constants.cjs +0 -2
- package/dist/components/charts/ChromatogramChart/constants.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/constants.js +0 -30
- package/dist/components/charts/ChromatogramChart/constants.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/dataProcessing.cjs +0 -2
- package/dist/components/charts/ChromatogramChart/dataProcessing.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/dataProcessing.js +0 -79
- package/dist/components/charts/ChromatogramChart/dataProcessing.js.map +0 -1
- package/dist/components/charts/ChromatogramChart/peakDetection.cjs.map +0 -1
- package/dist/components/charts/ChromatogramChart/peakDetection.js.map +0 -1
- package/dist/components/charts/DotPlot/DotPlot.cjs +0 -2
- package/dist/components/charts/DotPlot/DotPlot.cjs.map +0 -1
- package/dist/components/charts/DotPlot/DotPlot.js +0 -208
- package/dist/components/charts/DotPlot/DotPlot.js.map +0 -1
- package/dist/components/charts/Heatmap/Heatmap.cjs +0 -2
- package/dist/components/charts/Heatmap/Heatmap.cjs.map +0 -1
- package/dist/components/charts/Heatmap/Heatmap.js +0 -67
- package/dist/components/charts/Heatmap/Heatmap.js.map +0 -1
- package/dist/components/charts/LineGraph/LineGraph.cjs +0 -2
- package/dist/components/charts/LineGraph/LineGraph.cjs.map +0 -1
- package/dist/components/charts/LineGraph/LineGraph.js +0 -225
- package/dist/components/charts/LineGraph/LineGraph.js.map +0 -1
- package/dist/components/charts/ScatterGraph/ScatterGraph.cjs +0 -2
- package/dist/components/charts/ScatterGraph/ScatterGraph.cjs.map +0 -1
- package/dist/components/charts/ScatterGraph/ScatterGraph.js +0 -234
- package/dist/components/charts/ScatterGraph/ScatterGraph.js.map +0 -1
- package/dist/components/composed/tdp-link.cjs +0 -2
- package/dist/components/composed/tdp-link.cjs.map +0 -1
- package/dist/components/composed/tdp-link.js +0 -84
- package/dist/components/composed/tdp-link.js.map +0 -1
- package/dist/components/composed/tdp-url.cjs.map +0 -1
- package/dist/components/composed/tdp-url.js.map +0 -1
- package/dist/components/ui/accordion.cjs +0 -2
- package/dist/components/ui/accordion.cjs.map +0 -1
- package/dist/components/ui/accordion.js +0 -83
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/alert-dialog.cjs +0 -2
- package/dist/components/ui/alert-dialog.cjs.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -181
- package/dist/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/alert.cjs +0 -2
- package/dist/components/ui/alert.cjs.map +0 -1
- package/dist/components/ui/alert.js +0 -81
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/aspect-ratio.cjs.map +0 -1
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/avatar.cjs +0 -2
- package/dist/components/ui/avatar.cjs.map +0 -1
- package/dist/components/ui/avatar.js +0 -107
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.cjs +0 -2
- package/dist/components/ui/badge.cjs.map +0 -1
- package/dist/components/ui/badge.js +0 -47
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/banner.cjs +0 -2
- package/dist/components/ui/banner.cjs.map +0 -1
- package/dist/components/ui/banner.js +0 -80
- package/dist/components/ui/banner.js.map +0 -1
- package/dist/components/ui/breadcrumb.cjs +0 -2
- package/dist/components/ui/breadcrumb.cjs.map +0 -1
- package/dist/components/ui/breadcrumb.js +0 -118
- package/dist/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/button-group.cjs +0 -2
- package/dist/components/ui/button-group.cjs.map +0 -1
- package/dist/components/ui/button-group.js +0 -77
- package/dist/components/ui/button-group.js.map +0 -1
- package/dist/components/ui/button.cjs +0 -2
- package/dist/components/ui/button.cjs.map +0 -1
- package/dist/components/ui/button.js +0 -57
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/calendar.cjs +0 -2
- package/dist/components/ui/calendar.cjs.map +0 -1
- package/dist/components/ui/calendar.js +0 -174
- package/dist/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/card.cjs +0 -2
- package/dist/components/ui/card.cjs.map +0 -1
- package/dist/components/ui/card.js +0 -102
- package/dist/components/ui/card.js.map +0 -1
- package/dist/components/ui/carousel.cjs +0 -2
- package/dist/components/ui/carousel.cjs.map +0 -1
- package/dist/components/ui/carousel.js +0 -179
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/checkbox.cjs +0 -2
- package/dist/components/ui/checkbox.cjs.map +0 -1
- package/dist/components/ui/checkbox.js +0 -35
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/code-block.cjs +0 -4
- package/dist/components/ui/code-block.cjs.map +0 -1
- package/dist/components/ui/code-block.js +0 -306
- package/dist/components/ui/code-block.js.map +0 -1
- package/dist/components/ui/code-editor.cjs +0 -2
- package/dist/components/ui/code-editor.cjs.map +0 -1
- package/dist/components/ui/code-editor.js +0 -103
- package/dist/components/ui/code-editor.js.map +0 -1
- package/dist/components/ui/collapsible.cjs.map +0 -1
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/combobox.cjs +0 -2
- package/dist/components/ui/combobox.cjs.map +0 -1
- package/dist/components/ui/combobox.js +0 -281
- package/dist/components/ui/combobox.js.map +0 -1
- package/dist/components/ui/command.cjs +0 -2
- package/dist/components/ui/command.cjs.map +0 -1
- package/dist/components/ui/command.js +0 -174
- package/dist/components/ui/command.js.map +0 -1
- package/dist/components/ui/context-menu.cjs +0 -2
- package/dist/components/ui/context-menu.cjs.map +0 -1
- package/dist/components/ui/context-menu.js +0 -236
- package/dist/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/dialog.cjs +0 -2
- package/dist/components/ui/dialog.cjs.map +0 -1
- package/dist/components/ui/dialog.js +0 -165
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/drawer.cjs +0 -2
- package/dist/components/ui/drawer.cjs.map +0 -1
- package/dist/components/ui/drawer.js +0 -125
- package/dist/components/ui/drawer.js.map +0 -1
- package/dist/components/ui/dropdown-menu.cjs +0 -2
- package/dist/components/ui/dropdown-menu.cjs.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -252
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/field.cjs +0 -2
- package/dist/components/ui/field.cjs.map +0 -1
- package/dist/components/ui/field.js +0 -210
- package/dist/components/ui/field.js.map +0 -1
- package/dist/components/ui/hover-card.cjs +0 -2
- package/dist/components/ui/hover-card.cjs.map +0 -1
- package/dist/components/ui/hover-card.js +0 -39
- package/dist/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/input-group.cjs +0 -2
- package/dist/components/ui/input-group.cjs.map +0 -1
- package/dist/components/ui/input-group.js +0 -145
- package/dist/components/ui/input-group.js.map +0 -1
- package/dist/components/ui/input-otp.cjs +0 -2
- package/dist/components/ui/input-otp.cjs.map +0 -1
- package/dist/components/ui/input-otp.js +0 -82
- package/dist/components/ui/input-otp.js.map +0 -1
- package/dist/components/ui/input.cjs +0 -2
- package/dist/components/ui/input.cjs.map +0 -1
- package/dist/components/ui/input.js +0 -20
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/item.cjs +0 -2
- package/dist/components/ui/item.cjs.map +0 -1
- package/dist/components/ui/item.js +0 -191
- package/dist/components/ui/item.js.map +0 -1
- package/dist/components/ui/kbd.cjs +0 -2
- package/dist/components/ui/kbd.cjs.map +0 -1
- package/dist/components/ui/kbd.js +0 -30
- package/dist/components/ui/kbd.js.map +0 -1
- package/dist/components/ui/label.cjs +0 -2
- package/dist/components/ui/label.cjs.map +0 -1
- package/dist/components/ui/label.js +0 -23
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/menubar.cjs +0 -2
- package/dist/components/ui/menubar.cjs.map +0 -1
- package/dist/components/ui/menubar.js +0 -256
- package/dist/components/ui/menubar.js.map +0 -1
- package/dist/components/ui/navigation-menu.cjs +0 -2
- package/dist/components/ui/navigation-menu.cjs.map +0 -1
- package/dist/components/ui/navigation-menu.js +0 -164
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/popover.cjs +0 -2
- package/dist/components/ui/popover.cjs.map +0 -1
- package/dist/components/ui/popover.js +0 -45
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/radio-group.cjs +0 -2
- package/dist/components/ui/radio-group.cjs.map +0 -1
- package/dist/components/ui/radio-group.js +0 -45
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/resizable.cjs +0 -2
- package/dist/components/ui/resizable.cjs.map +0 -1
- package/dist/components/ui/resizable.js +0 -58
- package/dist/components/ui/resizable.js.map +0 -1
- package/dist/components/ui/scroll-area.cjs +0 -2
- package/dist/components/ui/scroll-area.cjs.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -60
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/select.cjs +0 -2
- package/dist/components/ui/select.cjs.map +0 -1
- package/dist/components/ui/select.js +0 -184
- package/dist/components/ui/select.js.map +0 -1
- package/dist/components/ui/separator.cjs +0 -2
- package/dist/components/ui/separator.cjs.map +0 -1
- package/dist/components/ui/separator.js +0 -27
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/sheet.cjs +0 -2
- package/dist/components/ui/sheet.cjs.map +0 -1
- package/dist/components/ui/sheet.js +0 -137
- package/dist/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/sidebar.cjs +0 -2
- package/dist/components/ui/sidebar.cjs.map +0 -1
- package/dist/components/ui/sidebar.js +0 -579
- package/dist/components/ui/sidebar.js.map +0 -1
- package/dist/components/ui/skeleton.cjs +0 -2
- package/dist/components/ui/skeleton.cjs.map +0 -1
- package/dist/components/ui/skeleton.js +0 -24
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/slider.cjs +0 -2
- package/dist/components/ui/slider.cjs.map +0 -1
- package/dist/components/ui/slider.js +0 -60
- package/dist/components/ui/slider.js.map +0 -1
- package/dist/components/ui/sonner.cjs +0 -2
- package/dist/components/ui/sonner.cjs.map +0 -1
- package/dist/components/ui/sonner.js +0 -37
- package/dist/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/spinner.cjs +0 -2
- package/dist/components/ui/spinner.cjs.map +0 -1
- package/dist/components/ui/spinner.js +0 -39
- package/dist/components/ui/spinner.js.map +0 -1
- package/dist/components/ui/switch.cjs +0 -2
- package/dist/components/ui/switch.cjs.map +0 -1
- package/dist/components/ui/switch.js +0 -32
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/table.cjs +0 -2
- package/dist/components/ui/table.cjs.map +0 -1
- package/dist/components/ui/table.js +0 -152
- package/dist/components/ui/table.js.map +0 -1
- package/dist/components/ui/tabs.cjs +0 -2
- package/dist/components/ui/tabs.cjs.map +0 -1
- package/dist/components/ui/tabs.js +0 -92
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/tetrascience-icon.cjs +0 -2
- package/dist/components/ui/tetrascience-icon.cjs.map +0 -1
- package/dist/components/ui/tetrascience-icon.js +0 -46
- package/dist/components/ui/tetrascience-icon.js.map +0 -1
- package/dist/components/ui/textarea.cjs +0 -2
- package/dist/components/ui/textarea.cjs.map +0 -1
- package/dist/components/ui/textarea.js +0 -19
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/toggle-group.cjs +0 -2
- package/dist/components/ui/toggle-group.cjs.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -77
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/toggle.cjs +0 -2
- package/dist/components/ui/toggle.cjs.map +0 -1
- package/dist/components/ui/toggle.js +0 -44
- package/dist/components/ui/toggle.js.map +0 -1
- package/dist/components/ui/tooltip.cjs +0 -2
- package/dist/components/ui/tooltip.cjs.map +0 -1
- package/dist/components/ui/tooltip.js +0 -56
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/databricks.d.ts +0 -129
- package/dist/providers/athena.d.ts +0 -9
- package/dist/providers/databricks.d.ts +0 -9
- package/dist/providers/snowflake.d.ts +0 -9
- package/dist/snowflake.d.ts +0 -125
- /package/dist/components/charts/{ChromatogramChart → Chromatogram}/peakDetection.cjs +0 -0
- /package/dist/components/charts/{ChromatogramChart → Chromatogram}/peakDetection.js +0 -0
- /package/dist/{components/composed → composed}/tdp-url.cjs +0 -0
- /package/dist/{components/composed → composed}/tdp-url.js +0 -0
- /package/dist/{components/ui → ui}/aspect-ratio.cjs +0 -0
- /package/dist/{components/ui → ui}/aspect-ratio.js +0 -0
- /package/dist/{components/ui → ui}/collapsible.cjs +0 -0
- /package/dist/{components/ui → ui}/collapsible.js +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
3
|
+
interface ReasoningContextValue {
|
|
4
|
+
isStreaming: boolean;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
setIsOpen: (open: boolean) => void;
|
|
7
|
+
duration: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const useReasoning: () => ReasoningContextValue;
|
|
10
|
+
export type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
11
|
+
isStreaming?: boolean;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
duration?: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const Reasoning: import('react').MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
19
|
+
getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode;
|
|
20
|
+
};
|
|
21
|
+
export declare const ReasoningTrigger: import('react').MemoExoticComponent<({ className, children, getThinkingMessage, ...props }: ReasoningTriggerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
22
|
+
export type ReasoningContentProps = ComponentProps<typeof CollapsibleContent> & {
|
|
23
|
+
children: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const ReasoningContent: import('react').MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
/** TetraScience brand gradient — Light Blue 300 → Purple 500 → Violet Marble */
|
|
3
|
+
export declare const TS_SHIMMER_GRADIENT = "linear-gradient(90deg, #549DFF, #8243BA, #9665F4)";
|
|
4
|
+
export interface TextShimmerProps {
|
|
5
|
+
children: string;
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
className?: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
spread?: number;
|
|
10
|
+
/**
|
|
11
|
+
* CSS gradient used as the base text colour. Defaults to `muted-foreground`.
|
|
12
|
+
* Pass `TS_SHIMMER_GRADIENT` (or any custom gradient) to colour the text
|
|
13
|
+
* with the brand blue→purple sweep.
|
|
14
|
+
*/
|
|
15
|
+
gradient?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Shimmer: import('react').MemoExoticComponent<({ children, as: Component, className, duration, spread, gradient, }: TextShimmerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
3
|
+
export type SourcesProps = ComponentProps<"div">;
|
|
4
|
+
export declare const Sources: ({ className, ...props }: SourcesProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type SourcesTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
6
|
+
count: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const SourcesTrigger: ({ className, count, children, ...props }: SourcesTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type SourcesContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
10
|
+
export declare const SourcesContent: ({ className, ...props }: SourcesContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type SourceProps = ComponentProps<"a">;
|
|
12
|
+
export declare const Source: ({ href, title, className, children, ...props }: SourceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Button } from '../ui/button';
|
|
3
|
+
interface SpeechRecognition extends EventTarget {
|
|
4
|
+
continuous: boolean;
|
|
5
|
+
interimResults: boolean;
|
|
6
|
+
lang: string;
|
|
7
|
+
start(): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
onstart: ((this: SpeechRecognition, ev: Event) => void) | null;
|
|
10
|
+
onend: ((this: SpeechRecognition, ev: Event) => void) | null;
|
|
11
|
+
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => void) | null;
|
|
12
|
+
onerror: ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => void) | null;
|
|
13
|
+
}
|
|
14
|
+
interface SpeechRecognitionEvent extends Event {
|
|
15
|
+
results: SpeechRecognitionResultList;
|
|
16
|
+
resultIndex: number;
|
|
17
|
+
}
|
|
18
|
+
interface SpeechRecognitionResultList {
|
|
19
|
+
readonly length: number;
|
|
20
|
+
item(index: number): SpeechRecognitionResult;
|
|
21
|
+
[index: number]: SpeechRecognitionResult;
|
|
22
|
+
}
|
|
23
|
+
interface SpeechRecognitionResult {
|
|
24
|
+
readonly length: number;
|
|
25
|
+
item(index: number): SpeechRecognitionAlternative;
|
|
26
|
+
[index: number]: SpeechRecognitionAlternative;
|
|
27
|
+
isFinal: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface SpeechRecognitionAlternative {
|
|
30
|
+
transcript: string;
|
|
31
|
+
confidence: number;
|
|
32
|
+
}
|
|
33
|
+
interface SpeechRecognitionErrorEvent extends Event {
|
|
34
|
+
error: string;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface Window {
|
|
38
|
+
SpeechRecognition: new () => SpeechRecognition;
|
|
39
|
+
webkitSpeechRecognition: new () => SpeechRecognition;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export type SpeechInputProps = ComponentProps<typeof Button> & {
|
|
43
|
+
onTranscriptionChange?: (text: string) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Callback for when audio is recorded using MediaRecorder fallback.
|
|
46
|
+
* This is called in browsers that don't support the Web Speech API (Firefox, Safari).
|
|
47
|
+
* The callback receives an audio Blob that should be sent to a transcription service.
|
|
48
|
+
* Return the transcribed text, which will be passed to onTranscriptionChange.
|
|
49
|
+
*/
|
|
50
|
+
onAudioRecorded?: (audioBlob: Blob) => Promise<string>;
|
|
51
|
+
lang?: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const SpeechInput: ({ className, onTranscriptionChange, onAudioRecorded, lang, ...props }: SpeechInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in spinner icons.
|
|
4
|
+
*
|
|
5
|
+
* The Lucide spinners pair with the flat `ts-spin-pulse` animation; the
|
|
6
|
+
* `tetra` variant is the Tetra-branded "TetraSpin" — the official TetraScience
|
|
7
|
+
* molecule logo filled with the brand blue gradient, rotating 360° with the
|
|
8
|
+
* gradient held fixed so its nodes shimmer, echoing the `:tetraspin3d:` gif for
|
|
9
|
+
* a sense of brand identity while an agent is thinking.
|
|
10
|
+
*/
|
|
11
|
+
export declare const STREAM_STATUS_ICONS: {
|
|
12
|
+
readonly loader: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
readonly "loader-circle": import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
readonly "loader-pinwheel": import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
readonly "disc-3": import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
readonly tetra: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export type StreamStatusIconVariant = keyof typeof STREAM_STATUS_ICONS;
|
|
19
|
+
export type StreamStatusState = "streaming" | "idle" | "done" | "error";
|
|
20
|
+
export interface StreamStatusProps {
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp when streaming started (Date or epoch ms).
|
|
23
|
+
* The component manages an internal 1-second ticker when set.
|
|
24
|
+
*/
|
|
25
|
+
startTime?: Date | number;
|
|
26
|
+
/** Whether streaming is currently active. Defaults to `true` when `startTime` is set. */
|
|
27
|
+
isStreaming?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Explicit state for the right-end indicator dot colour.
|
|
30
|
+
* If omitted, derived from `isStreaming`: `true` → "streaming", `false` → "idle".
|
|
31
|
+
*
|
|
32
|
+
* | state | colour |
|
|
33
|
+
* |-------------|----------------------------|
|
|
34
|
+
* | streaming | TS Light Blue 300 (pulsing)|
|
|
35
|
+
* | idle | muted gray |
|
|
36
|
+
* | done | TS Forest Green 300 |
|
|
37
|
+
* | error | TS Imperial Red |
|
|
38
|
+
*/
|
|
39
|
+
state?: StreamStatusState;
|
|
40
|
+
/**
|
|
41
|
+
* Show the coloured status dot at the right end of the component.
|
|
42
|
+
* Defaults to `false`.
|
|
43
|
+
*/
|
|
44
|
+
showIndicator?: boolean;
|
|
45
|
+
/** Token count shown after the separator, e.g. `8700` → "↓ 8.7k tokens". */
|
|
46
|
+
tokenCount?: number;
|
|
47
|
+
/** Prefix before the formatted token count. Defaults to `↓`. */
|
|
48
|
+
tokenLabel?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Custom icon (ReactNode). Takes precedence over `iconVariant`.
|
|
51
|
+
* While streaming, the icon wrapper receives `ts-spin-pulse` — a continuous
|
|
52
|
+
* rotation that occasionally surges to 1.3× scale.
|
|
53
|
+
*/
|
|
54
|
+
icon?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Convenience shorthand to pick a built-in spinner.
|
|
57
|
+
* Ignored when `icon` is also provided. Defaults to `"tetra"`.
|
|
58
|
+
*
|
|
59
|
+
* Options: `"loader"` | `"loader-circle"` | `"loader-pinwheel"` | `"disc-3"` | `"tetra"`.
|
|
60
|
+
* The default `"tetra"` variant renders the official TetraScience molecule
|
|
61
|
+
* logo with a fixed brand-blue gradient. Pass `icon={null}` to render no icon.
|
|
62
|
+
*/
|
|
63
|
+
iconVariant?: StreamStatusIconVariant;
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare const StreamStatus: import('react').MemoExoticComponent<({ startTime, isStreaming, state: stateProp, showIndicator, tokenCount, tokenLabel, icon, iconVariant, className, }: StreamStatusProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../lib/shiki.cjs"),r=["github-light","github-dark"],d=new Map,o=new Map,c=100,f=(e,l)=>{const s=e.slice(0,c),g=e.length>c?e.slice(-c):"";return`${l}:${e.length}:${s}:${g}`},C={name:"shiki",type:"code-highlighter",getSupportedLanguages:()=>i.getSupportedCodeBlockLanguages(),getThemes:()=>r,supportsLanguage:e=>i.resolveCodeBlockLanguage(e)!==null,highlight({code:e,language:l},s){const g=i.resolveCodeBlockLanguage(l)??"text",n=f(e,g),a=d.get(n);if(a)return a;if(s){let t=o.get(n);t||(t=new Set,o.set(n,t)),t.add(s)}return i.getCodeBlockHighlighter(g).then(({highlighter:t,lang:p})=>{const h=t.codeToTokens(e,{lang:p,themes:{dark:r[1],light:r[0]}});d.set(n,h);const u=o.get(n);if(u){for(const k of u)k(h);o.delete(n)}}).catch(t=>{console.error("Failed to highlight code:",t),o.delete(n)}),null}};exports.streamdownCodePlugin=C;
|
|
2
|
+
//# sourceMappingURL=streamdown-code-plugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamdown-code-plugin.cjs","sources":["../../../src/components/ai/streamdown-code-plugin.ts"],"sourcesContent":["/**\n * Slim replacement for `@streamdown/code` (SW-2007).\n *\n * The upstream plugin statically imports the full \"shiki\" bundle (~200\n * grammars), landing a second full Shiki copy in every consumer build. This\n * plugin implements the same streamdown `CodeHighlighterPlugin` contract on\n * top of the shared slim highlighter in `@/lib/shiki`, so only the explicit\n * language set is bundled and every grammar arrives as a lazy chunk.\n */\n\nimport type { BundledLanguage } from \"shiki\";\nimport type { CodeHighlighterPlugin } from \"streamdown\";\n\nimport {\n getCodeBlockHighlighter,\n getSupportedCodeBlockLanguages,\n resolveCodeBlockLanguage,\n} from \"@/lib/shiki\";\n\ntype HighlightCallback = NonNullable<Parameters<CodeHighlighterPlugin[\"highlight\"]>[1]>;\ntype HighlightResult = Parameters<HighlightCallback>[0];\n\nconst THEMES: ReturnType<CodeHighlighterPlugin[\"getThemes\"]> = [\n \"github-light\",\n \"github-dark\",\n];\n\n// Highlighted-token cache + pending-callback registry, mirroring the\n// upstream plugin's sync-return/async-callback protocol: return cached\n// tokens synchronously, otherwise kick off highlighting and notify via the\n// callback when tokens are ready.\nconst resultsCache = new Map<string, HighlightResult>();\nconst subscribers = new Map<string, Set<HighlightCallback>>();\n\nconst KEY_SLICE_LENGTH = 100;\n\nconst cacheKey = (code: string, lang: string): string => {\n const head = code.slice(0, KEY_SLICE_LENGTH);\n const tail = code.length > KEY_SLICE_LENGTH ? code.slice(-KEY_SLICE_LENGTH) : \"\";\n return `${lang}:${code.length}:${head}:${tail}`;\n};\n\nexport const streamdownCodePlugin: CodeHighlighterPlugin = {\n name: \"shiki\",\n type: \"code-highlighter\",\n getSupportedLanguages: () => getSupportedCodeBlockLanguages() as BundledLanguage[],\n getThemes: () => THEMES,\n supportsLanguage: (language) => resolveCodeBlockLanguage(language) !== null,\n highlight({ code, language }, callback) {\n // Unsupported languages resolve to plaintext inside the shared\n // highlighter, so streaming still renders the raw code.\n const lang = resolveCodeBlockLanguage(language) ?? \"text\";\n const key = cacheKey(code, lang);\n\n const cached = resultsCache.get(key);\n if (cached) {\n return cached;\n }\n\n if (callback) {\n let pending = subscribers.get(key);\n if (!pending) {\n pending = new Set();\n subscribers.set(key, pending);\n }\n pending.add(callback);\n }\n\n getCodeBlockHighlighter(lang)\n .then(({ highlighter, lang: resolvedLang }) => {\n const result = highlighter.codeToTokens(code, {\n lang: resolvedLang,\n themes: { dark: THEMES[1], light: THEMES[0] },\n });\n resultsCache.set(key, result);\n const pending = subscribers.get(key);\n if (pending) {\n for (const notify of pending) {\n notify(result);\n }\n subscribers.delete(key);\n }\n })\n .catch((error: unknown) => {\n console.error(\"Failed to highlight code:\", error);\n subscribers.delete(key);\n });\n\n return null;\n },\n};\n"],"names":["THEMES","resultsCache","subscribers","KEY_SLICE_LENGTH","cacheKey","code","lang","head","tail","streamdownCodePlugin","getSupportedCodeBlockLanguages","language","resolveCodeBlockLanguage","callback","key","cached","pending","getCodeBlockHighlighter","highlighter","resolvedLang","result","notify","error"],"mappings":"uHAsBMA,EAAyD,CAC7D,eACA,aACF,EAMMC,MAAmB,IACnBC,MAAkB,IAElBC,EAAmB,IAEnBC,EAAW,CAACC,EAAcC,IAAyB,CACvD,MAAMC,EAAOF,EAAK,MAAM,EAAGF,CAAgB,EACrCK,EAAOH,EAAK,OAASF,EAAmBE,EAAK,MAAM,CAACF,CAAgB,EAAI,GAC9E,MAAO,GAAGG,CAAI,IAAID,EAAK,MAAM,IAAIE,CAAI,IAAIC,CAAI,EAC/C,EAEaC,EAA8C,CACzD,KAAM,QACN,KAAM,mBACN,sBAAuB,IAAMC,EAAAA,+BAAA,EAC7B,UAAW,IAAMV,EACjB,iBAAmBW,GAAaC,2BAAyBD,CAAQ,IAAM,KACvE,UAAU,CAAE,KAAAN,EAAM,SAAAM,CAAA,EAAYE,EAAU,CAGtC,MAAMP,EAAOM,EAAAA,yBAAyBD,CAAQ,GAAK,OAC7CG,EAAMV,EAASC,EAAMC,CAAI,EAEzBS,EAASd,EAAa,IAAIa,CAAG,EACnC,GAAIC,EACF,OAAOA,EAGT,GAAIF,EAAU,CACZ,IAAIG,EAAUd,EAAY,IAAIY,CAAG,EAC5BE,IACHA,MAAc,IACdd,EAAY,IAAIY,EAAKE,CAAO,GAE9BA,EAAQ,IAAIH,CAAQ,CACtB,CAEAI,OAAAA,EAAAA,wBAAwBX,CAAI,EACzB,KAAK,CAAC,CAAE,YAAAY,EAAa,KAAMC,KAAmB,CAC7C,MAAMC,EAASF,EAAY,aAAab,EAAM,CAC5C,KAAMc,EACN,OAAQ,CAAE,KAAMnB,EAAO,CAAC,EAAG,MAAOA,EAAO,CAAC,CAAA,CAAE,CAC7C,EACDC,EAAa,IAAIa,EAAKM,CAAM,EAC5B,MAAMJ,EAAUd,EAAY,IAAIY,CAAG,EACnC,GAAIE,EAAS,CACX,UAAWK,KAAUL,EACnBK,EAAOD,CAAM,EAEflB,EAAY,OAAOY,CAAG,CACxB,CACF,CAAC,EACA,MAAOQ,GAAmB,CACzB,QAAQ,MAAM,4BAA6BA,CAAK,EAChDpB,EAAY,OAAOY,CAAG,CACxB,CAAC,EAEI,IACT,CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { resolveCodeBlockLanguage as u, getCodeBlockHighlighter as k, getSupportedCodeBlockLanguages as m } from "../../lib/shiki.js";
|
|
2
|
+
const l = [
|
|
3
|
+
"github-light",
|
|
4
|
+
"github-dark"
|
|
5
|
+
], d = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), h = 100, C = (e, i) => {
|
|
6
|
+
const g = e.slice(0, h), s = e.length > h ? e.slice(-h) : "";
|
|
7
|
+
return `${i}:${e.length}:${g}:${s}`;
|
|
8
|
+
}, E = {
|
|
9
|
+
name: "shiki",
|
|
10
|
+
type: "code-highlighter",
|
|
11
|
+
getSupportedLanguages: () => m(),
|
|
12
|
+
getThemes: () => l,
|
|
13
|
+
supportsLanguage: (e) => u(e) !== null,
|
|
14
|
+
highlight({ code: e, language: i }, g) {
|
|
15
|
+
const s = u(i) ?? "text", n = C(e, s), r = d.get(n);
|
|
16
|
+
if (r)
|
|
17
|
+
return r;
|
|
18
|
+
if (g) {
|
|
19
|
+
let t = o.get(n);
|
|
20
|
+
t || (t = /* @__PURE__ */ new Set(), o.set(n, t)), t.add(g);
|
|
21
|
+
}
|
|
22
|
+
return k(s).then(({ highlighter: t, lang: p }) => {
|
|
23
|
+
const c = t.codeToTokens(e, {
|
|
24
|
+
lang: p,
|
|
25
|
+
themes: { dark: l[1], light: l[0] }
|
|
26
|
+
});
|
|
27
|
+
d.set(n, c);
|
|
28
|
+
const a = o.get(n);
|
|
29
|
+
if (a) {
|
|
30
|
+
for (const f of a)
|
|
31
|
+
f(c);
|
|
32
|
+
o.delete(n);
|
|
33
|
+
}
|
|
34
|
+
}).catch((t) => {
|
|
35
|
+
console.error("Failed to highlight code:", t), o.delete(n);
|
|
36
|
+
}), null;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
E as streamdownCodePlugin
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=streamdown-code-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamdown-code-plugin.js","sources":["../../../src/components/ai/streamdown-code-plugin.ts"],"sourcesContent":["/**\n * Slim replacement for `@streamdown/code` (SW-2007).\n *\n * The upstream plugin statically imports the full \"shiki\" bundle (~200\n * grammars), landing a second full Shiki copy in every consumer build. This\n * plugin implements the same streamdown `CodeHighlighterPlugin` contract on\n * top of the shared slim highlighter in `@/lib/shiki`, so only the explicit\n * language set is bundled and every grammar arrives as a lazy chunk.\n */\n\nimport type { BundledLanguage } from \"shiki\";\nimport type { CodeHighlighterPlugin } from \"streamdown\";\n\nimport {\n getCodeBlockHighlighter,\n getSupportedCodeBlockLanguages,\n resolveCodeBlockLanguage,\n} from \"@/lib/shiki\";\n\ntype HighlightCallback = NonNullable<Parameters<CodeHighlighterPlugin[\"highlight\"]>[1]>;\ntype HighlightResult = Parameters<HighlightCallback>[0];\n\nconst THEMES: ReturnType<CodeHighlighterPlugin[\"getThemes\"]> = [\n \"github-light\",\n \"github-dark\",\n];\n\n// Highlighted-token cache + pending-callback registry, mirroring the\n// upstream plugin's sync-return/async-callback protocol: return cached\n// tokens synchronously, otherwise kick off highlighting and notify via the\n// callback when tokens are ready.\nconst resultsCache = new Map<string, HighlightResult>();\nconst subscribers = new Map<string, Set<HighlightCallback>>();\n\nconst KEY_SLICE_LENGTH = 100;\n\nconst cacheKey = (code: string, lang: string): string => {\n const head = code.slice(0, KEY_SLICE_LENGTH);\n const tail = code.length > KEY_SLICE_LENGTH ? code.slice(-KEY_SLICE_LENGTH) : \"\";\n return `${lang}:${code.length}:${head}:${tail}`;\n};\n\nexport const streamdownCodePlugin: CodeHighlighterPlugin = {\n name: \"shiki\",\n type: \"code-highlighter\",\n getSupportedLanguages: () => getSupportedCodeBlockLanguages() as BundledLanguage[],\n getThemes: () => THEMES,\n supportsLanguage: (language) => resolveCodeBlockLanguage(language) !== null,\n highlight({ code, language }, callback) {\n // Unsupported languages resolve to plaintext inside the shared\n // highlighter, so streaming still renders the raw code.\n const lang = resolveCodeBlockLanguage(language) ?? \"text\";\n const key = cacheKey(code, lang);\n\n const cached = resultsCache.get(key);\n if (cached) {\n return cached;\n }\n\n if (callback) {\n let pending = subscribers.get(key);\n if (!pending) {\n pending = new Set();\n subscribers.set(key, pending);\n }\n pending.add(callback);\n }\n\n getCodeBlockHighlighter(lang)\n .then(({ highlighter, lang: resolvedLang }) => {\n const result = highlighter.codeToTokens(code, {\n lang: resolvedLang,\n themes: { dark: THEMES[1], light: THEMES[0] },\n });\n resultsCache.set(key, result);\n const pending = subscribers.get(key);\n if (pending) {\n for (const notify of pending) {\n notify(result);\n }\n subscribers.delete(key);\n }\n })\n .catch((error: unknown) => {\n console.error(\"Failed to highlight code:\", error);\n subscribers.delete(key);\n });\n\n return null;\n },\n};\n"],"names":["THEMES","resultsCache","subscribers","KEY_SLICE_LENGTH","cacheKey","code","lang","head","tail","streamdownCodePlugin","getSupportedCodeBlockLanguages","language","resolveCodeBlockLanguage","callback","key","cached","pending","getCodeBlockHighlighter","highlighter","resolvedLang","result","notify","error"],"mappings":";AAsBA,MAAMA,IAAyD;AAAA,EAC7D;AAAA,EACA;AACF,GAMMC,wBAAmB,IAAA,GACnBC,wBAAkB,IAAA,GAElBC,IAAmB,KAEnBC,IAAW,CAACC,GAAcC,MAAyB;AACvD,QAAMC,IAAOF,EAAK,MAAM,GAAGF,CAAgB,GACrCK,IAAOH,EAAK,SAASF,IAAmBE,EAAK,MAAM,CAACF,CAAgB,IAAI;AAC9E,SAAO,GAAGG,CAAI,IAAID,EAAK,MAAM,IAAIE,CAAI,IAAIC,CAAI;AAC/C,GAEaC,IAA8C;AAAA,EACzD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,uBAAuB,MAAMC,EAAA;AAAA,EAC7B,WAAW,MAAMV;AAAA,EACjB,kBAAkB,CAACW,MAAaC,EAAyBD,CAAQ,MAAM;AAAA,EACvE,UAAU,EAAE,MAAAN,GAAM,UAAAM,EAAA,GAAYE,GAAU;AAGtC,UAAMP,IAAOM,EAAyBD,CAAQ,KAAK,QAC7CG,IAAMV,EAASC,GAAMC,CAAI,GAEzBS,IAASd,EAAa,IAAIa,CAAG;AACnC,QAAIC;AACF,aAAOA;AAGT,QAAIF,GAAU;AACZ,UAAIG,IAAUd,EAAY,IAAIY,CAAG;AACjC,MAAKE,MACHA,wBAAc,IAAA,GACdd,EAAY,IAAIY,GAAKE,CAAO,IAE9BA,EAAQ,IAAIH,CAAQ;AAAA,IACtB;AAEA,WAAAI,EAAwBX,CAAI,EACzB,KAAK,CAAC,EAAE,aAAAY,GAAa,MAAMC,QAAmB;AAC7C,YAAMC,IAASF,EAAY,aAAab,GAAM;AAAA,QAC5C,MAAMc;AAAA,QACN,QAAQ,EAAE,MAAMnB,EAAO,CAAC,GAAG,OAAOA,EAAO,CAAC,EAAA;AAAA,MAAE,CAC7C;AACD,MAAAC,EAAa,IAAIa,GAAKM,CAAM;AAC5B,YAAMJ,IAAUd,EAAY,IAAIY,CAAG;AACnC,UAAIE,GAAS;AACX,mBAAWK,KAAUL;AACnB,UAAAK,EAAOD,CAAM;AAEf,QAAAlB,EAAY,OAAOY,CAAG;AAAA,MACxB;AAAA,IACF,CAAC,EACA,MAAM,CAACQ,MAAmB;AACzB,cAAQ,MAAM,6BAA6BA,CAAK,GAChDpB,EAAY,OAAOY,CAAG;AAAA,IACxB,CAAC,GAEI;AAAA,EACT;AACF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@streamdown/cjk"),r=require("@streamdown/math"),t=require("@streamdown/mermaid"),o=require("./streamdown-code-plugin.cjs"),n={cjk:e.cjk,code:o.streamdownCodePlugin,math:r.math,mermaid:t.mermaid};exports.streamdownPlugins=n;
|
|
2
|
+
//# sourceMappingURL=streamdown-plugins.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamdown-plugins.cjs","sources":["../../../src/components/ai/streamdown-plugins.ts"],"sourcesContent":["/**\n * Full streamdown plugin set for `MessageResponse` / `Reasoning` markdown.\n *\n * This module is only ever reached through `useStreamdownPlugins`'s dynamic\n * import (SW-2007): mermaid, KaTeX, and the shiki grammars behind these\n * plugins land in a lazy chunk instead of the consumer's main bundle. Do not\n * import it statically from component code.\n */\nimport { cjk } from \"@streamdown/cjk\";\nimport { math } from \"@streamdown/math\";\nimport { mermaid } from \"@streamdown/mermaid\";\n\nimport { streamdownCodePlugin } from \"./streamdown-code-plugin\";\n\nimport type { PluginConfig } from \"streamdown\";\n\nexport const streamdownPlugins: PluginConfig = {\n cjk,\n code: streamdownCodePlugin,\n math,\n mermaid,\n};\n"],"names":["streamdownPlugins","cjk","streamdownCodePlugin","math","mermaid"],"mappings":"4NAgBaA,EAAkC,CAAA,IAC7CC,EAAAA,IACA,KAAMC,EAAAA,qBAAA,KACNC,EAAAA,KAAA,QACAC,EAAAA,OACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cjk as o } from "@streamdown/cjk";
|
|
2
|
+
import { math as m } from "@streamdown/math";
|
|
3
|
+
import { mermaid as r } from "@streamdown/mermaid";
|
|
4
|
+
import { streamdownCodePlugin as t } from "./streamdown-code-plugin.js";
|
|
5
|
+
const p = {
|
|
6
|
+
cjk: o,
|
|
7
|
+
code: t,
|
|
8
|
+
math: m,
|
|
9
|
+
mermaid: r
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
p as streamdownPlugins
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=streamdown-plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamdown-plugins.js","sources":["../../../src/components/ai/streamdown-plugins.ts"],"sourcesContent":["/**\n * Full streamdown plugin set for `MessageResponse` / `Reasoning` markdown.\n *\n * This module is only ever reached through `useStreamdownPlugins`'s dynamic\n * import (SW-2007): mermaid, KaTeX, and the shiki grammars behind these\n * plugins land in a lazy chunk instead of the consumer's main bundle. Do not\n * import it statically from component code.\n */\nimport { cjk } from \"@streamdown/cjk\";\nimport { math } from \"@streamdown/math\";\nimport { mermaid } from \"@streamdown/mermaid\";\n\nimport { streamdownCodePlugin } from \"./streamdown-code-plugin\";\n\nimport type { PluginConfig } from \"streamdown\";\n\nexport const streamdownPlugins: PluginConfig = {\n cjk,\n code: streamdownCodePlugin,\n math,\n mermaid,\n};\n"],"names":["streamdownPlugins","cjk","streamdownCodePlugin","math","mermaid"],"mappings":";;;;AAgBO,MAAMA,IAAkC;AAAA,EAC7C,KAAAC;AAAA,EACA,MAAMC;AAAA,EACN,MAAAC;AAAA,EACA,SAAAC;AACF;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Button } from '../ui/button';
|
|
3
|
+
export type SuggestionsProps = ComponentProps<"div">;
|
|
4
|
+
export declare const Suggestions: ({ className, children, ...props }: SuggestionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type SuggestionProps = Omit<ComponentProps<typeof Button>, "onClick"> & {
|
|
6
|
+
suggestion: string;
|
|
7
|
+
onClick?: (suggestion: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const Suggestion: ({ suggestion, onClick, className, variant, size, children, ...props }: SuggestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
3
|
+
export type TaskItemFileProps = ComponentProps<"div">;
|
|
4
|
+
export declare const TaskItemFile: ({ children, className, ...props }: TaskItemFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export type TaskItemProps = ComponentProps<"div">;
|
|
6
|
+
export declare const TaskItem: ({ children, className, ...props }: TaskItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type TaskProps = ComponentProps<typeof Collapsible> & {
|
|
8
|
+
isStreaming?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const Task: ({ defaultOpen, isStreaming, open, onOpenChange, className, ...props }: TaskProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const TaskTrigger: ({ children, className, title, ...props }: TaskTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
16
|
+
export declare const TaskContent: ({ children, className, ...props }: TaskContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DynamicToolUIPart, ToolUIPart } from 'ai';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Collapsible, CollapsibleContent } from '../ui/collapsible';
|
|
4
|
+
export type ToolProps = ComponentProps<typeof Collapsible> & {
|
|
5
|
+
isStreaming?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const Tool: ({ className, isStreaming, open, onOpenChange, defaultOpen, ...props }: ToolProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type ToolPart = ToolUIPart | DynamicToolUIPart;
|
|
9
|
+
export type ToolHeaderProps = {
|
|
10
|
+
title?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
} & ({
|
|
13
|
+
type: ToolUIPart["type"];
|
|
14
|
+
state: ToolUIPart["state"];
|
|
15
|
+
toolName?: never;
|
|
16
|
+
} | {
|
|
17
|
+
type: DynamicToolUIPart["type"];
|
|
18
|
+
state: DynamicToolUIPart["state"];
|
|
19
|
+
toolName: string;
|
|
20
|
+
});
|
|
21
|
+
export declare const getStatusBadge: (status: ToolPart["state"]) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const ToolHeader: ({ className, title, type, state, toolName, ...props }: ToolHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
24
|
+
export declare const ToolContent: ({ className, ...props }: ToolContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export type ToolInputProps = ComponentProps<"div"> & {
|
|
26
|
+
input: ToolPart["input"];
|
|
27
|
+
};
|
|
28
|
+
export declare const ToolInput: ({ className, input, ...props }: ToolInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export type ToolOutputProps = ComponentProps<"div"> & {
|
|
30
|
+
output: ToolPart["output"];
|
|
31
|
+
errorText: ToolPart["errorText"];
|
|
32
|
+
};
|
|
33
|
+
export declare const ToolOutput: ({ className, output, errorText, ...props }: ToolOutputProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");let n=null,t=null;function i(){return t??=Promise.resolve().then(()=>require("./streamdown-plugins.cjs")).then(e=>(n=e.streamdownPlugins,n)).catch(e=>{throw t=null,n=null,e}),t}function o(){const[e,r]=l.useState(n??void 0);return l.useEffect(()=>{if(e)return;let u=!1;return i().then(s=>{u||r(s)}),()=>{u=!0}},[e]),e}exports.useStreamdownPlugins=o;
|
|
2
|
+
//# sourceMappingURL=use-streamdown-plugins.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-streamdown-plugins.cjs","sources":["../../../src/components/ai/use-streamdown-plugins.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport type { PluginConfig } from \"streamdown\";\n\n// Module-level cache so the lazy chunk is fetched once and later mounts get\n// the plugins synchronously on first render (no highlight flash).\nlet cachedPlugins: PluginConfig | null = null;\nlet pluginsPromise: Promise<PluginConfig> | null = null;\n\nfunction loadStreamdownPlugins(): Promise<PluginConfig> {\n pluginsPromise ??= import(\"./streamdown-plugins\")\n .then((mod) => {\n cachedPlugins = mod.streamdownPlugins;\n return cachedPlugins;\n })\n .catch((error) => {\n pluginsPromise = null;\n cachedPlugins = null;\n throw error;\n });\n return pluginsPromise;\n}\n\n/**\n * Lazily loads the streamdown plugin set (SW-2007). Markdown renders\n * immediately without plugins; code highlighting, math, and mermaid upgrade\n * in place once the lazy chunk arrives, keeping shiki/KaTeX/mermaid out of\n * the consumer's main bundle.\n */\nexport function useStreamdownPlugins(): PluginConfig | undefined {\n const [plugins, setPlugins] = useState<PluginConfig | undefined>(\n cachedPlugins ?? undefined,\n );\n\n useEffect(() => {\n if (plugins) return;\n let cancelled = false;\n void loadStreamdownPlugins().then((loaded) => {\n if (!cancelled) setPlugins(loaded);\n });\n return () => {\n cancelled = true;\n };\n }, [plugins]);\n\n return plugins;\n}\n"],"names":["cachedPlugins","pluginsPromise","loadStreamdownPlugins","mod","error","useStreamdownPlugins","plugins","setPlugins","useState","useEffect","cancelled","loaded"],"mappings":"yGAMA,IAAIA,EAAqC,KACrCC,EAA+C,KAEnD,SAASC,GAA+C,CACtD,OAAAD,IAAmB,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,0BAAsB,CAAA,EAC7C,KAAME,IACLH,EAAgBG,EAAI,kBACbH,EACR,EACA,MAAOI,GAAU,CAChB,MAAAH,EAAiB,KACjBD,EAAgB,KACVI,CACR,CAAC,EACIH,CACT,CAQO,SAASI,GAAiD,CAC/D,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAC5BR,GAAiB,MAAA,EAGnBS,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIH,EAAS,OACb,IAAII,EAAY,GAChB,OAAKR,EAAA,EAAwB,KAAMS,GAAW,CACvCD,GAAWH,EAAWI,CAAM,CACnC,CAAC,EACM,IAAM,CACXD,EAAY,EACd,CACF,EAAG,CAACJ,CAAO,CAAC,EAELA,CACT"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginConfig } from 'streamdown';
|
|
2
|
+
/**
|
|
3
|
+
* Lazily loads the streamdown plugin set (SW-2007). Markdown renders
|
|
4
|
+
* immediately without plugins; code highlighting, math, and mermaid upgrade
|
|
5
|
+
* in place once the lazy chunk arrives, keeping shiki/KaTeX/mermaid out of
|
|
6
|
+
* the consumer's main bundle.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useStreamdownPlugins(): PluginConfig | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useState as i, useEffect as o } from "react";
|
|
2
|
+
let e = null, t = null;
|
|
3
|
+
function s() {
|
|
4
|
+
return t ??= import("./streamdown-plugins.js").then((n) => (e = n.streamdownPlugins, e)).catch((n) => {
|
|
5
|
+
throw t = null, e = null, n;
|
|
6
|
+
}), t;
|
|
7
|
+
}
|
|
8
|
+
function a() {
|
|
9
|
+
const [n, u] = i(
|
|
10
|
+
e ?? void 0
|
|
11
|
+
);
|
|
12
|
+
return o(() => {
|
|
13
|
+
if (n) return;
|
|
14
|
+
let l = !1;
|
|
15
|
+
return s().then((r) => {
|
|
16
|
+
l || u(r);
|
|
17
|
+
}), () => {
|
|
18
|
+
l = !0;
|
|
19
|
+
};
|
|
20
|
+
}, [n]), n;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
a as useStreamdownPlugins
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=use-streamdown-plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-streamdown-plugins.js","sources":["../../../src/components/ai/use-streamdown-plugins.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport type { PluginConfig } from \"streamdown\";\n\n// Module-level cache so the lazy chunk is fetched once and later mounts get\n// the plugins synchronously on first render (no highlight flash).\nlet cachedPlugins: PluginConfig | null = null;\nlet pluginsPromise: Promise<PluginConfig> | null = null;\n\nfunction loadStreamdownPlugins(): Promise<PluginConfig> {\n pluginsPromise ??= import(\"./streamdown-plugins\")\n .then((mod) => {\n cachedPlugins = mod.streamdownPlugins;\n return cachedPlugins;\n })\n .catch((error) => {\n pluginsPromise = null;\n cachedPlugins = null;\n throw error;\n });\n return pluginsPromise;\n}\n\n/**\n * Lazily loads the streamdown plugin set (SW-2007). Markdown renders\n * immediately without plugins; code highlighting, math, and mermaid upgrade\n * in place once the lazy chunk arrives, keeping shiki/KaTeX/mermaid out of\n * the consumer's main bundle.\n */\nexport function useStreamdownPlugins(): PluginConfig | undefined {\n const [plugins, setPlugins] = useState<PluginConfig | undefined>(\n cachedPlugins ?? undefined,\n );\n\n useEffect(() => {\n if (plugins) return;\n let cancelled = false;\n void loadStreamdownPlugins().then((loaded) => {\n if (!cancelled) setPlugins(loaded);\n });\n return () => {\n cancelled = true;\n };\n }, [plugins]);\n\n return plugins;\n}\n"],"names":["cachedPlugins","pluginsPromise","loadStreamdownPlugins","mod","error","useStreamdownPlugins","plugins","setPlugins","useState","useEffect","cancelled","loaded"],"mappings":";AAMA,IAAIA,IAAqC,MACrCC,IAA+C;AAEnD,SAASC,IAA+C;AACtD,SAAAD,MAAmB,OAAO,yBAAsB,EAC7C,KAAK,CAACE,OACLH,IAAgBG,EAAI,mBACbH,EACR,EACA,MAAM,CAACI,MAAU;AAChB,UAAAH,IAAiB,MACjBD,IAAgB,MACVI;AAAA,EACR,CAAC,GACIH;AACT;AAQO,SAASI,IAAiD;AAC/D,QAAM,CAACC,GAASC,CAAU,IAAIC;AAAA,IAC5BR,KAAiB;AAAA,EAAA;AAGnB,SAAAS,EAAU,MAAM;AACd,QAAIH,EAAS;AACb,QAAII,IAAY;AAChB,WAAKR,EAAA,EAAwB,KAAK,CAACS,MAAW;AAC5C,MAAKD,KAAWH,EAAWI,CAAM;AAAA,IACnC,CAAC,GACM,MAAM;AACX,MAAAD,IAAY;AAAA,IACd;AAAA,EACF,GAAG,CAACJ,CAAO,CAAC,GAELA;AACT;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),n=require("react"),tt=require("../ChartTooltip/ChartTooltip.cjs"),z=require("../plotly-loader.cjs"),et=require("../../../hooks/use-element-size.cjs"),d=require("../../../hooks/use-plotly-theme.cjs"),ot=require("../../../lib/utils.cjs"),W=require("../../../utils/colors.cjs"),rt=require("../ChartTooltip/lines.cjs"),nt=80,lt=40,it=({dataSeries:a,width:I,height:P,xRange:M,yRange:p,variant:x="normal",xTitle:C,yTitle:T,title:w,xTickText:_})=>{const f=n.useRef(null),r=d.usePlotlyTheme(),[D,R]=et.useElementSize(),u=I??R.width,h=P??R.height,F=u>0&&h>0,J=I===void 0,K=P===void 0,A=n.useRef({width:u,height:h});A.current={width:u,height:h};const k=n.useRef(!1),L=n.useRef({width:0,height:0}),{bindTooltip:O,tooltipElement:Q}=tt.useChartTooltip({getLines:e=>rt.chartTooltipLines(e.map(t=>typeof t.customdata=="number"?{...t,y:t.customdata}:t),{xLabel:C,yLabel:T})}),{xMin:Y,xMax:q,yMin:H,yMax:X}=n.useMemo(()=>{let e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=Number.MAX_VALUE,o=Number.MIN_VALUE;a.forEach(s=>{s.x.forEach(c=>{e=Math.min(e,c),t=Math.max(t,c)}),s.y.forEach(c=>{i=Math.min(i,c),o=Math.max(o,c)})});const y=(t-e)*.1,l=(o-i)*.1;return{xMin:e-y,xMax:t+y,yMin:x==="stacked"?0:i-l,yMax:o+l}},[a,x]),m=n.useMemo(()=>M||[Y,q],[M,Y,q]),g=n.useMemo(()=>p||[H,X],[p,H,X]),V=n.useMemo(()=>{const e=m[1]-m[0];let t=Math.pow(10,Math.floor(Math.log10(e)));e/t>10&&(t=t*2),e/t<4&&(t=t/2);const i=[];let o=Math.ceil(m[0]/t)*t;for(;o<=m[1];)i.push(o),o+=t;return i},[m]),j=n.useMemo(()=>{const e=g[1]-g[0];let t=Math.pow(10,Math.floor(Math.log10(e)));e/t>10&&(t=t*2),e/t<4&&(t=t/2);const i=[];let o=Math.ceil(g[0]/t)*t;for(;o<=g[1];)i.push(o),o+=t;return i},[g]),v=n.useMemo(()=>[...new Set(a.flatMap(e=>e.x))].sort((e,t)=>e-t),[a]),E=!!_&&_.length===v.length,N=n.useMemo(()=>({tickcolor:r.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:r.textColor,family:d.CHART_FONT_FAMILY,weight:400},linecolor:r.lineColor,linewidth:1,position:0,zeroline:!1}),[r]),b=n.useMemo(()=>w?{text:w,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:d.CHART_FONT_FAMILY,color:r.textColor,lineheight:1.2,standoff:30}}:void 0,[w,r]);return n.useEffect(()=>{if(!f.current||!F)return;let e;if(x==="stacked"){const l=new Array(a[0]?.x.length||0).fill(0);e=a.map((s,c)=>{const Z=s.y.map(($,B)=>{const G=l[B]+$;return l[B]=G,G}),U=W.seriesColor(c,s.color);return{x:s.x,y:Z,customdata:s.y,type:"scatter",mode:"lines",name:s.name,hoverinfo:"none",fill:c===0?"tozeroy":"tonexty",fillcolor:U,line:{color:U,width:2}}})}else e=a.map((l,s)=>{const c=W.seriesColor(s,l.color);return{x:l.x,y:l.y,type:"scatter",mode:"lines",name:l.name,hoverinfo:"none",fill:l.fill||"tozeroy",fillcolor:c,line:{color:c,width:2}}});const t={width:A.current.width,height:A.current.height,...b?{title:b}:{},margin:{l:80,r:40,b:96,t:w?nt:lt,pad:0},paper_bgcolor:r.paperBg,plot_bgcolor:r.plotBg,font:{family:d.CHART_FONT_FAMILY},dragmode:!1,xaxis:{title:{text:C,font:{size:16,color:r.textSecondary,family:d.CHART_FONT_FAMILY,weight:400},standoff:15},gridcolor:r.gridColor,range:M,autorange:!M,tickmode:"array",tickvals:E?v:V,...E?{ticktext:_}:{},showgrid:!0,automargin:!0,...N},yaxis:{title:{text:T,font:{size:16,color:r.textSecondary,family:d.CHART_FONT_FAMILY,weight:400},standoff:15},gridcolor:r.gridColor,range:p,autorange:!p,tickmode:"array",tickvals:j,showgrid:!0,automargin:!0,...N},legend:{x:.5,y:0,xanchor:"center",yanchor:"bottom",yref:"container",orientation:"h",font:{size:13,color:r.legendColor,family:d.CHART_FONT_FAMILY,weight:500,lineheight:18}},showlegend:!0},i={responsive:!1,displayModeBar:!1,displaylogo:!1};let o=!1,y=null;return z.loadPlotly().then(l=>{o||!f.current||(l.newPlot(f.current,e,t,i),O(f.current),y=f.current,k.current=!0,L.current={...A.current})}),()=>{o=!0,y&&(z.getLoadedPlotly().purge(y),k.current=!1)}},[a,F,M,p,m,g,x,C,T,w,b,N,V,j,v,E,_,r,O]),n.useEffect(()=>{const e=f.current;!e||!k.current||u<=0||h<=0||L.current.width===u&&L.current.height===h||(L.current={width:u,height:h},z.getLoadedPlotly().relayout(e,{width:u,height:h}).catch(()=>{}))},[u,h]),S.jsxs("div",{ref:D,className:ot.cn("area-graph-container relative",J&&"w-full",K&&"h-full"),children:[S.jsx("div",{ref:f,style:{width:"100%",height:"100%"}}),Q]})};exports.AreaPlot=it;
|
|
2
|
+
//# sourceMappingURL=AreaPlot.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaPlot.cjs","sources":["../../../../src/components/charts/AreaPlot/AreaPlot.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { chartTooltipLines, useChartTooltip } from \"../ChartTooltip\";\nimport { getLoadedPlotly, loadPlotly } from \"../plotly-loader\";\n\nimport { useElementSize } from \"@/hooks/use-element-size\";\nimport { CHART_FONT_FAMILY, usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\nimport { cn } from \"@/lib/utils\";\nimport { seriesColor } from \"@/utils/colors\";\n\ninterface AreaDataSeries {\n x: number[];\n y: number[];\n name: string;\n /** Optional color override (auto-assigned from CHART_COLORS if not provided) */\n color?: string;\n fill?: \"tozeroy\" | \"tonexty\" | \"toself\";\n}\n\ntype AreaPlotVariant = \"normal\" | \"stacked\";\n\n/** Top margin reserving room for the 32px title; reduced when no title is set */\nconst TITLE_MARGIN_TOP = 80;\nconst NO_TITLE_MARGIN_TOP = 40;\n\ninterface AreaPlotProps {\n dataSeries: AreaDataSeries[];\n /**\n * Fixed width in pixels. When omitted, the chart fills its container and\n * tracks the container's width via a `ResizeObserver`.\n */\n width?: number;\n /**\n * Fixed height in pixels. When omitted, the chart fills its container and\n * tracks the container's height via a `ResizeObserver`.\n */\n height?: number;\n xRange?: [number, number];\n yRange?: [number, number];\n variant?: AreaPlotVariant;\n xTitle?: string;\n yTitle?: string;\n title?: string;\n /**\n * Categorical labels for the x-axis ticks. When provided, the x data values\n * still drive area positioning but the displayed tick labels match these\n * strings in order (e.g. [\"Mon\", \"Tue\", …]). Should align 1:1 with the\n * unique, ordered x values across all series.\n */\n xTickText?: string[];\n}\n\nconst AreaPlot: React.FC<AreaPlotProps> = ({\n dataSeries,\n width,\n height,\n xRange,\n yRange,\n variant = \"normal\",\n xTitle,\n yTitle,\n title,\n xTickText,\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n\n // When width/height are omitted the chart fills its container; otherwise the\n // explicit pixel size wins. The container is measured either way (cheap) but\n // only used as the resolved size for the omitted dimension(s).\n const [containerRef, measured] = useElementSize<HTMLDivElement>();\n const resolvedWidth = width ?? measured.width;\n const resolvedHeight = height ?? measured.height;\n const hasSize = resolvedWidth > 0 && resolvedHeight > 0;\n // Fill is per-dimension: omit width to fill the container width, omit height\n // to fill its height (so e.g. a fixed width with a container-driven height works).\n const fillWidth = width === undefined;\n const fillHeight = height === undefined;\n\n // Hold the latest resolved size in a ref so the newPlot effect can read it\n // without listing it as a dependency — size changes are handled by a\n // separate relayout effect rather than by tearing down and recreating the plot.\n const sizeRef = useRef({ width: resolvedWidth, height: resolvedHeight });\n sizeRef.current = { width: resolvedWidth, height: resolvedHeight };\n const plotInitedRef = useRef(false);\n // Size last applied to the plot, so the resize effect can skip a redundant\n // relayout right after newPlot already drew at that size.\n const appliedSizeRef = useRef({ width: 0, height: 0 });\n const { bindTooltip, tooltipElement } = useChartTooltip({\n // Stacked traces carry the original series values as customdata;\n // display those instead of the cumulative stack heights\n getLines: (points) =>\n chartTooltipLines(\n points.map((point) =>\n typeof point.customdata === \"number\"\n ? { ...point, y: point.customdata }\n : point,\n ),\n { xLabel: xTitle, yLabel: yTitle },\n ),\n });\n\n const { xMin, xMax, yMin, yMax } = useMemo(() => {\n let minX = Number.MAX_VALUE;\n let maxX = Number.MIN_VALUE;\n let minY = Number.MAX_VALUE;\n let maxY = Number.MIN_VALUE;\n\n dataSeries.forEach((series) => {\n series.x.forEach((x) => {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n });\n series.y.forEach((y) => {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n });\n });\n\n const xPadding = (maxX - minX) * 0.1;\n const yPadding = (maxY - minY) * 0.1;\n\n return {\n xMin: minX - xPadding,\n xMax: maxX + xPadding,\n yMin: variant === \"stacked\" ? 0 : minY - yPadding,\n yMax: maxY + yPadding,\n };\n }, [dataSeries, variant]);\n\n const effectiveXRange = useMemo(\n () => xRange || [xMin, xMax],\n [xRange, xMin, xMax],\n );\n const effectiveYRange = useMemo(\n () => yRange || [yMin, yMax],\n [yRange, yMin, yMax],\n );\n\n const xTicks = useMemo(() => {\n const range = effectiveXRange[1] - effectiveXRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveXRange[0] / step) * step;\n while (current <= effectiveXRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveXRange]);\n\n const yTicks = useMemo(() => {\n const range = effectiveYRange[1] - effectiveYRange[0];\n let step = Math.pow(10, Math.floor(Math.log10(range)));\n\n if (range / step > 10) step = step * 2;\n if (range / step < 4) step = step / 2;\n\n const ticks = [];\n let current = Math.ceil(effectiveYRange[0] / step) * step;\n while (current <= effectiveYRange[1]) {\n ticks.push(current);\n current += step;\n }\n return ticks;\n }, [effectiveYRange]);\n\n // When categorical labels are supplied, ticks must sit on the actual data\n // x-positions rather than the computed nice-step values above. Sorted\n // ascending so labels map deterministically to x regardless of series order.\n const xDataValues = useMemo(\n () => [...new Set(dataSeries.flatMap((s) => s.x))].sort((a, b) => a - b),\n [dataSeries],\n );\n\n // Only apply categorical labels when they align 1:1 with the tick positions;\n // a mismatch would silently mis-label ticks, so fall back to numeric ticks.\n const useCategoricalX = !!xTickText && xTickText.length === xDataValues.length;\n\n const tickOptions = useMemo(\n () => ({\n tickcolor: theme.tickColor,\n ticklen: 12,\n tickwidth: 1,\n ticks: \"outside\" as const,\n tickfont: {\n size: 16,\n color: theme.textColor,\n family: CHART_FONT_FAMILY,\n weight: 400,\n },\n linecolor: theme.lineColor,\n linewidth: 1,\n position: 0,\n zeroline: false,\n }),\n [theme],\n );\n\n const titleOptions = useMemo(\n () =>\n title\n ? {\n text: title,\n x: 0.5,\n y: 0.95,\n xanchor: \"center\" as const,\n yanchor: \"top\" as const,\n font: {\n size: 32,\n weight: 600,\n family: CHART_FONT_FAMILY,\n color: theme.textColor,\n lineheight: 1.2,\n standoff: 30,\n },\n }\n : undefined,\n [title, theme],\n );\n\n useEffect(() => {\n if (!plotRef.current || !hasSize) return;\n\n let data;\n\n if (variant === \"stacked\") {\n // For stacked mode, we need to calculate cumulative values\n const cumulativeY = new Array(dataSeries[0]?.x.length || 0).fill(0);\n\n data = dataSeries.map((series, index) => {\n // Calculate cumulative values for this series\n const stackedY = series.y.map((value, i) => {\n const result = cumulativeY[i] + value;\n cumulativeY[i] = result;\n return result;\n });\n\n const color = seriesColor(index, series.color);\n return {\n x: series.x,\n y: stackedY,\n // Tooltips report the series' own values, not the stacked sums\n customdata: series.y,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n name: series.name,\n hoverinfo: \"none\" as const,\n fill: index === 0 ? (\"tozeroy\" as const) : (\"tonexty\" as const),\n fillcolor: color,\n line: {\n color,\n width: 2,\n },\n };\n });\n } else {\n // Normal mode - each area fills independently from zero\n data = dataSeries.map((series, index) => {\n const color = seriesColor(index, series.color);\n return {\n x: series.x,\n y: series.y,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n name: series.name,\n hoverinfo: \"none\" as const,\n fill: series.fill || (\"tozeroy\" as const),\n fillcolor: color,\n line: {\n color,\n width: 2,\n },\n };\n });\n }\n\n const layout = {\n width: sizeRef.current.width,\n height: sizeRef.current.height,\n ...(titleOptions ? { title: titleOptions } : {}),\n margin: {\n l: 80,\n r: 40,\n // Reserve room for tick labels, the x-axis title, and the\n // container-anchored bottom legend stacked beneath them.\n b: 96,\n t: title ? TITLE_MARGIN_TOP : NO_TITLE_MARGIN_TOP,\n pad: 0,\n },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n font: {\n family: CHART_FONT_FAMILY,\n },\n dragmode: false as const,\n xaxis: {\n title: {\n text: xTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: CHART_FONT_FAMILY,\n weight: 400,\n },\n standoff: 15,\n },\n gridcolor: theme.gridColor,\n range: xRange,\n autorange: !xRange,\n tickmode: \"array\" as const,\n tickvals: useCategoricalX ? xDataValues : xTicks,\n ...(useCategoricalX ? { ticktext: xTickText } : {}),\n showgrid: true,\n // Reserve space for tick labels + the axis title so the bottom legend\n // can't overlap them at small sizes (SW-2157).\n automargin: true,\n ...tickOptions,\n },\n yaxis: {\n title: {\n text: yTitle,\n font: {\n size: 16,\n color: theme.textSecondary,\n family: CHART_FONT_FAMILY,\n weight: 400,\n },\n standoff: 15,\n },\n gridcolor: theme.gridColor,\n range: yRange,\n autorange: !yRange,\n tickmode: \"array\" as const,\n tickvals: yTicks,\n showgrid: true,\n automargin: true,\n ...tickOptions,\n },\n legend: {\n // Anchor to the bottom of the container (not the plot area) so the\n // legend always clears the x-axis tick labels + title — a paper-relative\n // fractional offset collapses into the ticks at small heights (SW-2157).\n x: 0.5,\n y: 0,\n xanchor: \"center\" as const,\n yanchor: \"bottom\" as const,\n yref: \"container\" as const,\n orientation: \"h\" as const,\n font: {\n size: 13,\n color: theme.legendColor,\n family: CHART_FONT_FAMILY,\n weight: 500,\n lineheight: 18,\n },\n },\n showlegend: true,\n };\n\n const config = {\n // We drive sizing explicitly from the measured container, so Plotly's own\n // window-resize responsiveness is disabled (it can't see container resizes).\n responsive: false,\n displayModeBar: false,\n displaylogo: false,\n };\n\n // Plotly is loaded lazily so it stays out of the consumer's main chunk\n // (SW-2007); the draw is skipped if the effect re-runs or unmounts first.\n let cancelled = false;\n let plotElement: HTMLDivElement | null = null;\n void loadPlotly().then((plotly) => {\n if (cancelled || !plotRef.current) return;\n plotly.newPlot(plotRef.current, data, layout, config);\n bindTooltip(plotRef.current);\n\n // Capture ref value for cleanup\n plotElement = plotRef.current;\n plotInitedRef.current = true;\n appliedSizeRef.current = { ...sizeRef.current };\n });\n\n return () => {\n cancelled = true;\n if (plotElement) {\n getLoadedPlotly().purge(plotElement);\n plotInitedRef.current = false;\n }\n };\n }, [dataSeries, hasSize, xRange, yRange, effectiveXRange, effectiveYRange, variant, xTitle, yTitle, title, titleOptions, tickOptions, xTicks, yTicks, xDataValues, useCategoricalX, xTickText, theme, bindTooltip]);\n\n // Resize in place when the measured/overridden size changes — far cheaper\n // than recreating the plot (and it preserves tooltip/event bindings).\n useEffect(() => {\n const plotElement = plotRef.current;\n if (!plotElement || !plotInitedRef.current || resolvedWidth <= 0 || resolvedHeight <= 0) {\n return;\n }\n // newPlot already drew at the current size; skip the redundant relayout\n // (it would queue an automargin redraw that can reject if we unmount first).\n if (\n appliedSizeRef.current.width === resolvedWidth &&\n appliedSizeRef.current.height === resolvedHeight\n ) {\n return;\n }\n appliedSizeRef.current = { width: resolvedWidth, height: resolvedHeight };\n // Swallow rejections from a relayout that races an unmount/purge.\n // plotInitedRef guarantees Plotly finished loading, so sync access is safe.\n void getLoadedPlotly()\n .relayout(plotElement, { width: resolvedWidth, height: resolvedHeight })\n .catch(() => {});\n }, [resolvedWidth, resolvedHeight]);\n\n return (\n <div\n ref={containerRef}\n className={cn(\"area-graph-container relative\", fillWidth && \"w-full\", fillHeight && \"h-full\")}\n >\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n {tooltipElement}\n </div>\n );\n};\n\nexport { AreaPlot };\nexport type { AreaDataSeries, AreaPlotVariant, AreaPlotProps };\n"],"names":["TITLE_MARGIN_TOP","NO_TITLE_MARGIN_TOP","AreaPlot","dataSeries","width","height","xRange","yRange","variant","xTitle","yTitle","title","xTickText","plotRef","useRef","theme","usePlotlyTheme","containerRef","measured","useElementSize","resolvedWidth","resolvedHeight","hasSize","fillWidth","fillHeight","sizeRef","plotInitedRef","appliedSizeRef","bindTooltip","tooltipElement","useChartTooltip","points","chartTooltipLines","point","xMin","xMax","yMin","yMax","useMemo","minX","maxX","minY","maxY","series","x","y","xPadding","yPadding","effectiveXRange","effectiveYRange","xTicks","range","step","ticks","current","yTicks","xDataValues","s","a","b","useCategoricalX","tickOptions","CHART_FONT_FAMILY","titleOptions","useEffect","data","cumulativeY","index","stackedY","value","i","result","color","seriesColor","layout","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","jsxs","cn","jsx"],"mappings":"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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AreaDataSeries {
|
|
3
|
+
x: number[];
|
|
4
|
+
y: number[];
|
|
5
|
+
name: string;
|
|
6
|
+
/** Optional color override (auto-assigned from CHART_COLORS if not provided) */
|
|
7
|
+
color?: string;
|
|
8
|
+
fill?: "tozeroy" | "tonexty" | "toself";
|
|
9
|
+
}
|
|
10
|
+
type AreaPlotVariant = "normal" | "stacked";
|
|
11
|
+
interface AreaPlotProps {
|
|
12
|
+
dataSeries: AreaDataSeries[];
|
|
13
|
+
/**
|
|
14
|
+
* Fixed width in pixels. When omitted, the chart fills its container and
|
|
15
|
+
* tracks the container's width via a `ResizeObserver`.
|
|
16
|
+
*/
|
|
17
|
+
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Fixed height in pixels. When omitted, the chart fills its container and
|
|
20
|
+
* tracks the container's height via a `ResizeObserver`.
|
|
21
|
+
*/
|
|
22
|
+
height?: number;
|
|
23
|
+
xRange?: [number, number];
|
|
24
|
+
yRange?: [number, number];
|
|
25
|
+
variant?: AreaPlotVariant;
|
|
26
|
+
xTitle?: string;
|
|
27
|
+
yTitle?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Categorical labels for the x-axis ticks. When provided, the x data values
|
|
31
|
+
* still drive area positioning but the displayed tick labels match these
|
|
32
|
+
* strings in order (e.g. ["Mon", "Tue", …]). Should align 1:1 with the
|
|
33
|
+
* unique, ordered x values across all series.
|
|
34
|
+
*/
|
|
35
|
+
xTickText?: string[];
|
|
36
|
+
}
|
|
37
|
+
declare const AreaPlot: React.FC<AreaPlotProps>;
|
|
38
|
+
export { AreaPlot };
|
|
39
|
+
export type { AreaDataSeries, AreaPlotVariant, AreaPlotProps };
|