victory-core 37.0.0 → 37.0.1-next.1

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.
Files changed (122) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/index.d.ts +17 -17
  3. package/es/types/callbacks.d.ts +36 -36
  4. package/es/types/prop-types.d.ts +129 -129
  5. package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
  6. package/es/victory-animation/util.d.ts +66 -66
  7. package/es/victory-animation/victory-animation.d.ts +34 -34
  8. package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
  9. package/es/victory-container/victory-container.d.ts +68 -68
  10. package/es/victory-label/victory-label.d.ts +58 -58
  11. package/es/victory-portal/portal-context.d.ts +11 -11
  12. package/es/victory-portal/portal.d.ts +20 -20
  13. package/es/victory-portal/victory-portal.d.ts +26 -26
  14. package/es/victory-primitives/arc.d.ts +14 -14
  15. package/es/victory-primitives/background.d.ts +13 -13
  16. package/es/victory-primitives/border.d.ts +10 -10
  17. package/es/victory-primitives/circle.d.ts +3 -3
  18. package/es/victory-primitives/clip-path.d.ts +7 -7
  19. package/es/victory-primitives/index.d.ts +14 -14
  20. package/es/victory-primitives/line-segment.d.ts +11 -11
  21. package/es/victory-primitives/line.d.ts +3 -3
  22. package/es/victory-primitives/path.d.ts +3 -3
  23. package/es/victory-primitives/point.d.ts +13 -13
  24. package/es/victory-primitives/rect.d.ts +3 -3
  25. package/es/victory-primitives/text.d.ts +8 -8
  26. package/es/victory-primitives/tspan.d.ts +3 -3
  27. package/es/victory-primitives/types.d.ts +7 -7
  28. package/es/victory-primitives/whisker.d.ts +15 -15
  29. package/es/victory-theme/grayscale.d.ts +2 -2
  30. package/es/victory-theme/material.d.ts +2 -2
  31. package/es/victory-theme/types.d.ts +238 -238
  32. package/es/victory-theme/victory-theme.d.ts +5 -5
  33. package/es/victory-transition/victory-transition.d.ts +53 -53
  34. package/es/victory-util/add-events.d.ts +126 -126
  35. package/es/victory-util/axis.d.ts +50 -50
  36. package/es/victory-util/collection.d.ts +15 -15
  37. package/es/victory-util/common-props.d.ts +79 -79
  38. package/es/victory-util/data.d.ts +74 -74
  39. package/es/victory-util/default-transitions.d.ts +4 -4
  40. package/es/victory-util/domain.d.ts +90 -90
  41. package/es/victory-util/events.d.ts +64 -64
  42. package/es/victory-util/helpers.d.ts +96 -96
  43. package/es/victory-util/hooks/index.d.ts +2 -2
  44. package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
  45. package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
  46. package/es/victory-util/immutable.d.ts +11 -11
  47. package/es/victory-util/index.d.ts +26 -26
  48. package/es/victory-util/label-helpers.d.ts +26 -26
  49. package/es/victory-util/line-helpers.d.ts +4 -4
  50. package/es/victory-util/log.d.ts +1 -1
  51. package/es/victory-util/point-path-helpers.d.ts +9 -9
  52. package/es/victory-util/scale.d.ts +9 -9
  53. package/es/victory-util/selection.d.ts +28 -28
  54. package/es/victory-util/style.d.ts +18 -18
  55. package/es/victory-util/textsize.d.ts +35 -35
  56. package/es/victory-util/timer-context.d.ts +11 -11
  57. package/es/victory-util/timer.d.ts +16 -16
  58. package/es/victory-util/transitions.d.ts +48 -48
  59. package/es/victory-util/type-helpers.d.ts +9 -9
  60. package/es/victory-util/user-props.d.ts +26 -26
  61. package/es/victory-util/wrapper.d.ts +33 -33
  62. package/lib/index.d.ts +17 -17
  63. package/lib/types/callbacks.d.ts +36 -36
  64. package/lib/types/prop-types.d.ts +129 -129
  65. package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
  66. package/lib/victory-animation/util.d.ts +66 -66
  67. package/lib/victory-animation/victory-animation.d.ts +34 -34
  68. package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
  69. package/lib/victory-container/victory-container.d.ts +68 -68
  70. package/lib/victory-label/victory-label.d.ts +58 -58
  71. package/lib/victory-portal/portal-context.d.ts +11 -11
  72. package/lib/victory-portal/portal.d.ts +20 -20
  73. package/lib/victory-portal/victory-portal.d.ts +26 -26
  74. package/lib/victory-primitives/arc.d.ts +14 -14
  75. package/lib/victory-primitives/background.d.ts +13 -13
  76. package/lib/victory-primitives/border.d.ts +10 -10
  77. package/lib/victory-primitives/circle.d.ts +3 -3
  78. package/lib/victory-primitives/clip-path.d.ts +7 -7
  79. package/lib/victory-primitives/index.d.ts +14 -14
  80. package/lib/victory-primitives/line-segment.d.ts +11 -11
  81. package/lib/victory-primitives/line.d.ts +3 -3
  82. package/lib/victory-primitives/path.d.ts +3 -3
  83. package/lib/victory-primitives/point.d.ts +13 -13
  84. package/lib/victory-primitives/rect.d.ts +3 -3
  85. package/lib/victory-primitives/text.d.ts +8 -8
  86. package/lib/victory-primitives/tspan.d.ts +3 -3
  87. package/lib/victory-primitives/types.d.ts +7 -7
  88. package/lib/victory-primitives/whisker.d.ts +15 -15
  89. package/lib/victory-theme/grayscale.d.ts +2 -2
  90. package/lib/victory-theme/material.d.ts +2 -2
  91. package/lib/victory-theme/types.d.ts +238 -238
  92. package/lib/victory-theme/victory-theme.d.ts +5 -5
  93. package/lib/victory-transition/victory-transition.d.ts +53 -53
  94. package/lib/victory-util/add-events.d.ts +126 -126
  95. package/lib/victory-util/axis.d.ts +50 -50
  96. package/lib/victory-util/collection.d.ts +15 -15
  97. package/lib/victory-util/common-props.d.ts +79 -79
  98. package/lib/victory-util/data.d.ts +74 -74
  99. package/lib/victory-util/default-transitions.d.ts +4 -4
  100. package/lib/victory-util/domain.d.ts +90 -90
  101. package/lib/victory-util/events.d.ts +64 -64
  102. package/lib/victory-util/helpers.d.ts +96 -96
  103. package/lib/victory-util/hooks/index.d.ts +2 -2
  104. package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
  105. package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
  106. package/lib/victory-util/immutable.d.ts +11 -11
  107. package/lib/victory-util/index.d.ts +26 -26
  108. package/lib/victory-util/label-helpers.d.ts +26 -26
  109. package/lib/victory-util/line-helpers.d.ts +4 -4
  110. package/lib/victory-util/log.d.ts +1 -1
  111. package/lib/victory-util/point-path-helpers.d.ts +9 -9
  112. package/lib/victory-util/scale.d.ts +9 -9
  113. package/lib/victory-util/selection.d.ts +28 -28
  114. package/lib/victory-util/style.d.ts +18 -18
  115. package/lib/victory-util/textsize.d.ts +35 -35
  116. package/lib/victory-util/timer-context.d.ts +11 -11
  117. package/lib/victory-util/timer.d.ts +16 -16
  118. package/lib/victory-util/transitions.d.ts +48 -48
  119. package/lib/victory-util/type-helpers.d.ts +9 -9
  120. package/lib/victory-util/user-props.d.ts +26 -26
  121. package/lib/victory-util/wrapper.d.ts +33 -33
  122. package/package.json +2 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # victory-core
2
2
 
3
+ ## 37.0.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - victory-vendor@37.0.1-next.1
8
+
3
9
  ## 37.0.0
4
10
 
5
11
  ### Major Changes
package/es/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- export * from "./types/callbacks";
2
- export * from "./types/prop-types";
3
- export * from "./victory-accessible-group/victory-accessible-group";
4
- export * from "./victory-animation/victory-animation";
5
- export * from "./victory-container/victory-container";
6
- export * from "./victory-label/victory-label";
7
- export * from "./victory-transition/victory-transition";
8
- export * from "./victory-clip-container/victory-clip-container";
9
- export * from "./victory-theme/types";
10
- export * from "./victory-theme/victory-theme";
11
- export * from "./victory-portal/portal";
12
- export * from "./victory-portal/portal-context";
13
- export * from "./victory-portal/victory-portal";
14
- export * from "./victory-primitives";
15
- export { Border as Box } from "./victory-primitives";
16
- export type { BorderProps as BoxProps } from "./victory-primitives";
17
- export * from "./victory-util";
1
+ export * from "./types/callbacks";
2
+ export * from "./types/prop-types";
3
+ export * from "./victory-accessible-group/victory-accessible-group";
4
+ export * from "./victory-animation/victory-animation";
5
+ export * from "./victory-container/victory-container";
6
+ export * from "./victory-label/victory-label";
7
+ export * from "./victory-transition/victory-transition";
8
+ export * from "./victory-clip-container/victory-clip-container";
9
+ export * from "./victory-theme/types";
10
+ export * from "./victory-theme/victory-theme";
11
+ export * from "./victory-portal/portal";
12
+ export * from "./victory-portal/portal-context";
13
+ export * from "./victory-portal/victory-portal";
14
+ export * from "./victory-primitives";
15
+ export { Border as Box } from "./victory-primitives";
16
+ export type { BorderProps as BoxProps } from "./victory-primitives";
17
+ export * from "./victory-util";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,37 +1,37 @@
1
- import { D3Scale, Datum, ID, ScalePropType } from "./prop-types";
2
- import { BlockProps, OrientationTypes } from "../victory-theme/types";
3
- /**
4
- * This is the first parameter of a callback when a callback is used to
5
- * resolve the value of a property instead of a concrete value.
6
- *
7
- * Note that additional properties here like `scale`, `x`, `y`, etc are resolved
8
- * values of properties from the VictoryXXXProps for each component.
9
- */
10
- export interface CallbackArgs {
11
- active?: boolean;
12
- data?: Datum[];
13
- datum?: Datum;
14
- horizontal?: boolean;
15
- index?: ID;
16
- x?: number;
17
- y?: number;
18
- scale?: ScalePropType | D3Scale | {
19
- x?: ScalePropType | D3Scale;
20
- y?: ScalePropType | D3Scale;
21
- };
22
- tick?: any;
23
- ticks?: any;
24
- text?: any;
25
- }
26
- export declare type VictoryStringOrNumberCallback = (args: CallbackArgs) => string | number;
27
- export declare type VictoryStringCallback = (args: CallbackArgs) => string;
28
- export declare type StringOrNumberOrCallback = string | number | VictoryStringOrNumberCallback;
29
- export declare type StringOrCallback = string | VictoryStringCallback;
30
- export declare type SliceNumberOrCallback<T, P extends string | number | symbol = never> = number | ((props: Omit<T, P>) => number);
31
- export declare type VictoryNumberCallback = (args: CallbackArgs) => number;
32
- export declare type VictoryPaddingCallback = (args: CallbackArgs) => number | BlockProps;
33
- export declare type VictoryOrientationCallback = (args: CallbackArgs) => OrientationTypes;
34
- export declare type NumberOrCallback = number | VictoryNumberCallback;
35
- export declare type PaddingOrCallback = number | BlockProps | VictoryPaddingCallback;
36
- export declare type OrientationOrCallback = OrientationTypes | VictoryOrientationCallback;
1
+ import { D3Scale, Datum, ID, ScalePropType } from "./prop-types";
2
+ import { BlockProps, OrientationTypes } from "../victory-theme/types";
3
+ /**
4
+ * This is the first parameter of a callback when a callback is used to
5
+ * resolve the value of a property instead of a concrete value.
6
+ *
7
+ * Note that additional properties here like `scale`, `x`, `y`, etc are resolved
8
+ * values of properties from the VictoryXXXProps for each component.
9
+ */
10
+ export interface CallbackArgs {
11
+ active?: boolean;
12
+ data?: Datum[];
13
+ datum?: Datum;
14
+ horizontal?: boolean;
15
+ index?: ID;
16
+ x?: number;
17
+ y?: number;
18
+ scale?: ScalePropType | D3Scale | {
19
+ x?: ScalePropType | D3Scale;
20
+ y?: ScalePropType | D3Scale;
21
+ };
22
+ tick?: any;
23
+ ticks?: any;
24
+ text?: any;
25
+ }
26
+ export declare type VictoryStringOrNumberCallback = (args: CallbackArgs) => string | number;
27
+ export declare type VictoryStringCallback = (args: CallbackArgs) => string;
28
+ export declare type StringOrNumberOrCallback = string | number | VictoryStringOrNumberCallback;
29
+ export declare type StringOrCallback = string | VictoryStringCallback;
30
+ export declare type SliceNumberOrCallback<T, P extends string | number | symbol = never> = number | ((props: Omit<T, P>) => number);
31
+ export declare type VictoryNumberCallback = (args: CallbackArgs) => number;
32
+ export declare type VictoryPaddingCallback = (args: CallbackArgs) => number | BlockProps;
33
+ export declare type VictoryOrientationCallback = (args: CallbackArgs) => OrientationTypes;
34
+ export declare type NumberOrCallback = number | VictoryNumberCallback;
35
+ export declare type PaddingOrCallback = number | BlockProps | VictoryPaddingCallback;
36
+ export declare type OrientationOrCallback = OrientationTypes | VictoryOrientationCallback;
37
37
  //# sourceMappingURL=callbacks.d.ts.map
