@octanejs/visx 0.1.4 → 0.1.5
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/package.json +5 -5
- package/src/a11y/components/ChartA11yAnnouncer.tsrx +4 -3
- package/src/a11y/components/ChartA11yAnnouncer.tsrx.d.ts +4 -3
- package/src/annotation/components/Annotation.tsrx +2 -2
- package/src/annotation/components/Annotation.tsrx.d.ts +2 -2
- package/src/annotation/components/EditableAnnotation.tsrx +3 -2
- package/src/annotation/components/EditableAnnotation.tsrx.d.ts +3 -2
- package/src/annotation/components/HtmlLabel.tsrx +3 -2
- package/src/annotation/components/HtmlLabel.tsrx.d.ts +3 -2
- package/src/axis/types.ts +5 -4
- package/src/brush/BaseBrush.tsrx +3 -2
- package/src/brush/BaseBrush.tsrx.d.ts +3 -2
- package/src/brush/Brush.tsrx +3 -2
- package/src/brush/Brush.tsrx.d.ts +3 -2
- package/src/brush/BrushHandle.tsrx +2 -2
- package/src/brush/BrushHandle.tsrx.d.ts +2 -2
- package/src/brush/utils.ts +0 -1
- package/src/chord/Chord.tsrx +2 -2
- package/src/chord/Chord.tsrx.d.ts +2 -2
- package/src/clip-path/clip-paths/ClipPath.tsrx +3 -2
- package/src/clip-path/clip-paths/ClipPath.tsrx.d.ts +3 -2
- package/src/delaunay/components/Polygon.tsrx +3 -2
- package/src/delaunay/components/Polygon.tsrx.d.ts +3 -2
- package/src/drag/Drag.tsrx +2 -2
- package/src/drag/Drag.tsrx.d.ts +2 -2
- package/src/drag/useDrag.tsrx +2 -7
- package/src/drag/useDrag.tsrx.d.ts +0 -1
- package/src/geo/graticule/Graticule.tsrx +3 -2
- package/src/geo/graticule/Graticule.tsrx.d.ts +3 -2
- package/src/geo/projections/Projection.tsrx +5 -4
- package/src/geo/projections/Projection.tsrx.d.ts +5 -4
- package/src/glyph/glyphs/Glyph.tsrx +2 -2
- package/src/glyph/glyphs/Glyph.tsrx.d.ts +2 -2
- package/src/glyph/glyphs/GlyphCircle.tsrx +3 -2
- package/src/glyph/glyphs/GlyphCircle.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphCross.tsrx +3 -2
- package/src/glyph/glyphs/GlyphCross.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphDiamond.tsrx +3 -2
- package/src/glyph/glyphs/GlyphDiamond.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphSquare.tsrx +3 -2
- package/src/glyph/glyphs/GlyphSquare.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphStar.tsrx +3 -2
- package/src/glyph/glyphs/GlyphStar.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphTriangle.tsrx +3 -2
- package/src/glyph/glyphs/GlyphTriangle.tsrx.d.ts +3 -2
- package/src/glyph/glyphs/GlyphWye.tsrx +3 -2
- package/src/glyph/glyphs/GlyphWye.tsrx.d.ts +3 -2
- package/src/gradient/gradients/LinearGradient.tsrx +3 -2
- package/src/gradient/gradients/LinearGradient.tsrx.d.ts +3 -2
- package/src/grid/grids/GridAngle.tsrx +2 -2
- package/src/grid/grids/GridAngle.tsrx.d.ts +2 -2
- package/src/grid/grids/GridColumns.tsrx +2 -2
- package/src/grid/grids/GridColumns.tsrx.d.ts +2 -2
- package/src/grid/grids/GridPolar.tsrx +4 -3
- package/src/grid/grids/GridPolar.tsrx.d.ts +4 -3
- package/src/grid/grids/GridRadial.tsrx +4 -3
- package/src/grid/grids/GridRadial.tsrx.d.ts +4 -3
- package/src/grid/grids/GridRows.tsrx +2 -2
- package/src/grid/grids/GridRows.tsrx.d.ts +2 -2
- package/src/grid/types.ts +3 -2
- package/src/group/Group.tsrx +5 -3
- package/src/group/Group.tsrx.d.ts +5 -3
- package/src/heatmap/heatmaps/HeatmapCircle.tsrx +3 -2
- package/src/heatmap/heatmaps/HeatmapCircle.tsrx.d.ts +3 -2
- package/src/heatmap/heatmaps/HeatmapRect.tsrx +3 -2
- package/src/heatmap/heatmaps/HeatmapRect.tsrx.d.ts +3 -2
- package/src/hierarchy/hierarchies/Cluster.tsrx +3 -2
- package/src/hierarchy/hierarchies/Cluster.tsrx.d.ts +3 -2
- package/src/hierarchy/hierarchies/Pack.tsrx +3 -2
- package/src/hierarchy/hierarchies/Pack.tsrx.d.ts +3 -2
- package/src/hierarchy/hierarchies/Partition.tsrx +3 -2
- package/src/hierarchy/hierarchies/Partition.tsrx.d.ts +3 -2
- package/src/hierarchy/hierarchies/Tree.tsrx +3 -2
- package/src/hierarchy/hierarchies/Tree.tsrx.d.ts +3 -2
- package/src/hierarchy/hierarchies/Treemap.tsrx +3 -2
- package/src/hierarchy/hierarchies/Treemap.tsrx.d.ts +3 -2
- package/src/legend/legends/Legend/LegendItem.tsrx +3 -2
- package/src/legend/legends/Legend/LegendItem.tsrx.d.ts +3 -2
- package/src/legend/legends/Legend/LegendLabel.tsrx +4 -3
- package/src/legend/legends/Legend/LegendLabel.tsrx.d.ts +4 -3
- package/src/legend/legends/Legend/index.tsrx +3 -2
- package/src/legend/legends/Legend/index.tsrx.d.ts +3 -2
- package/src/marker/markers/Marker.tsrx +3 -2
- package/src/marker/markers/Marker.tsrx.d.ts +3 -2
- package/src/pattern/patterns/Pattern.tsrx +2 -2
- package/src/pattern/patterns/Pattern.tsrx.d.ts +2 -2
- package/src/responsive/components/ParentSize.tsrx +10 -4
- package/src/responsive/components/ParentSize.tsrx.d.ts +9 -4
- package/src/responsive/components/ScaleSVG.tsrx +3 -2
- package/src/responsive/components/ScaleSVG.tsrx.d.ts +3 -2
- package/src/sankey/Sankey.tsrx +3 -2
- package/src/sankey/Sankey.tsrx.d.ts +3 -2
- package/src/shape/shapes/Arc.tsrx +3 -2
- package/src/shape/shapes/Arc.tsrx.d.ts +3 -2
- package/src/shape/shapes/BarGroup.tsrx +2 -2
- package/src/shape/shapes/BarGroup.tsrx.d.ts +2 -2
- package/src/shape/shapes/BarGroupHorizontal.tsrx +2 -2
- package/src/shape/shapes/BarGroupHorizontal.tsrx.d.ts +2 -2
- package/src/shape/shapes/BarRounded.tsrx +3 -2
- package/src/shape/shapes/BarRounded.tsrx.d.ts +3 -2
- package/src/shape/shapes/LinePath.tsrx +3 -2
- package/src/shape/shapes/LinePath.tsrx.d.ts +3 -2
- package/src/shape/shapes/LineRadial.tsrx +2 -2
- package/src/shape/shapes/LineRadial.tsrx.d.ts +2 -2
- package/src/shape/shapes/Pie.tsrx +3 -3
- package/src/shape/shapes/Pie.tsrx.d.ts +3 -3
- package/src/shape/shapes/Polygon.tsrx +3 -2
- package/src/shape/shapes/Polygon.tsrx.d.ts +3 -2
- package/src/shape/shapes/SplitLinePath.tsrx +15 -4
- package/src/shape/shapes/SplitLinePath.tsrx.d.ts +14 -4
- package/src/shape/shapes/Stack.tsrx +2 -2
- package/src/shape/shapes/Stack.tsrx.d.ts +2 -2
- package/src/shape/types/area.ts +3 -2
- package/src/shape/types/barStack.ts +2 -2
- package/src/shape/types/base.ts +8 -5
- package/src/shape/types/link.ts +3 -2
- package/src/stats/BoxPlot.tsrx +3 -2
- package/src/stats/BoxPlot.tsrx.d.ts +3 -2
- package/src/stats/ViolinPlot.tsrx +3 -2
- package/src/stats/ViolinPlot.tsrx.d.ts +3 -2
- package/src/theme/provider/ThemeScope.tsrx +3 -2
- package/src/theme/provider/ThemeScope.tsrx.d.ts +3 -2
- package/src/tooltip/Portal.tsrx +2 -2
- package/src/tooltip/Portal.tsrx.d.ts +2 -2
- package/src/tooltip/floating/ChartTooltip.tsrx +3 -2
- package/src/tooltip/floating/ChartTooltip.tsrx.d.ts +3 -2
- package/src/tooltip/floating/ChartTooltipContent.tsrx +13 -12
- package/src/tooltip/floating/ChartTooltipContent.tsrx.d.ts +13 -12
- package/src/tooltip/floating/FloatingTooltip.tsrx.d.ts +1 -1
- package/src/tooltip/floating/context.tsrx +2 -1
- package/src/tooltip/floating/context.tsrx.d.ts +2 -1
- package/src/tooltip/floating/types.ts +4 -3
- package/src/tooltip/tooltips/Tooltip.tsrx +3 -2
- package/src/tooltip/tooltips/Tooltip.tsrx.d.ts +3 -2
- package/src/voronoi/components/VoronoiPolygon.tsrx +3 -2
- package/src/voronoi/components/VoronoiPolygon.tsrx.d.ts +3 -2
- package/src/wordcloud/Wordcloud.tsrx +2 -2
- package/src/wordcloud/Wordcloud.tsrx.d.ts +2 -2
- package/src/xychart/components/Tooltip.tsrx +4 -3
- package/src/xychart/components/Tooltip.tsrx.d.ts +4 -3
- package/src/xychart/components/XYChart.tsrx +3 -2
- package/src/xychart/components/XYChart.tsrx.d.ts +3 -2
- package/src/xychart/components/series/GlyphSeries.tsrx +3 -2
- package/src/xychart/components/series/private/AnimatedGlyphs.tsrx +3 -2
- package/src/xychart/components/series/private/BaseBarGroup.tsrx +3 -2
- package/src/xychart/components/series/private/BaseBarGroup.tsrx.d.ts +3 -2
- package/src/xychart/components/series/private/BaseGlyphSeries.tsrx +2 -2
- package/src/xychart/components/series/private/BaseGlyphSeries.tsrx.d.ts +2 -2
- package/src/xychart/hooks/useStackedData.tsrx +2 -2
- package/src/xychart/hooks/useStackedData.tsrx.d.ts +2 -2
- package/src/xychart/providers/DataProvider.tsrx +2 -2
- package/src/xychart/providers/DataProvider.tsrx.d.ts +2 -2
- package/src/xychart/providers/EventEmitterProvider.tsrx +2 -2
- package/src/xychart/providers/EventEmitterProvider.tsrx.d.ts +2 -2
- package/src/xychart/providers/ThemeProvider.tsrx +2 -2
- package/src/xychart/providers/ThemeProvider.tsrx.d.ts +2 -2
- package/src/xychart/providers/TooltipProvider.tsrx +2 -2
- package/src/xychart/providers/TooltipProvider.tsrx.d.ts +2 -2
- package/src/xychart/utils/collectDataRegistryEntries.ts +2 -2
- package/src/xychart/utils/getChildrenAndGrandchildrenWithProps.ts +6 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'octane';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import cx from 'classnames';
|
|
4
5
|
import { Group } from '@octanejs/visx/group';
|
|
5
6
|
import type { HierarchyNode, HierarchyRectangularNode } from 'd3-hierarchy';
|
|
@@ -12,7 +13,7 @@ export type PartitionProps<Datum> = {
|
|
|
12
13
|
/** The root hierarchy node from which to derive the treemap layout. */
|
|
13
14
|
root: HierarchyNode<Datum>;
|
|
14
15
|
/** Render override function which is passed the computed partition layout data. */
|
|
15
|
-
children?: (pack: HierarchyRectangularNode<Datum>) =>
|
|
16
|
+
children?: (pack: HierarchyRectangularNode<Datum>) => OctaneNode;
|
|
16
17
|
/** top offset applied to the g element container. */
|
|
17
18
|
top?: number;
|
|
18
19
|
/** left offset applied to the g element container. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { HierarchyNode, HierarchyRectangularNode } from 'd3-hierarchy';
|
|
4
5
|
export type NodeComponentProps<Datum> = {
|
|
5
6
|
node: HierarchyRectangularNode<Datum>;
|
|
@@ -8,7 +9,7 @@ export type PartitionProps<Datum> = {
|
|
|
8
9
|
/** The root hierarchy node from which to derive the treemap layout. */
|
|
9
10
|
root: HierarchyNode<Datum>;
|
|
10
11
|
/** Render override function which is passed the computed partition layout data. */
|
|
11
|
-
children?: (pack: HierarchyRectangularNode<Datum>) =>
|
|
12
|
+
children?: (pack: HierarchyRectangularNode<Datum>) => OctaneNode;
|
|
12
13
|
/** top offset applied to the g element container. */
|
|
13
14
|
top?: number;
|
|
14
15
|
/** left offset applied to the g element container. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'octane';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import cx from 'classnames';
|
|
4
5
|
import { Group } from '@octanejs/visx/group';
|
|
5
6
|
import type { HierarchyNode, HierarchyPointNode, HierarchyPointLink } from 'd3-hierarchy';
|
|
@@ -14,7 +15,7 @@ export type TreeProps<Datum> = {
|
|
|
14
15
|
/** The root hierarchy node from which to derive the tree layout. */
|
|
15
16
|
root: HierarchyNode<Datum>;
|
|
16
17
|
/** Render override function which is passed the computed cluster layout data. */
|
|
17
|
-
children?: (pack: HierarchyPointNode<Datum>) =>
|
|
18
|
+
children?: (pack: HierarchyPointNode<Datum>) => OctaneNode;
|
|
18
19
|
/** top offset applied to the g element container. */
|
|
19
20
|
top?: number;
|
|
20
21
|
/** left offset applied to the g element container. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { HierarchyNode, HierarchyPointNode, HierarchyPointLink } from 'd3-hierarchy';
|
|
4
5
|
export type NodeComponentProps<Datum> = {
|
|
5
6
|
node: HierarchyPointNode<Datum>;
|
|
@@ -11,7 +12,7 @@ export type TreeProps<Datum> = {
|
|
|
11
12
|
/** The root hierarchy node from which to derive the tree layout. */
|
|
12
13
|
root: HierarchyNode<Datum>;
|
|
13
14
|
/** Render override function which is passed the computed cluster layout data. */
|
|
14
|
-
children?: (pack: HierarchyPointNode<Datum>) =>
|
|
15
|
+
children?: (pack: HierarchyPointNode<Datum>) => OctaneNode;
|
|
15
16
|
/** top offset applied to the g element container. */
|
|
16
17
|
top?: number;
|
|
17
18
|
/** left offset applied to the g element container. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'octane';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import cx from 'classnames';
|
|
4
5
|
import { Group } from '@octanejs/visx/group';
|
|
5
6
|
import type { HierarchyRectangularNode, HierarchyNode } from 'd3-hierarchy';
|
|
@@ -16,7 +17,7 @@ export type TreemapProps<Datum> = {
|
|
|
16
17
|
/** The root hierarchy node from which to derive the treemap layout. */
|
|
17
18
|
root: HierarchyNode<Datum>;
|
|
18
19
|
/** Render override function which is passed the computed pack layout data. */
|
|
19
|
-
children?: (pack: HierarchyRectangularNode<Datum>) =>
|
|
20
|
+
children?: (pack: HierarchyRectangularNode<Datum>) => OctaneNode;
|
|
20
21
|
/** top offset applied to the g element container. */
|
|
21
22
|
top?: number;
|
|
22
23
|
/** left offset applied to the g element container. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionComponent, ComponentClass } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { HierarchyRectangularNode, HierarchyNode } from 'd3-hierarchy';
|
|
4
5
|
import type { TileMethod } from '../types';
|
|
5
6
|
export type NodeComponentProps<Datum> = {
|
|
@@ -10,7 +11,7 @@ export type TreemapProps<Datum> = {
|
|
|
10
11
|
/** The root hierarchy node from which to derive the treemap layout. */
|
|
11
12
|
root: HierarchyNode<Datum>;
|
|
12
13
|
/** Render override function which is passed the computed pack layout data. */
|
|
13
|
-
children?: (pack: HierarchyRectangularNode<Datum>) =>
|
|
14
|
+
children?: (pack: HierarchyRectangularNode<Datum>) => OctaneNode;
|
|
14
15
|
/** top offset applied to the g element container. */
|
|
15
16
|
top?: number;
|
|
16
17
|
/** left offset applied to the g element container. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTMLProps } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import type { FlexDirection } from '../../types';
|
|
3
4
|
|
|
4
5
|
export type LegendItemProps = {
|
|
@@ -9,7 +10,7 @@ export type LegendItemProps = {
|
|
|
9
10
|
/** Margin around the legend item. */
|
|
10
11
|
margin?: string | number;
|
|
11
12
|
/** Child elements to render inside the legend item (typically LegendShape and LegendLabel). */
|
|
12
|
-
children?:
|
|
13
|
+
children?: OctaneNode;
|
|
13
14
|
/** CSS display property for the legend item. */
|
|
14
15
|
display?: string;
|
|
15
16
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLProps } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { FlexDirection } from '../../types';
|
|
4
5
|
export type LegendItemProps = {
|
|
5
6
|
/** Flex direction for the legend item layout. Determines if the shape and label are arranged horizontally or vertically. */
|
|
@@ -9,7 +10,7 @@ export type LegendItemProps = {
|
|
|
9
10
|
/** Margin around the legend item. */
|
|
10
11
|
margin?: string | number;
|
|
11
12
|
/** Child elements to render inside the legend item (typically LegendShape and LegendLabel). */
|
|
12
|
-
children?:
|
|
13
|
+
children?: OctaneNode;
|
|
13
14
|
/** CSS display property for the legend item. */
|
|
14
15
|
display?: string;
|
|
15
16
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTMLProps } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
|
|
3
4
|
export type LegendLabelOwnProps = {
|
|
4
5
|
/** Horizontal alignment of the label text. Maps to CSS justify-content property. */
|
|
5
6
|
align?: string;
|
|
6
7
|
/** The label content to display. Can be a string or any React node. */
|
|
7
|
-
label?:
|
|
8
|
+
label?: OctaneNode;
|
|
8
9
|
/** CSS flex property controlling how the label grows/shrinks in the legend item. */
|
|
9
10
|
flex?: string | number;
|
|
10
11
|
/** Margin around the label. */
|
|
11
12
|
margin?: string | number;
|
|
12
13
|
/** Child elements to render. If provided, overrides the label prop. */
|
|
13
|
-
children?:
|
|
14
|
+
children?: OctaneNode;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export type LegendLabelProps =
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLProps } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
export type LegendLabelOwnProps = {
|
|
4
5
|
/** Horizontal alignment of the label text. Maps to CSS justify-content property. */
|
|
5
6
|
align?: string;
|
|
6
7
|
/** The label content to display. Can be a string or any React node. */
|
|
7
|
-
label?:
|
|
8
|
+
label?: OctaneNode;
|
|
8
9
|
/** CSS flex property controlling how the label grows/shrinks in the legend item. */
|
|
9
10
|
flex?: string | number;
|
|
10
11
|
/** Margin around the label. */
|
|
11
12
|
margin?: string | number;
|
|
12
13
|
/** Child elements to render. If provided, overrides the label prop. */
|
|
13
|
-
children?:
|
|
14
|
+
children?: OctaneNode;
|
|
14
15
|
};
|
|
15
16
|
export type LegendLabelProps = LegendLabelOwnProps & Omit<HTMLProps<HTMLDivElement>, keyof LegendLabelOwnProps>;
|
|
16
17
|
export default function LegendLabel({ flex, label, margin, align, children, ...restProps }: LegendLabelProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import { createElement } from 'octane';
|
|
3
4
|
import cx from 'classnames';
|
|
4
5
|
import type { AnyD3Scale, ScaleInput } from '@octanejs/visx/scale';
|
|
@@ -18,7 +19,7 @@ import type {
|
|
|
18
19
|
|
|
19
20
|
export type LegendProps<Scale extends AnyD3Scale> = {
|
|
20
21
|
/** Optional render function override. */
|
|
21
|
-
children?: (labels: FormattedLabel<ScaleInput<Scale>, ReturnType<Scale>>[]) =>
|
|
22
|
+
children?: (labels: FormattedLabel<ScaleInput<Scale>, ReturnType<Scale>>[]) => OctaneNode;
|
|
22
23
|
/** Classname to be applied to legend container. */
|
|
23
24
|
className?: string;
|
|
24
25
|
/** Styles to be applied to the legend container. */
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { AnyD3Scale, ScaleInput } from '@octanejs/visx/scale';
|
|
4
5
|
import type { LegendLabelProps } from './LegendLabel.tsrx';
|
|
5
6
|
import type { FlexDirection, FormattedLabel, LabelFormatter, LabelFormatterFactory, LegendShape as LegendShapeType } from '../../types';
|
|
6
7
|
export type LegendProps<Scale extends AnyD3Scale> = {
|
|
7
8
|
/** Optional render function override. */
|
|
8
|
-
children?: (labels: FormattedLabel<ScaleInput<Scale>, ReturnType<Scale>>[]) =>
|
|
9
|
+
children?: (labels: FormattedLabel<ScaleInput<Scale>, ReturnType<Scale>>[]) => OctaneNode;
|
|
9
10
|
/** Classname to be applied to legend container. */
|
|
10
11
|
className?: string;
|
|
11
12
|
/** Styles to be applied to the legend container. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import useStableId from '../../kernel/ids/useStableId.tsrx';
|
|
3
4
|
|
|
4
5
|
export interface Props {
|
|
@@ -19,7 +20,7 @@ export interface Props {
|
|
|
19
20
|
/** The stroke width. constrained to a `number` type due to use in bounding box calculations */
|
|
20
21
|
strokeWidth?: number;
|
|
21
22
|
/** The <marker> contents. Typically one of: `<path>`, `<line>`, `<polyline>`, or `<polygon>` */
|
|
22
|
-
children:
|
|
23
|
+
children: OctaneNode;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export type MarkerProps = Props & Omit<SVGProps<SVGMarkerElement>, keyof Props>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { SVGProps } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
export interface Props {
|
|
4
5
|
/** Unique id for the `<marker>`. Should be unique across all page elements. */
|
|
5
6
|
id?: string;
|
|
@@ -18,7 +19,7 @@ export interface Props {
|
|
|
18
19
|
/** The stroke width. constrained to a `number` type due to use in bounding box calculations */
|
|
19
20
|
strokeWidth?: number;
|
|
20
21
|
/** The <marker> contents. Typically one of: `<path>`, `<line>`, `<polyline>`, or `<polygon>` */
|
|
21
|
-
children:
|
|
22
|
+
children: OctaneNode;
|
|
22
23
|
}
|
|
23
24
|
export type MarkerProps = Props & Omit<SVGProps<SVGMarkerElement>, keyof Props>;
|
|
24
25
|
export type MarkerComponentProps = Omit<MarkerProps, 'children'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OctaneNode } from 'octane';
|
|
2
2
|
import useStableId from '../../kernel/ids/useStableId.tsrx';
|
|
3
3
|
|
|
4
4
|
export type PatternProps = {
|
|
@@ -9,7 +9,7 @@ export type PatternProps = {
|
|
|
9
9
|
/** Height of the pattern. */
|
|
10
10
|
height: number;
|
|
11
11
|
/** Children of pattern element to render. */
|
|
12
|
-
children:
|
|
12
|
+
children: OctaneNode;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export default function Pattern({ id, width, height, children }: PatternProps) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
3
3
|
export type PatternProps = {
|
|
4
4
|
/** Unique id of the pattern element. */
|
|
5
5
|
id?: string;
|
|
@@ -8,6 +8,6 @@ export type PatternProps = {
|
|
|
8
8
|
/** Height of the pattern. */
|
|
9
9
|
height: number;
|
|
10
10
|
/** Children of pattern element to render. */
|
|
11
|
-
children:
|
|
11
|
+
children: OctaneNode;
|
|
12
12
|
};
|
|
13
13
|
export default function Pattern({ id, width, height, children }: PatternProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Octane } from 'octane/jsx-runtime';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
2
4
|
import type { ParentSizeState, UseParentSizeConfig } from '../hooks/useParentSize.tsrx';
|
|
3
5
|
import useParentSize from '../hooks/useParentSize.tsrx';
|
|
4
6
|
|
|
@@ -17,8 +19,8 @@ export type ParentSizeProps = {
|
|
|
17
19
|
* (`width: 100%; height: 100%; position: relative`); your values take precedence.
|
|
18
20
|
* */
|
|
19
21
|
parentSizeStyles?: CSSProperties;
|
|
20
|
-
/** Child render function `({ width, height, top, left, ref, resize }) =>
|
|
21
|
-
children: (args: ParentSizeProvidedProps) =>
|
|
22
|
+
/** Child render function `({ width, height, top, left, ref, resize }) => OctaneNode`. */
|
|
23
|
+
children: (args: ParentSizeProvidedProps) => OctaneNode;
|
|
22
24
|
} & UseParentSizeConfig;
|
|
23
25
|
|
|
24
26
|
const defaultOuterStyles: CSSProperties = { width: '100%', height: '100%', position: 'relative' };
|
|
@@ -43,7 +45,11 @@ export default function ParentSize({
|
|
|
43
45
|
resizeObserverPolyfill,
|
|
44
46
|
style,
|
|
45
47
|
...restProps
|
|
46
|
-
}: ParentSizeProps &
|
|
48
|
+
}: ParentSizeProps &
|
|
49
|
+
Omit<Octane.HTMLAttributes<HTMLDivElement>, keyof ParentSizeProps | 'style'> & {
|
|
50
|
+
/** Octane's `style` also accepts a plain string; ParentSize merges styles, so keep the object form. */
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
}) {
|
|
47
53
|
const { parentRef, node, resize, ...dimensions } = useParentSize({
|
|
48
54
|
initialSize,
|
|
49
55
|
debounceTime,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type { CSSProperties
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { Octane } from 'octane/jsx-runtime';
|
|
4
|
+
import type { OctaneNode } from 'octane';
|
|
3
5
|
import type { ParentSizeState, UseParentSizeConfig } from '../hooks/useParentSize.tsrx';
|
|
4
6
|
export type ParentSizeProvidedProps = ParentSizeState & {
|
|
5
7
|
ref: HTMLDivElement | null;
|
|
@@ -15,7 +17,10 @@ export type ParentSizeProps = {
|
|
|
15
17
|
* (`width: 100%; height: 100%; position: relative`); your values take precedence.
|
|
16
18
|
* */
|
|
17
19
|
parentSizeStyles?: CSSProperties;
|
|
18
|
-
/** Child render function `({ width, height, top, left, ref, resize }) =>
|
|
19
|
-
children: (args: ParentSizeProvidedProps) =>
|
|
20
|
+
/** Child render function `({ width, height, top, left, ref, resize }) => OctaneNode`. */
|
|
21
|
+
children: (args: ParentSizeProvidedProps) => OctaneNode;
|
|
20
22
|
} & UseParentSizeConfig;
|
|
21
|
-
export default function ParentSize({ className, children, debounceTime, ignoreDimensions, initialSize, parentSizeStyles, enableDebounceLeadingCall, resizeObserverPolyfill, style, ...restProps }: ParentSizeProps & Omit<HTMLAttributes<HTMLDivElement>, keyof ParentSizeProps>
|
|
23
|
+
export default function ParentSize({ className, children, debounceTime, ignoreDimensions, initialSize, parentSizeStyles, enableDebounceLeadingCall, resizeObserverPolyfill, style, ...restProps }: ParentSizeProps & Omit<Octane.HTMLAttributes<HTMLDivElement>, keyof ParentSizeProps | 'style'> & {
|
|
24
|
+
/** Octane's `style` also accepts a plain string; ParentSize merges styles, so keep the object form. */
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
|
|
3
4
|
export type ScaleSVGProps = {
|
|
4
5
|
/** Child SVG to scale, rendered as the child of the parent wrappers provided by this component `<div><svg>{children}</svg></div>`. */
|
|
5
|
-
children?:
|
|
6
|
+
children?: OctaneNode;
|
|
6
7
|
/** Width of the desired SVG. */
|
|
7
8
|
width?: number | string;
|
|
8
9
|
/** Height of the desired SVG. */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
export type ScaleSVGProps = {
|
|
4
5
|
/** Child SVG to scale, rendered as the child of the parent wrappers provided by this component `<div><svg>{children}</svg></div>`. */
|
|
5
|
-
children?:
|
|
6
|
+
children?: OctaneNode;
|
|
6
7
|
/** Width of the desired SVG. */
|
|
7
8
|
width?: number | string;
|
|
8
9
|
/** Height of the desired SVG. */
|
package/src/sankey/Sankey.tsrx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SVGAttributes } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import { Group } from '@octanejs/visx/group';
|
|
4
5
|
import type { SankeyExtraProperties, SankeyGraph, SankeyLink, SankeyNode } from 'd3-sankey';
|
|
@@ -42,7 +43,7 @@ type SankeyChildrenFunction<NodeDatum extends SankeyExtraProperties, LinkDatum e
|
|
|
42
43
|
(args: {
|
|
43
44
|
graph: SankeyGraph<NodeDatum, LinkDatum>;
|
|
44
45
|
createPath: CreatePath<NodeDatum, LinkDatum>;
|
|
45
|
-
}) =>
|
|
46
|
+
}) => OctaneNode;
|
|
46
47
|
|
|
47
48
|
export type SankeyProps<NodeDatum extends SankeyExtraProperties, LinkDatum extends SankeyExtraProperties> = {
|
|
48
49
|
/** The root data from which to derive the sankey layout. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { SVGAttributes } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { SankeyExtraProperties, SankeyGraph, SankeyLink, SankeyNode } from 'd3-sankey';
|
|
4
5
|
import type { Link } from 'd3-shape';
|
|
5
6
|
type NodeProps = Pick<SVGAttributes<SVGRectElement>, 'stroke' | 'strokeOpacity' | 'strokeWidth' | 'fill' | 'fillOpacity'>;
|
|
@@ -12,7 +13,7 @@ type NodeAlignment<NodeDatum extends SankeyExtraProperties, LinkDatum extends Sa
|
|
|
12
13
|
type SankeyChildrenFunction<NodeDatum extends SankeyExtraProperties, LinkDatum extends SankeyExtraProperties> = (args: {
|
|
13
14
|
graph: SankeyGraph<NodeDatum, LinkDatum>;
|
|
14
15
|
createPath: CreatePath<NodeDatum, LinkDatum>;
|
|
15
|
-
}) =>
|
|
16
|
+
}) => OctaneNode;
|
|
16
17
|
export type SankeyProps<NodeDatum extends SankeyExtraProperties, LinkDatum extends SankeyExtraProperties> = {
|
|
17
18
|
/** The root data from which to derive the sankey layout. */
|
|
18
19
|
root: SankeyGraph<NodeDatum, LinkDatum>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import type { Arc as ArcType } from 'd3-shape';
|
|
4
5
|
import type { $TSFIXME, AddSVGProps, ArcPathConfig } from '../types';
|
|
@@ -10,7 +11,7 @@ export type ArcProps<Datum> = {
|
|
|
10
11
|
/** A Datum for which to generate an arc. */
|
|
11
12
|
data?: Datum;
|
|
12
13
|
/** Override render function which is passed the configured arc generator as input. */
|
|
13
|
-
children?: (args: { path: ArcType<$TSFIXME, Datum> }) =>
|
|
14
|
+
children?: (args: { path: ArcType<$TSFIXME, Datum> }) => OctaneNode;
|
|
14
15
|
/** React ref to the path element. */
|
|
15
16
|
innerRef?: Ref<SVGPathElement>;
|
|
16
17
|
} & ArcPathConfig<Datum>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { Arc as ArcType } from 'd3-shape';
|
|
4
5
|
import type { $TSFIXME, AddSVGProps, ArcPathConfig } from '../types';
|
|
5
6
|
export type ArcProps<Datum> = {
|
|
@@ -10,7 +11,7 @@ export type ArcProps<Datum> = {
|
|
|
10
11
|
/** Override render function which is passed the configured arc generator as input. */
|
|
11
12
|
children?: (args: {
|
|
12
13
|
path: ArcType<$TSFIXME, Datum>;
|
|
13
|
-
}) =>
|
|
14
|
+
}) => OctaneNode;
|
|
14
15
|
/** React ref to the path element. */
|
|
15
16
|
innerRef?: Ref<SVGPathElement>;
|
|
16
17
|
} & ArcPathConfig<Datum>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OctaneNode } from 'octane';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { Group } from '@octanejs/visx/group';
|
|
4
4
|
import type { ScaleInput } from '@octanejs/visx/scale';
|
|
@@ -28,7 +28,7 @@ export type BarGroupProps<Datum extends DatumObject, Key extends GroupKey = Grou
|
|
|
28
28
|
/** Total height of the y-axis. */
|
|
29
29
|
height: number;
|
|
30
30
|
/** Override render function which is passed the computed BarGroups. */
|
|
31
|
-
children?: (barGroups: BarGroupType<Key>[]) =>
|
|
31
|
+
children?: (barGroups: BarGroupType<Key>[]) => OctaneNode;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
3
3
|
import type { ScaleInput } from '@octanejs/visx/scale';
|
|
4
4
|
import type { PositionScale, DatumObject, AnyScaleBand, AddSVGProps, BaseBarGroupProps, BarGroup as BarGroupType, GroupKey, Accessor } from '../types';
|
|
5
5
|
export type BarGroupProps<Datum extends DatumObject, Key extends GroupKey = GroupKey, X0Scale extends AnyScaleBand = AnyScaleBand, X1Scale extends AnyScaleBand = AnyScaleBand> = BaseBarGroupProps<Datum, Key> & {
|
|
@@ -14,7 +14,7 @@ export type BarGroupProps<Datum extends DatumObject, Key extends GroupKey = Grou
|
|
|
14
14
|
/** Total height of the y-axis. */
|
|
15
15
|
height: number;
|
|
16
16
|
/** Override render function which is passed the computed BarGroups. */
|
|
17
|
-
children?: (barGroups: BarGroupType<Key>[]) =>
|
|
17
|
+
children?: (barGroups: BarGroupType<Key>[]) => OctaneNode;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Generates bar groups as an array of objects and renders `<rect />`s for each datum grouped by `key`. A general setup might look like this:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OctaneNode } from 'octane';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { Group } from '@octanejs/visx/group';
|
|
4
4
|
import type { ScaleInput } from '@octanejs/visx/scale';
|
|
@@ -30,7 +30,7 @@ export type BarGroupHorizontalProps<Datum extends DatumObject, Key extends Group
|
|
|
30
30
|
/** Total width of the x-axis. */
|
|
31
31
|
width: number;
|
|
32
32
|
/** Override render function which is passed the computed Ba/rGroups. */
|
|
33
|
-
children?: (barGroups: BarGroupHorizontalType<Key>[]) =>
|
|
33
|
+
children?: (barGroups: BarGroupHorizontalType<Key>[]) => OctaneNode;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export default function BarGroupHorizontal<Datum extends DatumObject, Key extends GroupKey = GroupKey, Y0Scale extends AnyScaleBand = AnyScaleBand, Y1Scale extends AnyScaleBand = AnyScaleBand>({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
3
3
|
import type { ScaleInput } from '@octanejs/visx/scale';
|
|
4
4
|
import type { PositionScale, AnyScaleBand, DatumObject, AddSVGProps, BarGroupHorizontal as BarGroupHorizontalType, BaseBarGroupProps, GroupKey, Accessor } from '../types';
|
|
5
5
|
export type BarGroupHorizontalProps<Datum extends DatumObject, Key extends GroupKey = GroupKey, Y0Scale extends AnyScaleBand = AnyScaleBand, Y1Scale extends AnyScaleBand = AnyScaleBand> = BaseBarGroupProps<Datum, Key> & {
|
|
@@ -16,6 +16,6 @@ export type BarGroupHorizontalProps<Datum extends DatumObject, Key extends Group
|
|
|
16
16
|
/** Total width of the x-axis. */
|
|
17
17
|
width: number;
|
|
18
18
|
/** Override render function which is passed the computed Ba/rGroups. */
|
|
19
|
-
children?: (barGroups: BarGroupHorizontalType<Key>[]) =>
|
|
19
|
+
children?: (barGroups: BarGroupHorizontalType<Key>[]) => OctaneNode;
|
|
20
20
|
};
|
|
21
21
|
export default function BarGroupHorizontal<Datum extends DatumObject, Key extends GroupKey = GroupKey, Y0Scale extends AnyScaleBand = AnyScaleBand, Y1Scale extends AnyScaleBand = AnyScaleBand>({ data, className, top, left, x, y0, y0Scale, y1Scale, xScale, color, keys, width, children, ...restProps }: AddSVGProps<BarGroupHorizontalProps<Datum, Key, Y0Scale, Y1Scale>, SVGRectElement>): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import type { AddSVGProps } from '../types';
|
|
4
5
|
|
|
@@ -40,7 +41,7 @@ export type BarRoundedProps = {
|
|
|
40
41
|
path,
|
|
41
42
|
}: {
|
|
42
43
|
path: string;
|
|
43
|
-
}) =>
|
|
44
|
+
}) => OctaneNode;
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
/** Hook that returns a BarRounded path. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { AddSVGProps } from '../types';
|
|
4
5
|
export type BarRoundedProps = {
|
|
5
6
|
/** className to apply to path element. */
|
|
@@ -37,7 +38,7 @@ export type BarRoundedProps = {
|
|
|
37
38
|
/** Optional children override. */
|
|
38
39
|
children?: ({ path, }: {
|
|
39
40
|
path: string;
|
|
40
|
-
}) =>
|
|
41
|
+
}) => OctaneNode;
|
|
41
42
|
};
|
|
42
43
|
/** Hook that returns a BarRounded path. */
|
|
43
44
|
export declare function useBarRoundedPath({ all, bottom, bottomLeft, bottomRight, height, left, radius, right, top, topLeft, topRight, width, x, y, }: Pick<BarRoundedProps, 'all' | 'top' | 'bottom' | 'left' | 'right' | 'x' | 'y' | 'width' | 'height' | 'radius' | 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft'>): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Ref
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import type { Line as LineType } from 'd3-shape';
|
|
4
5
|
import type { AddSVGProps, LinePathConfig } from '../types';
|
|
@@ -10,7 +11,7 @@ export type LinePathProps<Datum> = {
|
|
|
10
11
|
/** React RefObject passed to the path element. */
|
|
11
12
|
innerRef?: Ref<SVGPathElement>;
|
|
12
13
|
/** Override render function which is passed the configured path generator as input. */
|
|
13
|
-
children?: (args: { path: LineType<Datum> }) =>
|
|
14
|
+
children?: (args: { path: LineType<Datum> }) => OctaneNode;
|
|
14
15
|
/** Fill color of the path element. */
|
|
15
16
|
fill?: string;
|
|
16
17
|
/** className applied to path element. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type { Ref
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import type { OctaneNode } from 'octane';
|
|
3
4
|
import type { Line as LineType } from 'd3-shape';
|
|
4
5
|
import type { AddSVGProps, LinePathConfig } from '../types';
|
|
5
6
|
export type LinePathProps<Datum> = {
|
|
@@ -10,7 +11,7 @@ export type LinePathProps<Datum> = {
|
|
|
10
11
|
/** Override render function which is passed the configured path generator as input. */
|
|
11
12
|
children?: (args: {
|
|
12
13
|
path: LineType<Datum>;
|
|
13
|
-
}) =>
|
|
14
|
+
}) => OctaneNode;
|
|
14
15
|
/** Fill color of the path element. */
|
|
15
16
|
fill?: string;
|
|
16
17
|
/** className applied to path element. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OctaneNode } from 'octane';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import type { RadialLine } from 'd3-shape';
|
|
4
4
|
import type { LinePathProps } from './LinePath.tsrx';
|
|
@@ -8,7 +8,7 @@ import { radialLine } from '../util/D3ShapeFactories';
|
|
|
8
8
|
export type LineRadialProps<Datum> =
|
|
9
9
|
Pick<LinePathProps<Datum>, 'className' | 'data' | 'fill' | 'innerRef'> & {
|
|
10
10
|
/** Override render function which is passed the configured path generator as input. */
|
|
11
|
-
children?: (args: { path: RadialLine<Datum> }) =>
|
|
11
|
+
children?: (args: { path: RadialLine<Datum> }) => OctaneNode;
|
|
12
12
|
} & RadialLinePathConfig<Datum>;
|
|
13
13
|
|
|
14
14
|
export default function LineRadial<Datum>({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs.
|
|
2
|
-
import type {
|
|
2
|
+
import type { OctaneNode } from 'octane';
|
|
3
3
|
import type { RadialLine } from 'd3-shape';
|
|
4
4
|
import type { LinePathProps } from './LinePath.tsrx';
|
|
5
5
|
import type { AddSVGProps, RadialLinePathConfig } from '../types';
|
|
@@ -7,6 +7,6 @@ export type LineRadialProps<Datum> = Pick<LinePathProps<Datum>, 'className' | 'd
|
|
|
7
7
|
/** Override render function which is passed the configured path generator as input. */
|
|
8
8
|
children?: (args: {
|
|
9
9
|
path: RadialLine<Datum>;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => OctaneNode;
|
|
11
11
|
} & RadialLinePathConfig<Datum>;
|
|
12
12
|
export default function LineRadial<Datum>({ className, angle, radius, defined, curve, data, innerRef, children, fill, ...restProps }: AddSVGProps<LineRadialProps<Datum>, SVGPathElement>): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OctaneNode } from 'octane';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { Group } from '@octanejs/visx/group';
|
|
4
4
|
import type { AddSVGProps, ArcPathConfig, PiePathConfig } from '../types';
|
|
@@ -21,7 +21,7 @@ export type PieProps<Datum> = {
|
|
|
21
21
|
/** Array of data to generate a Pie for. */
|
|
22
22
|
data?: Datum[];
|
|
23
23
|
/** Optional render function invoked for each Datum to render something (e.g., a Label) at each pie centroid. */
|
|
24
|
-
centroid?: (xyCoords: [number, number], arc: PieArcDatum<Datum>) =>
|
|
24
|
+
centroid?: (xyCoords: [number, number], arc: PieArcDatum<Datum>) => OctaneNode;
|
|
25
25
|
// These three fields are renamed
|
|
26
26
|
/** Invoked for each datum, returns the value for a given Pie segment/arc datum. */
|
|
27
27
|
pieValue?: PiePathConfig<Datum>['value'];
|
|
@@ -30,7 +30,7 @@ export type PieProps<Datum> = {
|
|
|
30
30
|
/** Comparator function to sort arc *values*, overrides pieSort if defined. If pieSort and pieSortValues are null, arcs match input data order. */
|
|
31
31
|
pieSortValues?: PiePathConfig<Datum>['sortValues'];
|
|
32
32
|
/** Render function override which is passed the configured arc generator as input. */
|
|
33
|
-
children?: (provided: ProvidedProps<Datum>) =>
|
|
33
|
+
children?: (provided: ProvidedProps<Datum>) => OctaneNode;
|
|
34
34
|
/** Optional accessor function to return the fill string value of a given arc. */
|
|
35
35
|
fill?: string | StringAccessor<Datum>;
|
|
36
36
|
} & Pick<PiePathConfig<Datum>, 'startAngle' | 'endAngle' | 'padAngle'> & Pick<ArcPathConfig<PieArcDatum<Datum>>, 'innerRadius' | 'outerRadius' | 'cornerRadius' | 'padRadius'>;
|