victory-core 36.5.2 → 36.5.3

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/es/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export * from "./victory-portal/portal";
12
12
  export * from "./victory-portal/portal-context";
13
13
  export * from "./victory-portal/victory-portal";
14
14
  export * from "./victory-primitives";
15
- export { Border as Box } from "./victory-primitives";
15
+ export { Border as Box, type BorderProps as BoxProps, } from "./victory-primitives";
16
16
  export * from "./victory-util";
17
17
  export * from "./victory-state";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -43,7 +43,7 @@ export var useAnimationState = function () {
43
43
  }, [_setState]); // This is a copy of Wrapper.getAnimationProps
44
44
 
45
45
  var getAnimationProps = React.useCallback(function (props, child, index) {
46
- if (!props.animate) {
46
+ if (!(props !== null && props !== void 0 && props.animate)) {
47
47
  return child.props.animate;
48
48
  }
49
49
 
@@ -76,7 +76,7 @@ export var useAnimationState = function () {
76
76
  }, [state, setState]); // This is a copy of Wrapper.setAnimationState
77
77
 
78
78
  var setAnimationState = React.useCallback(function (props, nextProps) {
79
- if (!props.animate) {
79
+ if (!props || !props.animate) {
80
80
  return;
81
81
  }
82
82
 
package/lib/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export * from "./victory-portal/portal";
12
12
  export * from "./victory-portal/portal-context";
13
13
  export * from "./victory-portal/victory-portal";
14
14
  export * from "./victory-primitives";
15
- export { Border as Box } from "./victory-primitives";
15
+ export { Border as Box, type BorderProps as BoxProps, } from "./victory-primitives";
16
16
  export * from "./victory-util";
17
17
  export * from "./victory-state";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -62,7 +62,7 @@ var useAnimationState = function () {
62
62
 
63
63
 
64
64
  var getAnimationProps = _react.default.useCallback(function (props, child, index) {
65
- if (!props.animate) {
65
+ if (!(props !== null && props !== void 0 && props.animate)) {
66
66
  return child.props.animate;
67
67
  }
68
68
 
@@ -96,7 +96,7 @@ var useAnimationState = function () {
96
96
 
97
97
 
98
98
  var setAnimationState = _react.default.useCallback(function (props, nextProps) {
99
- if (!props.animate) {
99
+ if (!props || !props.animate) {
100
100
  return;
101
101
  }
102
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-core",
3
- "version": "36.5.2",
3
+ "version": "36.5.3",
4
4
  "description": "Victory Core",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -31,5 +31,5 @@
31
31
  "version": "yarn run nps build-libs && nps build-dists"
32
32
  },
33
33
  "sideEffects": false,
34
- "gitHead": "def218e9749ecafc159ef458dd03a8b92e227666"
34
+ "gitHead": "55338af3c57eacca5956e53c08a58e47ba41d01e"
35
35
  }
package/src/index.ts CHANGED
@@ -12,6 +12,9 @@ export * from "./victory-portal/portal";
12
12
  export * from "./victory-portal/portal-context";
13
13
  export * from "./victory-portal/victory-portal";
14
14
  export * from "./victory-primitives";
15
- export { Border as Box } from "./victory-primitives";
15
+ export {
16
+ Border as Box,
17
+ type BorderProps as BoxProps,
18
+ } from "./victory-primitives";
16
19
  export * from "./victory-util";
17
20
  export * from "./victory-state";
@@ -24,7 +24,7 @@ export const useAnimationState = (initialState = INITIAL_STATE) => {
24
24
  // This is a copy of Wrapper.getAnimationProps
25
25
  const getAnimationProps = React.useCallback(
26
26
  (props, child, index) => {
27
- if (!props.animate) {
27
+ if (!props?.animate) {
28
28
  return child.props.animate;
29
29
  }
30
30
  const getFilteredState = () => {
@@ -60,7 +60,7 @@ export const useAnimationState = (initialState = INITIAL_STATE) => {
60
60
  // This is a copy of Wrapper.setAnimationState
61
61
  const setAnimationState = React.useCallback(
62
62
  (props, nextProps) => {
63
- if (!props.animate) {
63
+ if (!props || !props.animate) {
64
64
  return;
65
65
  }
66
66
  if (props.animate.parentState) {
@@ -1,19 +0,0 @@
1
- /**
2
- * @license React
3
- * react-dom.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
-
11
- /**
12
- * @license React
13
- * scheduler.production.min.js
14
- *
15
- * Copyright (c) Facebook, Inc. and its affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */