@nivo/axes
Advanced tools
Comparing version 0.61.0 to 0.62.0
import * as React from 'react' | ||
import { Dimensions } from '@nivo/core' | ||
import { Scale } from '@nivo/scales' | ||
@@ -6,5 +8,26 @@ declare module '@nivo/axes' { | ||
type GridValuesBuilder<T> = T extends number | ||
? number[] | ||
: T extends string | ||
? string[] | ||
: T extends Date | ||
? Date[] | ||
: never | ||
export type GridValues<T extends number | string | Date> = number | GridValuesBuilder<T> | ||
export type Orient = 'top' | 'right' | 'bottom' | 'left' | ||
type AxisPositions = { [K in Orient]: AxisProps } | ||
interface Scales { | ||
xScale?: Scale | ||
yScale?: Scale | ||
} | ||
export interface AxesProps extends Dimensions, AxisPositions, Scales {} | ||
export interface AxisProps { | ||
orient?: 'top' | 'right' | 'bottom' | 'left' | ||
tickValues?: number | number[] | string[] | Date[] | string | ||
orient?: Orient | ||
tickValues?: GridValues<number | string | Date> | string | ||
tickSize?: number | ||
@@ -14,3 +37,3 @@ tickPadding?: number | ||
format?: string | TickFormatter | ||
renderTick?: (data: any) => React.ReactNode | ||
renderTick?: <T>(data: T) => React.ReactNode | ||
legend?: React.ReactNode | ||
@@ -21,3 +44,10 @@ legendPosition?: 'start' | 'middle' | 'end' | ||
export type Axis = any | ||
export interface GridProps extends Dimensions, Scales { | ||
xValues?: GridValues<number | string | Date> | ||
yValues?: GridValues<number | string | Date> | ||
} | ||
export const Axes: React.FC<AxesProps> | ||
export const Axis: React.FC<AxisProps> | ||
export const Grid: React.FC<GridProps> | ||
} |
{ | ||
"name": "@nivo/axes", | ||
"version": "0.61.0", | ||
"version": "0.62.0", | ||
"license": "MIT", | ||
@@ -24,3 +24,4 @@ "author": { | ||
"dependencies": { | ||
"@nivo/core": "0.61.0", | ||
"@nivo/core": "0.62.0", | ||
"@nivo/scales": "0.62.0", | ||
"d3-format": "^1.3.2", | ||
@@ -39,3 +40,3 @@ "d3-time": "^1.0.11", | ||
}, | ||
"gitHead": "441383999dad1c9697ef6f4bc89b1c19b4505153" | ||
"gitHead": "a98a072c4fe5339457d26f396d032dfc302187bc" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95813
2515
9
+ Added@nivo/scales@0.62.0
+ Added@nivo/core@0.62.0(transitive)
+ Added@nivo/scales@0.62.0(transitive)
+ Added@nivo/tooltip@0.62.0(transitive)
- Removed@nivo/core@0.61.0(transitive)
- Removed@nivo/tooltip@0.61.0(transitive)
Updated@nivo/core@0.62.0