@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 @@
|
|
|
1
|
+
{"version":3,"file":"LinePlot.cjs","sources":["../../../../src/components/charts/LinePlot/LinePlot.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { 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\ntype MarkerSymbol =\n | \"circle\"\n | \"circle-open\"\n | \"circle-dot\"\n | \"circle-open-dot\"\n | \"square\"\n | \"square-open\"\n | \"square-dot\"\n | \"square-open-dot\"\n | \"diamond\"\n | \"diamond-open\"\n | \"diamond-dot\"\n | \"diamond-open-dot\"\n | \"cross\"\n | \"cross-open\"\n | \"cross-dot\"\n | \"cross-open-dot\"\n | \"x\"\n | \"x-open\"\n | \"x-dot\"\n | \"x-open-dot\"\n | \"triangle-up\"\n | \"triangle-up-open\"\n | \"triangle-up-dot\"\n | \"triangle-up-open-dot\"\n | \"triangle-down\"\n | \"triangle-down-open\"\n | \"triangle-down-dot\"\n | \"triangle-down-open-dot\"\n | \"triangle-left\"\n | \"triangle-left-open\"\n | \"triangle-left-dot\"\n | \"triangle-left-open-dot\"\n | \"triangle-right\"\n | \"triangle-right-open\"\n | \"triangle-right-dot\"\n | \"triangle-right-open-dot\"\n | \"triangle-ne\"\n | \"triangle-ne-open\"\n | \"triangle-ne-dot\"\n | \"triangle-ne-open-dot\"\n | \"triangle-se\"\n | \"triangle-se-open\"\n | \"triangle-se-dot\"\n | \"triangle-se-open-dot\"\n | \"triangle-sw\"\n | \"triangle-sw-open\"\n | \"triangle-sw-dot\"\n | \"triangle-sw-open-dot\"\n | \"triangle-nw\"\n | \"triangle-nw-open\"\n | \"triangle-nw-dot\"\n | \"triangle-nw-open-dot\"\n | \"pentagon\"\n | \"pentagon-open\"\n | \"pentagon-dot\"\n | \"pentagon-open-dot\"\n | \"hexagon\"\n | \"hexagon-open\"\n | \"hexagon-dot\"\n | \"hexagon-open-dot\"\n | \"hexagon2\"\n | \"hexagon2-open\"\n | \"hexagon2-dot\"\n | \"hexagon2-open-dot\"\n | \"octagon\"\n | \"octagon-open\"\n | \"octagon-dot\"\n | \"octagon-open-dot\"\n | \"star\"\n | \"star-open\"\n | \"star-dot\"\n | \"star-open-dot\"\n | \"hexagram\"\n | \"hexagram-open\"\n | \"hexagram-dot\"\n | \"hexagram-open-dot\"\n | \"star-triangle-up\"\n | \"star-triangle-up-open\"\n | \"star-triangle-up-dot\"\n | \"star-triangle-up-open-dot\"\n | \"star-triangle-down\"\n | \"star-triangle-down-open\"\n | \"star-triangle-down-dot\"\n | \"star-triangle-down-open-dot\"\n | \"star-square\"\n | \"star-square-open\"\n | \"star-square-dot\"\n | \"star-square-open-dot\"\n | \"star-diamond\"\n | \"star-diamond-open\"\n | \"star-diamond-dot\"\n | \"star-diamond-open-dot\"\n | \"diamond-tall\"\n | \"diamond-tall-open\"\n | \"diamond-tall-dot\"\n | \"diamond-tall-open-dot\"\n | \"diamond-wide\"\n | \"diamond-wide-open\"\n | \"diamond-wide-dot\"\n | \"diamond-wide-open-dot\"\n | \"hourglass\"\n | \"hourglass-open\"\n | \"bowtie\"\n | \"bowtie-open\"\n | \"circle-cross\"\n | \"circle-cross-open\"\n | \"circle-x\"\n | \"circle-x-open\"\n | \"square-cross\"\n | \"square-cross-open\"\n | \"square-x\"\n | \"square-x-open\"\n | \"diamond-cross\"\n | \"diamond-cross-open\"\n | \"diamond-x\"\n | \"diamond-x-open\"\n | \"cross-thin\"\n | \"cross-thin-open\"\n | \"x-thin\"\n | \"x-thin-open\"\n | \"asterisk\"\n | \"asterisk-open\"\n | \"hash\"\n | \"hash-open\"\n | \"hash-dot\"\n | \"hash-open-dot\"\n | \"y-up\"\n | \"y-up-open\"\n | \"y-down\"\n | \"y-down-open\"\n | \"y-left\"\n | \"y-left-open\"\n | \"y-right\"\n | \"y-right-open\"\n | \"line-ew\"\n | \"line-ew-open\"\n | \"line-ns\"\n | \"line-ns-open\"\n | \"line-ne\"\n | \"line-ne-open\"\n | \"line-nw\"\n | \"line-nw-open\"\n | \"arrow\"\n | \"arrow-open\"\n | \"arrow-wide\"\n | \"arrow-wide-open\";\n\ninterface LineDataSeries {\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 symbol?: MarkerSymbol;\n error_y?: {\n type: \"data\";\n array: number[];\n visible: boolean;\n };\n}\n\ntype LinePlotVariant = \"lines\" | \"lines+markers\" | \"lines+markers+error_bars\";\n\n/** Top margin reserving room for the 32px title; reduced when no title is set */\nconst TITLE_MARGIN_TOP = 60;\nconst NO_TITLE_MARGIN_TOP = 30;\n\ntype LinePlotProps = {\n dataSeries: LineDataSeries[];\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?: LinePlotVariant;\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 line 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 LinePlot: React.FC<LinePlotProps> = ({\n dataSeries,\n width,\n height,\n xRange,\n yRange,\n variant = \"lines\",\n xTitle,\n yTitle,\n title,\n xTickText,\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n const { bindTooltip, tooltipElement } = useChartTooltip({ xLabel: xTitle, yLabel: yTitle });\n\n // Omitted width/height → fill the container and track its measured size;\n // explicit pixel values override. See AreaPlot for the reference pattern.\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 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\n const { 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: minY - yPadding,\n yMax: maxY + yPadding,\n };\n }, [dataSeries]);\n\n const effectiveYRange = useMemo(\n () => yRange || [yMin, yMax],\n [yRange, yMin, yMax],\n );\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 const xTicks = 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 === xTicks.length;\n\n const mode = useMemo((): \"lines\" | \"lines+markers\" => {\n switch (variant) {\n case \"lines+markers\":\n case \"lines+markers+error_bars\":\n return \"lines+markers\";\n default:\n return \"lines\";\n }\n }, [variant]);\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 useEffect(() => {\n if (!plotRef.current || !hasSize) return;\n\n const plotData = 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: mode,\n name: series.name,\n hoverinfo: \"none\" as const,\n line: {\n color,\n width: 1.5,\n },\n marker:\n variant === \"lines\"\n ? { opacity: 0 }\n : {\n color,\n size: 8,\n symbol: series.symbol || \"triangle-up\",\n },\n error_y:\n variant === \"lines+markers+error_bars\"\n ? series.error_y || {\n type: \"data\" as const,\n array: series.y.map(() => 10),\n visible: true,\n color,\n thickness: 1,\n width: 5,\n }\n : undefined,\n };\n });\n\n const layout = {\n ...(title\n ? {\n title: {\n text: title,\n font: {\n size: 32,\n family: CHART_FONT_FAMILY,\n color: theme.textColor,\n },\n },\n }\n : {}),\n width: sizeRef.current.width,\n height: sizeRef.current.height,\n margin: {\n l: 80,\n r: 30,\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: 10,\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: 32,\n },\n gridcolor: theme.gridColor,\n range: xRange,\n autorange: !xRange,\n tickmode: \"array\" as const,\n tickvals: xTicks,\n ticktext: useCategoricalX ? xTickText : xTicks.map(String),\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: 30,\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: 16,\n color: theme.legendColor,\n family: CHART_FONT_FAMILY,\n weight: 500,\n },\n },\n showlegend: true,\n };\n\n const config = {\n // Sizing is driven from the measured container; disable Plotly's own\n // window-resize responsiveness (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, plotData, 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, xTitle, yTitle, title, mode, tickOptions, xTicks, yTicks, useCategoricalX, xTickText, effectiveYRange, variant, theme, bindTooltip]);\n\n // Resize in place when the measured/overridden size changes — cheaper than\n // 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 ref={containerRef} className={cn(\"relative\", fillWidth && \"w-full\", fillHeight && \"h-full\")}>\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n {tooltipElement}\n </div>\n );\n};\n\nexport { LinePlot };\nexport type { LineDataSeries, LinePlotVariant, LinePlotProps, MarkerSymbol };\n"],"names":["TITLE_MARGIN_TOP","NO_TITLE_MARGIN_TOP","LinePlot","dataSeries","width","height","xRange","yRange","variant","xTitle","yTitle","title","xTickText","plotRef","useRef","theme","usePlotlyTheme","bindTooltip","tooltipElement","useChartTooltip","containerRef","measured","useElementSize","resolvedWidth","resolvedHeight","hasSize","fillWidth","fillHeight","sizeRef","plotInitedRef","appliedSizeRef","yMin","yMax","useMemo","minX","maxX","minY","maxY","series","x","y","xPadding","yPadding","effectiveYRange","yTicks","range","step","ticks","current","xTicks","s","a","b","useCategoricalX","mode","tickOptions","CHART_FONT_FAMILY","useEffect","plotData","index","color","seriesColor","layout","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","jsxs","cn","jsx"],"mappings":"qYA+KMA,EAAmB,GACnBC,EAAsB,GA6BtBC,EAAoC,CAAC,CACzC,WAAAC,EACA,MAAAC,EACA,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EAAU,QACV,OAAAC,EACA,OAAAC,EACA,MAAAC,EACA,UAAAC,CACF,IAAM,CACJ,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrCC,EAAQC,EAAAA,eAAA,EACR,CAAE,YAAAC,EAAa,eAAAC,CAAA,EAAmBC,EAAAA,gBAAgB,CAAE,OAAQV,EAAQ,OAAQC,EAAQ,EAIpF,CAACU,EAAcC,CAAQ,EAAIC,iBAAA,EAC3BC,EAAgBnB,GAASiB,EAAS,MAClCG,EAAiBnB,GAAUgB,EAAS,OACpCI,EAAUF,EAAgB,GAAKC,EAAiB,EAGhDE,EAAYtB,IAAU,OACtBuB,EAAatB,IAAW,OACxBuB,EAAUd,EAAAA,OAAO,CAAE,MAAOS,EAAe,OAAQC,EAAgB,EACvEI,EAAQ,QAAU,CAAE,MAAOL,EAAe,OAAQC,CAAA,EAClD,MAAMK,EAAgBf,EAAAA,OAAO,EAAK,EAG5BgB,EAAiBhB,EAAAA,OAAO,CAAE,MAAO,EAAG,OAAQ,EAAG,EAE/C,CAAE,KAAAiB,EAAM,KAAAC,CAAA,EAASC,EAAAA,QAAQ,IAAM,CACnC,IAAIC,EAAO,OAAO,UACdC,EAAO,OAAO,UACdC,EAAO,OAAO,UACdC,EAAO,OAA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AAU,GACxBC,EAAe,QAAU,CAAE,GAAGF,EAAQ,OAAA,EACxC,CAAC,EAEM,IAAM,CACXoC,EAAY,GACRC,IACFG,kBAAA,EAAkB,MAAMH,CAAW,EACnCpC,EAAc,QAAU,GAE5B,CACF,EAAG,CAAC1B,EAAYsB,EAASnB,EAAQC,EAAQE,EAAQC,EAAQC,EAAO2C,EAAMC,EAAaN,EAAQL,EAAQS,EAAiBzC,EAAW+B,EAAiBnC,EAASO,EAAOE,CAAW,CAAC,EAI5KwC,EAAAA,UAAU,IAAM,CACd,MAAMQ,EAAcpD,EAAQ,QACxB,CAACoD,GAAe,CAACpC,EAAc,SAAWN,GAAiB,GAAKC,GAAkB,GAMpFM,EAAe,QAAQ,QAAUP,GACjCO,EAAe,QAAQ,SAAWN,IAIpCM,EAAe,QAAU,CAAE,MAAOP,EAAe,OAAQC,CAAA,EAGpD4C,kBAAA,EACF,SAASH,EAAa,CAAE,MAAO1C,EAAe,OAAQC,EAAgB,EACtE,MAAM,IAAM,CAAC,CAAC,EACnB,EAAG,CAACD,EAAeC,CAAc,CAAC,EAGhC6C,EAAAA,KAAC,MAAA,CAAI,IAAKjD,EAAc,UAAWkD,EAAAA,GAAG,WAAY5C,GAAa,SAAUC,GAAc,QAAQ,EAC7F,SAAA,CAAA4C,EAAAA,IAAC,MAAA,CAAI,IAAK1D,EAAS,MAAO,CAAE,MAAO,OAAQ,OAAQ,MAAA,CAAO,CAAG,EAC5DK,CAAA,EACH,CAEJ"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type MarkerSymbol = "circle" | "circle-open" | "circle-dot" | "circle-open-dot" | "square" | "square-open" | "square-dot" | "square-open-dot" | "diamond" | "diamond-open" | "diamond-dot" | "diamond-open-dot" | "cross" | "cross-open" | "cross-dot" | "cross-open-dot" | "x" | "x-open" | "x-dot" | "x-open-dot" | "triangle-up" | "triangle-up-open" | "triangle-up-dot" | "triangle-up-open-dot" | "triangle-down" | "triangle-down-open" | "triangle-down-dot" | "triangle-down-open-dot" | "triangle-left" | "triangle-left-open" | "triangle-left-dot" | "triangle-left-open-dot" | "triangle-right" | "triangle-right-open" | "triangle-right-dot" | "triangle-right-open-dot" | "triangle-ne" | "triangle-ne-open" | "triangle-ne-dot" | "triangle-ne-open-dot" | "triangle-se" | "triangle-se-open" | "triangle-se-dot" | "triangle-se-open-dot" | "triangle-sw" | "triangle-sw-open" | "triangle-sw-dot" | "triangle-sw-open-dot" | "triangle-nw" | "triangle-nw-open" | "triangle-nw-dot" | "triangle-nw-open-dot" | "pentagon" | "pentagon-open" | "pentagon-dot" | "pentagon-open-dot" | "hexagon" | "hexagon-open" | "hexagon-dot" | "hexagon-open-dot" | "hexagon2" | "hexagon2-open" | "hexagon2-dot" | "hexagon2-open-dot" | "octagon" | "octagon-open" | "octagon-dot" | "octagon-open-dot" | "star" | "star-open" | "star-dot" | "star-open-dot" | "hexagram" | "hexagram-open" | "hexagram-dot" | "hexagram-open-dot" | "star-triangle-up" | "star-triangle-up-open" | "star-triangle-up-dot" | "star-triangle-up-open-dot" | "star-triangle-down" | "star-triangle-down-open" | "star-triangle-down-dot" | "star-triangle-down-open-dot" | "star-square" | "star-square-open" | "star-square-dot" | "star-square-open-dot" | "star-diamond" | "star-diamond-open" | "star-diamond-dot" | "star-diamond-open-dot" | "diamond-tall" | "diamond-tall-open" | "diamond-tall-dot" | "diamond-tall-open-dot" | "diamond-wide" | "diamond-wide-open" | "diamond-wide-dot" | "diamond-wide-open-dot" | "hourglass" | "hourglass-open" | "bowtie" | "bowtie-open" | "circle-cross" | "circle-cross-open" | "circle-x" | "circle-x-open" | "square-cross" | "square-cross-open" | "square-x" | "square-x-open" | "diamond-cross" | "diamond-cross-open" | "diamond-x" | "diamond-x-open" | "cross-thin" | "cross-thin-open" | "x-thin" | "x-thin-open" | "asterisk" | "asterisk-open" | "hash" | "hash-open" | "hash-dot" | "hash-open-dot" | "y-up" | "y-up-open" | "y-down" | "y-down-open" | "y-left" | "y-left-open" | "y-right" | "y-right-open" | "line-ew" | "line-ew-open" | "line-ns" | "line-ns-open" | "line-ne" | "line-ne-open" | "line-nw" | "line-nw-open" | "arrow" | "arrow-open" | "arrow-wide" | "arrow-wide-open";
|
|
3
|
+
interface LineDataSeries {
|
|
4
|
+
x: number[];
|
|
5
|
+
y: number[];
|
|
6
|
+
name: string;
|
|
7
|
+
/** Optional color override (auto-assigned from CHART_COLORS if not provided) */
|
|
8
|
+
color?: string;
|
|
9
|
+
symbol?: MarkerSymbol;
|
|
10
|
+
error_y?: {
|
|
11
|
+
type: "data";
|
|
12
|
+
array: number[];
|
|
13
|
+
visible: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
type LinePlotVariant = "lines" | "lines+markers" | "lines+markers+error_bars";
|
|
17
|
+
type LinePlotProps = {
|
|
18
|
+
dataSeries: LineDataSeries[];
|
|
19
|
+
/**
|
|
20
|
+
* Fixed width in pixels. When omitted, the chart fills its container and
|
|
21
|
+
* tracks the container's width via a `ResizeObserver`.
|
|
22
|
+
*/
|
|
23
|
+
width?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Fixed height in pixels. When omitted, the chart fills its container and
|
|
26
|
+
* tracks the container's height via a `ResizeObserver`.
|
|
27
|
+
*/
|
|
28
|
+
height?: number;
|
|
29
|
+
xRange?: [number, number];
|
|
30
|
+
yRange?: [number, number];
|
|
31
|
+
variant?: LinePlotVariant;
|
|
32
|
+
xTitle?: string;
|
|
33
|
+
yTitle?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Categorical labels for the x-axis ticks. When provided, the x data values
|
|
37
|
+
* still drive line positioning but the displayed tick labels match these
|
|
38
|
+
* strings in order (e.g. ["Mon", "Tue", …]). Should align 1:1 with the
|
|
39
|
+
* unique, ordered x values across all series.
|
|
40
|
+
*/
|
|
41
|
+
xTickText?: string[];
|
|
42
|
+
};
|
|
43
|
+
declare const LinePlot: React.FC<LinePlotProps>;
|
|
44
|
+
export { LinePlot };
|
|
45
|
+
export type { LineDataSeries, LinePlotVariant, LinePlotProps, MarkerSymbol };
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { jsxs as S, jsx as W } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as b, useMemo as m, useEffect as B } from "react";
|
|
3
|
+
import { useChartTooltip as D } from "../ChartTooltip/ChartTooltip.js";
|
|
4
|
+
import { loadPlotly as q, getLoadedPlotly as H } from "../plotly-loader.js";
|
|
5
|
+
import { useElementSize as J } from "../../../hooks/use-element-size.js";
|
|
6
|
+
import { usePlotlyTheme as K, CHART_FONT_FAMILY as d } from "../../../hooks/use-plotly-theme.js";
|
|
7
|
+
import { cn as Q } from "../../../lib/utils.js";
|
|
8
|
+
import { seriesColor as Z } from "../../../utils/colors.js";
|
|
9
|
+
const $ = 60, tt = 30, at = ({
|
|
10
|
+
dataSeries: h,
|
|
11
|
+
width: N,
|
|
12
|
+
height: A,
|
|
13
|
+
xRange: E,
|
|
14
|
+
yRange: g,
|
|
15
|
+
variant: p = "lines",
|
|
16
|
+
xTitle: v,
|
|
17
|
+
yTitle: z,
|
|
18
|
+
title: y,
|
|
19
|
+
xTickText: w
|
|
20
|
+
}) => {
|
|
21
|
+
const a = b(null), o = K(), { bindTooltip: P, tooltipElement: T } = D({ xLabel: v, yLabel: z }), [j, I] = J(), c = N ?? I.width, s = A ?? I.height, O = c > 0 && s > 0, F = N === void 0, G = A === void 0, M = b({ width: c, height: s });
|
|
22
|
+
M.current = { width: c, height: s };
|
|
23
|
+
const C = b(!1), x = b({ width: 0, height: 0 }), { yMin: X, yMax: R } = m(() => {
|
|
24
|
+
let e = Number.MAX_VALUE, t = Number.MIN_VALUE, i = Number.MAX_VALUE, n = Number.MIN_VALUE;
|
|
25
|
+
h.forEach((_) => {
|
|
26
|
+
_.x.forEach((l) => {
|
|
27
|
+
e = Math.min(e, l), t = Math.max(t, l);
|
|
28
|
+
}), _.y.forEach((l) => {
|
|
29
|
+
i = Math.min(i, l), n = Math.max(n, l);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const u = (t - e) * 0.1, r = (n - i) * 0.1;
|
|
33
|
+
return {
|
|
34
|
+
xMin: e - u,
|
|
35
|
+
xMax: t + u,
|
|
36
|
+
yMin: i - r,
|
|
37
|
+
yMax: n + r
|
|
38
|
+
};
|
|
39
|
+
}, [h]), f = m(
|
|
40
|
+
() => g || [X, R],
|
|
41
|
+
[g, X, R]
|
|
42
|
+
), U = m(() => {
|
|
43
|
+
const e = f[1] - f[0];
|
|
44
|
+
let t = Math.pow(10, Math.floor(Math.log10(e)));
|
|
45
|
+
e / t > 10 && (t = t * 2), e / t < 4 && (t = t / 2);
|
|
46
|
+
const i = [];
|
|
47
|
+
let n = Math.ceil(f[0] / t) * t;
|
|
48
|
+
for (; n <= f[1]; )
|
|
49
|
+
i.push(n), n += t;
|
|
50
|
+
return i;
|
|
51
|
+
}, [f]), k = m(
|
|
52
|
+
() => [...new Set(h.flatMap((e) => e.x))].sort((e, t) => e - t),
|
|
53
|
+
[h]
|
|
54
|
+
), V = !!w && w.length === k.length, Y = m(() => {
|
|
55
|
+
switch (p) {
|
|
56
|
+
case "lines+markers":
|
|
57
|
+
case "lines+markers+error_bars":
|
|
58
|
+
return "lines+markers";
|
|
59
|
+
default:
|
|
60
|
+
return "lines";
|
|
61
|
+
}
|
|
62
|
+
}, [p]), L = m(
|
|
63
|
+
() => ({
|
|
64
|
+
tickcolor: o.tickColor,
|
|
65
|
+
ticklen: 12,
|
|
66
|
+
tickwidth: 1,
|
|
67
|
+
ticks: "outside",
|
|
68
|
+
tickfont: {
|
|
69
|
+
size: 16,
|
|
70
|
+
color: o.textColor,
|
|
71
|
+
family: d,
|
|
72
|
+
weight: 400
|
|
73
|
+
},
|
|
74
|
+
linecolor: o.lineColor,
|
|
75
|
+
linewidth: 1,
|
|
76
|
+
position: 0,
|
|
77
|
+
zeroline: !1
|
|
78
|
+
}),
|
|
79
|
+
[o]
|
|
80
|
+
);
|
|
81
|
+
return B(() => {
|
|
82
|
+
if (!a.current || !O) return;
|
|
83
|
+
const e = h.map((r, _) => {
|
|
84
|
+
const l = Z(_, r.color);
|
|
85
|
+
return {
|
|
86
|
+
x: r.x,
|
|
87
|
+
y: r.y,
|
|
88
|
+
type: "scatter",
|
|
89
|
+
mode: Y,
|
|
90
|
+
name: r.name,
|
|
91
|
+
hoverinfo: "none",
|
|
92
|
+
line: {
|
|
93
|
+
color: l,
|
|
94
|
+
width: 1.5
|
|
95
|
+
},
|
|
96
|
+
marker: p === "lines" ? { opacity: 0 } : {
|
|
97
|
+
color: l,
|
|
98
|
+
size: 8,
|
|
99
|
+
symbol: r.symbol || "triangle-up"
|
|
100
|
+
},
|
|
101
|
+
error_y: p === "lines+markers+error_bars" ? r.error_y || {
|
|
102
|
+
type: "data",
|
|
103
|
+
array: r.y.map(() => 10),
|
|
104
|
+
visible: !0,
|
|
105
|
+
color: l,
|
|
106
|
+
thickness: 1,
|
|
107
|
+
width: 5
|
|
108
|
+
} : void 0
|
|
109
|
+
};
|
|
110
|
+
}), t = {
|
|
111
|
+
...y ? {
|
|
112
|
+
title: {
|
|
113
|
+
text: y,
|
|
114
|
+
font: {
|
|
115
|
+
size: 32,
|
|
116
|
+
family: d,
|
|
117
|
+
color: o.textColor
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} : {},
|
|
121
|
+
width: M.current.width,
|
|
122
|
+
height: M.current.height,
|
|
123
|
+
margin: {
|
|
124
|
+
l: 80,
|
|
125
|
+
r: 30,
|
|
126
|
+
// Reserve room for tick labels, the x-axis title, and the
|
|
127
|
+
// container-anchored bottom legend stacked beneath them.
|
|
128
|
+
b: 96,
|
|
129
|
+
t: y ? $ : tt,
|
|
130
|
+
pad: 10
|
|
131
|
+
},
|
|
132
|
+
paper_bgcolor: o.paperBg,
|
|
133
|
+
plot_bgcolor: o.plotBg,
|
|
134
|
+
font: {
|
|
135
|
+
family: d
|
|
136
|
+
},
|
|
137
|
+
dragmode: !1,
|
|
138
|
+
xaxis: {
|
|
139
|
+
title: {
|
|
140
|
+
text: v,
|
|
141
|
+
font: {
|
|
142
|
+
size: 16,
|
|
143
|
+
color: o.textSecondary,
|
|
144
|
+
family: d,
|
|
145
|
+
weight: 400
|
|
146
|
+
},
|
|
147
|
+
standoff: 32
|
|
148
|
+
},
|
|
149
|
+
gridcolor: o.gridColor,
|
|
150
|
+
range: E,
|
|
151
|
+
autorange: !E,
|
|
152
|
+
tickmode: "array",
|
|
153
|
+
tickvals: k,
|
|
154
|
+
ticktext: V ? w : k.map(String),
|
|
155
|
+
showgrid: !0,
|
|
156
|
+
// Reserve space for tick labels + the axis title so the bottom legend
|
|
157
|
+
// can't overlap them at small sizes (SW-2157).
|
|
158
|
+
automargin: !0,
|
|
159
|
+
...L
|
|
160
|
+
},
|
|
161
|
+
yaxis: {
|
|
162
|
+
title: {
|
|
163
|
+
text: z,
|
|
164
|
+
font: {
|
|
165
|
+
size: 16,
|
|
166
|
+
color: o.textSecondary,
|
|
167
|
+
family: d,
|
|
168
|
+
weight: 400
|
|
169
|
+
},
|
|
170
|
+
standoff: 30
|
|
171
|
+
},
|
|
172
|
+
gridcolor: o.gridColor,
|
|
173
|
+
range: g,
|
|
174
|
+
autorange: !g,
|
|
175
|
+
tickmode: "array",
|
|
176
|
+
tickvals: U,
|
|
177
|
+
showgrid: !0,
|
|
178
|
+
automargin: !0,
|
|
179
|
+
...L
|
|
180
|
+
},
|
|
181
|
+
legend: {
|
|
182
|
+
// Anchor to the bottom of the container (not the plot area) so the
|
|
183
|
+
// legend always clears the x-axis tick labels + title — a paper-relative
|
|
184
|
+
// fractional offset collapses into the ticks at small heights (SW-2157).
|
|
185
|
+
x: 0.5,
|
|
186
|
+
y: 0,
|
|
187
|
+
xanchor: "center",
|
|
188
|
+
yanchor: "bottom",
|
|
189
|
+
yref: "container",
|
|
190
|
+
orientation: "h",
|
|
191
|
+
font: {
|
|
192
|
+
size: 16,
|
|
193
|
+
color: o.legendColor,
|
|
194
|
+
family: d,
|
|
195
|
+
weight: 500
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
showlegend: !0
|
|
199
|
+
}, i = {
|
|
200
|
+
// Sizing is driven from the measured container; disable Plotly's own
|
|
201
|
+
// window-resize responsiveness (it can't see container resizes).
|
|
202
|
+
responsive: !1,
|
|
203
|
+
displayModeBar: !1,
|
|
204
|
+
displaylogo: !1
|
|
205
|
+
};
|
|
206
|
+
let n = !1, u = null;
|
|
207
|
+
return q().then((r) => {
|
|
208
|
+
n || !a.current || (r.newPlot(a.current, e, t, i), P(a.current), u = a.current, C.current = !0, x.current = { ...M.current });
|
|
209
|
+
}), () => {
|
|
210
|
+
n = !0, u && (H().purge(u), C.current = !1);
|
|
211
|
+
};
|
|
212
|
+
}, [h, O, E, g, v, z, y, Y, L, k, U, V, w, f, p, o, P]), B(() => {
|
|
213
|
+
const e = a.current;
|
|
214
|
+
!e || !C.current || c <= 0 || s <= 0 || x.current.width === c && x.current.height === s || (x.current = { width: c, height: s }, H().relayout(e, { width: c, height: s }).catch(() => {
|
|
215
|
+
}));
|
|
216
|
+
}, [c, s]), /* @__PURE__ */ S("div", { ref: j, className: Q("relative", F && "w-full", G && "h-full"), children: [
|
|
217
|
+
/* @__PURE__ */ W("div", { ref: a, style: { width: "100%", height: "100%" } }),
|
|
218
|
+
T
|
|
219
|
+
] });
|
|
220
|
+
};
|
|
221
|
+
export {
|
|
222
|
+
at as LinePlot
|
|
223
|
+
};
|
|
224
|
+
//# sourceMappingURL=LinePlot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinePlot.js","sources":["../../../../src/components/charts/LinePlot/LinePlot.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { 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\ntype MarkerSymbol =\n | \"circle\"\n | \"circle-open\"\n | \"circle-dot\"\n | \"circle-open-dot\"\n | \"square\"\n | \"square-open\"\n | \"square-dot\"\n | \"square-open-dot\"\n | \"diamond\"\n | \"diamond-open\"\n | \"diamond-dot\"\n | \"diamond-open-dot\"\n | \"cross\"\n | \"cross-open\"\n | \"cross-dot\"\n | \"cross-open-dot\"\n | \"x\"\n | \"x-open\"\n | \"x-dot\"\n | \"x-open-dot\"\n | \"triangle-up\"\n | \"triangle-up-open\"\n | \"triangle-up-dot\"\n | \"triangle-up-open-dot\"\n | \"triangle-down\"\n | \"triangle-down-open\"\n | \"triangle-down-dot\"\n | \"triangle-down-open-dot\"\n | \"triangle-left\"\n | \"triangle-left-open\"\n | \"triangle-left-dot\"\n | \"triangle-left-open-dot\"\n | \"triangle-right\"\n | \"triangle-right-open\"\n | \"triangle-right-dot\"\n | \"triangle-right-open-dot\"\n | \"triangle-ne\"\n | \"triangle-ne-open\"\n | \"triangle-ne-dot\"\n | \"triangle-ne-open-dot\"\n | \"triangle-se\"\n | \"triangle-se-open\"\n | \"triangle-se-dot\"\n | \"triangle-se-open-dot\"\n | \"triangle-sw\"\n | \"triangle-sw-open\"\n | \"triangle-sw-dot\"\n | \"triangle-sw-open-dot\"\n | \"triangle-nw\"\n | \"triangle-nw-open\"\n | \"triangle-nw-dot\"\n | \"triangle-nw-open-dot\"\n | \"pentagon\"\n | \"pentagon-open\"\n | \"pentagon-dot\"\n | \"pentagon-open-dot\"\n | \"hexagon\"\n | \"hexagon-open\"\n | \"hexagon-dot\"\n | \"hexagon-open-dot\"\n | \"hexagon2\"\n | \"hexagon2-open\"\n | \"hexagon2-dot\"\n | \"hexagon2-open-dot\"\n | \"octagon\"\n | \"octagon-open\"\n | \"octagon-dot\"\n | \"octagon-open-dot\"\n | \"star\"\n | \"star-open\"\n | \"star-dot\"\n | \"star-open-dot\"\n | \"hexagram\"\n | \"hexagram-open\"\n | \"hexagram-dot\"\n | \"hexagram-open-dot\"\n | \"star-triangle-up\"\n | \"star-triangle-up-open\"\n | \"star-triangle-up-dot\"\n | \"star-triangle-up-open-dot\"\n | \"star-triangle-down\"\n | \"star-triangle-down-open\"\n | \"star-triangle-down-dot\"\n | \"star-triangle-down-open-dot\"\n | \"star-square\"\n | \"star-square-open\"\n | \"star-square-dot\"\n | \"star-square-open-dot\"\n | \"star-diamond\"\n | \"star-diamond-open\"\n | \"star-diamond-dot\"\n | \"star-diamond-open-dot\"\n | \"diamond-tall\"\n | \"diamond-tall-open\"\n | \"diamond-tall-dot\"\n | \"diamond-tall-open-dot\"\n | \"diamond-wide\"\n | \"diamond-wide-open\"\n | \"diamond-wide-dot\"\n | \"diamond-wide-open-dot\"\n | \"hourglass\"\n | \"hourglass-open\"\n | \"bowtie\"\n | \"bowtie-open\"\n | \"circle-cross\"\n | \"circle-cross-open\"\n | \"circle-x\"\n | \"circle-x-open\"\n | \"square-cross\"\n | \"square-cross-open\"\n | \"square-x\"\n | \"square-x-open\"\n | \"diamond-cross\"\n | \"diamond-cross-open\"\n | \"diamond-x\"\n | \"diamond-x-open\"\n | \"cross-thin\"\n | \"cross-thin-open\"\n | \"x-thin\"\n | \"x-thin-open\"\n | \"asterisk\"\n | \"asterisk-open\"\n | \"hash\"\n | \"hash-open\"\n | \"hash-dot\"\n | \"hash-open-dot\"\n | \"y-up\"\n | \"y-up-open\"\n | \"y-down\"\n | \"y-down-open\"\n | \"y-left\"\n | \"y-left-open\"\n | \"y-right\"\n | \"y-right-open\"\n | \"line-ew\"\n | \"line-ew-open\"\n | \"line-ns\"\n | \"line-ns-open\"\n | \"line-ne\"\n | \"line-ne-open\"\n | \"line-nw\"\n | \"line-nw-open\"\n | \"arrow\"\n | \"arrow-open\"\n | \"arrow-wide\"\n | \"arrow-wide-open\";\n\ninterface LineDataSeries {\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 symbol?: MarkerSymbol;\n error_y?: {\n type: \"data\";\n array: number[];\n visible: boolean;\n };\n}\n\ntype LinePlotVariant = \"lines\" | \"lines+markers\" | \"lines+markers+error_bars\";\n\n/** Top margin reserving room for the 32px title; reduced when no title is set */\nconst TITLE_MARGIN_TOP = 60;\nconst NO_TITLE_MARGIN_TOP = 30;\n\ntype LinePlotProps = {\n dataSeries: LineDataSeries[];\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?: LinePlotVariant;\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 line 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 LinePlot: React.FC<LinePlotProps> = ({\n dataSeries,\n width,\n height,\n xRange,\n yRange,\n variant = \"lines\",\n xTitle,\n yTitle,\n title,\n xTickText,\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n const { bindTooltip, tooltipElement } = useChartTooltip({ xLabel: xTitle, yLabel: yTitle });\n\n // Omitted width/height → fill the container and track its measured size;\n // explicit pixel values override. See AreaPlot for the reference pattern.\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 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\n const { 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: minY - yPadding,\n yMax: maxY + yPadding,\n };\n }, [dataSeries]);\n\n const effectiveYRange = useMemo(\n () => yRange || [yMin, yMax],\n [yRange, yMin, yMax],\n );\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 const xTicks = 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 === xTicks.length;\n\n const mode = useMemo((): \"lines\" | \"lines+markers\" => {\n switch (variant) {\n case \"lines+markers\":\n case \"lines+markers+error_bars\":\n return \"lines+markers\";\n default:\n return \"lines\";\n }\n }, [variant]);\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 useEffect(() => {\n if (!plotRef.current || !hasSize) return;\n\n const plotData = 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: mode,\n name: series.name,\n hoverinfo: \"none\" as const,\n line: {\n color,\n width: 1.5,\n },\n marker:\n variant === \"lines\"\n ? { opacity: 0 }\n : {\n color,\n size: 8,\n symbol: series.symbol || \"triangle-up\",\n },\n error_y:\n variant === \"lines+markers+error_bars\"\n ? series.error_y || {\n type: \"data\" as const,\n array: series.y.map(() => 10),\n visible: true,\n color,\n thickness: 1,\n width: 5,\n }\n : undefined,\n };\n });\n\n const layout = {\n ...(title\n ? {\n title: {\n text: title,\n font: {\n size: 32,\n family: CHART_FONT_FAMILY,\n color: theme.textColor,\n },\n },\n }\n : {}),\n width: sizeRef.current.width,\n height: sizeRef.current.height,\n margin: {\n l: 80,\n r: 30,\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: 10,\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: 32,\n },\n gridcolor: theme.gridColor,\n range: xRange,\n autorange: !xRange,\n tickmode: \"array\" as const,\n tickvals: xTicks,\n ticktext: useCategoricalX ? xTickText : xTicks.map(String),\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: 30,\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: 16,\n color: theme.legendColor,\n family: CHART_FONT_FAMILY,\n weight: 500,\n },\n },\n showlegend: true,\n };\n\n const config = {\n // Sizing is driven from the measured container; disable Plotly's own\n // window-resize responsiveness (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, plotData, 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, xTitle, yTitle, title, mode, tickOptions, xTicks, yTicks, useCategoricalX, xTickText, effectiveYRange, variant, theme, bindTooltip]);\n\n // Resize in place when the measured/overridden size changes — cheaper than\n // 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 ref={containerRef} className={cn(\"relative\", fillWidth && \"w-full\", fillHeight && \"h-full\")}>\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n {tooltipElement}\n </div>\n );\n};\n\nexport { LinePlot };\nexport type { LineDataSeries, LinePlotVariant, LinePlotProps, MarkerSymbol };\n"],"names":["TITLE_MARGIN_TOP","NO_TITLE_MARGIN_TOP","LinePlot","dataSeries","width","height","xRange","yRange","variant","xTitle","yTitle","title","xTickText","plotRef","useRef","theme","usePlotlyTheme","bindTooltip","tooltipElement","useChartTooltip","containerRef","measured","useElementSize","resolvedWidth","resolvedHeight","hasSize","fillWidth","fillHeight","sizeRef","plotInitedRef","appliedSizeRef","yMin","yMax","useMemo","minX","maxX","minY","maxY","series","x","y","xPadding","yPadding","effectiveYRange","yTicks","range","step","ticks","current","xTicks","s","a","b","useCategoricalX","mode","tickOptions","CHART_FONT_FAMILY","useEffect","plotData","index","color","seriesColor","layout","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","jsxs","cn","jsx"],"mappings":";;;;;;;;AA+KA,MAAMA,IAAmB,IACnBC,KAAsB,IA6BtBC,KAAoC,CAAC;AAAA,EACzC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,QAAAC;AAAA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7F,UAAA;AAAA,IAAA,gBAAA4C,EAAC,OAAA,EAAI,KAAK1D,GAAS,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,EAAO,CAAG;AAAA,IAC5DK;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("react"),N=require("../ChartTooltip/ChartTooltip.cjs"),v=require("../plotly-loader.cjs"),g=require("../../../hooks/use-plotly-theme.cjs"),P=require("../../../utils/colors.cjs"),C=P.CHART_COLORS,R=({dataSeries:e,width:m=400,height:x=400,title:h,textInfo:d="percent",hole:b=0,rotation:y=0})=>{const n=a.useRef(null),u=g.usePlotlyTheme(),{bindTooltip:j,tooltipElement:w}=N.useChartTooltip({followCursor:!0}),p=a.useMemo(()=>{if(e.colors&&e.colors.length>=e.labels.length)return e.colors;const o=[...e.colors||[]],r=e.labels.length-o.length;if(r<=0)return o;for(let s=0;s<r;s++)o.push(C[s%C.length]);return o},[e.colors,e.labels.length]);a.useEffect(()=>{if(!n.current)return;const o=[{type:"pie",labels:e.labels,values:e.values,name:e.name,marker:{colors:p},textinfo:d,hoverinfo:"none",insidetextfont:{size:0,family:g.CHART_FONT_FAMILY,color:"transparent"},hole:b,rotation:y}],r={width:m,height:x,font:{family:g.CHART_FONT_FAMILY,color:u.textColor},showlegend:!1,margin:{l:40,r:40,b:40,t:40},paper_bgcolor:u.paperBg,plot_bgcolor:u.plotBg},s={responsive:!0,displayModeBar:!1,displaylogo:!1};let i=!1,c=null;return v.loadPlotly().then(t=>{i||!n.current||(t.newPlot(n.current,o,r,s),j(n.current),c=n.current)}),()=>{i=!0,c&&v.getLoadedPlotly().purge(c)}},[p,e.labels,e.name,e.values,m,x,d,b,y,u,j]);const T=({labels:o,colors:r})=>{const s=o.map((t,f)=>l.jsx(a.Fragment,{children:l.jsxs("div",{className:"flex items-center text-[13px] leading-[18px] font-medium",children:[l.jsx("span",{"data-slot":"pie-legend-swatch",className:"mr-1.5 inline-block size-3 rounded-[4px]",style:{background:r[f]}}),t,f<o.length-1&&l.jsx("span",{className:"mx-3 inline-block h-6 w-0.5 bg-border"})]})},`${t}-${f}`)),i=6,c=[];for(let t=0;t<s.length;t+=i)c.push(l.jsx("div",{className:"mb-2 flex w-full max-w-full flex-wrap items-center justify-center gap-y-3 break-words px-10",children:s.slice(t,t+i)},t));return l.jsx("div",{"data-slot":"pie-legend",className:"flex w-full flex-wrap text-foreground",children:c})};return l.jsxs("div",{className:"relative",style:{width:m},children:[l.jsxs("div",{className:"size-full",children:[h&&l.jsx("div",{className:"px-10 text-center",children:l.jsx("h2",{className:"m-0 text-[32px] leading-tight font-semibold",children:h})}),l.jsx("div",{ref:n,style:{width:"100%",height:"100%",margin:"0"}}),l.jsx(T,{labels:e.labels,colors:p})]}),w]})};exports.PieChart=R;
|
|
2
2
|
//# sourceMappingURL=PieChart.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PieChart.cjs","sources":["../../../../src/components/charts/PieChart/PieChart.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"PieChart.cjs","sources":["../../../../src/components/charts/PieChart/PieChart.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { useChartTooltip } from \"../ChartTooltip\";\nimport { getLoadedPlotly, loadPlotly } from \"../plotly-loader\";\n\nimport { CHART_FONT_FAMILY, usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\nimport { CHART_COLORS } from \"@/utils/colors\";\n\ninterface PieDataSeries {\n labels: string[];\n values: number[];\n name: string;\n colors?: string[];\n}\n\ntype PieTextInfo =\n | \"none\"\n | \"label\"\n | \"percent\"\n | \"value\"\n | \"label+percent\"\n | \"label+value\"\n | \"value+percent\"\n | \"label+value+percent\";\n\ntype PieChartProps = {\n dataSeries: PieDataSeries;\n width?: number;\n height?: number;\n title?: string;\n textInfo?: PieTextInfo;\n hole?: number;\n rotation?: number;\n};\n\nconst DEFAULT_COLORS = CHART_COLORS;\n\nconst PieChart: React.FC<PieChartProps> = ({\n dataSeries,\n width = 400,\n height = 400,\n title,\n textInfo = \"percent\",\n hole = 0,\n rotation = 0,\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n // Slices are large hover targets, so the tooltip tracks the cursor (clamped\n // to the viewport) rather than pinning to the slice centroid\n const { bindTooltip, tooltipElement } = useChartTooltip({ followCursor: true });\n\n const colors = useMemo(() => {\n if (\n dataSeries.colors &&\n dataSeries.colors.length >= dataSeries.labels.length\n ) {\n return dataSeries.colors;\n }\n\n const result = [...(dataSeries.colors || [])];\n const missingColors = dataSeries.labels.length - result.length;\n\n if (missingColors <= 0) return result;\n\n for (let i = 0; i < missingColors; i++) {\n result.push(DEFAULT_COLORS[i % DEFAULT_COLORS.length]);\n }\n\n return result;\n }, [dataSeries.colors, dataSeries.labels.length]);\n\n useEffect(() => {\n if (!plotRef.current) return;\n\n const plotData = [\n {\n type: \"pie\" as const,\n labels: dataSeries.labels,\n values: dataSeries.values,\n name: dataSeries.name,\n marker: {\n colors: colors,\n },\n textinfo: textInfo,\n hoverinfo: \"none\" as const,\n insidetextfont: {\n size: 0,\n family: CHART_FONT_FAMILY,\n color: \"transparent\",\n },\n hole: hole,\n rotation: rotation,\n },\n ];\n\n const layout = {\n width,\n height,\n font: {\n family: CHART_FONT_FAMILY,\n color: theme.textColor,\n },\n showlegend: false,\n margin: { l: 40, r: 40, b: 40, t: 40 },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n };\n\n const config = {\n responsive: true,\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, plotData, layout, config);\n bindTooltip(plotRef.current);\n\n // Capture ref value for cleanup\n plotElement = plotRef.current;\n });\n\n return () => {\n cancelled = true;\n if (plotElement) {\n getLoadedPlotly().purge(plotElement);\n }\n };\n }, [colors, dataSeries.labels, dataSeries.name, dataSeries.values, width, height, textInfo, hole, rotation, theme, bindTooltip]);\n\n const PieChartLegend: React.FC<{ labels: string[]; colors: string[] }> = ({\n labels,\n colors,\n }) => {\n const items = labels.map((label, i) => (\n <React.Fragment key={`${label}-${i}`}>\n <div className=\"flex items-center text-[13px] leading-[18px] font-medium\">\n <span\n data-slot=\"pie-legend-swatch\"\n className=\"mr-1.5 inline-block size-3 rounded-[4px]\"\n style={{ background: colors[i] }}\n />\n {label}\n {i < labels.length - 1 && (\n <span className=\"mx-3 inline-block h-6 w-0.5 bg-border\" />\n )}\n </div>\n </React.Fragment>\n ));\n\n const rowSize = 6;\n const rows = [];\n for (let i = 0; i < items.length; i += rowSize) {\n rows.push(\n <div\n className=\"mb-2 flex w-full max-w-full flex-wrap items-center justify-center gap-y-3 break-words px-10\"\n key={i}\n >\n {items.slice(i, i + rowSize)}\n </div>\n );\n }\n return (\n <div data-slot=\"pie-legend\" className=\"flex w-full flex-wrap text-foreground\">\n {rows}\n </div>\n );\n };\n\n return (\n <div className=\"relative\" style={{ width: width }}>\n <div className=\"size-full\">\n {title && (\n <div className=\"px-10 text-center\">\n <h2 className=\"m-0 text-[32px] leading-tight font-semibold\">{title}</h2>\n </div>\n )}\n <div\n ref={plotRef}\n style={{\n width: \"100%\",\n height: \"100%\",\n margin: \"0\",\n }}\n />\n <PieChartLegend labels={dataSeries.labels} colors={colors} />\n </div>\n {tooltipElement}\n </div>\n );\n};\n\nexport { PieChart };\nexport type { PieDataSeries, PieTextInfo, PieChartProps };\n"],"names":["DEFAULT_COLORS","CHART_COLORS","PieChart","dataSeries","width","height","title","textInfo","hole","rotation","plotRef","useRef","theme","usePlotlyTheme","bindTooltip","tooltipElement","useChartTooltip","colors","useMemo","result","missingColors","i","useEffect","plotData","CHART_FONT_FAMILY","layout","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","PieChartLegend","labels","items","label","jsx","React","jsxs","rowSize","rows"],"mappings":"gTAmCMA,EAAiBC,EAAAA,aAEjBC,EAAoC,CAAC,CACzC,WAAAC,EACA,MAAAC,EAAQ,IACR,OAAAC,EAAS,IACT,MAAAC,EACA,SAAAC,EAAW,UACX,KAAAC,EAAO,EACP,SAAAC,EAAW,CACb,IAAM,CACJ,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrCC,EAAQC,EAAAA,eAAA,EAGR,CAAE,YAAAC,EAAa,eAAAC,CAAA,EAAmBC,EAAAA,gBAAgB,CAAE,aAAc,GAAM,EAExEC,EAASC,EAAAA,QAAQ,IAAM,CAC3B,GACEf,EAAW,QACXA,EAAW,OAAO,QAAUA,EAAW,OAAO,OAE9C,OAAOA,EAAW,OAGpB,MAAMgB,EAAS,CAAC,GAAIhB,EAAW,QAAU,CAAA,CAAG,EACtCiB,EAAgBjB,EAAW,OAAO,OAASgB,EAAO,OAExD,GAAIC,GAAiB,EAAG,OAAOD,EAE/B,QAASE,EAAI,EAAGA,EAAID,EAAeC,IACjCF,EAAO,KAAKnB,EAAeqB,EAAIrB,EAAe,MAAM,CAAC,EAGvD,OAAOmB,CACT,EAAG,CAAChB,EAAW,OAAQA,EAAW,OAAO,MAAM,CAAC,EAEhDmB,EAAAA,UAAU,IAAM,CACd,GAAI,CAACZ,EAAQ,QAAS,OAEtB,MAAMa,EAAW,CACf,CACE,KAAM,MACN,OAAQpB,EAAW,OACnB,OAAQA,EAAW,OACnB,KAAMA,EAAW,KACjB,OAAQ,CACN,OAAAc,CAAA,EAEF,SAAUV,EACV,UAAW,OACX,eAAgB,CACd,KAAM,EACN,OAAQiB,EAAAA,kBACR,MAAO,aAAA,EAET,KAAAhB,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OAAQb,GAAKkB,EACrCC,EAAK,KACHJ,EAAAA,IAAC,MAAA,CACC,UAAU,8FAGT,SAAAF,EAAM,MAAMb,EAAGA,EAAIkB,CAAO,CAAA,EAFtBlB,CAAA,CAGP,EAGJ,aACG,MAAA,CAAI,YAAU,aAAa,UAAU,wCACnC,SAAAmB,EACH,CAEJ,EAEA,cACG,MAAA,CAAI,UAAU,WAAW,MAAO,CAAE,MAAApC,GACjC,SAAA,CAAAkC,EAAAA,KAAC,MAAA,CAAI,UAAU,YACZ,SAAA,CAAAhC,GACC8B,EAAAA,IAAC,OAAI,UAAU,oBACb,eAAC,KAAA,CAAG,UAAU,8CAA+C,SAAA9B,CAAA,CAAM,CAAA,CACrE,EAEF8B,EAAAA,IAAC,MAAA,CACC,IAAK1B,EACL,MAAO,CACL,MAAO,OACP,OAAQ,OACR,OAAQ,GAAA,CACV,CAAA,EAEF0B,EAAAA,IAACJ,EAAA,CAAe,OAAQ7B,EAAW,OAAQ,OAAAc,CAAA,CAAgB,CAAA,EAC7D,EACCF,CAAA,EACH,CAEJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PieDataSeries {
|
|
3
|
+
labels: string[];
|
|
4
|
+
values: number[];
|
|
5
|
+
name: string;
|
|
6
|
+
colors?: string[];
|
|
7
|
+
}
|
|
8
|
+
type PieTextInfo = "none" | "label" | "percent" | "value" | "label+percent" | "label+value" | "value+percent" | "label+value+percent";
|
|
9
|
+
type PieChartProps = {
|
|
10
|
+
dataSeries: PieDataSeries;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
title?: string;
|
|
14
|
+
textInfo?: PieTextInfo;
|
|
15
|
+
hole?: number;
|
|
16
|
+
rotation?: number;
|
|
17
|
+
};
|
|
18
|
+
declare const PieChart: React.FC<PieChartProps>;
|
|
19
|
+
export { PieChart };
|
|
20
|
+
export type { PieDataSeries, PieTextInfo, PieChartProps };
|