@@ -1,130 +1,130 @@
1
- import * as React from "react";
2
- import { ScaleLinear, ScaleLogarithmic, ScalePower, ScaleTime } from "victory-vendor/d3-scale";
3
- import { AnimationEasing, AnimationStyle } from "../victory-animation/victory-animation";
4
- import { CallbackArgs, StringOrNumberOrCallback } from "./callbacks";
5
- export declare type AxisType = "x" | "y";
6
- export declare type DatumValue = number | string | Date | null | undefined;
7
- export declare type Datum = any;
8
- export declare type ForAxes<T> = T | {
9
- x?: T;
10
- y?: T;
11
- };
12
- export declare type ID = number | string;
13
- export declare type ValueOrAccessor<ValueType, PropsType = CallbackArgs> = ValueType | ((props: PropsType) => ValueType);
14
- export declare type Tuple<T> = [T, T];
15
- export declare type ValueOrAxes<T> = T | ForAxes<T>;
16
- export declare type DomainPaddingPropType = ValueOrAxes<PaddingType>;
17
- export declare type DomainPropType = ValueOrAxes<DomainTuple>;
18
- export declare type DomainValue = number | Date;
19
- export declare type DomainTuple = Tuple<number> | Tuple<Date>;
20
- export declare type PaddingType = number | Tuple<number>;
21
- export declare type RangePropType = ValueOrAxes<RangeTuple>;
22
- export declare type RangeTuple = number[];
23
- export declare type StringOrNumberOrList = string | number | (string | number)[];
24
- export interface Padding {
25
- top: number;
26
- bottom: number;
27
- left: number;
28
- right: number;
29
- }
30
- export interface AnimatePropTypeInterface {
31
- duration?: number;
32
- onEnd?: () => void;
33
- onExit?: {
34
- duration?: number;
35
- before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
36
- };
37
- onEnter?: {
38
- duration?: number;
39
- before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
40
- after?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
41
- };
42
- onLoad?: {
43
- duration?: number;
44
- before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
45
- after?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
46
- };
47
- easing?: AnimationEasing;
48
- animationWhitelist?: string[];
49
- }
50
- export interface EventCallbackInterface<TTarget, TEventKey> {
51
- childName?: string | string[];
52
- target?: TTarget;
53
- eventKey?: TEventKey;
54
- mutation: (props: any) => any;
55
- callback?: (props: any) => any;
56
- }
57
- export interface EventPropTypeInterface<TTarget, TEventKey> {
58
- childName?: string | Array<StringOrNumberOrCallback>;
59
- target: TTarget;
60
- eventKey?: TEventKey;
61
- eventHandlers: {
62
- [key: string]: {
63
- (event: React.SyntheticEvent<any>, props?: any): EventCallbackInterface<TTarget, TEventKey>;
64
- } | {
65
- (event: React.SyntheticEvent<any>, props?: any): EventCallbackInterface<TTarget, TEventKey>[];
66
- } | {
67
- (event: React.SyntheticEvent<any>, props?: any): void;
68
- };
69
- };
70
- }
71
- declare type NumberValue = number | {
72
- valueOf(): number;
73
- };
74
- /**
75
- * D3 scale function shape. Don't want to introduce typing dependency to d3
76
- */
77
- export interface D3Scale<TRange = any> {
78
- (numberValue: NumberValue): number;
79
- base?: () => number;
80
- ticks: (count?: number) => number[];
81
- tickFormat: (count?: number) => (d: number) => string;
82
- domain: {
83
- (): number[];
84
- (domain: NumberValue[]): D3Scale<TRange>;
85
- };
86
- range: {
87
- (): TRange[];
88
- (range: TRange): D3Scale<TRange>;
89
- };
90
- copy: () => this;
91
- invert: (value: number) => number;
92
- }
93
- export declare type D3ScaleFn<TRange = any, TOutput = any> = () => ScaleLinear<TRange, TOutput, unknown> | ScaleLogarithmic<TRange, TOutput, unknown> | ScaleTime<TRange, TOutput, unknown> | ScalePower<TRange, TOutput, unknown>;
94
- export declare type ScaleName = "linear" | "time" | "log" | "sqrt";
95
- export declare type ScalePropType = ScaleName;
96
- export declare type ScaleXYPropType = {
97
- x: D3Scale;
98
- y: D3Scale;
99
- };
100
- export declare type CategoryPropType = string[] | {
101
- x: string[];
102
- } | {
103
- y: string[];
104
- } | {
105
- x: string[];
106
- y: string[];
107
- };
108
- export declare type DataGetterPropType = ValueOrAccessor<string | string[] | number | number[], any>;
109
- export declare type InterpolationPropType = "basis" | "basisClosed" | "basisOpen" | "bundle" | "cardinal" | "cardinalClosed" | "cardinalOpen" | "catmullRom" | "catmullRomClosed" | "catmullRomOpen" | "linear" | "linearClosed" | "monotoneX" | "monotoneY" | "natural" | "radial" | "step" | "stepAfter" | "stepBefore";
110
- export declare type ColorScalePropType = "grayscale" | "qualitative" | "heatmap" | "warm" | "cool" | "red" | "green" | "blue" | string[];
111
- export declare type SortOrderPropType = "ascending" | "descending";
112
- export interface VictoryLabelableProps {
113
- labelComponent?: React.ReactElement;
114
- }
115
- export interface VictoryMultiLabelableProps extends VictoryLabelableProps {
116
- labels?: string[] | number[] | {
117
- (data: any): string | string[] | number | number[] | null;
118
- };
119
- }
120
- export interface VictorySingleLabelableProps extends VictoryLabelableProps {
121
- label?: string | {
122
- (data: any): string | number | null;
123
- };
124
- }
125
- export declare type CoordinatesPropType = {
126
- x: number;
127
- y: number;
128
- };
129
- export {};
1
+ import * as React from "react";
2
+ import { ScaleLinear, ScaleLogarithmic, ScalePower, ScaleTime } from "victory-vendor/d3-scale";
3
+ import { AnimationEasing, AnimationStyle } from "../victory-animation/victory-animation";
4
+ import { CallbackArgs, StringOrNumberOrCallback } from "./callbacks";
5
+ export declare type AxisType = "x" | "y";
6
+ export declare type DatumValue = number | string | Date | null | undefined;
7
+ export declare type Datum = any;
8
+ export declare type ForAxes<T> = T | {
9
+ x?: T;
10
+ y?: T;
11
+ };
12
+ export declare type ID = number | string;
13
+ export declare type ValueOrAccessor<ValueType, PropsType = CallbackArgs> = ValueType | ((props: PropsType) => ValueType);
14
+ export declare type Tuple<T> = [T, T];
15
+ export declare type ValueOrAxes<T> = T | ForAxes<T>;
16
+ export declare type DomainPaddingPropType = ValueOrAxes<PaddingType>;
17
+ export declare type DomainPropType = ValueOrAxes<DomainTuple>;
18
+ export declare type DomainValue = number | Date;
19
+ export declare type DomainTuple = Tuple<number> | Tuple<Date>;
20
+ export declare type PaddingType = number | Tuple<number>;
21
+ export declare type RangePropType = ValueOrAxes<RangeTuple>;
22
+ export declare type RangeTuple = number[];
23
+ export declare type StringOrNumberOrList = string | number | (string | number)[];
24
+ export interface Padding {
25
+ top: number;
26
+ bottom: number;
27
+ left: number;
28
+ right: number;
29
+ }
30
+ export interface AnimatePropTypeInterface {
31
+ duration?: number;
32
+ onEnd?: () => void;
33
+ onExit?: {
34
+ duration?: number;
35
+ before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
36
+ };
37
+ onEnter?: {
38
+ duration?: number;
39
+ before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
40
+ after?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
41
+ };
42
+ onLoad?: {
43
+ duration?: number;
44
+ before?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
45
+ after?: (datum: Datum, index: number, data: Datum[]) => AnimationStyle;
46
+ };
47
+ easing?: AnimationEasing;
48
+ animationWhitelist?: string[];
49
+ }
50
+ export interface EventCallbackInterface<TTarget, TEventKey> {
51
+ childName?: string | string[];
52
+ target?: TTarget;
53
+ eventKey?: TEventKey;
54
+ mutation: (props: any) => any;
55
+ callback?: (props: any) => any;
56
+ }
57
+ export interface EventPropTypeInterface<TTarget, TEventKey> {
58
+ childName?: string | Array<StringOrNumberOrCallback>;
59
+ target: TTarget;
60
+ eventKey?: TEventKey;
61
+ eventHandlers: {
62
+ [key: string]: {
63
+ (event: React.SyntheticEvent<any>, props?: any): EventCallbackInterface<TTarget, TEventKey>;
64
+ } | {
65
+ (event: React.SyntheticEvent<any>, props?: any): EventCallbackInterface<TTarget, TEventKey>[];
66
+ } | {
67
+ (event: React.SyntheticEvent<any>, props?: any): void;
68
+ };
69
+ };
70
+ }
71
+ declare type NumberValue = number | {
72
+ valueOf(): number;
73
+ };
74
+ /**
75
+ * D3 scale function shape. Don't want to introduce typing dependency to d3
76
+ */
77
+ export interface D3Scale<TRange = any> {
78
+ (numberValue: NumberValue): number;
79
+ base?: () => number;
80
+ ticks: (count?: number) => number[];
81
+ tickFormat: (count?: number) => (d: number) => string;
82
+ domain: {
83
+ (): number[];
84
+ (domain: NumberValue[]): D3Scale<TRange>;
85
+ };
86
+ range: {
87
+ (): TRange[];
88
+ (range: TRange): D3Scale<TRange>;
89
+ };
90
+ copy: () => this;
91
+ invert: (value: number) => number;
92
+ }
93
+ export declare type D3ScaleFn<TRange = any, TOutput = any> = () => ScaleLinear<TRange, TOutput, unknown> | ScaleLogarithmic<TRange, TOutput, unknown> | ScaleTime<TRange, TOutput, unknown> | ScalePower<TRange, TOutput, unknown>;
94
+ export declare type ScaleName = "linear" | "time" | "log" | "sqrt";
95
+ export declare type ScalePropType = ScaleName;
96
+ export declare type ScaleXYPropType = {
97
+ x: D3Scale;
98
+ y: D3Scale;
99
+ };
100
+ export declare type CategoryPropType = string[] | {
101
+ x: string[];
102
+ } | {
103
+ y: string[];
104
+ } | {
105
+ x: string[];
106
+ y: string[];
107
+ };
108
+ export declare type DataGetterPropType = ValueOrAccessor<string | string[] | number | number[], any>;
109
+ export declare type InterpolationPropType = "basis" | "basisClosed" | "basisOpen" | "bundle" | "cardinal" | "cardinalClosed" | "cardinalOpen" | "catmullRom" | "catmullRomClosed" | "catmullRomOpen" | "linear" | "linearClosed" | "monotoneX" | "monotoneY" | "natural" | "radial" | "step" | "stepAfter" | "stepBefore";
110
+ export declare type ColorScalePropType = "grayscale" | "qualitative" | "heatmap" | "warm" | "cool" | "red" | "green" | "blue" | string[];
111
+ export declare type SortOrderPropType = "ascending" | "descending";
112
+ export interface VictoryLabelableProps {
113
+ labelComponent?: React.ReactElement;
114
+ }
115
+ export interface VictoryMultiLabelableProps extends VictoryLabelableProps {
116
+ labels?: string[] | number[] | {
117
+ (data: any): string | string[] | number | number[] | null;
118
+ };
119
+ }
120
+ export interface VictorySingleLabelableProps extends VictoryLabelableProps {
121
+ label?: string | {
122
+ (data: any): string | number | null;
123
+ };
124
+ }
125
+ export declare type CoordinatesPropType = {
126
+ x: number;
127
+ y: number;
128
+ };
129
+ export {};
130
130
  //# sourceMappingURL=prop-types.d.ts.map
