@astryxdesign/lab 0.0.0-bootstrap.0 → 0.1.2-canary.04e71b2
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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.md +47 -1
- package/dist/Chart/Chart.d.ts +77 -0
- package/dist/Chart/Chart.d.ts.map +1 -0
- package/dist/Chart/Chart.js +247 -0
- package/dist/Chart/ChartArea.d.ts +28 -0
- package/dist/Chart/ChartArea.d.ts.map +1 -0
- package/dist/Chart/ChartArea.js +71 -0
- package/dist/Chart/ChartAxis.d.ts +27 -0
- package/dist/Chart/ChartAxis.d.ts.map +1 -0
- package/dist/Chart/ChartAxis.js +147 -0
- package/dist/Chart/ChartBar.d.ts +19 -0
- package/dist/Chart/ChartBar.d.ts.map +1 -0
- package/dist/Chart/ChartBar.js +61 -0
- package/dist/Chart/ChartBrush.d.ts +59 -0
- package/dist/Chart/ChartBrush.d.ts.map +1 -0
- package/dist/Chart/ChartBrush.js +197 -0
- package/dist/Chart/ChartCandlestick.d.ts +50 -0
- package/dist/Chart/ChartCandlestick.d.ts.map +1 -0
- package/dist/Chart/ChartCandlestick.js +138 -0
- package/dist/Chart/ChartContext.d.ts +5 -0
- package/dist/Chart/ChartContext.d.ts.map +1 -0
- package/dist/Chart/ChartContext.js +20 -0
- package/dist/Chart/ChartDot.d.ts +18 -0
- package/dist/Chart/ChartDot.d.ts.map +1 -0
- package/dist/Chart/ChartDot.js +43 -0
- package/dist/Chart/ChartDotGL.d.ts +16 -0
- package/dist/Chart/ChartDotGL.d.ts.map +1 -0
- package/dist/Chart/ChartDotGL.js +135 -0
- package/dist/Chart/ChartDotGLInteractive.d.ts +41 -0
- package/dist/Chart/ChartDotGLInteractive.d.ts.map +1 -0
- package/dist/Chart/ChartDotGLInteractive.js +446 -0
- package/dist/Chart/ChartErrorBar.d.ts +23 -0
- package/dist/Chart/ChartErrorBar.d.ts.map +1 -0
- package/dist/Chart/ChartErrorBar.js +68 -0
- package/dist/Chart/ChartGrid.d.ts +17 -0
- package/dist/Chart/ChartGrid.d.ts.map +1 -0
- package/dist/Chart/ChartGrid.js +67 -0
- package/dist/Chart/ChartHeatmapGL.d.ts +10 -0
- package/dist/Chart/ChartHeatmapGL.d.ts.map +1 -0
- package/dist/Chart/ChartHeatmapGL.js +171 -0
- package/dist/Chart/ChartLegend.d.ts +60 -0
- package/dist/Chart/ChartLegend.d.ts.map +1 -0
- package/dist/Chart/ChartLegend.js +161 -0
- package/dist/Chart/ChartLine.d.ts +23 -0
- package/dist/Chart/ChartLine.d.ts.map +1 -0
- package/dist/Chart/ChartLine.js +64 -0
- package/dist/Chart/ChartReferenceLine.d.ts +11 -0
- package/dist/Chart/ChartReferenceLine.d.ts.map +1 -0
- package/dist/Chart/ChartReferenceLine.js +109 -0
- package/dist/Chart/ChartSelect.d.ts +9 -0
- package/dist/Chart/ChartSelect.d.ts.map +1 -0
- package/dist/Chart/ChartSelect.js +90 -0
- package/dist/Chart/ChartStreamGL.d.ts +17 -0
- package/dist/Chart/ChartStreamGL.d.ts.map +1 -0
- package/dist/Chart/ChartStreamGL.js +157 -0
- package/dist/Chart/ChartTooltip.d.ts +85 -0
- package/dist/Chart/ChartTooltip.d.ts.map +1 -0
- package/dist/Chart/ChartTooltip.js +335 -0
- package/dist/Chart/ChartZoom.d.ts +23 -0
- package/dist/Chart/ChartZoom.d.ts.map +1 -0
- package/dist/Chart/ChartZoom.js +314 -0
- package/dist/Chart/formatters.d.ts +33 -0
- package/dist/Chart/formatters.d.ts.map +1 -0
- package/dist/Chart/formatters.js +101 -0
- package/dist/Chart/getChartColors.d.ts +56 -0
- package/dist/Chart/getChartColors.d.ts.map +1 -0
- package/dist/Chart/getChartColors.js +150 -0
- package/dist/Chart/index.d.ts +29 -0
- package/dist/Chart/index.d.ts.map +1 -0
- package/dist/Chart/index.js +29 -0
- package/dist/Chart/m4.d.ts +36 -0
- package/dist/Chart/m4.d.ts.map +1 -0
- package/dist/Chart/m4.js +106 -0
- package/dist/Chart/types.d.ts +55 -0
- package/dist/Chart/types.d.ts.map +1 -0
- package/dist/Chart/types.js +1 -0
- package/dist/Chart/useChartColors.d.ts +16 -0
- package/dist/Chart/useChartColors.d.ts.map +1 -0
- package/dist/Chart/useChartColors.js +30 -0
- package/dist/Chart/useChartRange.d.ts +50 -0
- package/dist/Chart/useChartRange.d.ts.map +1 -0
- package/dist/Chart/useChartRange.js +90 -0
- package/dist/Chart/utils.d.ts +15 -0
- package/dist/Chart/utils.d.ts.map +1 -0
- package/dist/Chart/utils.js +24 -0
- package/dist/Chart/webgl.d.ts +62 -0
- package/dist/Chart/webgl.d.ts.map +1 -0
- package/dist/Chart/webgl.js +169 -0
- package/dist/ChartV2/Chart.d.ts +32 -0
- package/dist/ChartV2/Chart.d.ts.map +1 -0
- package/dist/ChartV2/Chart.js +281 -0
- package/dist/ChartV2/ChartAxis.d.ts +36 -0
- package/dist/ChartV2/ChartAxis.d.ts.map +1 -0
- package/dist/ChartV2/ChartAxis.js +161 -0
- package/dist/ChartV2/ChartGrid.d.ts +20 -0
- package/dist/ChartV2/ChartGrid.d.ts.map +1 -0
- package/dist/ChartV2/ChartGrid.js +76 -0
- package/dist/ChartV2/ChartLegend.d.ts +14 -0
- package/dist/ChartV2/ChartLegend.d.ts.map +1 -0
- package/dist/ChartV2/ChartLegend.js +54 -0
- package/dist/ChartV2/ChartSwatch.d.ts +36 -0
- package/dist/ChartV2/ChartSwatch.d.ts.map +1 -0
- package/dist/ChartV2/ChartSwatch.js +82 -0
- package/dist/ChartV2/ChartTooltip.d.ts +46 -0
- package/dist/ChartV2/ChartTooltip.d.ts.map +1 -0
- package/dist/ChartV2/ChartTooltip.js +267 -0
- package/dist/ChartV2/ChartV2Context.d.ts +4 -0
- package/dist/ChartV2/ChartV2Context.d.ts.map +1 -0
- package/dist/ChartV2/ChartV2Context.js +12 -0
- package/dist/ChartV2/index.d.ts +13 -0
- package/dist/ChartV2/index.d.ts.map +1 -0
- package/dist/ChartV2/index.js +10 -0
- package/dist/ChartV2/layout.d.ts +25 -0
- package/dist/ChartV2/layout.d.ts.map +1 -0
- package/dist/ChartV2/layout.js +195 -0
- package/dist/ChartV2/legend.d.ts +18 -0
- package/dist/ChartV2/legend.d.ts.map +1 -0
- package/dist/ChartV2/legend.js +24 -0
- package/dist/ChartV2/marks/area.d.ts +19 -0
- package/dist/ChartV2/marks/area.d.ts.map +1 -0
- package/dist/ChartV2/marks/area.js +109 -0
- package/dist/ChartV2/marks/band.d.ts +9 -0
- package/dist/ChartV2/marks/band.d.ts.map +1 -0
- package/dist/ChartV2/marks/band.js +59 -0
- package/dist/ChartV2/marks/bar.d.ts +17 -0
- package/dist/ChartV2/marks/bar.d.ts.map +1 -0
- package/dist/ChartV2/marks/bar.js +120 -0
- package/dist/ChartV2/marks/candlestick.d.ts +15 -0
- package/dist/ChartV2/marks/candlestick.d.ts.map +1 -0
- package/dist/ChartV2/marks/candlestick.js +83 -0
- package/dist/ChartV2/marks/dot.d.ts +15 -0
- package/dist/ChartV2/marks/dot.d.ts.map +1 -0
- package/dist/ChartV2/marks/dot.js +65 -0
- package/dist/ChartV2/marks/dotGL.d.ts +16 -0
- package/dist/ChartV2/marks/dotGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/dotGL.js +178 -0
- package/dist/ChartV2/marks/dotGLInteractive.d.ts +30 -0
- package/dist/ChartV2/marks/dotGLInteractive.d.ts.map +1 -0
- package/dist/ChartV2/marks/dotGLInteractive.js +464 -0
- package/dist/ChartV2/marks/errorBar.d.ts +27 -0
- package/dist/ChartV2/marks/errorBar.d.ts.map +1 -0
- package/dist/ChartV2/marks/errorBar.js +87 -0
- package/dist/ChartV2/marks/heatmapGL.d.ts +23 -0
- package/dist/ChartV2/marks/heatmapGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/heatmapGL.js +242 -0
- package/dist/ChartV2/marks/index.d.ts +13 -0
- package/dist/ChartV2/marks/index.d.ts.map +1 -0
- package/dist/ChartV2/marks/index.js +14 -0
- package/dist/ChartV2/marks/line.d.ts +18 -0
- package/dist/ChartV2/marks/line.d.ts.map +1 -0
- package/dist/ChartV2/marks/line.js +76 -0
- package/dist/ChartV2/marks/referenceLine.d.ts +35 -0
- package/dist/ChartV2/marks/referenceLine.d.ts.map +1 -0
- package/dist/ChartV2/marks/referenceLine.js +186 -0
- package/dist/ChartV2/marks/streamGL.d.ts +36 -0
- package/dist/ChartV2/marks/streamGL.d.ts.map +1 -0
- package/dist/ChartV2/marks/streamGL.js +204 -0
- package/dist/ChartV2/tooltip.d.ts +38 -0
- package/dist/ChartV2/tooltip.d.ts.map +1 -0
- package/dist/ChartV2/tooltip.js +54 -0
- package/dist/ChartV2/types.d.ts +115 -0
- package/dist/ChartV2/types.d.ts.map +1 -0
- package/dist/ChartV2/types.js +35 -0
- package/dist/ChatReasoning/ChatReasoning.d.ts +51 -0
- package/dist/ChatReasoning/ChatReasoning.d.ts.map +1 -0
- package/dist/ChatReasoning/ChatReasoning.js +236 -0
- package/dist/CircularProgress/CircularProgress.d.ts +101 -0
- package/dist/CircularProgress/CircularProgress.d.ts.map +1 -0
- package/dist/CircularProgress/CircularProgress.js +263 -0
- package/dist/CircularProgress/index.d.ts +6 -0
- package/dist/CircularProgress/index.d.ts.map +1 -0
- package/dist/CircularProgress/index.js +8 -0
- package/dist/CodeBlock/index.d.ts +8 -0
- package/dist/CodeBlock/index.d.ts.map +1 -0
- package/dist/CodeBlock/index.js +9 -0
- package/dist/CodeEditor/CodeEditor.d.ts +46 -0
- package/dist/CodeEditor/CodeEditor.d.ts.map +1 -0
- package/dist/CodeEditor/CodeEditor.js +396 -0
- package/dist/CodeEditor/index.d.ts +6 -0
- package/dist/CodeEditor/index.d.ts.map +1 -0
- package/dist/CodeEditor/index.js +7 -0
- package/dist/Radial/RadialArea.d.ts +25 -0
- package/dist/Radial/RadialArea.d.ts.map +1 -0
- package/dist/Radial/RadialArea.js +91 -0
- package/dist/Radial/RadialAxis.d.ts +14 -0
- package/dist/Radial/RadialAxis.d.ts.map +1 -0
- package/dist/Radial/RadialAxis.js +55 -0
- package/dist/Radial/RadialChart.d.ts +70 -0
- package/dist/Radial/RadialChart.d.ts.map +1 -0
- package/dist/Radial/RadialChart.js +174 -0
- package/dist/Radial/RadialContext.d.ts +5 -0
- package/dist/Radial/RadialContext.d.ts.map +1 -0
- package/dist/Radial/RadialContext.js +19 -0
- package/dist/Radial/RadialGrid.d.ts +14 -0
- package/dist/Radial/RadialGrid.d.ts.map +1 -0
- package/dist/Radial/RadialGrid.js +70 -0
- package/dist/Radial/RadialSlice.d.ts +23 -0
- package/dist/Radial/RadialSlice.d.ts.map +1 -0
- package/dist/Radial/RadialSlice.js +85 -0
- package/dist/Radial/RadialTooltip.d.ts +44 -0
- package/dist/Radial/RadialTooltip.d.ts.map +1 -0
- package/dist/Radial/RadialTooltip.js +284 -0
- package/dist/Radial/index.d.ts +9 -0
- package/dist/Radial/index.d.ts.map +1 -0
- package/dist/Radial/index.js +9 -0
- package/dist/Radial/types.d.ts +39 -0
- package/dist/Radial/types.d.ts.map +1 -0
- package/dist/Radial/types.js +1 -0
- package/dist/SVGIcon/SVGIcon.d.ts +87 -0
- package/dist/SVGIcon/SVGIcon.d.ts.map +1 -0
- package/dist/SVGIcon/SVGIcon.js +299 -0
- package/dist/SVGIcon/icons.d.ts +49 -0
- package/dist/SVGIcon/icons.d.ts.map +1 -0
- package/dist/SVGIcon/icons.js +326 -0
- package/dist/SVGIcon/index.d.ts +15 -0
- package/dist/SVGIcon/index.d.ts.map +1 -0
- package/dist/SVGIcon/index.js +22 -0
- package/dist/SVGIcon/pathTransforms.d.ts +35 -0
- package/dist/SVGIcon/pathTransforms.d.ts.map +1 -0
- package/dist/SVGIcon/pathTransforms.js +644 -0
- package/dist/SVGIcon/tokens.stylex.d.ts +37 -0
- package/dist/SVGIcon/tokens.stylex.d.ts.map +1 -0
- package/dist/SVGIcon/tokens.stylex.js +40 -0
- package/dist/SVGIcon/variations.stylex.d.ts +44 -0
- package/dist/SVGIcon/variations.stylex.d.ts.map +1 -0
- package/dist/SVGIcon/variations.stylex.js +119 -0
- package/dist/SVGIcon/xif-examples.d.ts +22 -0
- package/dist/SVGIcon/xif-examples.d.ts.map +1 -0
- package/dist/SVGIcon/xif-examples.js +202 -0
- package/dist/SVGIcon/xif-types.d.ts +129 -0
- package/dist/SVGIcon/xif-types.d.ts.map +1 -0
- package/dist/SVGIcon/xif-types.js +1 -0
- package/dist/Sankey/SankeyChart.d.ts +72 -0
- package/dist/Sankey/SankeyChart.d.ts.map +1 -0
- package/dist/Sankey/SankeyChart.js +162 -0
- package/dist/Sankey/SankeyContext.d.ts +5 -0
- package/dist/Sankey/SankeyContext.d.ts.map +1 -0
- package/dist/Sankey/SankeyContext.js +20 -0
- package/dist/Sankey/SankeyGrid.d.ts +20 -0
- package/dist/Sankey/SankeyGrid.d.ts.map +1 -0
- package/dist/Sankey/SankeyGrid.js +53 -0
- package/dist/Sankey/SankeyLabel.d.ts +11 -0
- package/dist/Sankey/SankeyLabel.d.ts.map +1 -0
- package/dist/Sankey/SankeyLabel.js +179 -0
- package/dist/Sankey/SankeyLink.d.ts +29 -0
- package/dist/Sankey/SankeyLink.d.ts.map +1 -0
- package/dist/Sankey/SankeyLink.js +139 -0
- package/dist/Sankey/SankeyNode.d.ts +15 -0
- package/dist/Sankey/SankeyNode.d.ts.map +1 -0
- package/dist/Sankey/SankeyNode.js +56 -0
- package/dist/Sankey/index.d.ts +8 -0
- package/dist/Sankey/index.d.ts.map +1 -0
- package/dist/Sankey/index.js +8 -0
- package/dist/Sankey/layout.d.ts +26 -0
- package/dist/Sankey/layout.d.ts.map +1 -0
- package/dist/Sankey/layout.js +157 -0
- package/dist/Sankey/types.d.ts +84 -0
- package/dist/Sankey/types.d.ts.map +1 -0
- package/dist/Sankey/types.js +1 -0
- package/dist/Schedule/CalendarEvent.d.ts +36 -0
- package/dist/Schedule/CalendarEvent.d.ts.map +1 -0
- package/dist/Schedule/CalendarEvent.js +35 -0
- package/dist/Schedule/DayView.d.ts +8 -0
- package/dist/Schedule/DayView.d.ts.map +1 -0
- package/dist/Schedule/DayView.js +105 -0
- package/dist/Schedule/ListView.d.ts +6 -0
- package/dist/Schedule/ListView.d.ts.map +1 -0
- package/dist/Schedule/ListView.js +171 -0
- package/dist/Schedule/MonthlyView.d.ts +6 -0
- package/dist/Schedule/MonthlyView.d.ts.map +1 -0
- package/dist/Schedule/MonthlyView.js +270 -0
- package/dist/Schedule/Schedule.d.ts +22 -0
- package/dist/Schedule/Schedule.d.ts.map +1 -0
- package/dist/Schedule/Schedule.js +185 -0
- package/dist/Schedule/TimeGridView.d.ts +12 -0
- package/dist/Schedule/TimeGridView.d.ts.map +1 -0
- package/dist/Schedule/TimeGridView.js +364 -0
- package/dist/Schedule/WeeklyView.d.ts +9 -0
- package/dist/Schedule/WeeklyView.d.ts.map +1 -0
- package/dist/Schedule/WeeklyView.js +112 -0
- package/dist/Schedule/context.d.ts +20 -0
- package/dist/Schedule/context.d.ts.map +1 -0
- package/dist/Schedule/context.js +19 -0
- package/dist/Schedule/dateMath.d.ts +21 -0
- package/dist/Schedule/dateMath.d.ts.map +1 -0
- package/dist/Schedule/dateMath.js +63 -0
- package/dist/Schedule/index.d.ts +19 -0
- package/dist/Schedule/index.d.ts.map +1 -0
- package/dist/Schedule/index.js +17 -0
- package/dist/Schedule/plugins/PaginationPlugin.d.ts +7 -0
- package/dist/Schedule/plugins/PaginationPlugin.d.ts.map +1 -0
- package/dist/Schedule/plugins/PaginationPlugin.js +81 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.d.ts +11 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.d.ts.map +1 -0
- package/dist/Schedule/plugins/ViewSelectorPlugin.js +78 -0
- package/dist/Schedule/plugins/index.d.ts +5 -0
- package/dist/Schedule/plugins/index.d.ts.map +1 -0
- package/dist/Schedule/plugins/index.js +14 -0
- package/dist/Schedule/shared.d.ts +923 -0
- package/dist/Schedule/shared.d.ts.map +1 -0
- package/dist/Schedule/shared.js +1325 -0
- package/dist/Schedule/types.d.ts +51 -0
- package/dist/Schedule/types.d.ts.map +1 -0
- package/dist/Schedule/types.js +1 -0
- package/dist/Schedule/useCurrentTime.d.ts +3 -0
- package/dist/Schedule/useCurrentTime.d.ts.map +1 -0
- package/dist/Schedule/useCurrentTime.js +43 -0
- package/dist/Schedule/zonedDateTime.d.ts +20 -0
- package/dist/Schedule/zonedDateTime.d.ts.map +1 -0
- package/dist/Schedule/zonedDateTime.js +31 -0
- package/dist/Stepper/Step.d.ts +120 -0
- package/dist/Stepper/Step.d.ts.map +1 -0
- package/dist/Stepper/Step.js +573 -0
- package/dist/Stepper/StepStatus.d.ts +24 -0
- package/dist/Stepper/StepStatus.d.ts.map +1 -0
- package/dist/Stepper/StepStatus.js +1 -0
- package/dist/Stepper/Stepper.d.ts +77 -0
- package/dist/Stepper/Stepper.d.ts.map +1 -0
- package/dist/Stepper/Stepper.js +104 -0
- package/dist/Stepper/StepperContext.d.ts +12 -0
- package/dist/Stepper/StepperContext.d.ts.map +1 -0
- package/dist/Stepper/StepperContext.js +24 -0
- package/dist/Stepper/index.d.ts +8 -0
- package/dist/Stepper/index.d.ts.map +1 -0
- package/dist/Stepper/index.js +7 -0
- package/dist/ThreeD/ThreeDAxis.d.ts +6 -0
- package/dist/ThreeD/ThreeDAxis.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDAxis.js +75 -0
- package/dist/ThreeD/ThreeDBar.d.ts +7 -0
- package/dist/ThreeD/ThreeDBar.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDBar.js +98 -0
- package/dist/ThreeD/ThreeDChart.d.ts +24 -0
- package/dist/ThreeD/ThreeDChart.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDChart.js +202 -0
- package/dist/ThreeD/ThreeDContext.d.ts +5 -0
- package/dist/ThreeD/ThreeDContext.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDContext.js +19 -0
- package/dist/ThreeD/ThreeDGrid.d.ts +5 -0
- package/dist/ThreeD/ThreeDGrid.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDGrid.js +55 -0
- package/dist/ThreeD/ThreeDScatter.d.ts +7 -0
- package/dist/ThreeD/ThreeDScatter.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDScatter.js +57 -0
- package/dist/ThreeD/ThreeDScatterGL.d.ts +7 -0
- package/dist/ThreeD/ThreeDScatterGL.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDScatterGL.js +243 -0
- package/dist/ThreeD/ThreeDSurface.d.ts +15 -0
- package/dist/ThreeD/ThreeDSurface.d.ts.map +1 -0
- package/dist/ThreeD/ThreeDSurface.js +97 -0
- package/dist/ThreeD/index.d.ts +10 -0
- package/dist/ThreeD/index.d.ts.map +1 -0
- package/dist/ThreeD/index.js +10 -0
- package/dist/ThreeD/types.d.ts +57 -0
- package/dist/ThreeD/types.d.ts.map +1 -0
- package/dist/ThreeD/types.js +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/lab.css +423 -0
- package/package.json +69 -4
- package/src/Chart/Chart.tsx +312 -0
- package/src/Chart/ChartArea.doc.mjs +16 -0
- package/src/Chart/ChartArea.tsx +91 -0
- package/src/Chart/ChartAxis.tsx +186 -0
- package/src/Chart/ChartBar.doc.mjs +16 -0
- package/src/Chart/ChartBar.tsx +71 -0
- package/src/Chart/ChartBrush.tsx +237 -0
- package/src/Chart/ChartCandlestick.doc.mjs +16 -0
- package/src/Chart/ChartCandlestick.tsx +186 -0
- package/src/Chart/ChartContext.ts +23 -0
- package/src/Chart/ChartDot.doc.mjs +16 -0
- package/src/Chart/ChartDot.tsx +44 -0
- package/src/Chart/ChartDotGL.doc.mjs +16 -0
- package/src/Chart/ChartDotGL.tsx +151 -0
- package/src/Chart/ChartDotGLInteractive.doc.mjs +16 -0
- package/src/Chart/ChartDotGLInteractive.tsx +519 -0
- package/src/Chart/ChartErrorBar.tsx +84 -0
- package/src/Chart/ChartGrid.tsx +86 -0
- package/src/Chart/ChartHeatmapGL.doc.mjs +16 -0
- package/src/Chart/ChartHeatmapGL.tsx +219 -0
- package/src/Chart/ChartLegend.tsx +181 -0
- package/src/Chart/ChartLine.doc.mjs +16 -0
- package/src/Chart/ChartLine.tsx +70 -0
- package/src/Chart/ChartReferenceLine.tsx +76 -0
- package/src/Chart/ChartSelect.tsx +111 -0
- package/src/Chart/ChartStreamGL.doc.mjs +16 -0
- package/src/Chart/ChartStreamGL.tsx +189 -0
- package/src/Chart/ChartTooltip.tsx +451 -0
- package/src/Chart/ChartZoom.tsx +400 -0
- package/src/Chart/formatters.ts +95 -0
- package/src/Chart/getChartColors.ts +249 -0
- package/src/Chart/index.ts +90 -0
- package/src/Chart/m4.test.ts +66 -0
- package/src/Chart/m4.ts +128 -0
- package/src/Chart/types.ts +64 -0
- package/src/Chart/useChartColors.ts +34 -0
- package/src/Chart/useChartRange.test.ts +101 -0
- package/src/Chart/useChartRange.ts +146 -0
- package/src/Chart/utils.ts +31 -0
- package/src/Chart/webgl.ts +192 -0
- package/src/ChartV2/Chart.tsx +348 -0
- package/src/ChartV2/ChartAxis.tsx +209 -0
- package/src/ChartV2/ChartGrid.tsx +99 -0
- package/src/ChartV2/ChartLegend.tsx +69 -0
- package/src/ChartV2/ChartSwatch.doc.mjs +17 -0
- package/src/ChartV2/ChartSwatch.tsx +86 -0
- package/src/ChartV2/ChartTooltip.tsx +382 -0
- package/src/ChartV2/ChartV2.doc.mjs +16 -0
- package/src/ChartV2/ChartV2Context.ts +15 -0
- package/src/ChartV2/index.ts +62 -0
- package/src/ChartV2/layout.ts +223 -0
- package/src/ChartV2/legend.ts +32 -0
- package/src/ChartV2/marks/area.tsx +122 -0
- package/src/ChartV2/marks/band.tsx +70 -0
- package/src/ChartV2/marks/bar.tsx +159 -0
- package/src/ChartV2/marks/candlestick.tsx +106 -0
- package/src/ChartV2/marks/dot.tsx +64 -0
- package/src/ChartV2/marks/dotGL.tsx +202 -0
- package/src/ChartV2/marks/dotGLInteractive.tsx +546 -0
- package/src/ChartV2/marks/errorBar.tsx +89 -0
- package/src/ChartV2/marks/heatmapGL.tsx +299 -0
- package/src/ChartV2/marks/index.ts +14 -0
- package/src/ChartV2/marks/line.tsx +94 -0
- package/src/ChartV2/marks/referenceLine.tsx +224 -0
- package/src/ChartV2/marks/streamGL.tsx +251 -0
- package/src/ChartV2/tooltip.ts +70 -0
- package/src/ChartV2/types.ts +129 -0
- package/src/ChatReasoning/ChatReasoning.doc.mjs +16 -0
- package/src/ChatReasoning/ChatReasoning.test.tsx +56 -0
- package/src/ChatReasoning/ChatReasoning.tsx +322 -0
- package/src/CircularProgress/CircularProgress.doc.mjs +174 -0
- package/src/CircularProgress/CircularProgress.test.tsx +157 -0
- package/src/CircularProgress/CircularProgress.tsx +373 -0
- package/src/CircularProgress/index.ts +15 -0
- package/src/CodeBlock/index.ts +10 -0
- package/src/CodeEditor/CodeEditor.doc.mjs +16 -0
- package/src/CodeEditor/CodeEditor.tsx +466 -0
- package/src/CodeEditor/index.ts +8 -0
- package/src/Radial/RadialArea.tsx +103 -0
- package/src/Radial/RadialAxis.tsx +60 -0
- package/src/Radial/RadialChart.doc.mjs +16 -0
- package/src/Radial/RadialChart.tsx +219 -0
- package/src/Radial/RadialContext.ts +22 -0
- package/src/Radial/RadialGrid.tsx +81 -0
- package/src/Radial/RadialSlice.tsx +130 -0
- package/src/Radial/RadialTooltip.tsx +347 -0
- package/src/Radial/index.ts +14 -0
- package/src/Radial/types.ts +46 -0
- package/src/SVGIcon/SVGIcon.doc.mjs +16 -0
- package/src/SVGIcon/SVGIcon.tsx +406 -0
- package/src/SVGIcon/icons.ts +283 -0
- package/src/SVGIcon/index.ts +73 -0
- package/src/SVGIcon/pathTransforms.ts +612 -0
- package/src/SVGIcon/tokens.stylex.ts +53 -0
- package/src/SVGIcon/variations.stylex.ts +122 -0
- package/src/SVGIcon/xif-examples.ts +191 -0
- package/src/SVGIcon/xif-types.ts +181 -0
- package/src/Sankey/SankeyChart.doc.mjs +16 -0
- package/src/Sankey/SankeyChart.tsx +220 -0
- package/src/Sankey/SankeyContext.ts +23 -0
- package/src/Sankey/SankeyGrid.tsx +69 -0
- package/src/Sankey/SankeyLabel.tsx +234 -0
- package/src/Sankey/SankeyLink.tsx +167 -0
- package/src/Sankey/SankeyNode.tsx +66 -0
- package/src/Sankey/index.ts +22 -0
- package/src/Sankey/layout.ts +219 -0
- package/src/Sankey/types.ts +93 -0
- package/src/Schedule/CalendarEvent.ts +74 -0
- package/src/Schedule/DayView.tsx +112 -0
- package/src/Schedule/ListView.tsx +236 -0
- package/src/Schedule/MonthlyView.tsx +401 -0
- package/src/Schedule/Schedule.doc.mjs +16 -0
- package/src/Schedule/Schedule.test.tsx +405 -0
- package/src/Schedule/Schedule.tsx +307 -0
- package/src/Schedule/TimeGridView.tsx +589 -0
- package/src/Schedule/WeeklyView.tsx +130 -0
- package/src/Schedule/context.tsx +49 -0
- package/src/Schedule/dateMath.ts +112 -0
- package/src/Schedule/index.ts +61 -0
- package/src/Schedule/plugins/PaginationPlugin.tsx +98 -0
- package/src/Schedule/plugins/ViewSelectorPlugin.tsx +128 -0
- package/src/Schedule/plugins/index.tsx +20 -0
- package/src/Schedule/shared.tsx +1304 -0
- package/src/Schedule/types.ts +86 -0
- package/src/Schedule/useCurrentTime.ts +50 -0
- package/src/Schedule/zonedDateTime.ts +71 -0
- package/src/Stepper/Step.doc.mjs +17 -0
- package/src/Stepper/Step.tsx +756 -0
- package/src/Stepper/StepStatus.ts +26 -0
- package/src/Stepper/Stepper.doc.mjs +265 -0
- package/src/Stepper/Stepper.test.tsx +281 -0
- package/src/Stepper/Stepper.tsx +157 -0
- package/src/Stepper/StepperContext.ts +43 -0
- package/src/Stepper/index.ts +14 -0
- package/src/ThreeD/3DBar.doc.mjs +16 -0
- package/src/ThreeD/3DChart.doc.mjs +16 -0
- package/src/ThreeD/3DScatter.doc.mjs +16 -0
- package/src/ThreeD/3DScatterGL.doc.mjs +16 -0
- package/src/ThreeD/3DSurface.doc.mjs +16 -0
- package/src/ThreeD/ThreeDAxis.tsx +86 -0
- package/src/ThreeD/ThreeDBar.tsx +130 -0
- package/src/ThreeD/ThreeDChart.tsx +262 -0
- package/src/ThreeD/ThreeDContext.ts +22 -0
- package/src/ThreeD/ThreeDGrid.tsx +68 -0
- package/src/ThreeD/ThreeDScatter.tsx +63 -0
- package/src/ThreeD/ThreeDScatterGL.tsx +270 -0
- package/src/ThreeD/ThreeDSurface.tsx +142 -0
- package/src/ThreeD/index.ts +11 -0
- package/src/ThreeD/projection.test.ts +132 -0
- package/src/ThreeD/types.ts +62 -0
- package/src/index.ts +250 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ChartGridProps {
|
|
2
|
+
/** Show horizontal grid lines. Default: `true`. */
|
|
3
|
+
horizontal?: boolean;
|
|
4
|
+
/** Show vertical grid lines. Default: `false`. */
|
|
5
|
+
vertical?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Grid lines behind chart marks.
|
|
9
|
+
*
|
|
10
|
+
* Pair with `<ChartAxis>` so users always see an axis line beside the
|
|
11
|
+
* grid — the components are designed to be used together.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```
|
|
15
|
+
* <ChartGrid /> // horizontal grid lines (default)
|
|
16
|
+
* <ChartGrid horizontal vertical />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function ChartGrid({ horizontal, vertical, }: ChartGridProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=ChartGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartGrid.d.ts","sourceRoot":"","sources":["../../src/ChartV2/ChartGrid.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EACxB,UAAiB,EACjB,QAAgB,GACjB,EAAE,cAAc,+BAsDhB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file ChartGrid.tsx (v2)
|
|
5
|
+
* @output Grid lines behind chart marks
|
|
6
|
+
* @position Child of Chart v2; reads scales from chart context
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import * as stylex from '@stylexjs/stylex';
|
|
11
|
+
import '@astryxdesign/core/theme/tokens.stylex';
|
|
12
|
+
import { colorVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
13
|
+
import { useChart } from "../Chart/ChartContext.js";
|
|
14
|
+
import { isBandScale } from "../Chart/utils.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
/**
|
|
17
|
+
* Grid lines behind chart marks.
|
|
18
|
+
*
|
|
19
|
+
* Pair with `<ChartAxis>` so users always see an axis line beside the
|
|
20
|
+
* grid — the components are designed to be used together.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```
|
|
24
|
+
* <ChartGrid /> // horizontal grid lines (default)
|
|
25
|
+
* <ChartGrid horizontal vertical />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function ChartGrid({
|
|
29
|
+
horizontal = true,
|
|
30
|
+
vertical = false
|
|
31
|
+
}) {
|
|
32
|
+
const {
|
|
33
|
+
width,
|
|
34
|
+
height,
|
|
35
|
+
xScale,
|
|
36
|
+
yScale
|
|
37
|
+
} = useChart();
|
|
38
|
+
|
|
39
|
+
// Skip the y=0 line when emphasizing it via the axis. Without this we'd
|
|
40
|
+
// double-draw on top of the axis line.
|
|
41
|
+
const hLines = useMemo(() => {
|
|
42
|
+
if (!horizontal) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return yScale.ticks(5).filter(tick => tick !== 0).map(tick => yScale(tick));
|
|
46
|
+
}, [horizontal, yScale]);
|
|
47
|
+
const vLines = useMemo(() => {
|
|
48
|
+
if (!vertical) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
if (isBandScale(xScale)) {
|
|
52
|
+
return xScale.domain().map(d => (xScale(d) ?? 0) + xScale.bandwidth() / 2);
|
|
53
|
+
}
|
|
54
|
+
const linear = xScale;
|
|
55
|
+
return linear.ticks(5).map(d => linear(d));
|
|
56
|
+
}, [vertical, xScale]);
|
|
57
|
+
return /*#__PURE__*/_jsxs("g", {
|
|
58
|
+
children: [hLines.map(y => /*#__PURE__*/_jsx("line", {
|
|
59
|
+
x1: 0,
|
|
60
|
+
x2: width,
|
|
61
|
+
y1: y,
|
|
62
|
+
y2: y,
|
|
63
|
+
...{
|
|
64
|
+
className: "x113i6qz xnpr05h"
|
|
65
|
+
}
|
|
66
|
+
}, `h-${y}`)), vLines.map(x => /*#__PURE__*/_jsx("line", {
|
|
67
|
+
x1: x,
|
|
68
|
+
x2: x,
|
|
69
|
+
y1: 0,
|
|
70
|
+
y2: height,
|
|
71
|
+
...{
|
|
72
|
+
className: "x113i6qz xnpr05h"
|
|
73
|
+
}
|
|
74
|
+
}, `v-${x}`))]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LegendItem } from './legend';
|
|
2
|
+
export type { LegendItem };
|
|
3
|
+
export type LegendPosition = 'top' | 'bottom' | 'start' | 'end';
|
|
4
|
+
export type LegendAlignment = 'start' | 'center' | 'end';
|
|
5
|
+
export interface ChartLegendProps {
|
|
6
|
+
/** Legend items to display */
|
|
7
|
+
items?: LegendItem[];
|
|
8
|
+
/** Position of the legend relative to the chart. Default: 'bottom' */
|
|
9
|
+
position?: LegendPosition;
|
|
10
|
+
/** Alignment of the legend within its position. Default: 'start' */
|
|
11
|
+
alignment?: LegendAlignment;
|
|
12
|
+
}
|
|
13
|
+
export declare function ChartLegend({ items, position, alignment, }: ChartLegendProps): import("react").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=ChartLegend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../src/ChartV2/ChartLegend.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEzC,YAAY,EAAC,UAAU,EAAC,CAAC;AAEzB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,oEAAoE;IACpE,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAU,EACV,QAAmB,EACnB,SAAmB,GACpB,EAAE,gBAAgB,sCA8BlB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file ChartLegend.tsx
|
|
5
|
+
* @output Standalone chart legend component
|
|
6
|
+
* @position Can be used inside Chart via the `legend` prop, or independently
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Via Chart
|
|
10
|
+
* <Chart legend={{position: 'top', alignment: 'start'}} ... />
|
|
11
|
+
*
|
|
12
|
+
* // Standalone
|
|
13
|
+
* <ChartLegend items={[{label: 'Revenue', color: '#3b82f6'}]} />
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { Text } from '@astryxdesign/core';
|
|
17
|
+
import { VStack, HStack } from '@astryxdesign/core';
|
|
18
|
+
import { ChartSwatch, swatchVariantForType } from "./ChartSwatch.js";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
export function ChartLegend({
|
|
21
|
+
items = [],
|
|
22
|
+
position = 'bottom',
|
|
23
|
+
alignment = 'start'
|
|
24
|
+
}) {
|
|
25
|
+
if (items.length === 0) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const isVertical = position === 'start' || position === 'end';
|
|
29
|
+
const legendItems = items.map(item => /*#__PURE__*/_jsxs(HStack, {
|
|
30
|
+
gap: 2,
|
|
31
|
+
vAlign: "center",
|
|
32
|
+
children: [/*#__PURE__*/_jsx(ChartSwatch, {
|
|
33
|
+
color: item.color,
|
|
34
|
+
variant: swatchVariantForType(item.type)
|
|
35
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
36
|
+
type: "supporting",
|
|
37
|
+
children: item.label
|
|
38
|
+
})]
|
|
39
|
+
}, item.label));
|
|
40
|
+
if (isVertical) {
|
|
41
|
+
return /*#__PURE__*/_jsx(VStack, {
|
|
42
|
+
gap: 2,
|
|
43
|
+
hAlign: alignment,
|
|
44
|
+
children: legendItems
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return /*#__PURE__*/_jsx(HStack, {
|
|
48
|
+
gap: 4,
|
|
49
|
+
justify: alignment,
|
|
50
|
+
vAlign: "center",
|
|
51
|
+
wrap: "wrap",
|
|
52
|
+
children: legendItems
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visual variant — drives shape.
|
|
3
|
+
* - `'square'` — square chip (bar series)
|
|
4
|
+
* - `'line'` — short stroke (line, dot, area, and other non-bar series)
|
|
5
|
+
*/
|
|
6
|
+
export type ChartSwatchVariant = 'square' | 'line';
|
|
7
|
+
export interface ChartSwatchProps {
|
|
8
|
+
/** Fill color — typically a series color token */
|
|
9
|
+
color: string;
|
|
10
|
+
/** Visual variant. Default: `'square'`. */
|
|
11
|
+
variant?: ChartSwatchVariant;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Color swatch primitive.
|
|
15
|
+
*
|
|
16
|
+
* Used by ChartLegend (and ChartTooltip) to render the colored
|
|
17
|
+
* indicator next to a series label. Exported as a primitive so consumers
|
|
18
|
+
* can build their own custom legend/tooltip layouts while keeping visuals
|
|
19
|
+
* consistent.
|
|
20
|
+
*/
|
|
21
|
+
declare function ChartSwatchImpl({ color, variant }: ChartSwatchProps): import("react").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Memoized — swatches are static for a given (color, variant) tuple
|
|
24
|
+
* and can render many times in a tooltip/legend with several series.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ChartSwatch: import("react").MemoExoticComponent<typeof ChartSwatchImpl>;
|
|
27
|
+
/**
|
|
28
|
+
* Map a SeriesDef.type string to its swatch variant.
|
|
29
|
+
*
|
|
30
|
+
* Bar series get a square chip; everything else (line, dot, area, and any
|
|
31
|
+
* other non-bar mark) gets a short stroke. Centralized so legend, tooltip,
|
|
32
|
+
* and any custom chrome stay consistent.
|
|
33
|
+
*/
|
|
34
|
+
export declare function swatchVariantForType(type: string | undefined): ChartSwatchVariant;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=ChartSwatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartSwatch.d.ts","sourceRoot":"","sources":["../../src/ChartV2/ChartSwatch.tsx"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAmBD;;;;;;;GAOG;AACH,iBAAS,eAAe,CAAC,EAAC,KAAK,EAAE,OAAkB,EAAC,EAAE,gBAAgB,+BAQrE;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,6DAAwB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,kBAAkB,CAEpB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file ChartSwatch.tsx
|
|
5
|
+
* @output Color swatch primitive for legends, tooltips, and standalone use
|
|
6
|
+
* @position Composable primitive — used by ChartLegend (and future
|
|
7
|
+
* ChartTooltip), or independently anywhere a series indicator
|
|
8
|
+
* is needed.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* <ChartSwatch color="#3b82f6" variant="square" />
|
|
13
|
+
* <ChartSwatch color="#f59e0b" variant="line" />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { memo } from 'react';
|
|
18
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Visual variant — drives shape.
|
|
22
|
+
* - `'square'` — square chip (bar series)
|
|
23
|
+
* - `'line'` — short stroke (line, dot, area, and other non-bar series)
|
|
24
|
+
*/
|
|
25
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
+
const styles = {
|
|
27
|
+
base: {
|
|
28
|
+
kmuXW: "x2lah0s",
|
|
29
|
+
$$css: true
|
|
30
|
+
},
|
|
31
|
+
square: {
|
|
32
|
+
kzqmXN: "x1xc55vz",
|
|
33
|
+
kZKoxP: "xdk7pt",
|
|
34
|
+
kaIpWk: "x1cum3z5",
|
|
35
|
+
kUOVxO: "xckhbgb",
|
|
36
|
+
$$css: true
|
|
37
|
+
},
|
|
38
|
+
line: {
|
|
39
|
+
kzqmXN: "x1fsd2vl",
|
|
40
|
+
kZKoxP: "xuoj239",
|
|
41
|
+
kaIpWk: "xbvija",
|
|
42
|
+
$$css: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Color swatch primitive.
|
|
48
|
+
*
|
|
49
|
+
* Used by ChartLegend (and ChartTooltip) to render the colored
|
|
50
|
+
* indicator next to a series label. Exported as a primitive so consumers
|
|
51
|
+
* can build their own custom legend/tooltip layouts while keeping visuals
|
|
52
|
+
* consistent.
|
|
53
|
+
*/
|
|
54
|
+
function ChartSwatchImpl({
|
|
55
|
+
color,
|
|
56
|
+
variant = 'square'
|
|
57
|
+
}) {
|
|
58
|
+
return /*#__PURE__*/_jsx("div", {
|
|
59
|
+
"aria-hidden": true,
|
|
60
|
+
...stylex.props(styles.base, styles[variant]),
|
|
61
|
+
style: {
|
|
62
|
+
backgroundColor: color
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Memoized — swatches are static for a given (color, variant) tuple
|
|
69
|
+
* and can render many times in a tooltip/legend with several series.
|
|
70
|
+
*/
|
|
71
|
+
export const ChartSwatch = /*#__PURE__*/memo(ChartSwatchImpl);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Map a SeriesDef.type string to its swatch variant.
|
|
75
|
+
*
|
|
76
|
+
* Bar series get a square chip; everything else (line, dot, area, and any
|
|
77
|
+
* other non-bar mark) gets a short stroke. Centralized so legend, tooltip,
|
|
78
|
+
* and any custom chrome stay consistent.
|
|
79
|
+
*/
|
|
80
|
+
export function swatchVariantForType(type) {
|
|
81
|
+
return type === 'bar' ? 'square' : 'line';
|
|
82
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TooltipSeriesValue } from './tooltip';
|
|
3
|
+
import type { SeriesDef } from './types';
|
|
4
|
+
export type ChartTooltipPlacement = 'auto' | 'right' | 'left' | 'top';
|
|
5
|
+
export interface ChartTooltipProps {
|
|
6
|
+
/**
|
|
7
|
+
* Series definitions — used to map the hovered datum to per-series rows.
|
|
8
|
+
* When rendered via `<Chart tooltip />`, Chart injects this automatically.
|
|
9
|
+
* When composing directly, pass the same `series` array you gave Chart.
|
|
10
|
+
*/
|
|
11
|
+
series?: readonly SeriesDef[];
|
|
12
|
+
/**
|
|
13
|
+
* Custom render function. Receives the x-value and one row per visible series.
|
|
14
|
+
* Returning `null` hides the card while still rendering the band highlight + dots.
|
|
15
|
+
*/
|
|
16
|
+
render?: (xValue: unknown, seriesValues: TooltipSeriesValue[]) => ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to draw a hover indicator at the focused x-position.
|
|
19
|
+
* Picks the right shape automatically:
|
|
20
|
+
* - **band-highlight rect** when the chart includes bar series on a band scale
|
|
21
|
+
* - **vertical crosshair line** for line / area / dot charts
|
|
22
|
+
*
|
|
23
|
+
* Default: `true`.
|
|
24
|
+
*/
|
|
25
|
+
hoverIndicator?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to draw a hover dot at each series' point (skipped for bars).
|
|
28
|
+
* Default: `true`.
|
|
29
|
+
*/
|
|
30
|
+
showHoverDots?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Card placement relative to the hovered point:
|
|
33
|
+
* - `'auto'` (default): right of the point, flips to left if it would overflow
|
|
34
|
+
* - `'right'` / `'left'` / `'top'`: pinned position
|
|
35
|
+
*/
|
|
36
|
+
placement?: ChartTooltipPlacement;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Composable grouped tooltip for Chart.
|
|
40
|
+
*
|
|
41
|
+
* Subscribes to the chart's pointer event stream and only re-renders when the
|
|
42
|
+
* hovered data index changes (not on every pointer move). Card position is
|
|
43
|
+
* updated imperatively via a ref to keep pointer-move cost ~free.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ChartTooltip({ series, render, hoverIndicator, showHoverDots, placement, }: ChartTooltipProps): import("react").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=ChartTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../src/ChartV2/ChartTooltip.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAC,SAAS,EAAoB,MAAM,SAAS,CAAC;AAG1D,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,KAAK,SAAS,CAAC;IAC5E;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AA2DD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAW,EACX,MAAM,EACN,cAAqB,EACrB,aAAoB,EACpB,SAAkB,GACnB,EAAE,iBAAiB,+BA4NnB"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file ChartTooltip.tsx
|
|
5
|
+
* @output Grouped chart tooltip — shows all series values at the hovered x-position.
|
|
6
|
+
* Composable: drop into `<Chart tooltip>` or render directly inside a chart
|
|
7
|
+
* to take full control of props.
|
|
8
|
+
* @position Reads from ChartV2Context — must render inside an <Chart>.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* // Default — declarative on Chart
|
|
13
|
+
* <Chart tooltip />
|
|
14
|
+
*
|
|
15
|
+
* // Custom render function via Chart prop
|
|
16
|
+
* <Chart tooltip={{render: (x, rows) => <MyCard x={x} rows={rows} />}} />
|
|
17
|
+
*
|
|
18
|
+
* // Composable — drop into the chart's children for full control
|
|
19
|
+
* <Chart>
|
|
20
|
+
* <ChartTooltip hoverIndicator={false} placement="top" />
|
|
21
|
+
* </Chart>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
'use client';
|
|
26
|
+
|
|
27
|
+
import { memo, useState, useEffect, useMemo, useRef, useCallback } from 'react';
|
|
28
|
+
import { createPortal } from 'react-dom';
|
|
29
|
+
import * as stylex from '@stylexjs/stylex';
|
|
30
|
+
import '@astryxdesign/core/theme/tokens.stylex';
|
|
31
|
+
import { colorVars, radiusVars, shadowVars, spacingVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
32
|
+
import { Text } from '@astryxdesign/core';
|
|
33
|
+
import { VStack, HStack } from '@astryxdesign/core';
|
|
34
|
+
import { useChartV2 } from "./ChartV2Context.js";
|
|
35
|
+
import { ChartSwatch, swatchVariantForType } from "./ChartSwatch.js";
|
|
36
|
+
import { deriveTooltipSeriesValues, shouldRenderHoverDot } from "./tooltip.js";
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
38
|
+
/** Default tooltip body — used when `render` is not provided. */
|
|
39
|
+
const DefaultTooltipContent = /*#__PURE__*/memo(function DefaultTooltipContent({
|
|
40
|
+
xValue,
|
|
41
|
+
rows
|
|
42
|
+
}) {
|
|
43
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
44
|
+
gap: 1,
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
46
|
+
type: "body",
|
|
47
|
+
weight: "semibold",
|
|
48
|
+
children: String(xValue)
|
|
49
|
+
}), rows.length === 1 ? /*#__PURE__*/_jsx(Text, {
|
|
50
|
+
type: "supporting",
|
|
51
|
+
children: String(rows[0].value)
|
|
52
|
+
}) : /*#__PURE__*/_jsx(VStack, {
|
|
53
|
+
gap: 1,
|
|
54
|
+
children: rows.map(row => /*#__PURE__*/_jsxs(HStack, {
|
|
55
|
+
gap: 2,
|
|
56
|
+
vAlign: "center",
|
|
57
|
+
children: [/*#__PURE__*/_jsx(ChartSwatch, {
|
|
58
|
+
color: row.color,
|
|
59
|
+
variant: swatchVariantForType(row.type)
|
|
60
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
61
|
+
type: "supporting",
|
|
62
|
+
children: row.label
|
|
63
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
64
|
+
type: "supporting",
|
|
65
|
+
weight: "semibold",
|
|
66
|
+
children: String(row.value)
|
|
67
|
+
})]
|
|
68
|
+
}, row.key))
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Composable grouped tooltip for Chart.
|
|
75
|
+
*
|
|
76
|
+
* Subscribes to the chart's pointer event stream and only re-renders when the
|
|
77
|
+
* hovered data index changes (not on every pointer move). Card position is
|
|
78
|
+
* updated imperatively via a ref to keep pointer-move cost ~free.
|
|
79
|
+
*/
|
|
80
|
+
export function ChartTooltip({
|
|
81
|
+
series = [],
|
|
82
|
+
render,
|
|
83
|
+
hoverIndicator = true,
|
|
84
|
+
showHoverDots = true,
|
|
85
|
+
placement = 'auto'
|
|
86
|
+
}) {
|
|
87
|
+
const {
|
|
88
|
+
data,
|
|
89
|
+
xKey,
|
|
90
|
+
resolved,
|
|
91
|
+
onPointer,
|
|
92
|
+
svgRef,
|
|
93
|
+
margin,
|
|
94
|
+
xScale,
|
|
95
|
+
width,
|
|
96
|
+
height
|
|
97
|
+
} = useChartV2();
|
|
98
|
+
const [hoveredIndex, setHoveredIndex] = useState(null);
|
|
99
|
+
const cardRef = useRef(null);
|
|
100
|
+
|
|
101
|
+
// Stable Set of resolved series keys — used by deriveTooltipSeriesValues.
|
|
102
|
+
// Recomputed only when the resolved map identity changes (per layout pass).
|
|
103
|
+
const resolvedKeys = useMemo(() => new Set(resolved.keys()), [resolved]);
|
|
104
|
+
|
|
105
|
+
// ─── Card positioning ──────────────────────────────────────────────────
|
|
106
|
+
// Imperative — the card is portaled, and we don't want pointer-move to
|
|
107
|
+
// trigger React renders.
|
|
108
|
+
const positionCard = useCallback(e => {
|
|
109
|
+
const card = cardRef.current;
|
|
110
|
+
const svg = svgRef.current;
|
|
111
|
+
if (!card) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (!svg || !e.nearest) {
|
|
115
|
+
card.style.display = 'none';
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const svgRect = svg.getBoundingClientRect();
|
|
119
|
+
const screenX = svgRect.left + margin.left + e.nearest.px;
|
|
120
|
+
const screenY = svgRect.top + margin.top;
|
|
121
|
+
const cardWidth = card.offsetWidth;
|
|
122
|
+
const cardHeight = card.offsetHeight;
|
|
123
|
+
const viewportWidth = window.innerWidth;
|
|
124
|
+
const gap = 8;
|
|
125
|
+
let x;
|
|
126
|
+
let y = screenY;
|
|
127
|
+
switch (placement) {
|
|
128
|
+
case 'left':
|
|
129
|
+
x = screenX - cardWidth - gap;
|
|
130
|
+
break;
|
|
131
|
+
case 'right':
|
|
132
|
+
x = screenX + gap;
|
|
133
|
+
break;
|
|
134
|
+
case 'top':
|
|
135
|
+
x = screenX - cardWidth / 2;
|
|
136
|
+
y = screenY - cardHeight - gap;
|
|
137
|
+
break;
|
|
138
|
+
case 'auto':
|
|
139
|
+
default:
|
|
140
|
+
{
|
|
141
|
+
const rightX = screenX + gap;
|
|
142
|
+
x = rightX + cardWidth > viewportWidth ? screenX - cardWidth - gap : rightX;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
card.style.left = `${x}px`;
|
|
146
|
+
card.style.top = `${y}px`;
|
|
147
|
+
card.style.display = 'block';
|
|
148
|
+
}, [svgRef, margin, placement]);
|
|
149
|
+
|
|
150
|
+
// ─── Subscribe to pointer events ───────────────────────────────────────
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
let currentIndex = null;
|
|
153
|
+
const unsub = onPointer(e => {
|
|
154
|
+
const newIndex = e.nearest?.dataIndex ?? null;
|
|
155
|
+
if (newIndex !== currentIndex) {
|
|
156
|
+
currentIndex = newIndex;
|
|
157
|
+
setHoveredIndex(newIndex);
|
|
158
|
+
}
|
|
159
|
+
positionCard(e);
|
|
160
|
+
});
|
|
161
|
+
return unsub;
|
|
162
|
+
}, [onPointer, positionCard]);
|
|
163
|
+
|
|
164
|
+
// ─── Derived data ──────────────────────────────────────────────────────
|
|
165
|
+
const datum = hoveredIndex != null ? data[hoveredIndex] : undefined;
|
|
166
|
+
const xValue = datum?.[xKey];
|
|
167
|
+
const seriesValues = useMemo(() => deriveTooltipSeriesValues(series, datum, resolvedKeys), [series, datum, resolvedKeys]);
|
|
168
|
+
|
|
169
|
+
// Hover dots — read from the resolved map at the hovered index.
|
|
170
|
+
const dots = useMemo(() => {
|
|
171
|
+
if (!showHoverDots || hoveredIndex == null) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
const elements = [];
|
|
175
|
+
for (const s of series) {
|
|
176
|
+
if (!shouldRenderHoverDot(s.type)) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const points = resolved.get(s.key);
|
|
180
|
+
const point = points?.find(p => p.dataIndex === hoveredIndex);
|
|
181
|
+
if (!point) {
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
elements.push(/*#__PURE__*/_jsx("circle", {
|
|
185
|
+
cx: point.px,
|
|
186
|
+
cy: point.py,
|
|
187
|
+
r: 4,
|
|
188
|
+
fill: "var(--color-background-surface)",
|
|
189
|
+
stroke: s.color ?? 'var(--color-border-emphasized)',
|
|
190
|
+
strokeWidth: 2,
|
|
191
|
+
pointerEvents: "none"
|
|
192
|
+
}, s.key));
|
|
193
|
+
}
|
|
194
|
+
return elements;
|
|
195
|
+
}, [showHoverDots, hoveredIndex, series, resolved]);
|
|
196
|
+
|
|
197
|
+
// Hover indicator — band-highlight rect for bar charts, vertical crosshair
|
|
198
|
+
// line for line/area charts. Same source-of-truth (hoveredIndex), distinct
|
|
199
|
+
// visual idioms picked automatically based on the series mix.
|
|
200
|
+
const hoverIndicatorElement = useMemo(() => {
|
|
201
|
+
if (!hoverIndicator || hoveredIndex == null) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
const xv = data[hoveredIndex]?.[xKey];
|
|
205
|
+
if (xv == null) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
const isBandScale = 'bandwidth' in xScale;
|
|
209
|
+
const hasBars = series.some(s => s.type === 'bar');
|
|
210
|
+
|
|
211
|
+
// Bar charts on a band scale → soft column highlight.
|
|
212
|
+
if (hasBars && isBandScale) {
|
|
213
|
+
const bandScale = xScale;
|
|
214
|
+
const x = bandScale(String(xv)) ?? 0;
|
|
215
|
+
const bw = bandScale.bandwidth();
|
|
216
|
+
const pad = 8;
|
|
217
|
+
const rectX = Math.max(0, x - pad);
|
|
218
|
+
const rectRight = Math.min(width, x + bw + pad);
|
|
219
|
+
const rectWidth = rectRight - rectX;
|
|
220
|
+
const topPad = Math.min(pad, margin.top);
|
|
221
|
+
return /*#__PURE__*/_jsx("rect", {
|
|
222
|
+
x: rectX,
|
|
223
|
+
y: -topPad,
|
|
224
|
+
width: rectWidth,
|
|
225
|
+
height: height + topPad,
|
|
226
|
+
fill: "currentColor",
|
|
227
|
+
opacity: 0.06,
|
|
228
|
+
rx: 4,
|
|
229
|
+
pointerEvents: "none"
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Line / area / dot charts → vertical crosshair through the point.
|
|
234
|
+
const px = isBandScale ? (xScale(String(xv)) ?? 0) + xScale.bandwidth() / 2 : xScale(xv);
|
|
235
|
+
return /*#__PURE__*/_jsx("line", {
|
|
236
|
+
x1: px,
|
|
237
|
+
x2: px,
|
|
238
|
+
y1: 0,
|
|
239
|
+
y2: height,
|
|
240
|
+
...{
|
|
241
|
+
className: "x1lo1t26 xnpr05h"
|
|
242
|
+
},
|
|
243
|
+
pointerEvents: "none"
|
|
244
|
+
});
|
|
245
|
+
}, [hoverIndicator, hoveredIndex, series, xScale, data, xKey, width, height, margin.top]);
|
|
246
|
+
|
|
247
|
+
// ─── Render ────────────────────────────────────────────────────────────
|
|
248
|
+
if (typeof document === 'undefined') {
|
|
249
|
+
// SSR: no DOM portal target; band highlight + dots still render in SVG.
|
|
250
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
251
|
+
children: [hoverIndicatorElement, dots]
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
const cardContent = hoveredIndex == null ? null : render ? render(xValue, seriesValues) : /*#__PURE__*/_jsx(DefaultTooltipContent, {
|
|
255
|
+
xValue: xValue,
|
|
256
|
+
rows: seriesValues
|
|
257
|
+
});
|
|
258
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
259
|
+
children: [hoverIndicatorElement, dots, /*#__PURE__*/createPortal(/*#__PURE__*/_jsx("div", {
|
|
260
|
+
ref: cardRef,
|
|
261
|
+
...{
|
|
262
|
+
className: "xixxii4 x1prclbq x1hviunn xce4md1 xrrkdod x14hfi27 x47corl xuxw1ft x1q2oy4v x1s85apg"
|
|
263
|
+
},
|
|
264
|
+
children: cardContent
|
|
265
|
+
}), document.body)]
|
|
266
|
+
});
|
|
267
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartV2Context.d.ts","sourceRoot":"","sources":["../../src/ChartV2/ChartV2Context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAG5C,eAAO,MAAM,eAAe,iDAAe,CAAC;AAE5C,wBAAgB,UAAU,IAAI,cAAc,CAM3C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
const Ctx = /*#__PURE__*/createContext(null);
|
|
5
|
+
export const ChartV2Provider = Ctx.Provider;
|
|
6
|
+
export function useChartV2() {
|
|
7
|
+
const ctx = useContext(Ctx);
|
|
8
|
+
if (!ctx) {
|
|
9
|
+
throw new Error('Must be used inside <Chart>');
|
|
10
|
+
}
|
|
11
|
+
return ctx;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Chart, type ChartProps } from './Chart';
|
|
2
|
+
export { ChartAxis, type ChartAxisProps } from './ChartAxis';
|
|
3
|
+
export { ChartGrid, type ChartGridProps } from './ChartGrid';
|
|
4
|
+
export { ChartLegend, type ChartLegendProps, type LegendPosition, type LegendAlignment, } from './ChartLegend';
|
|
5
|
+
export { type LegendItem } from './legend';
|
|
6
|
+
export { ChartSwatch, swatchVariantForType, type ChartSwatchProps, type ChartSwatchVariant, } from './ChartSwatch';
|
|
7
|
+
export { ChartTooltip, type ChartTooltipProps, type ChartTooltipPlacement, } from './ChartTooltip';
|
|
8
|
+
export { type TooltipSeriesValue } from './tooltip';
|
|
9
|
+
export { bar, line, dot, area, band, candlestick, errorBar, referenceLine, dotGL, dotGLInteractive, heatmapGL, streamGL, } from './marks';
|
|
10
|
+
export type { BarOptions, LineOptions, DotOptions, AreaOptions, BandOptions, CandlestickOptions, ErrorBarOptions, ReferenceLineOptions, DotGLOptions, DotGLInteractiveOptions, HeatmapGLOptions, StreamGLOptions, StreamGLHandle, } from './marks';
|
|
11
|
+
export { useChartV2 } from './ChartV2Context';
|
|
12
|
+
export type { SeriesDef, ChartV2Context, ChartPointerEvent, ResolvedPoint, ResolvedPositions, SeriesContext, } from './types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ChartV2/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAC,SAAS,EAAE,KAAK,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAC,SAAS,EAAE,KAAK,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,aAAa,EACb,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,YAAY,EACV,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,aAAa,GACd,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
export { Chart } from "./Chart.js";
|
|
4
|
+
export { ChartAxis } from "./ChartAxis.js";
|
|
5
|
+
export { ChartGrid } from "./ChartGrid.js";
|
|
6
|
+
export { ChartLegend } from "./ChartLegend.js";
|
|
7
|
+
export { ChartSwatch, swatchVariantForType } from "./ChartSwatch.js";
|
|
8
|
+
export { ChartTooltip } from "./ChartTooltip.js";
|
|
9
|
+
export { bar, line, dot, area, band, candlestick, errorBar, referenceLine, dotGL, dotGLInteractive, heatmapGL, streamGL } from "./marks/index.js";
|
|
10
|
+
export { useChartV2 } from "./ChartV2Context.js";
|