Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/polaris-viz

Package Overview
Dependencies
Maintainers
19
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/polaris-viz - npm Package Compare versions

Comparing version 0.16.1 to 0.17.0

esnext/scripts/tsconfig.tsbuildinfo

10

CHANGELOG.md
# Changelog
## Unreleased
## [0.17.0] - 2021-06-16
### Changed
- Upgrades our build tools to the latest major versions. We **do not** expect any change in behavior for consumers of Polaris Viz.
## [0.16.1] - 2021-06-09

@@ -10,4 +18,2 @@

## Unreleased
## [0.16.0] - 2021-05-26

@@ -14,0 +20,0 @@

{
"name": "@shopify/polaris-viz",
"description": "Shopify’s viz component library",
"version": "0.16.1",
"version": "0.17.0",
"private": false,

@@ -40,3 +40,3 @@ "license": "SEE LICENSE IN LICENSE.md",

"extends": [
"stylelint-config-shopify/prettier"
"@shopify/stylelint-plugin/prettier"
],

@@ -65,8 +65,9 @@ "rules": {

"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/node": "^7.6.1",
"@babel/core": "^7.14.3",
"@babel/node": "^7.14.2",
"@juggle/resize-observer": "^3.3.1",
"@shopify/babel-preset": "^24.0.1",
"@shopify/postcss-plugin": "^3.1.1",
"@shopify/react-testing": "^1.8.0",
"@shopify/sewing-kit": "^0.120.0",
"@shopify/react-testing": "^3.0.1",
"@shopify/sewing-kit": "^2.0.0",
"@storybook/addon-actions": "^6.2.1",

@@ -80,3 +81,3 @@ "@storybook/addon-essentials": "^6.2.1",

"@types/d3-shape": "^1.3.2",
"@types/jest": "24.0.19",
"@types/jest": "26.0.23",
"@types/lodash.isequal": "^4.5.5",

@@ -87,5 +88,3 @@ "@types/lodash.throttle": "^4.1.6",

"@types/react-dom": "^16.8.4",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "^8.0.6",
"babel-preset-shopify": "^20.1.0",
"babel-loader": "^8.2.2",
"change-case": "^3.1.0",

@@ -103,2 +102,3 @@ "copyfiles": "^2.1.1",

"postcss": "^7.0.18",
"postcss-loader": "^3",
"postcss-modules-extract-imports": "^2.0.0",

@@ -119,7 +119,7 @@ "postcss-modules-local-by-default": "^2.0.6",

"rollup-pluginutils": "^2.8.2",
"sass-loader": "^8.0.0",
"sass-loader": "^10.1.1",
"semver": "^6.3.0",
"shelljs": "^0.8.3",
"shx": "^0.3.2",
"typescript": "~3.7.2"
"typescript": "~4.3.2"
},

@@ -156,9 +156,3 @@ "peerDependencies": {

"use-debounce": "^3.3.0"
},
"resolutions": {
"is-svg": "4.3.1",
"merge": "2.1.1",
"trim": "0.0.3",
"y18n": "4.0.1"
}
}

2