@@ -1,11 +1,11 @@
1
- import React from "react";
2
- export interface VictoryAccessibleGroupProps {
3
- desc?: string;
4
- "aria-describedby"?: string;
5
- "aria-label"?: string;
6
- children?: React.ReactElement | React.ReactElement[];
7
- className?: string;
8
- tabIndex?: number;
9
- }
10
- export declare const VictoryAccessibleGroup: ({ desc, children, tabIndex, className, ...props }: VictoryAccessibleGroupProps) => JSX.Element;
1
+ import React from "react";
2
+ export interface VictoryAccessibleGroupProps {
3
+ desc?: string;
4
+ "aria-describedby"?: string;
5
+ "aria-label"?: string;
6
+ children?: React.ReactElement | React.ReactElement[];
7
+ className?: string;
8
+ tabIndex?: number;
9
+ }
10
+ export declare const VictoryAccessibleGroup: ({ desc, children, tabIndex, className, ...props }: VictoryAccessibleGroupProps) => JSX.Element;
11
11
  //# sourceMappingURL=victory-accessible-group.d.ts.map
@@ -1,67 +1,67 @@
1
- export declare const isInterpolatable: (obj: any) => boolean;
2
- /**
3
- * Interpolate immediately to the end value at the given step `when`.
4
- * Some nicer default behavior might be to jump at the halfway point or return
5
- * `a` if `t` is 0 (instead of always returning `b`). But d3's default
6
- * interpolator does not do these things:
7
- *
8
- * d3.interpolate('aaa', 'bbb')(0) === 'bbb'
9
- *
10
- * ...and things might get wonky if we don't replicate that behavior.
11
- *
12
- * @param {any} a - Start value.
13
- * @param {any} b - End value.
14
- * @param {Number} when - Step value (0 to 1) at which to jump to `b`.
15
- * @returns {Function} An interpolation function.
16
- */
17
- export declare const interpolateImmediate: (a: any, b: any, when?: number) => (t: any) => any;
18
- /**
19
- * Interpolate to or from a function. The interpolated value will be a function
20
- * that calls `a` (if it's a function) and `b` (if it's a function) and calls
21
- * `d3.interpolate` on the resulting values. Note that our function won't
22
- * necessarily be called (that's up to the component this eventually gets
23
- * passed to) - but if it does get called, it will return an appropriately
24
- * interpolated value.
25
- *
26
- * @param {any} a - Start value.
27
- * @param {any} b - End value.
28
- * @returns {Function} An interpolation function.
29
- */
30
- export declare const interpolateFunction: (a: any, b: any) => (t: any) => any;
31
- /**
32
- * Interpolate to or from an object. This method is a modification of the object interpolator in
33
- * d3-interpolate https://github.com/d3/d3-interpolate/blob/master/src/object.js. This interpolator
34
- * differs in that it uses our custom interpolators when interpolating the value of each property in
35
- * an object. This allows the correct interpolation of nested objects, including styles
36
- *
37
- * @param {any} startValue - Start value.
38
- * @param {any} endValue - End value.
39
- * @returns {Function} An interpolation function.
40
- */
41
- export declare const interpolateObject: (startValue: any, endValue: any) => (t: any) => {};
42
- export declare const interpolateString: (a: any, b: any) => (t: number) => any;
43
- /**
44
- * By default, the list of interpolators used by `d3.interpolate` has a few
45
- * downsides:
46
- *
47
- * - `null` values get turned into 0.
48
- * - `undefined`, `function`, and some other value types get turned into NaN.
49
- * - Boolean types get turned into numbers, which probably will be meaningless
50
- * to whatever is consuming them.
51
- * - It tries to interpolate between identical start and end values, doing
52
- * unnecessary calculations that sometimes result in floating point rounding
53
- * errors.
54
- *
55
- * If only the default interpolators are used, `VictoryAnimation` will happily
56
- * pass down NaN (and other bad) values as props to the wrapped component.
57
- * The component will then either use the incorrect values or complain that it
58
- * was passed props of the incorrect type. This custom interpolator is added
59
- * using the `d3.interpolators` API, and prevents such cases from happening
60
- * for most values.
61
- *
62
- * @param {any} a - Start value.
63
- * @param {any} b - End value.
64
- * @returns {Function|undefined} An interpolation function, if necessary.
65
- */
66
- export declare const victoryInterpolator: <T>(a: T, b: T) => (t: number) => T;
1
+ export declare const isInterpolatable: (obj: any) => boolean;
2
+ /**
3
+ * Interpolate immediately to the end value at the given step `when`.
4
+ * Some nicer default behavior might be to jump at the halfway point or return
5
+ * `a` if `t` is 0 (instead of always returning `b`). But d3's default
6
+ * interpolator does not do these things:
7
+ *
8
+ * d3.interpolate('aaa', 'bbb')(0) === 'bbb'
9
+ *
10
+ * ...and things might get wonky if we don't replicate that behavior.
11
+ *
12
+ * @param {any} a - Start value.
13
+ * @param {any} b - End value.
14
+ * @param {Number} when - Step value (0 to 1) at which to jump to `b`.
15
+ * @returns {Function} An interpolation function.
16
+ */
17
+ export declare const interpolateImmediate: (a: any, b: any, when?: number) => (t: any) => any;
18
+ /**
19
+ * Interpolate to or from a function. The interpolated value will be a function
20
+ * that calls `a` (if it's a function) and `b` (if it's a function) and calls
21
+ * `d3.interpolate` on the resulting values. Note that our function won't
22
+ * necessarily be called (that's up to the component this eventually gets
23
+ * passed to) - but if it does get called, it will return an appropriately
24
+ * interpolated value.
25
+ *
26
+ * @param {any} a - Start value.
27
+ * @param {any} b - End value.
28
+ * @returns {Function} An interpolation function.
29
+ */
30
+ export declare const interpolateFunction: (a: any, b: any) => (t: any) => any;
31
+ /**
32
+ * Interpolate to or from an object. This method is a modification of the object interpolator in
33
+ * d3-interpolate https://github.com/d3/d3-interpolate/blob/master/src/object.js. This interpolator
34
+ * differs in that it uses our custom interpolators when interpolating the value of each property in
35
+ * an object. This allows the correct interpolation of nested objects, including styles
36
+ *
37
+ * @param {any} startValue - Start value.
38
+ * @param {any} endValue - End value.
39
+ * @returns {Function} An interpolation function.
40
+ */
41
+ export declare const interpolateObject: (startValue: any, endValue: any) => (t: any) => {};
42
+ export declare const interpolateString: (a: any, b: any) => (t: number) => any;
43
+ /**
44
+ * By default, the list of interpolators used by `d3.interpolate` has a few
45
+ * downsides:
46
+ *
47
+ * - `null` values get turned into 0.
48
+ * - `undefined`, `function`, and some other value types get turned into NaN.
49
+ * - Boolean types get turned into numbers, which probably will be meaningless
50
+ * to whatever is consuming them.
51
+ * - It tries to interpolate between identical start and end values, doing
52
+ * unnecessary calculations that sometimes result in floating point rounding
53
+ * errors.
54
+ *
55
+ * If only the default interpolators are used, `VictoryAnimation` will happily
56
+ * pass down NaN (and other bad) values as props to the wrapped component.
57
+ * The component will then either use the incorrect values or complain that it
58
+ * was passed props of the incorrect type. This custom interpolator is added
59
+ * using the `d3.interpolators` API, and prevents such cases from happening
60
+ * for most values.
61
+ *
62
+ * @param {any} a - Start value.
63
+ * @param {any} b - End value.
64
+ * @returns {Function|undefined} An interpolation function, if necessary.
65
+ */
66
+ export declare const victoryInterpolator: <T>(a: T, b: T) => (t: number) => T;
67
67
  //# sourceMappingURL=util.d.ts.map
@@ -1,35 +1,35 @@
1
- import React from "react";
2
- import TimerContext from "../victory-util/timer-context";
3
- /**
4
- * Single animation object to interpolate
5
- */
6
- export declare type AnimationStyle = {
7
- [key: string]: string | number;
8
- };
9
- /**
10
- * Animation styles to interpolate
11
- */
12
- export declare type AnimationData = AnimationStyle | AnimationStyle[];
13
- export declare type AnimationEasing = "back" | "backIn" | "backOut" | "backInOut" | "bounce" | "bounceIn" | "bounceOut" | "bounceInOut" | "circle" | "circleIn" | "circleOut" | "circleInOut" | "linear" | "linearIn" | "linearOut" | "linearInOut" | "cubic" | "cubicIn" | "cubicOut" | "cubicInOut" | "elastic" | "elasticIn" | "elasticOut" | "elasticInOut" | "exp" | "expIn" | "expOut" | "expInOut" | "poly" | "polyIn" | "polyOut" | "polyInOut" | "quad" | "quadIn" | "quadOut" | "quadInOut" | "sin" | "sinIn" | "sinOut" | "sinInOut";
14
- export interface VictoryAnimationProps {
15
- children: (style: AnimationStyle, info: AnimationInfo) => React.ReactElement;
16
- duration?: number;
17
- easing?: AnimationEasing;
18
- delay?: number;
19
- onEnd?: () => void;
20
- data: AnimationData;
21
- }
22
- export interface VictoryAnimationState {
23
- data: AnimationStyle;
24
- animationInfo: AnimationInfo;
25
- }
26
- export interface AnimationInfo {
27
- progress: number;
28
- animating: boolean;
29
- terminating?: boolean;
30
- }
31
- export interface VictoryAnimation {
32
- context: React.ContextType<typeof TimerContext>;
33
- }
34
- export declare const VictoryAnimation: ({ duration, easing, delay, data, children, onEnd, }: VictoryAnimationProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
1
+ import React from "react";
2
+ import TimerContext from "../victory-util/timer-context";
3
+ /**
4
+ * Single animation object to interpolate
5
+ */
6
+ export declare type AnimationStyle = {
7
+ [key: string]: string | number;
8
+ };
9
+ /**
10
+ * Animation styles to interpolate
11
+ */
12
+ export declare type AnimationData = AnimationStyle | AnimationStyle[];
13
+ export declare type AnimationEasing = "back" | "backIn" | "backOut" | "backInOut" | "bounce" | "bounceIn" | "bounceOut" | "bounceInOut" | "circle" | "circleIn" | "circleOut" | "circleInOut" | "linear" | "linearIn" | "linearOut" | "linearInOut" | "cubic" | "cubicIn" | "cubicOut" | "cubicInOut" | "elastic" | "elasticIn" | "elasticOut" | "elasticInOut" | "exp" | "expIn" | "expOut" | "expInOut" | "poly" | "polyIn" | "polyOut" | "polyInOut" | "quad" | "quadIn" | "quadOut" | "quadInOut" | "sin" | "sinIn" | "sinOut" | "sinInOut";
14
+ export interface VictoryAnimationProps {
15
+ children: (style: AnimationStyle, info: AnimationInfo) => React.ReactElement;
16
+ duration?: number;
17
+ easing?: AnimationEasing;
18
+ delay?: number;
19
+ onEnd?: () => void;
20
+ data: AnimationData;
21
+ }
22
+ export interface VictoryAnimationState {
23
+ data: AnimationStyle;
24
+ animationInfo: AnimationInfo;
25
+ }
26
+ export interface AnimationInfo {
27
+ progress: number;
28
+ animating: boolean;
29
+ terminating?: boolean;
30
+ }
31
+ export interface VictoryAnimation {
32
+ context: React.ContextType<typeof TimerContext>;
33
+ }
34
+ export declare const VictoryAnimation: ({ duration, easing, delay, data, children, onEnd, }: VictoryAnimationProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
35
35
  //# sourceMappingURL=victory-animation.d.ts.map