@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,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for Chromatogram component
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Data series for chromatogram visualization
|
|
6
|
+
*/
|
|
7
|
+
export interface ChromatogramSeries {
|
|
8
|
+
/** Retention time values (x-axis) */
|
|
9
|
+
x: number[];
|
|
10
|
+
/** Signal intensity values (y-axis) */
|
|
11
|
+
y: number[];
|
|
12
|
+
/** Series label for legend */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Optional color override (auto-assigned from CHART_COLORS if not provided) */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Optional metadata for the trace (displayed in tooltip on hover) */
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Individual boundary marker type for a single boundary point
|
|
21
|
+
*/
|
|
22
|
+
export type BoundaryMarkerType = "none" | "triangle" | "diamond";
|
|
23
|
+
/**
|
|
24
|
+
* Internal computed fields for peak annotations.
|
|
25
|
+
* These are populated by the component during processing.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export interface PeakComputedFields {
|
|
29
|
+
/** Peak area calculated using trapezoidal integration */
|
|
30
|
+
area?: number;
|
|
31
|
+
/** Peak index in the data array */
|
|
32
|
+
index?: number;
|
|
33
|
+
/** Start index of peak boundary in the data array */
|
|
34
|
+
startIndex?: number;
|
|
35
|
+
/** End index of peak boundary in the data array */
|
|
36
|
+
endIndex?: number;
|
|
37
|
+
/** Peak width at half maximum */
|
|
38
|
+
widthAtHalfMax?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Peak annotation for labeling peaks on the chromatogram.
|
|
42
|
+
* Used for both user-provided annotations and auto-detected peaks.
|
|
43
|
+
*/
|
|
44
|
+
export interface PeakAnnotation {
|
|
45
|
+
/**
|
|
46
|
+
* Stable identifier used for selection (selectedPeakIds).
|
|
47
|
+
* Auto-generated by the component if omitted:
|
|
48
|
+
* - User annotations: "user-ann-{index}"
|
|
49
|
+
* - Auto-detected peaks: "peak-{seriesIndex}-{peakIndex}"
|
|
50
|
+
*/
|
|
51
|
+
id?: string;
|
|
52
|
+
/** Retention time of the peak (x-axis position) */
|
|
53
|
+
x: number;
|
|
54
|
+
/** Signal intensity at peak (y-axis position) */
|
|
55
|
+
y: number;
|
|
56
|
+
/** Label text (e.g., compound name). If not provided, auto-generated from computed area. */
|
|
57
|
+
text?: string;
|
|
58
|
+
/** Vertical arrow offset in pixels (negative = above peak, default: -30) */
|
|
59
|
+
ay?: number;
|
|
60
|
+
/** Horizontal arrow offset in pixels (default: 0) */
|
|
61
|
+
ax?: number;
|
|
62
|
+
/** Start retention time for peak boundary */
|
|
63
|
+
startX?: number;
|
|
64
|
+
/** End retention time for peak boundary */
|
|
65
|
+
endX?: number;
|
|
66
|
+
/** Marker style for start boundary (default: "triangle") */
|
|
67
|
+
startMarker?: BoundaryMarkerType;
|
|
68
|
+
/** Marker style for end boundary (default: "diamond") */
|
|
69
|
+
endMarker?: BoundaryMarkerType;
|
|
70
|
+
/**
|
|
71
|
+
* Optional per-peak color override. When set, overrides the default
|
|
72
|
+
* series-color / grey for the annotation label, arrow, border, and boundary markers.
|
|
73
|
+
*/
|
|
74
|
+
color?: string;
|
|
75
|
+
/**
|
|
76
|
+
* When true, overlay a thickened line along the underlying trace between startX and endX.
|
|
77
|
+
* Requires startX/endX. Uses peak.color if set, otherwise series color.
|
|
78
|
+
*/
|
|
79
|
+
regionOverlay?: boolean;
|
|
80
|
+
/** Line width for the region overlay (default: 3.5) */
|
|
81
|
+
regionOverlayWidth?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Plotly hovertemplate HTML string used by the region overlay and the invisible
|
|
84
|
+
* hit-area marker for this peak. Falls back to a default summary when omitted.
|
|
85
|
+
*/
|
|
86
|
+
hoverText?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Internal computed fields populated by the component.
|
|
89
|
+
* @internal Do not set these directly - they are computed from startX/endX or auto-detection.
|
|
90
|
+
*/
|
|
91
|
+
_computed?: PeakComputedFields;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Payload delivered to onPeakClick and onPeakHover callbacks.
|
|
95
|
+
*/
|
|
96
|
+
export interface PeakSelectEvent {
|
|
97
|
+
/** The resolved peak ID (matches id field on PeakAnnotation) */
|
|
98
|
+
id: string;
|
|
99
|
+
/** The annotation object for this peak */
|
|
100
|
+
peak: PeakAnnotation;
|
|
101
|
+
/** Index of the series this peak belongs to (0-based; -1 for legacy user annotations) */
|
|
102
|
+
seriesIndex: number;
|
|
103
|
+
/** Display name of the series */
|
|
104
|
+
seriesName: string;
|
|
105
|
+
/** True when the peak was found by automatic peak detection, false for user-provided annotations */
|
|
106
|
+
isAutoDetected: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Visual overrides for the selected / unselected / hover states.
|
|
110
|
+
* All fields are optional — defaults are applied for any omitted field.
|
|
111
|
+
*
|
|
112
|
+
* Defaults:
|
|
113
|
+
* selected.borderColor "#3b82f6"
|
|
114
|
+
* selected.backgroundColor "#dbeafe"
|
|
115
|
+
* selected.bold true
|
|
116
|
+
* unselected.opacity 0.4 (applied when any other peak is selected)
|
|
117
|
+
* hoverLineWidthMultiplier 1.67 (1.5 px → ~2.5 px)
|
|
118
|
+
*/
|
|
119
|
+
export interface PeakSelectionAppearance {
|
|
120
|
+
selected?: {
|
|
121
|
+
borderColor?: string;
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
/** Wrap annotation text in <b> tags when selected */
|
|
124
|
+
bold?: boolean;
|
|
125
|
+
};
|
|
126
|
+
unselected?: {
|
|
127
|
+
/** Opacity of annotations whose peak is NOT selected while another peak IS selected (0–1) */
|
|
128
|
+
opacity?: number;
|
|
129
|
+
};
|
|
130
|
+
/** Multiplier applied to the base line width (1.5 px) on peak hover */
|
|
131
|
+
hoverLineWidthMultiplier?: number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Baseline correction method
|
|
135
|
+
*/
|
|
136
|
+
export type BaselineCorrectionMethod = "none" | "linear" | "rolling";
|
|
137
|
+
/**
|
|
138
|
+
* Global boundary marker style setting
|
|
139
|
+
* - "none": No boundary markers displayed
|
|
140
|
+
* - "enabled": Show boundary markers using per-peak settings (startMarker/endMarker) or defaults
|
|
141
|
+
*/
|
|
142
|
+
export type BoundaryMarkerStyle = "none" | "enabled";
|
|
143
|
+
/**
|
|
144
|
+
* Peak detection algorithm options
|
|
145
|
+
*/
|
|
146
|
+
export interface PeakDetectionOptions {
|
|
147
|
+
/** Minimum peak height threshold (absolute or relative to max, default: 0.05) */
|
|
148
|
+
minHeight?: number;
|
|
149
|
+
/** Minimum distance between peaks in data points (default: 5) */
|
|
150
|
+
minDistance?: number;
|
|
151
|
+
/** Prominence threshold - how much a peak stands out from neighbors (default: 0.02) */
|
|
152
|
+
prominence?: number;
|
|
153
|
+
/** Use relative threshold as percentage of max signal (default: true) */
|
|
154
|
+
relativeThreshold?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Props for Chromatogram component
|
|
158
|
+
*/
|
|
159
|
+
export interface ChromatogramProps {
|
|
160
|
+
/** Array of data series to display */
|
|
161
|
+
series: ChromatogramSeries[];
|
|
162
|
+
/** Chart width in pixels */
|
|
163
|
+
width?: number;
|
|
164
|
+
/** Chart height in pixels */
|
|
165
|
+
height?: number;
|
|
166
|
+
/** Chart title */
|
|
167
|
+
title?: string;
|
|
168
|
+
/** X-axis label */
|
|
169
|
+
xAxisTitle?: string;
|
|
170
|
+
/** Y-axis label */
|
|
171
|
+
yAxisTitle?: string;
|
|
172
|
+
/** Peak annotations to display */
|
|
173
|
+
annotations?: PeakAnnotation[];
|
|
174
|
+
/** Fixed x-axis range [min, max] */
|
|
175
|
+
xRange?: [number, number];
|
|
176
|
+
/** Fixed y-axis range [min, max] */
|
|
177
|
+
yRange?: [number, number];
|
|
178
|
+
/** Show legend (default: true) */
|
|
179
|
+
showLegend?: boolean;
|
|
180
|
+
/** Show vertical grid lines (default: true) */
|
|
181
|
+
showGridX?: boolean;
|
|
182
|
+
/** Show horizontal grid lines (default: true) */
|
|
183
|
+
showGridY?: boolean;
|
|
184
|
+
/** Show data point markers (default: false) */
|
|
185
|
+
showMarkers?: boolean;
|
|
186
|
+
/** Marker size when showMarkers is true (default: 4) */
|
|
187
|
+
markerSize?: number;
|
|
188
|
+
/** Show crosshairs on hover (default: false) */
|
|
189
|
+
showCrosshairs?: boolean;
|
|
190
|
+
/** Baseline correction method (default: "none") */
|
|
191
|
+
baselineCorrection?: BaselineCorrectionMethod;
|
|
192
|
+
/** Rolling baseline window size (default: 50) */
|
|
193
|
+
baselineWindowSize?: number;
|
|
194
|
+
/** Peak detection algorithm options - if provided, enables automatic peak detection */
|
|
195
|
+
peakDetectionOptions?: PeakDetectionOptions;
|
|
196
|
+
/** Show peak areas as annotations (default: false) */
|
|
197
|
+
showPeakAreas?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Show peak boundary markers (default: "none").
|
|
200
|
+
* - "none": No boundary markers displayed
|
|
201
|
+
* - "enabled": Show boundary markers using per-peak startMarker/endMarker settings
|
|
202
|
+
*
|
|
203
|
+
* Per-peak marker defaults: startMarker="triangle", endMarker="diamond"
|
|
204
|
+
*/
|
|
205
|
+
boundaryMarkers?: BoundaryMarkerStyle;
|
|
206
|
+
/**
|
|
207
|
+
* Retention time threshold for grouping overlapping annotations (default: 0.4 minutes).
|
|
208
|
+
* Peaks closer than this threshold will have their annotations staggered to avoid overlap.
|
|
209
|
+
*/
|
|
210
|
+
annotationOverlapThreshold?: number;
|
|
211
|
+
/** Show export button in modebar (default: true) */
|
|
212
|
+
showExportButton?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* IDs of peaks that should render in the "selected" visual state.
|
|
215
|
+
* Fully controlled — the component owns no selection state of its own.
|
|
216
|
+
* IDs match the id field on PeakAnnotation (user-provided) or the
|
|
217
|
+
* auto-generated IDs for auto-detected peaks ("peak-{seriesIndex}-{peakIndex}").
|
|
218
|
+
*/
|
|
219
|
+
selectedPeakIds?: string[];
|
|
220
|
+
/**
|
|
221
|
+
* Called when the user clicks on a peak annotation or its invisible hit target.
|
|
222
|
+
* The consumer decides whether to add/remove the id from selectedPeakIds
|
|
223
|
+
* (toggle vs. replace behaviour is the consumer's responsibility).
|
|
224
|
+
*/
|
|
225
|
+
onPeakClick?: (event: PeakSelectEvent) => void;
|
|
226
|
+
/**
|
|
227
|
+
* Called when the cursor enters or leaves a peak hit target.
|
|
228
|
+
* Receives null on unhover. As a side-effect, the series line for the
|
|
229
|
+
* hovered peak thickens by selectionAppearance.hoverLineWidthMultiplier.
|
|
230
|
+
*/
|
|
231
|
+
onPeakHover?: (event: PeakSelectEvent | null) => void;
|
|
232
|
+
/**
|
|
233
|
+
* Override the default visual behaviour for selected / unselected / hover states.
|
|
234
|
+
* All sub-fields are optional — defaults are applied for any omitted value.
|
|
235
|
+
* Only has a visual effect when selectedPeakIds or onPeakClick/onPeakHover are used.
|
|
236
|
+
*/
|
|
237
|
+
selectionAppearance?: PeakSelectionAppearance;
|
|
238
|
+
/**
|
|
239
|
+
* Annotation label style (default: "arrow").
|
|
240
|
+
* - "arrow" — arrowhead pointing to the peak with a floating label box
|
|
241
|
+
* - "inline" — no arrow; label sits 4 px above the actual trace Y value
|
|
242
|
+
*/
|
|
243
|
+
annotationStyle?: "arrow" | "inline";
|
|
244
|
+
/** Title font size in pixels (default: 20) */
|
|
245
|
+
titleFontSize?: number;
|
|
246
|
+
/**
|
|
247
|
+
* Top margin override when a title is shown (default: from
|
|
248
|
+
* CHROMATOGRAM_LAYOUT.MARGIN_TOP_WITH_TITLE).
|
|
249
|
+
*/
|
|
250
|
+
titleTopMargin?: number;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Metadata for a peak annotation with its series index.
|
|
254
|
+
*/
|
|
255
|
+
export type PeakWithMeta = {
|
|
256
|
+
peak: PeakAnnotation;
|
|
257
|
+
seriesIndex: number;
|
|
258
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),$=require("../ChartTooltip/ChartTooltip.cjs"),E=require("../plotly-loader.cjs"),w=require("../../../hooks/use-plotly-theme.cjs"),b=require("../../../utils/colors.cjs");;/* empty css */const D=75,I=1.05,V=e=>{if(e.base!==void 0)return e.base;const a={A:e.peakA,T:e.peakT,G:e.peakG,C:e.peakC},m=Object.values(a);if(m.every(c=>c===m[0]))return"";let h="",f=0;return Object.entries(a).forEach(([c,g])=>{g>f&&(h=c,f=g)}),h},z=({data:e=[],width:a=900,height:m=600,positionInterval:y=10,colorA:h=b.CHART_COLORS[0],colorT:f=b.CHART_COLORS[2],colorG:c=b.CHART_COLORS[3],colorC:g=b.CHART_COLORS[1]})=>{const d=n.useRef(null),T=w.usePlotlyTheme(),{bindTooltip:O,tooltipElement:H}=$.useChartTooltip({xLabel:"Position",yLabel:"Intensity"}),s=n.useMemo(()=>e.map(t=>t.position),[e]),F=n.useMemo(()=>e.map(t=>V(t)),[e]),M=n.useMemo(()=>e.map(t=>t.peakA),[e]),P=n.useMemo(()=>e.map(t=>t.peakT),[e]),v=n.useMemo(()=>e.map(t=>t.peakG),[e]),C=n.useMemo(()=>e.map(t=>t.peakC),[e]),R=n.useMemo(()=>({x:s,y:M,type:"scatter",mode:"lines",hoverinfo:"none",name:"A",line:{color:h,width:2,shape:"spline"}}),[s,M,h]),_=n.useMemo(()=>({x:s,y:P,type:"scatter",mode:"lines",hoverinfo:"none",name:"T",line:{color:f,width:2,shape:"spline"}}),[s,P,f]),j=n.useMemo(()=>({x:s,y:v,type:"scatter",mode:"lines",hoverinfo:"none",name:"G",line:{color:c,width:2,shape:"spline"}}),[s,v,c]),A=n.useMemo(()=>({x:s,y:C,type:"scatter",mode:"lines",hoverinfo:"none",name:"C",line:{color:g,width:2,shape:"spline"}}),[s,C,g]),L=n.useMemo(()=>Math.max(...M,...P,...v,...C),[M,P,v,C]);if(n.useEffect(()=>{if(!d.current||e.length===0)return;const t=[R,_,j,A],k={width:a,height:m-D,margin:{l:0,r:0,b:20,t:10,pad:0},paper_bgcolor:T.paperBg,plot_bgcolor:T.plotBg,font:{family:w.CHART_FONT_FAMILY},showlegend:!1,xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[Math.min(...s),Math.max(...s)],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[0,L*I],fixedrange:!0}},i={responsive:!0,displayModeBar:!1,displaylogo:!1,fillFrame:!0};let p=!1,u=null;return E.loadPlotly().then(r=>{p||!d.current||(r.newPlot(d.current,t,k,i),O(d.current),u=d.current)}),()=>{p=!0,u&&E.getLoadedPlotly().purge(u)}},[e,a,m,R,_,j,A,L,s,T,O]),e.length===0)return l.jsx("div",{className:"chart-container",children:"No data available"});const G=()=>{const t=()=>{const i=Math.min(...s),p=Math.max(...s),u=a;return l.jsx("div",{className:"sequence-letters-container",children:F.map((r,x)=>{const o=s[x],q=r==="A"?h:r==="T"?f:r==="G"?c:r==="C"?g:T.textColor,N=p-i||1,B=(o-i)/N*u;return l.jsx("span",{className:"sequence-letter",style:{left:`${B}px`,color:q},children:r},`base-${x}`)})})},k=()=>{const i=Math.min(...s),p=Math.max(...s),u=a,r=Math.ceil(i/y)*y,x=[];for(let o=r;o<=p;o+=y)x.push({position:o,label:o.toString()});return l.jsx("div",{className:"position-numbers-container",children:x.map(o=>{const q=p-i||1,S=(o.position-i)/q*u;return l.jsx("span",{className:"position-number",style:{left:`${S}px`},children:o.label},`pos-${o.position}`)})})};return l.jsxs("div",{className:"sequence-header",children:[t(),k()]})};return l.jsxs("div",{className:"electropherogram-container relative",style:{width:a,height:m},children:[G(),l.jsx("div",{className:"electropherogram-chart",children:l.jsx("div",{ref:d,style:{width:"100%",height:"100%"}})}),H]})};exports.Electropherogram=z;
|
|
2
|
+
//# sourceMappingURL=Electropherogram.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Electropherogram.cjs","sources":["../../../../src/components/charts/Electropherogram/Electropherogram.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { useChartTooltip } from \"../ChartTooltip\";\nimport { getLoadedPlotly, loadPlotly } from \"../plotly-loader\";\n\nimport type Plotly from \"plotly.js-dist\";\n\nimport { CHART_FONT_FAMILY, usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\nimport { CHART_COLORS } from \"@/utils/colors\";\nimport \"./Electropherogram.scss\";\n\n/** Height offset for the plot area in pixels */\nconst PLOT_HEIGHT_OFFSET = 75;\n/** Scale factor for y-axis range to add padding above max value */\nconst Y_AXIS_PADDING_FACTOR = 1.05;\n\ninterface PeakData {\n position: number;\n base?: string;\n peakA: number;\n peakT: number;\n peakG: number;\n peakC: number;\n}\n\ninterface ElectropherogramProps {\n data?: PeakData[];\n width?: number;\n height?: number;\n positionInterval?: number;\n colorA?: string;\n colorT?: string;\n colorG?: string;\n colorC?: string;\n}\n\nconst determineBase = (item: PeakData): string => {\n if (item.base !== undefined) return item.base;\n const peakValues = {\n A: item.peakA,\n T: item.peakT,\n G: item.peakG,\n C: item.peakC,\n };\n\n const values = Object.values(peakValues);\n const allEqual = values.every((val) => val === values[0]);\n\n if (allEqual) {\n return \"\";\n }\n\n let highestBase = \"\";\n let highestValue = 0;\n\n Object.entries(peakValues).forEach(([base, value]) => {\n if (value > highestValue) {\n highestBase = base;\n highestValue = value;\n }\n });\n\n return highestBase;\n};\n\nconst Electropherogram: React.FC<ElectropherogramProps> = ({\n data = [],\n width = 900,\n height = 600,\n positionInterval = 10,\n colorA = CHART_COLORS[0], // blue\n colorT = CHART_COLORS[2], // teal/green\n colorG = CHART_COLORS[3], // red\n colorC = CHART_COLORS[1], // orange\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n const { bindTooltip, tooltipElement } = useChartTooltip({\n xLabel: \"Position\",\n yLabel: \"Intensity\",\n });\n\n const positions = useMemo(() => data.map((item) => item.position), [data]);\n const sequence = useMemo(() => data.map((item) => determineBase(item)), [data]);\n const peakA = useMemo(() => data.map((item) => item.peakA), [data]);\n const peakT = useMemo(() => data.map((item) => item.peakT), [data]);\n const peakG = useMemo(() => data.map((item) => item.peakG), [data]);\n const peakC = useMemo(() => data.map((item) => item.peakC), [data]);\n\n const aTrace = useMemo(\n () => ({\n x: positions,\n y: peakA,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"A\",\n line: { color: colorA, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakA, colorA],\n );\n\n const tTrace = useMemo(\n () => ({\n x: positions,\n y: peakT,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"T\",\n line: { color: colorT, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakT, colorT],\n );\n\n const gTrace = useMemo(\n () => ({\n x: positions,\n y: peakG,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"G\",\n line: { color: colorG, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakG, colorG],\n );\n\n const cTrace = useMemo(\n () => ({\n x: positions,\n y: peakC,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"C\",\n line: { color: colorC, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakC, colorC],\n );\n\n const maxValue = useMemo(\n () => Math.max(...peakA, ...peakT, ...peakG, ...peakC),\n [peakA, peakT, peakG, peakC],\n );\n\n useEffect(() => {\n if (!plotRef.current || data.length === 0) return;\n\n const plotData = [aTrace, tTrace, gTrace, cTrace];\n\n const layout: Partial<Plotly.Layout> = {\n width: width,\n height: height - PLOT_HEIGHT_OFFSET,\n margin: { l: 0, r: 0, b: 20, t: 10, pad: 0 },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n font: {\n family: CHART_FONT_FAMILY,\n },\n showlegend: false,\n xaxis: {\n showgrid: false,\n zeroline: false,\n showticklabels: false,\n showline: false,\n range: [Math.min(...positions), Math.max(...positions)],\n fixedrange: true,\n },\n yaxis: {\n showgrid: false,\n zeroline: false,\n showticklabels: false,\n showline: false,\n range: [0, maxValue * Y_AXIS_PADDING_FACTOR],\n fixedrange: true,\n },\n };\n\n const config = {\n responsive: true,\n displayModeBar: false,\n displaylogo: false,\n fillFrame: true,\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 }, [data, width, height, aTrace, tTrace, gTrace, cTrace, maxValue, positions, theme, bindTooltip]);\n\n if (data.length === 0) {\n return <div className=\"chart-container\">No data available</div>;\n }\n\n const renderSequence = () => {\n const renderSequenceLetters = () => {\n const minPosition = Math.min(...positions);\n const maxPosition = Math.max(...positions);\n const chartWidth = width;\n\n return (\n <div className=\"sequence-letters-container\">\n {sequence.map((base, index) => {\n const position = positions[index];\n const color =\n base === \"A\"\n ? colorA\n : base === \"T\"\n ? colorT\n : base === \"G\"\n ? colorG\n : base === \"C\"\n ? colorC\n : theme.textColor;\n\n const span = maxPosition - minPosition || 1;\n const percentage = (position - minPosition) / span;\n const leftPosition = percentage * chartWidth;\n\n return (\n <span\n key={`base-${index}`}\n className=\"sequence-letter\"\n style={{\n left: `${leftPosition}px`,\n color,\n }}\n >\n {base}\n </span>\n );\n })}\n </div>\n );\n };\n\n const renderPositionNumbers = () => {\n const minPosition = Math.min(...positions);\n const maxPosition = Math.max(...positions);\n const chartWidth = width;\n\n const startPos =\n Math.ceil(minPosition / positionInterval) * positionInterval;\n\n const regularPositionLabels: Array<{ position: number; label: string }> =\n [];\n\n for (let pos = startPos; pos <= maxPosition; pos += positionInterval) {\n regularPositionLabels.push({\n position: pos,\n label: pos.toString(),\n });\n }\n\n return (\n <div className=\"position-numbers-container\">\n {regularPositionLabels.map((label) => {\n const span = maxPosition - minPosition || 1;\n const percentage = (label.position - minPosition) / span;\n const leftPosition = percentage * chartWidth;\n\n return (\n <span\n key={`pos-${label.position}`}\n className=\"position-number\"\n style={{\n left: `${leftPosition}px`,\n }}\n >\n {label.label}\n </span>\n );\n })}\n </div>\n );\n };\n\n return (\n <div className=\"sequence-header\">\n {renderSequenceLetters()}\n {renderPositionNumbers()}\n </div>\n );\n };\n\n return (\n <div className=\"electropherogram-container relative\" style={{ width, height }}>\n {renderSequence()}\n <div className=\"electropherogram-chart\">\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n </div>\n {tooltipElement}\n </div>\n );\n};\n\nexport { Electropherogram };\nexport type { PeakData, ElectropherogramProps };\n"],"names":["PLOT_HEIGHT_OFFSET","Y_AXIS_PADDING_FACTOR","determineBase","item","peakValues","values","val","highestBase","highestValue","base","value","Electropherogram","data","width","height","positionInterval","colorA","CHART_COLORS","colorT","colorG","colorC","plotRef","useRef","theme","usePlotlyTheme","bindTooltip","tooltipElement","useChartTooltip","positions","useMemo","sequence","peakA","peakT","peakG","peakC","aTrace","tTrace","gTrace","cTrace","maxValue","useEffect","plotData","layout","CHART_FONT_FAMILY","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","jsx","renderSequence","renderSequenceLetters","minPosition","maxPosition","chartWidth","index","position","color","span","leftPosition","renderPositionNumbers","startPos","regularPositionLabels","pos","label","jsxs"],"mappings":"uVAYA,MAAMA,EAAqB,GAErBC,EAAwB,KAsBxBC,EAAiBC,GAA2B,CAChD,GAAIA,EAAK,OAAS,OAAW,OAAOA,EAAK,KACzC,MAAMC,EAAa,CACjB,EAAGD,EAAK,MACR,EAAGA,EAAK,MACR,EAAGA,EAAK,MACR,EAAGA,EAAK,KAAA,EAGJE,EAAS,OAAO,OAAOD,CAAU,EAGvC,GAFiBC,EAAO,MAAOC,GAAQA,IAAQD,EAAO,CAAC,CAAC,EAGtD,MAAO,GAGT,IAAIE,EAAc,GACdC,EAAe,EAEnB,cAAO,QAAQJ,CAAU,EAAE,QAAQ,CAAC,CAACK,EAAMC,CAAK,IAAM,CAChDA,EAAQF,IACVD,EAAcE,EACdD,EAAeE,EAEnB,CAAC,EAEMH,CACT,EAEMI,EAAoD,CAAC,CACzD,KAAAC,EAAO,CAAA,EACP,MAAAC,EAAQ,IACR,OAAAC,EAAS,IACT,iBAAAC,EAAmB,GACnB,OAAAC,EAASC,EAAAA,aAAa,CAAC,EACvB,OAAAC,EAASD,EAAAA,aAAa,CAAC,EACvB,OAAAE,EAASF,EAAAA,aAAa,CAAC,EACvB,OAAAG,EAASH,EAAAA,aAAa,CAAC,CACzB,IAAM,CACJ,MAAMI,EAAUC,EAAAA,OAAuB,IAAI,EACrCC,EAAQC,EAAAA,eAAA,EACR,CAAE,YAAAC,EAAa,eAAAC,CAAA,EAAmBC,kBAAgB,CACtD,OAAQ,WACR,OAAQ,WAAA,CACT,EAEKC,EAAYC,EAAAA,QAAQ,IAAMjB,EAAK,IAAKT,GAASA,EAAK,QAAQ,EAAG,CAACS,CAAI,CAAC,EACnEkB,EAAWD,EAAAA,QAAQ,IAAMjB,EAAK,IAAKT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ACV,MAAO,CACL,KAAM,GAAGU,CAAY,IAAA,EAGtB,SAAAK,EAAM,KAAA,EANF,OAAOA,EAAM,QAAQ,EAAA,CAShC,CAAC,CAAA,CACH,CAEJ,EAEA,OACEC,EAAAA,KAAC,MAAA,CAAI,UAAU,kBACZ,SAAA,CAAAd,EAAA,EACAS,EAAA,CAAsB,EACzB,CAEJ,EAEA,OACEK,EAAAA,KAAC,OAAI,UAAU,sCAAsC,MAAO,CAAE,MAAArD,EAAO,OAAAC,GAClE,SAAA,CAAAqC,EAAA,EACDD,EAAAA,IAAC,MAAA,CAAI,UAAU,yBACb,eAAC,MAAA,CAAI,IAAK7B,EAAS,MAAO,CAAE,MAAO,OAAQ,OAAQ,MAAA,EAAU,EAC/D,EACCK,CAAA,EACH,CAEJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PeakData {
|
|
3
|
+
position: number;
|
|
4
|
+
base?: string;
|
|
5
|
+
peakA: number;
|
|
6
|
+
peakT: number;
|
|
7
|
+
peakG: number;
|
|
8
|
+
peakC: number;
|
|
9
|
+
}
|
|
10
|
+
interface ElectropherogramProps {
|
|
11
|
+
data?: PeakData[];
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
positionInterval?: number;
|
|
15
|
+
colorA?: string;
|
|
16
|
+
colorT?: string;
|
|
17
|
+
colorG?: string;
|
|
18
|
+
colorC?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const Electropherogram: React.FC<ElectropherogramProps>;
|
|
21
|
+
export { Electropherogram };
|
|
22
|
+
export type { PeakData, ElectropherogramProps };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { jsx as m, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j, useMemo as o, useEffect as H } from "react";
|
|
3
|
+
import { useChartTooltip as $ } from "../ChartTooltip/ChartTooltip.js";
|
|
4
|
+
import { loadPlotly as D, getLoadedPlotly as I } from "../plotly-loader.js";
|
|
5
|
+
import { usePlotlyTheme as V, CHART_FONT_FAMILY as z } from "../../../hooks/use-plotly-theme.js";
|
|
6
|
+
import { CHART_COLORS as N } from "../../../utils/colors.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
const W = 75, Y = 1.05, X = (e) => {
|
|
9
|
+
if (e.base !== void 0) return e.base;
|
|
10
|
+
const l = {
|
|
11
|
+
A: e.peakA,
|
|
12
|
+
T: e.peakT,
|
|
13
|
+
G: e.peakG,
|
|
14
|
+
C: e.peakC
|
|
15
|
+
}, h = Object.values(l);
|
|
16
|
+
if (h.every((i) => i === h[0]))
|
|
17
|
+
return "";
|
|
18
|
+
let u = "", f = 0;
|
|
19
|
+
return Object.entries(l).forEach(([i, d]) => {
|
|
20
|
+
d > f && (u = i, f = d);
|
|
21
|
+
}), u;
|
|
22
|
+
}, oe = ({
|
|
23
|
+
data: e = [],
|
|
24
|
+
width: l = 900,
|
|
25
|
+
height: h = 600,
|
|
26
|
+
positionInterval: x = 10,
|
|
27
|
+
colorA: u = N[0],
|
|
28
|
+
// blue
|
|
29
|
+
colorT: f = N[2],
|
|
30
|
+
// teal/green
|
|
31
|
+
colorG: i = N[3],
|
|
32
|
+
// red
|
|
33
|
+
colorC: d = N[1]
|
|
34
|
+
// orange
|
|
35
|
+
}) => {
|
|
36
|
+
const g = j(null), T = V(), { bindTooltip: C, tooltipElement: G } = $({
|
|
37
|
+
xLabel: "Position",
|
|
38
|
+
yLabel: "Intensity"
|
|
39
|
+
}), n = o(() => e.map((t) => t.position), [e]), R = o(() => e.map((t) => X(t)), [e]), v = o(() => e.map((t) => t.peakA), [e]), P = o(() => e.map((t) => t.peakT), [e]), k = o(() => e.map((t) => t.peakG), [e]), b = o(() => e.map((t) => t.peakC), [e]), _ = o(
|
|
40
|
+
() => ({
|
|
41
|
+
x: n,
|
|
42
|
+
y: v,
|
|
43
|
+
type: "scatter",
|
|
44
|
+
mode: "lines",
|
|
45
|
+
hoverinfo: "none",
|
|
46
|
+
name: "A",
|
|
47
|
+
line: { color: u, width: 2, shape: "spline" }
|
|
48
|
+
}),
|
|
49
|
+
[n, v, u]
|
|
50
|
+
), q = o(
|
|
51
|
+
() => ({
|
|
52
|
+
x: n,
|
|
53
|
+
y: P,
|
|
54
|
+
type: "scatter",
|
|
55
|
+
mode: "lines",
|
|
56
|
+
hoverinfo: "none",
|
|
57
|
+
name: "T",
|
|
58
|
+
line: { color: f, width: 2, shape: "spline" }
|
|
59
|
+
}),
|
|
60
|
+
[n, P, f]
|
|
61
|
+
), w = o(
|
|
62
|
+
() => ({
|
|
63
|
+
x: n,
|
|
64
|
+
y: k,
|
|
65
|
+
type: "scatter",
|
|
66
|
+
mode: "lines",
|
|
67
|
+
hoverinfo: "none",
|
|
68
|
+
name: "G",
|
|
69
|
+
line: { color: i, width: 2, shape: "spline" }
|
|
70
|
+
}),
|
|
71
|
+
[n, k, i]
|
|
72
|
+
), E = o(
|
|
73
|
+
() => ({
|
|
74
|
+
x: n,
|
|
75
|
+
y: b,
|
|
76
|
+
type: "scatter",
|
|
77
|
+
mode: "lines",
|
|
78
|
+
hoverinfo: "none",
|
|
79
|
+
name: "C",
|
|
80
|
+
line: { color: d, width: 2, shape: "spline" }
|
|
81
|
+
}),
|
|
82
|
+
[n, b, d]
|
|
83
|
+
), L = o(
|
|
84
|
+
() => Math.max(...v, ...P, ...k, ...b),
|
|
85
|
+
[v, P, k, b]
|
|
86
|
+
);
|
|
87
|
+
return H(() => {
|
|
88
|
+
if (!g.current || e.length === 0) return;
|
|
89
|
+
const t = [_, q, w, E], M = {
|
|
90
|
+
width: l,
|
|
91
|
+
height: h - W,
|
|
92
|
+
margin: { l: 0, r: 0, b: 20, t: 10, pad: 0 },
|
|
93
|
+
paper_bgcolor: T.paperBg,
|
|
94
|
+
plot_bgcolor: T.plotBg,
|
|
95
|
+
font: {
|
|
96
|
+
family: z
|
|
97
|
+
},
|
|
98
|
+
showlegend: !1,
|
|
99
|
+
xaxis: {
|
|
100
|
+
showgrid: !1,
|
|
101
|
+
zeroline: !1,
|
|
102
|
+
showticklabels: !1,
|
|
103
|
+
showline: !1,
|
|
104
|
+
range: [Math.min(...n), Math.max(...n)],
|
|
105
|
+
fixedrange: !0
|
|
106
|
+
},
|
|
107
|
+
yaxis: {
|
|
108
|
+
showgrid: !1,
|
|
109
|
+
zeroline: !1,
|
|
110
|
+
showticklabels: !1,
|
|
111
|
+
showline: !1,
|
|
112
|
+
range: [0, L * Y],
|
|
113
|
+
fixedrange: !0
|
|
114
|
+
}
|
|
115
|
+
}, a = {
|
|
116
|
+
responsive: !0,
|
|
117
|
+
displayModeBar: !1,
|
|
118
|
+
displaylogo: !1,
|
|
119
|
+
fillFrame: !0
|
|
120
|
+
};
|
|
121
|
+
let c = !1, p = null;
|
|
122
|
+
return D().then((r) => {
|
|
123
|
+
c || !g.current || (r.newPlot(g.current, t, M, a), C(g.current), p = g.current);
|
|
124
|
+
}), () => {
|
|
125
|
+
c = !0, p && I().purge(p);
|
|
126
|
+
};
|
|
127
|
+
}, [e, l, h, _, q, w, E, L, n, T, C]), e.length === 0 ? /* @__PURE__ */ m("div", { className: "chart-container", children: "No data available" }) : /* @__PURE__ */ F("div", { className: "electropherogram-container relative", style: { width: l, height: h }, children: [
|
|
128
|
+
(() => {
|
|
129
|
+
const t = () => {
|
|
130
|
+
const a = Math.min(...n), c = Math.max(...n), p = l;
|
|
131
|
+
return /* @__PURE__ */ m("div", { className: "sequence-letters-container", children: R.map((r, y) => {
|
|
132
|
+
const s = n[y], A = r === "A" ? u : r === "T" ? f : r === "G" ? i : r === "C" ? d : T.textColor, O = c - a || 1, B = (s - a) / O * p;
|
|
133
|
+
return /* @__PURE__ */ m(
|
|
134
|
+
"span",
|
|
135
|
+
{
|
|
136
|
+
className: "sequence-letter",
|
|
137
|
+
style: {
|
|
138
|
+
left: `${B}px`,
|
|
139
|
+
color: A
|
|
140
|
+
},
|
|
141
|
+
children: r
|
|
142
|
+
},
|
|
143
|
+
`base-${y}`
|
|
144
|
+
);
|
|
145
|
+
}) });
|
|
146
|
+
}, M = () => {
|
|
147
|
+
const a = Math.min(...n), c = Math.max(...n), p = l, r = Math.ceil(a / x) * x, y = [];
|
|
148
|
+
for (let s = r; s <= c; s += x)
|
|
149
|
+
y.push({
|
|
150
|
+
position: s,
|
|
151
|
+
label: s.toString()
|
|
152
|
+
});
|
|
153
|
+
return /* @__PURE__ */ m("div", { className: "position-numbers-container", children: y.map((s) => {
|
|
154
|
+
const A = c - a || 1, S = (s.position - a) / A * p;
|
|
155
|
+
return /* @__PURE__ */ m(
|
|
156
|
+
"span",
|
|
157
|
+
{
|
|
158
|
+
className: "position-number",
|
|
159
|
+
style: {
|
|
160
|
+
left: `${S}px`
|
|
161
|
+
},
|
|
162
|
+
children: s.label
|
|
163
|
+
},
|
|
164
|
+
`pos-${s.position}`
|
|
165
|
+
);
|
|
166
|
+
}) });
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ F("div", { className: "sequence-header", children: [
|
|
169
|
+
t(),
|
|
170
|
+
M()
|
|
171
|
+
] });
|
|
172
|
+
})(),
|
|
173
|
+
/* @__PURE__ */ m("div", { className: "electropherogram-chart", children: /* @__PURE__ */ m("div", { ref: g, style: { width: "100%", height: "100%" } }) }),
|
|
174
|
+
G
|
|
175
|
+
] });
|
|
176
|
+
};
|
|
177
|
+
export {
|
|
178
|
+
oe as Electropherogram
|
|
179
|
+
};
|
|
180
|
+
//# sourceMappingURL=Electropherogram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Electropherogram.js","sources":["../../../../src/components/charts/Electropherogram/Electropherogram.tsx"],"sourcesContent":["import React, { useEffect, useRef, useMemo } from \"react\";\n\nimport { useChartTooltip } from \"../ChartTooltip\";\nimport { getLoadedPlotly, loadPlotly } from \"../plotly-loader\";\n\nimport type Plotly from \"plotly.js-dist\";\n\nimport { CHART_FONT_FAMILY, usePlotlyTheme } from \"@/hooks/use-plotly-theme\";\nimport { CHART_COLORS } from \"@/utils/colors\";\nimport \"./Electropherogram.scss\";\n\n/** Height offset for the plot area in pixels */\nconst PLOT_HEIGHT_OFFSET = 75;\n/** Scale factor for y-axis range to add padding above max value */\nconst Y_AXIS_PADDING_FACTOR = 1.05;\n\ninterface PeakData {\n position: number;\n base?: string;\n peakA: number;\n peakT: number;\n peakG: number;\n peakC: number;\n}\n\ninterface ElectropherogramProps {\n data?: PeakData[];\n width?: number;\n height?: number;\n positionInterval?: number;\n colorA?: string;\n colorT?: string;\n colorG?: string;\n colorC?: string;\n}\n\nconst determineBase = (item: PeakData): string => {\n if (item.base !== undefined) return item.base;\n const peakValues = {\n A: item.peakA,\n T: item.peakT,\n G: item.peakG,\n C: item.peakC,\n };\n\n const values = Object.values(peakValues);\n const allEqual = values.every((val) => val === values[0]);\n\n if (allEqual) {\n return \"\";\n }\n\n let highestBase = \"\";\n let highestValue = 0;\n\n Object.entries(peakValues).forEach(([base, value]) => {\n if (value > highestValue) {\n highestBase = base;\n highestValue = value;\n }\n });\n\n return highestBase;\n};\n\nconst Electropherogram: React.FC<ElectropherogramProps> = ({\n data = [],\n width = 900,\n height = 600,\n positionInterval = 10,\n colorA = CHART_COLORS[0], // blue\n colorT = CHART_COLORS[2], // teal/green\n colorG = CHART_COLORS[3], // red\n colorC = CHART_COLORS[1], // orange\n}) => {\n const plotRef = useRef<HTMLDivElement>(null);\n const theme = usePlotlyTheme();\n const { bindTooltip, tooltipElement } = useChartTooltip({\n xLabel: \"Position\",\n yLabel: \"Intensity\",\n });\n\n const positions = useMemo(() => data.map((item) => item.position), [data]);\n const sequence = useMemo(() => data.map((item) => determineBase(item)), [data]);\n const peakA = useMemo(() => data.map((item) => item.peakA), [data]);\n const peakT = useMemo(() => data.map((item) => item.peakT), [data]);\n const peakG = useMemo(() => data.map((item) => item.peakG), [data]);\n const peakC = useMemo(() => data.map((item) => item.peakC), [data]);\n\n const aTrace = useMemo(\n () => ({\n x: positions,\n y: peakA,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"A\",\n line: { color: colorA, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakA, colorA],\n );\n\n const tTrace = useMemo(\n () => ({\n x: positions,\n y: peakT,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"T\",\n line: { color: colorT, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakT, colorT],\n );\n\n const gTrace = useMemo(\n () => ({\n x: positions,\n y: peakG,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"G\",\n line: { color: colorG, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakG, colorG],\n );\n\n const cTrace = useMemo(\n () => ({\n x: positions,\n y: peakC,\n type: \"scatter\" as const,\n mode: \"lines\" as const,\n hoverinfo: \"none\" as const,\n name: \"C\",\n line: { color: colorC, width: 2, shape: \"spline\" as const },\n }),\n [positions, peakC, colorC],\n );\n\n const maxValue = useMemo(\n () => Math.max(...peakA, ...peakT, ...peakG, ...peakC),\n [peakA, peakT, peakG, peakC],\n );\n\n useEffect(() => {\n if (!plotRef.current || data.length === 0) return;\n\n const plotData = [aTrace, tTrace, gTrace, cTrace];\n\n const layout: Partial<Plotly.Layout> = {\n width: width,\n height: height - PLOT_HEIGHT_OFFSET,\n margin: { l: 0, r: 0, b: 20, t: 10, pad: 0 },\n paper_bgcolor: theme.paperBg,\n plot_bgcolor: theme.plotBg,\n font: {\n family: CHART_FONT_FAMILY,\n },\n showlegend: false,\n xaxis: {\n showgrid: false,\n zeroline: false,\n showticklabels: false,\n showline: false,\n range: [Math.min(...positions), Math.max(...positions)],\n fixedrange: true,\n },\n yaxis: {\n showgrid: false,\n zeroline: false,\n showticklabels: false,\n showline: false,\n range: [0, maxValue * Y_AXIS_PADDING_FACTOR],\n fixedrange: true,\n },\n };\n\n const config = {\n responsive: true,\n displayModeBar: false,\n displaylogo: false,\n fillFrame: true,\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 }, [data, width, height, aTrace, tTrace, gTrace, cTrace, maxValue, positions, theme, bindTooltip]);\n\n if (data.length === 0) {\n return <div className=\"chart-container\">No data available</div>;\n }\n\n const renderSequence = () => {\n const renderSequenceLetters = () => {\n const minPosition = Math.min(...positions);\n const maxPosition = Math.max(...positions);\n const chartWidth = width;\n\n return (\n <div className=\"sequence-letters-container\">\n {sequence.map((base, index) => {\n const position = positions[index];\n const color =\n base === \"A\"\n ? colorA\n : base === \"T\"\n ? colorT\n : base === \"G\"\n ? colorG\n : base === \"C\"\n ? colorC\n : theme.textColor;\n\n const span = maxPosition - minPosition || 1;\n const percentage = (position - minPosition) / span;\n const leftPosition = percentage * chartWidth;\n\n return (\n <span\n key={`base-${index}`}\n className=\"sequence-letter\"\n style={{\n left: `${leftPosition}px`,\n color,\n }}\n >\n {base}\n </span>\n );\n })}\n </div>\n );\n };\n\n const renderPositionNumbers = () => {\n const minPosition = Math.min(...positions);\n const maxPosition = Math.max(...positions);\n const chartWidth = width;\n\n const startPos =\n Math.ceil(minPosition / positionInterval) * positionInterval;\n\n const regularPositionLabels: Array<{ position: number; label: string }> =\n [];\n\n for (let pos = startPos; pos <= maxPosition; pos += positionInterval) {\n regularPositionLabels.push({\n position: pos,\n label: pos.toString(),\n });\n }\n\n return (\n <div className=\"position-numbers-container\">\n {regularPositionLabels.map((label) => {\n const span = maxPosition - minPosition || 1;\n const percentage = (label.position - minPosition) / span;\n const leftPosition = percentage * chartWidth;\n\n return (\n <span\n key={`pos-${label.position}`}\n className=\"position-number\"\n style={{\n left: `${leftPosition}px`,\n }}\n >\n {label.label}\n </span>\n );\n })}\n </div>\n );\n };\n\n return (\n <div className=\"sequence-header\">\n {renderSequenceLetters()}\n {renderPositionNumbers()}\n </div>\n );\n };\n\n return (\n <div className=\"electropherogram-container relative\" style={{ width, height }}>\n {renderSequence()}\n <div className=\"electropherogram-chart\">\n <div ref={plotRef} style={{ width: \"100%\", height: \"100%\" }} />\n </div>\n {tooltipElement}\n </div>\n );\n};\n\nexport { Electropherogram };\nexport type { PeakData, ElectropherogramProps };\n"],"names":["PLOT_HEIGHT_OFFSET","Y_AXIS_PADDING_FACTOR","determineBase","item","peakValues","values","val","highestBase","highestValue","base","value","Electropherogram","data","width","height","positionInterval","colorA","CHART_COLORS","colorT","colorG","colorC","plotRef","useRef","theme","usePlotlyTheme","bindTooltip","tooltipElement","useChartTooltip","positions","useMemo","sequence","peakA","peakT","peakG","peakC","aTrace","tTrace","gTrace","cTrace","maxValue","useEffect","plotData","layout","CHART_FONT_FAMILY","config","cancelled","plotElement","loadPlotly","plotly","getLoadedPlotly","jsx","jsxs","renderSequenceLetters","minPosition","maxPosition","chartWidth","index","position","color","span","leftPosition","renderPositionNumbers","startPos","regularPositionLabels","pos","label"],"mappings":";;;;;;;AAYA,MAAMA,IAAqB,IAErBC,IAAwB,MAsBxBC,IAAgB,CAACC,MAA2B;AAChD,MAAIA,EAAK,SAAS,OAAW,QAAOA,EAAK;AACzC,QAAMC,IAAa;AAAA,IACjB,GAAGD,EAAK;AAAA,IACR,GAAGA,EAAK;AAAA,IACR,GAAGA,EAAK;AAAA,IACR,GAAGA,EAAK;AAAA,EAAA,GAGJE,IAAS,OAAO,OAAOD,CAAU;AAGvC,MAFiBC,EAAO,MAAM,CAACC,MAAQA,MAAQD,EAAO,CAAC,CAAC;AAGtD,WAAO;AAGT,MAAIE,IAAc,IACdC,IAAe;AAEnB,gBAAO,QAAQJ,CAAU,EAAE,QAAQ,CAAC,CAACK,GAAMC,CA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,IAAOL,IAAcD,KAAe,GAEpCO,KADcK,EAAM,WAAWZ,KAAeM,IAClBJ;AAElC,iBACE,gBAAAL;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,MAAM,GAAGU,CAAY;AAAA,cAAA;AAAA,cAGtB,UAAAK,EAAM;AAAA,YAAA;AAAA,YANF,OAAOA,EAAM,QAAQ;AAAA,UAAA;AAAA,QAShC,CAAC,EAAA,CACH;AAAA,MAEJ;AAEA,aACE,gBAAAd,EAAC,OAAA,EAAI,WAAU,mBACZ,UAAA;AAAA,QAAAC,EAAA;AAAA,QACAS,EAAA;AAAA,MAAsB,GACzB;AAAA,IAEJ,GAIK;AAAA,IACD,gBAAAX,EAAC,OAAA,EAAI,WAAU,0BACb,4BAAC,OAAA,EAAI,KAAK7B,GAAS,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAAU,GAC/D;AAAA,IACCK;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),U=require("../ChartTooltip/ChartTooltip.cjs"),k=require("../plotly-loader.cjs"),$=require("../../../hooks/use-element-size.cjs"),R=require("../../../hooks/use-plotly-theme.cjs"),D=require("../../../lib/utils.cjs"),G=require("../../../utils/colors.cjs");;/* empty css */const J=-.5,K=r=>r.reduce((n,u)=>n+u,0)/r.length,Q=(r,a)=>{const u=r.map(c=>Math.pow(c-a,2)).reduce((c,h)=>c+h,0)/r.length;return Math.sqrt(u)},Z=(r,a,n,u,c=100)=>{const h=[],p=[],y=(u-n)/(c-1);for(let e=0;e<c;e++){const o=n+e*y;h.push(o);const M=J*Math.pow((o-r)/a,2),q=1/(a*Math.sqrt(2*Math.PI))*Math.exp(M);p.push(q)}return{x:h,y:p}},tt=(r,a,n)=>{const u=Math.ceil((n.end-n.start)/n.size),c=Array(u).fill(0);a.forEach(e=>{if(e>=n.start&&e<=n.end){const o=Math.floor((e-n.start)/n.size);c[o]++}});const h=Math.max(...c),p=Math.max(...r),y=h/p;return r.map(e=>e*y)},et=({dataSeries:r,width:a,height:n,title:u="Histogram",xTitle:c="X Axis",yTitle:h="Frequency",bargap:p=.2,showDistributionLine:y=!1})=>{const e=l.useRef(null),o=R.usePlotlyTheme(),{bindTooltip:M,tooltipElement:q}=U.useChartTooltip({xLabel:c,yLabel:h}),[B,F]=$.useElementSize(),g=a??F.width,x=n??F.height,_=g>0&&x>0,W=a===void 0,L=n===void 0,b=l.useRef({width:g,height:x});b.current={width:g,height:x};const j=l.useRef(!1),C=l.useRef({width:0,height:0}),N=l.useMemo(()=>Array.isArray(r)?r:[r],[r]),T=l.useMemo(()=>N.length>1?"stack":void 0,[N.length]),z=G.CHART_COLORS,v=l.useMemo(()=>N.map((t,m)=>{const d=typeof t.showDistributionLine>"u"?y:t.showDistributionLine;return{...t,color:t.color||z[m%z.length],opacity:d?.5:t.opacity||1,showDistributionLine:d,lineWidth:t.lineWidth||3}}),[N,y,z]),A=o.gridColor,E=l.useMemo(()=>v.map(t=>({type:"histogram",x:t.x,name:t.name,marker:{color:t.color,line:{color:o.paperBg,width:1},opacity:t.opacity},autobinx:t.autobinx,xbins:t.xbins,hoverinfo:"none"})),[v,o]),P=l.useMemo(()=>v.filter(t=>t.showDistributionLine).map(t=>{const m=K(t.x),d=Q(t.x,m),f=Math.min(...t.x),i=Math.max(...t.x),w=i-f,H=f-w*.1,I=i+w*.1,V=t.xbins||{start:H,end:I,size:w/10},S=Z(m,d,H,I,100),X=tt(S.y,t.x,V);return{type:"scatter",x:S.x,y:X,mode:"lines",name:`${t.name} Distribution`,line:{color:t.color,width:t.lineWidth},hoverinfo:"none"}}),[v]),O=l.useMemo(()=>[...E,...P],[E,P]);l.useEffect(()=>{if(!e.current||!_)return;const t={width:b.current.width,height:b.current.height,font:{family:R.CHART_FONT_FAMILY},showlegend:!1,margin:{l:90,r:40,b:80,t:40},xaxis:{title:{text:c,font:{size:16,color:o.textSecondary,family:R.CHART_FONT_FAMILY,weight:400},standoff:20},gridcolor:A,tickcolor:o.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:o.lineColor,linewidth:1,zeroline:!1,automargin:!0},yaxis:{title:{text:h,font:{size:16,color:o.textSecondary,family:R.CHART_FONT_FAMILY,weight:400},standoff:20},gridcolor:A,tickcolor:o.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:o.lineColor,linewidth:1,zeroline:!1,rangemode:"tozero",automargin:!0},barmode:T,bargap:p,paper_bgcolor:o.paperBg,plot_bgcolor:o.plotBg},m={responsive:!1,displayModeBar:!1,displaylogo:!1};let d=!1,f=null;return k.loadPlotly().then(i=>{d||!e.current||(i.newPlot(e.current,O,t,m),M(e.current),f=e.current,j.current=!0,C.current={...b.current})}),()=>{d=!0,f&&(k.getLoadedPlotly().purge(f),j.current=!1)}},[_,c,h,p,O,T,A,o,M]),l.useEffect(()=>{const t=e.current;!t||!j.current||g<=0||x<=0||C.current.width===g&&C.current.height===x||(C.current={width:g,height:x},k.getLoadedPlotly().relayout(t,{width:g,height:x}).catch(()=>{}))},[g,x]);const Y=({series:t})=>{const m=t.map((i,w)=>s.jsx(l.Fragment,{children:s.jsxs("div",{className:"legend-item",children:[s.jsx("span",{className:"color-box",style:{background:i.color}}),i.name,w<t.length-1&&s.jsx("span",{className:"divider"})]})},i.name)),d=[],f=6;for(let i=0;i<m.length;i+=f)d.push(s.jsx("div",{className:"legend-row",children:m.slice(i,i+f)},i));return s.jsx("div",{className:"legend-container",children:d})};return s.jsxs("div",{className:D.cn("histogram-container relative",W&&"w-full",L&&"h-full"),style:a===void 0?void 0:{width:a},children:[s.jsxs("div",{className:D.cn("chart-container",L&&"flex h-full flex-col"),children:[u&&s.jsx("div",{className:"title-container",children:s.jsx("h2",{className:"title",children:u})}),s.jsx("div",{ref:B,className:D.cn(L&&"min-h-0 flex-1"),children:s.jsx("div",{ref:e,style:{width:"100%",height:"100%",margin:"0"}})}),s.jsx(Y,{series:v})]}),q]})};exports.Histogram=et;
|
|
2
2
|
//# sourceMappingURL=Histogram.cjs.map
|