types/components/Bar/Bar.d.ts
/// <reference types="react" />
import { SpringValue } from '@react-spring/web';
import { ScaleLinear } from 'd3-scale';
import type { ScaleLinear } from 'd3-scale';
interface Props {

@@ -5,0 +5,0 @@ color: string;

import React from 'react';
import { Dimensions } from '../../types';
import { BarChartData, RenderTooltipContentData, BarOptions as BarChartBarOptions, GridOptions, XAxisOptions, YAxisOptions, AnnotationLookupTable } from './types';
import type { Dimensions } from '../../types';
import type { BarChartData, RenderTooltipContentData, BarOptions as BarChartBarOptions, GridOptions, XAxisOptions, YAxisOptions, AnnotationLookupTable } from './types';
declare type BarOptions = Omit<BarChartBarOptions, 'innerMargin' | 'outerMargin'> & {

@@ -5,0 +5,0 @@ innerMargin: number;

/// <reference types="react" />
import { Annotation } from '../../types';
import type { Annotation } from '../../types';
export interface AnnotationLineProps extends Omit<Annotation, 'dataIndex'> {

@@ -4,0 +4,0 @@ xPosition: number;

@@ -1,2 +0,3 @@

export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
export { AnnotationLine } from './AnnotationLine';

@@ -1,1 +0,2 @@

export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
/// <reference types="react" />
import { Annotation } from '../../types';
import type { Annotation } from '../../types';
export interface TooltipContentProps {

@@ -4,0 +4,0 @@ label: string;

@@ -1,3 +0,3 @@

import { Data } from 'types';
import { StringLabelFormatter } from '../../../types';
import type { Data } from 'types';
import type { StringLabelFormatter } from '../../../types';
export declare function useXScale({ drawableWidth, innerMargin, outerMargin, data, formatXAxisLabel, }: {

@@ -4,0 +4,0 @@ drawableWidth: number;

@@ -1,3 +0,3 @@

import { Data } from 'types';
import { NumberLabelFormatter } from '../../../types';
import type { Data } from 'types';
import type { NumberLabelFormatter } from '../../../types';
export declare function useYScale({ drawableHeight, data, formatYAxisLabel, integersOnly, }: {

@@ -4,0 +4,0 @@ drawableHeight: number;

@@ -1,2 +0,4 @@

export { BarChart, BarChartProps } from './BarChart';
export { TooltipContent as BarChartTooltipContent, TooltipContentProps as BarChartTooltipContentProps, } from './components';
export { BarChart } from './BarChart';
export type { BarChartProps } from './BarChart';
export { TooltipContent as BarChartTooltipContent } from './components';
export type { TooltipContentProps as BarChartTooltipContentProps } from './components';

@@ -1,2 +0,2 @@

import { Color, StringLabelFormatter, NumberLabelFormatter, GradientStop } from 'types';
import type { Color, StringLabelFormatter, NumberLabelFormatter, GradientStop } from 'types';
export interface BarChartData {

@@ -3,0 +3,0 @@ barOptions?: {

/// <reference types="react" />
import { ScaleBand } from 'd3-scale';
import type { ScaleBand } from 'd3-scale';
interface XAxisDetails {

@@ -4,0 +4,0 @@ maxXLabelHeight: number;

/// <reference types="react" />
import { ComparisonMetricShape } from './types';
import type { ComparisonMetricShape } from './types';
export declare function ComparisonMetric({ metric, trend, accessibilityLabel, }: ComparisonMetricShape): JSX.Element;
export { ComparisonMetric } from './ComparisonMetric';
export { ComparisonMetricShape } from './types';
export type { ComparisonMetricShape } from './types';
/// <reference types="react" />
import { YAxisTick } from '../../types';
import type { YAxisTick } from '../../types';
interface Props {

@@ -4,0 +4,0 @@ ticks: YAxisTick[];

@@ -5,14 +5,23 @@ export { Point } from './Point';

export { HorizontalGridLines } from './HorizontalGridLines';
export { Sparkline, SparklineProps } from './Sparkline';
export { Sparkbar, SparkbarProps } from './Sparkbar';
export { BarChart, BarChartProps, BarChartTooltipContent, BarChartTooltipContentProps, } from './BarChart';
export { LineChart, LineChartProps, LineChartTooltipContent, LineChartTooltipContentProps, } from './LineChart';
export { NormalizedStackedBarChart, NormalizedStackedBarChartProps, } from './NormalizedStackedBarChart';
export { Sparkline } from './Sparkline';
export type { SparklineProps } from './Sparkline';
export { Sparkbar } from './Sparkbar';
export type { SparkbarProps } from './Sparkbar';
export { BarChart, BarChartTooltipContent } from './BarChart';
export type { BarChartProps, BarChartTooltipContentProps } from './BarChart';
export { LineChart, LineChartTooltipContent } from './LineChart';
export type { LineChartProps, LineChartTooltipContentProps } from './LineChart';
export { NormalizedStackedBarChart } from './NormalizedStackedBarChart';
export type { NormalizedStackedBarChartProps } from './NormalizedStackedBarChart';
export { YAxis } from './YAxis';
export { TooltipContainer } from './TooltipContainer';
export { SquareColorPreview, SquareColorPreviewProps, } from './SquareColorPreview';
export { StackedAreaChart, StackedAreaChartProps } from './StackedAreaChart';
export { SquareColorPreview } from './SquareColorPreview';
export type { SquareColorPreviewProps } from './SquareColorPreview';
export { StackedAreaChart } from './StackedAreaChart';
export type { StackedAreaChartProps } from './StackedAreaChart';
export { LinearXAxis } from './LinearXAxis';
export { MultiSeriesBarChart, MultiSeriesBarChartProps, } from './MultiSeriesBarChart';
export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { MultiSeriesBarChart } from './MultiSeriesBarChart';
export type { MultiSeriesBarChartProps } from './MultiSeriesBarChart';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
export { BarChartXAxis } from './BarChartXAxis';

@@ -19,0 +28,0 @@ export { SkipLink } from './SkipLink';

/// <reference types="react" />
import { DataSeries, Data, NullableData, LineStyle, SeriesColor } from '../../types';
import type { DataSeries, Data, NullableData, LineStyle, SeriesColor } from '../../types';
declare type LegendData = Required<DataSeries<Data | NullableData, SeriesColor>>;

@@ -4,0 +4,0 @@ interface LegendProps extends Omit<LegendData, 'data'> {

/// <reference types="react" />
import { GradientStop } from '../../types';
import type { GradientStop } from '../../types';
export interface LinearGradientProps {

@@ -4,0 +4,0 @@ gradient: GradientStop[];

import React from 'react';
import { ScaleLinear } from 'd3-scale';
import type { ScaleLinear } from 'd3-scale';
interface XAxisDetails {

@@ -4,0 +4,0 @@ maxXLabelHeight: number;

import React from 'react';
import { Dimensions } from '../../types';
import { RenderTooltipContentData, LineOptions, XAxisOptions, YAxisOptions, GridOptions, CrossHairOptions, SeriesWithDefaults } from './types';
import type { Dimensions } from '../../types';
import type { RenderTooltipContentData, LineOptions, XAxisOptions, YAxisOptions, GridOptions, CrossHairOptions, SeriesWithDefaults } from './types';
interface Props {

@@ -5,0 +5,0 @@ series: SeriesWithDefaults[];

/// <reference types="react" />
import { ScaleLinear } from 'd3-scale';
import { Series } from '../../types';
import type { ScaleLinear } from 'd3-scale';
import type { Series } from '../../types';
interface Props {

@@ -5,0 +5,0 @@ series: Series;

@@ -1,2 +0,2 @@

import { Data } from '../../../../../types';
import type { Data } from '../../../../../types';
export declare function getGradientDetails(data: Data[]): {

@@ -3,0 +3,0 @@ offset: number;

export { Line } from './Line';
export { GradientArea } from './GradientArea';
export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
import React from 'react';
import { Line as D3Line } from 'd3-shape';
import { SeriesWithDefaults } from '../../types';
import type { Line as D3Line } from 'd3-shape';
import type { SeriesWithDefaults } from '../../types';
interface Props {

@@ -5,0 +5,0 @@ series: SeriesWithDefaults;

@@ -1,1 +0,2 @@

export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
/// <reference types="react" />
import { LineStyle, SeriesColor } from 'types';
import type { LineStyle, SeriesColor } from 'types';
interface TooltipData {

@@ -4,0 +4,0 @@ name: string;

@@ -1,3 +0,3 @@

import { Line } from 'd3-shape';
import { SeriesWithDefaults } from '../types';
import type { Line } from 'd3-shape';
import type { SeriesWithDefaults } from '../types';
export declare function useLineChartAnimations({ activeIndex, lineGenerator, series, isAnimated, }: {

@@ -4,0 +4,0 @@ activeIndex: number | null;

@@ -1,3 +0,3 @@

import { Series } from '../types';
import { NumberLabelFormatter } from '../../../types';
import type { Series } from '../types';
import type { NumberLabelFormatter } from '../../../types';
export declare function useYScale({ drawableHeight, series, formatYAxisLabel, fontSize, integersOnly, }: {

@@ -4,0 +4,0 @@ fontSize: number;

@@ -1,2 +0,4 @@

export { LineChart, LineChartProps } from './LineChart';
export { TooltipContent as LineChartTooltipContent, TooltipContentProps as LineChartTooltipContentProps, } from './components';
export { LineChart } from './LineChart';
export type { LineChartProps } from './LineChart';
export { TooltipContent as LineChartTooltipContent } from './components';
export type { TooltipContentProps as LineChartTooltipContentProps } from './components';
import React from 'react';
import { Series, RenderTooltipContentData, LineOptions, XAxisOptions, YAxisOptions, GridOptions, CrossHairOptions } from './types';
import type { Series, RenderTooltipContentData, LineOptions, XAxisOptions, YAxisOptions, GridOptions, CrossHairOptions } from './types';
export interface LineChartProps {

@@ -4,0 +4,0 @@ series: Series[];

@@ -1,2 +0,2 @@

import { DataSeries, Data, LineStyle, StringLabelFormatter, NumberLabelFormatter, SeriesColor } from '../../types';
import type { DataSeries, Data, LineStyle, StringLabelFormatter, NumberLabelFormatter, SeriesColor } from '../../types';
export interface Series extends DataSeries<Data, SeriesColor> {

@@ -3,0 +3,0 @@ areaColor?: string;

@@ -1,2 +0,2 @@

import { Series } from '../types';
import type { Series } from '../types';
export declare function yAxisMinMax({ series, integersOnly, }: {

@@ -3,0 +3,0 @@ series: Series[];

/// <reference types="react" />
import { SeriesColor } from 'types';
import { LineStyle } from '../../types';
import type { SeriesColor } from 'types';
import type { LineStyle } from '../../types';
interface Props {

@@ -5,0 +5,0 @@ color: SeriesColor;

import React from 'react';
import { Dimensions } from '../../types';
import { Series, RenderTooltipContentData, BarOptions as MultiSeriesBarOptions, GridOptions, XAxisOptions, YAxisOptions } from './types';
import type { Dimensions } from '../../types';
import type { Series, RenderTooltipContentData, BarOptions as MultiSeriesBarOptions, GridOptions, XAxisOptions, YAxisOptions } from './types';
declare type BarOptions = Omit<MultiSeriesBarOptions, 'innerMargin' | 'outerMargin'> & {

@@ -5,0 +5,0 @@ innerMargin: number;

/// <reference types="react" />
import { ScaleLinear } from 'd3-scale';
import { SeriesColor } from 'types';
import type { ScaleLinear } from 'd3-scale';
import type { SeriesColor } from 'types';
interface Props {

@@ -5,0 +5,0 @@ x: number;

/// <reference types="react" />
import { StackedBarGroupProps } from '../../types';
import type { StackedBarGroupProps } from '../../types';
export declare function Stack({ data, xScale, onFocus, ariaHidden, activeBarId, accessibilityData, activeBarGroup, yScale, groupIndex, }: Omit<StackedBarGroupProps, 'colors'> & {

@@ -4,0 +4,0 @@ ariaHidden: boolean;

/// <reference types="react" />
import { StackedBarGroupProps } from './types';
import type { StackedBarGroupProps } from './types';
export declare function StackedBarGroup({ groupIndex, data, yScale, xScale, colors, onFocus, accessibilityData, activeBarGroup, }: StackedBarGroupProps): JSX.Element;

@@ -1,4 +0,4 @@

import { ScaleLinear, ScaleBand } from 'd3-scale';
import { StackSeries } from '../../types';
import { SeriesColor } from '../../../../types';
import type { ScaleLinear, ScaleBand } from 'd3-scale';
import type { StackSeries } from '../../types';
import type { SeriesColor } from '../../../../types';
export interface StackedBarGroupProps {

@@ -5,0 +5,0 @@ groupIndex: number;

@@ -1,3 +0,3 @@

import { Series, StackSeries } from '../types';
import { NumberLabelFormatter } from '../../../types';
import type { Series, StackSeries } from '../types';
import type { NumberLabelFormatter } from '../../../types';
export declare function useYScale({ drawableHeight, data, formatYAxisLabel, stackedValues, integersOnly, }: {

@@ -4,0 +4,0 @@ drawableHeight: number;

@@ -1,1 +0,2 @@

export { MultiSeriesBarChart, MultiSeriesBarChartProps, } from './MultiSeriesBarChart';
export { MultiSeriesBarChart } from './MultiSeriesBarChart';
export type { MultiSeriesBarChartProps } from './MultiSeriesBarChart';

@@ -1,3 +0,3 @@

import { Series as ShapeSeries } from 'd3-shape';
import { StringLabelFormatter, NumberLabelFormatter, DataSeries, Data, SeriesColor } from '../../types';
import type { Series as ShapeSeries } from 'd3-shape';
import type { StringLabelFormatter, NumberLabelFormatter, DataSeries, Data, SeriesColor } from '../../types';
export declare type Series = DataSeries<Data, SeriesColor>;

@@ -4,0 +4,0 @@ export declare type StackSeries = ShapeSeries<{

@@ -1,2 +0,2 @@

import { AccessibilitySeries } from '../types';
import type { AccessibilitySeries } from '../types';
export declare function formatAriaLabel(series: AccessibilitySeries): string;

@@ -1,2 +0,2 @@

import { Series, StackSeries } from '../types';
import type { Series, StackSeries } from '../types';
export declare function getMinMax({ stackedValues, data, integersOnly, }: {

@@ -3,0 +3,0 @@ stackedValues: StackSeries[] | null;

@@ -1,4 +0,4 @@

import { Series } from '../types';
import type { Series } from '../types';
export declare function getStackedValues(series: Series[], labels: string[]): import("d3-shape").Series<{
[key: string]: number;
}, string>[];

@@ -1,1 +0,2 @@

export { BarLabel, Props as BarLabelProps } from './BarLabel';
export { BarLabel } from './BarLabel';
export type { Props as BarLabelProps } from './BarLabel';
/// <reference types="react" />
import { Orientation, Size } from '../../types';
import type { Orientation, Size } from '../../types';
interface Props {

@@ -4,0 +4,0 @@ scale: number;

@@ -1,2 +0,3 @@

export { NormalizedStackedBarChart, NormalizedStackedBarChartProps, } from './NormalizedStackedBarChart';
export { Orientation, Size } from './types';
export { NormalizedStackedBarChart } from './NormalizedStackedBarChart';
export type { NormalizedStackedBarChartProps } from './NormalizedStackedBarChart';
export type { Orientation, Size } from './types';
/// <reference types="react" />
import { Color } from 'types';
import { Size, Data, Orientation } from './types';
import type { Color } from 'types';
import type { Size, Data, Orientation } from './types';
export interface NormalizedStackedBarChartProps {

@@ -5,0 +5,0 @@ data: Data[];

@@ -1,2 +0,2 @@

import { ComparisonMetricShape } from '../ComparisonMetric';
import type { ComparisonMetricShape } from '../ComparisonMetric';
export declare type Orientation = 'horizontal' | 'vertical';

@@ -3,0 +3,0 @@ export declare type Size = 'small' | 'medium' | 'large';

import React from 'react';
import { ActiveTooltip } from 'types';
import type { ActiveTooltip } from 'types';
import { Interpolation } from '@react-spring/web';

@@ -4,0 +4,0 @@ interface Props {

/// <reference types="react" />
import { ScaleLinear } from 'd3-scale';
import type { ScaleLinear } from 'd3-scale';
import { SpringValue } from '@react-spring/web';
import { SparkChartData } from '../../../../types';
import type { SparkChartData } from '../../../../types';
interface Props {

@@ -6,0 +6,0 @@ x: number;

@@ -1,1 +0,2 @@

export { Sparkbar, SparkbarProps } from './Sparkbar';
export { Sparkbar } from './Sparkbar';
export type { SparkbarProps } from './Sparkbar';
/// <reference types="react" />
import { Color, SparkChartData } from '../../types';
import type { Color, SparkChartData } from '../../types';
interface Coordinates {

@@ -4,0 +4,0 @@ x: number;

/// <reference types="react" />
import { ScaleLinear } from 'd3-scale';
import { SingleSeries } from '../../Sparkline';
import type { ScaleLinear } from 'd3-scale';
import type { SingleSeries } from '../../Sparkline';
export declare function Series({ xScale, yScale, series, isAnimated, height, hasSpline, }: {

@@ -5,0 +5,0 @@ xScale: ScaleLinear<number, number>;

@@ -1,1 +0,2 @@

export { Sparkline, SparklineProps } from './Sparkline';
export { Sparkline } from './Sparkline';
export type { SparklineProps } from './Sparkline';
/// <reference types="react" />
import { Color, SparkChartData } from 'types';
import type { Color, SparkChartData } from 'types';
export interface Coordinates {

@@ -4,0 +4,0 @@ x: number;

@@ -1,1 +0,2 @@

export { SquareColorPreview, SquareColorPreviewProps, } from './SquareColorPreview';
export { SquareColorPreview } from './SquareColorPreview';
export type { SquareColorPreviewProps } from './SquareColorPreview';
/// <reference types="react" />
import { SeriesColor } from 'types';
import type { SeriesColor } from 'types';
export interface SquareColorPreviewProps {

@@ -4,0 +4,0 @@ color: SeriesColor;

import React from 'react';
import { StringLabelFormatter, NumberLabelFormatter, Dimensions } from '../../types';
import { Series, RenderTooltipContentData } from './types';
import type { StringLabelFormatter, NumberLabelFormatter, Dimensions } from '../../types';
import type { Series, RenderTooltipContentData } from './types';
interface Props {

@@ -5,0 +5,0 @@ xAxisLabels: string[];

import React from 'react';
import { Series } from 'd3-shape';
import { Color } from 'types';
import { ScaleLinear } from 'd3-scale';
import type { Color } from 'types';
import type { ScaleLinear } from 'd3-scale';
declare type StackedSeries = Series<{

@@ -6,0 +6,0 @@ [key: string]: number;

@@ -1,3 +0,3 @@

import { Series } from 'd3-shape';
import { NumberLabelFormatter } from '../../../types';
import type { Series } from 'd3-shape';
import type { NumberLabelFormatter } from '../../../types';
export declare function useYScale({ fontSize, drawableHeight, stackedValues, formatYAxisLabel, }: {

@@ -4,0 +4,0 @@ fontSize: number;

@@ -1,1 +0,2 @@

export { StackedAreaChart, StackedAreaChartProps } from './StackedAreaChart';
export { StackedAreaChart } from './StackedAreaChart';
export type { StackedAreaChartProps } from './StackedAreaChart';
import React from 'react';
import { StringLabelFormatter, NumberLabelFormatter } from '../../types';
import { Series, RenderTooltipContentData } from './types';
import type { StringLabelFormatter, NumberLabelFormatter } from '../../types';
import type { Series, RenderTooltipContentData } from './types';
export interface StackedAreaChartProps {

@@ -5,0 +5,0 @@ formatXAxisLabel?: StringLabelFormatter;

@@ -1,2 +0,2 @@

import { Color, DataSeries, NullableData } from '../../types';
import type { Color, DataSeries, NullableData } from '../../types';
export interface Series extends DataSeries<NullableData, Color> {

@@ -3,0 +3,0 @@ }

import { ReactNode } from 'react';
import { Dimensions } from '../../types';
import type { Dimensions } from '../../types';
interface Props {

@@ -4,0 +4,0 @@ children: ReactNode;

@@ -1,1 +0,2 @@

export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { TooltipContent } from './TooltipContent';
export type { TooltipContentProps } from './TooltipContent';
/// <reference types="react" />
import { SeriesColor } from 'types';
import type { SeriesColor } from 'types';
interface TooltipData {

@@ -4,0 +4,0 @@ color: SeriesColor;

import React from 'react';
import { NumberLabelFormatter, DataSeries, NullableData, Data, SeriesColor } from '../../types';
import type { NumberLabelFormatter, DataSeries, NullableData, Data, SeriesColor } from '../../types';
interface Props {

@@ -4,0 +4,0 @@ series: DataSeries<Data | NullableData, SeriesColor>[];

import React from 'react';
import { YAxisTick } from '../../types';
import type { YAxisTick } from '../../types';
interface Props {

@@ -4,0 +4,0 @@ ticks: YAxisTick[];

export { usePrefersReducedMotion } from './usePrefersReducedMotion';
export { useLinearXAxisDetails, ChartDetails } from './useLinearXAxisDetails';
export { useLinearXAxisDetails } from './useLinearXAxisDetails';
export type { ChartDetails } from './useLinearXAxisDetails';
export { useLinearXScale } from './useLinearXScale';
export { usePrevious } from './use-previous';
export { useResizeObserver } from './useResizeObserver';

@@ -1,2 +0,2 @@

import { StringLabelFormatter, NullableData, Data, DataSeries, SeriesColor, YAxisTick } from '../types';
import type { StringLabelFormatter, NullableData, Data, DataSeries, SeriesColor, YAxisTick } from '../types';
export interface ChartDetails {

@@ -3,0 +3,0 @@ series: DataSeries<Data | NullableData, SeriesColor>[];

@@ -1,2 +0,3 @@

export { Sparkline, SparklineProps, Sparkbar, SparkbarProps, NormalizedStackedBarChart, NormalizedStackedBarChartProps, BarChart, BarChartProps, BarChartTooltipContent, BarChartTooltipContentProps, LineChart, LineChartProps, LineChartTooltipContent, LineChartTooltipContentProps, StackedAreaChart, StackedAreaChartProps, Legend, MultiSeriesBarChart, MultiSeriesBarChartProps, TooltipContent, TooltipContentProps, LinePreview, SquareColorPreview, } from './components';
export { Color, GradientStop } from './types';
export { Sparkline, Sparkbar, NormalizedStackedBarChart, BarChart, BarChartTooltipContent, LineChart, LineChartTooltipContent, StackedAreaChart, Legend, MultiSeriesBarChart, TooltipContent, LinePreview, SquareColorPreview, } from './components';
export type { SparklineProps, SparkbarProps, NormalizedStackedBarChartProps, BarChartProps, BarChartTooltipContentProps, LineChartProps, LineChartTooltipContentProps, StackedAreaChartProps, MultiSeriesBarChartProps, TooltipContentProps, } from './components';
export type { Color, GradientStop } from './types';

@@ -1,2 +0,2 @@

import { InterpolatorFn } from '@react-spring/web';
import type { InterpolatorFn } from '@react-spring/web';
export interface Data {

@@ -46,3 +46,3 @@ label: string;

export declare type SparkChartData = number | null;
export declare type PathInterpolator = InterpolatorFn<ReadonlyArray<number>, string>;
export declare type NumberInterpolator = InterpolatorFn<ReadonlyArray<number>, number>;
export declare type PathInterpolator = InterpolatorFn<readonly number[], string>;
export declare type NumberInterpolator = InterpolatorFn<readonly number[], number>;

@@ -1,4 +0,4 @@

import { Color } from '../types';
import type { Color } from '../types';
export declare const colorOptions: string[];
export declare const primaryColor: Color;
export declare const secondaryColor: Color;

@@ -1,2 +0,2 @@

import { GradientStop } from 'types';
import type { GradientStop } from 'types';
export declare const createCSSGradient: (gradient: GradientStop[]) => string;

@@ -1,3 +0,3 @@

import { Path } from 'd3-path';
import { CurveGenerator } from 'd3-shape';
import type { Path } from 'd3-path';
import type { CurveGenerator } from 'd3-shape';
export interface CurveStepRoundedProps {

@@ -4,0 +4,0 @@ distance: number;

@@ -1,2 +0,2 @@

import { MouseEvent, TouchEvent } from 'react';
import type { MouseEvent, TouchEvent } from 'react';
export declare function eventPoint(event: MouseEvent<SVGSVGElement> | TouchEvent<SVGSVGElement>): {

@@ -3,0 +3,0 @@ clientX: number;

@@ -1,3 +0,3 @@

import { Color } from 'types';
import type { Color } from 'types';
export declare function isValidColorToken(color: any): color is Color;
export declare function getColorValue(color: Color): string;

@@ -1,2 +0,2 @@

import { Color } from 'types';
import type { Color } from 'types';
export declare function getDefaultColor(index?: number): Color;

@@ -1,2 +0,2 @@

import { GradientStop, SeriesColor } from '../types';
import type { GradientStop, SeriesColor } from '../types';
export declare function isGradientType(color: SeriesColor): color is GradientStop[];

@@ -1,2 +0,2 @@

import React from 'react';
import type React from 'react';
export declare function isMouseEvent(event: React.SyntheticEvent): event is React.MouseEvent;

@@ -1,2 +0,2 @@

import React from 'react';
import type React from 'react';
export declare function isTouchEvent(event: React.SyntheticEvent): event is React.TouchEvent;

@@ -1,2 +0,2 @@

import { GradientStop } from '../types';
import type { GradientStop } from '../types';
export declare function makeColorOpaque(color: string): string;

@@ -3,0 +3,0 @@ export declare function makeGradientOpaque(gradient: GradientStop[]): {

@@ -1,2 +0,2 @@

import { Data } from '../types';
import type { Data } from '../types';
export declare function shouldRotateZeroBars(data: Data[]): false;

@@ -1,2 +0,2 @@

import { ScaleLinear } from 'd3-scale';
import type { ScaleLinear } from 'd3-scale';
export declare function shouldRoundScaleUp({ yScale, maxTicks, maxValue, }: {

@@ -3,0 +3,0 @@ yScale: ScaleLinear<number, number>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc