@datalith/util
Advanced tools
Comparing version 0.8.0 to 0.9.0
/// <reference types="react" /> | ||
import ResponsiveWrapper from './ResponsiveWrapper'; | ||
export declare type Datum = any; | ||
declare type ContinuousAccessor = (d: Datum, i: number) => number; | ||
declare type DiscreteAccessor = (d: Datum, i: number) => string; | ||
declare type CoordsAccessor = (d: Datum, i: number) => [number, number]; | ||
export declare type Value = ContinuousAccessor | number; | ||
export declare type Color = DiscreteAccessor | string; | ||
export declare type Coords = CoordsAccessor | [number, number]; | ||
export interface CommonProps { | ||
declare type AccessorFunction<T> = (d: Datum, i: number) => T; | ||
export declare type Accessor<T> = AccessorFunction<T> | T; | ||
export declare type CoordsAccessor = Accessor<[number, number]>; | ||
export declare type StringAccessor = Accessor<string>; | ||
export declare type NumberAccessor = Accessor<number>; | ||
export interface CommonAccessors { | ||
/** Fill color accessor */ | ||
fill: StringAccessor; | ||
/** Fill opacity accessor */ | ||
fillOpacity: NumberAccessor; | ||
/** Stroke color accessor */ | ||
stroke: StringAccessor; | ||
/** Stroke opacity accessor */ | ||
strokeOpacity: NumberAccessor; | ||
} | ||
export interface CommonProps extends CommonAccessors { | ||
/** Custom css classes to apply to the SVG */ | ||
@@ -19,6 +28,2 @@ className?: string; | ||
data: Datum[]; | ||
/** Fill color accessor */ | ||
fill: Color; | ||
/** Stroke color accessor */ | ||
stroke: Color; | ||
/** Width and Height of the SVG */ | ||
@@ -25,0 +30,0 @@ size: { |
{ | ||
"name": "@datalith/util", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "datalith util", | ||
@@ -9,2 +9,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"prebuild": "rm -rf dist", | ||
"build": "tsc", | ||
@@ -49,3 +50,3 @@ "prepublish": "tsc" | ||
}, | ||
"gitHead": "cd7052522b6a4c73f8d0434ddaf0385d18e55880" | ||
"gitHead": "1d7b372a4d0bb83f7c5e94adc06841d133033f13" | ||
} |
Sorry, the diff of this file is not supported yet
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
9913
133