@coinbase/cds-mobile-visualization 3.4.0 → 3.6.2

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.
@@ -6,4 +6,5 @@ export * from './BarStack';
6
6
  export * from './BarStackGroup';
7
7
  export * from './DefaultBar';
8
8
  export * from './DefaultBarStack';
9
+ export * from './PercentageBarChart';
9
10
  // codegen:end
@@ -63,6 +63,15 @@ export const defaultBarEnterTransition = _extends({}, defaultTransition, {
63
63
  staggerDelay: 250
64
64
  });
65
65
 
66
+ /**
67
+ * Default bar enter opacity transition.
68
+ * `{ type: 'timing', duration: 200 }`
69
+ */
70
+ export const defaultBarEnterOpacityTransition = {
71
+ type: 'timing',
72
+ duration: 200
73
+ };
74
+
66
75
  /**
67
76
  * Calculates the size adjustment needed for bars when accounting for gaps between them.
68
77
  * This function helps determine how much to reduce each bar's width to accommodate
@@ -173,8 +173,12 @@ export const usePathTransition = _ref => {
173
173
  transitions,
174
174
  transition = defaultTransition
175
175
  } = _ref;
176
- const updateTransition = (transitions == null ? void 0 : transitions.update) !== undefined ? transitions.update : transition;
177
- const enterTransition = transitions == null ? void 0 : transitions.enter;
176
+ const transitionRef = useRef({
177
+ enter: transitions == null ? void 0 : transitions.enter,
178
+ update: (transitions == null ? void 0 : transitions.update) !== undefined ? transitions.update : transition
179
+ });
180
+ transitionRef.current.enter = transitions == null ? void 0 : transitions.enter;
181
+ transitionRef.current.update = (transitions == null ? void 0 : transitions.update) !== undefined ? transitions.update : transition;
178
182
  const targetPathRef = useRef(initialPath != null ? initialPath : currentPath);
179
183
  const isFirstAnimation = useRef(!!initialPath);
180
184
  const interpolatorRef = useRef(null);
@@ -193,7 +197,11 @@ export const usePathTransition = _ref => {
193
197
  fromPath = interpolatorRef.current(p);
194
198
  }
195
199
  targetPathRef.current = currentPath;
196
- const activeTransition = isFirstAnimation.current && enterTransition !== undefined ? enterTransition : updateTransition;
200
+ const {
201
+ enter,
202
+ update
203
+ } = transitionRef.current;
204
+ const activeTransition = isFirstAnimation.current && enter !== undefined ? enter : update;
197
205
  isFirstAnimation.current = false;
198
206
  if (activeTransition === null) {
199
207
  var _Skia$Path$MakeFromSV2;
@@ -215,7 +223,7 @@ export const usePathTransition = _ref => {
215
223
  progress.value = 0;
216
224
  progress.value = buildTransition(1, activeTransition);
217
225
  }
218
- }, [currentPath, updateTransition, enterTransition, progress, normalizedStartShared, normalizedEndShared, fallbackPathShared, result]);
226
+ }, [currentPath, progress, normalizedStartShared, normalizedEndShared, fallbackPathShared, result]);
219
227
  useAnimatedReaction(() => ({
220
228
  p: progress.value,
221
229
  to: fallbackPathShared.value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile-visualization",
3
- "version": "3.4.0",
3
+ "version": "3.6.2",
4
4
  "description": "Coinbase Design System - Mobile Visualization Native",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,9 +36,9 @@
36
36
  "CHANGELOG"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@coinbase/cds-common": "^8.62.1",
39
+ "@coinbase/cds-common": "^8.66.0",
40
40
  "@coinbase/cds-lottie-files": "^3.3.4",
41
- "@coinbase/cds-mobile": "^8.62.1",
41
+ "@coinbase/cds-mobile": "^8.66.0",
42
42
  "@coinbase/cds-utils": "^2.3.5",
43
43
  "@shopify/react-native-skia": "^1.12.4 || ^2.0.0",
44
44
  "react": "^18.3.1",
@@ -57,9 +57,9 @@
57
57
  "@babel/preset-env": "^7.28.0",
58
58
  "@babel/preset-react": "^7.27.1",
59
59
  "@babel/preset-typescript": "^7.27.1",
60
- "@coinbase/cds-common": "^8.62.1",
60
+ "@coinbase/cds-common": "^8.66.0",
61
61
  "@coinbase/cds-lottie-files": "^3.3.4",
62
- "@coinbase/cds-mobile": "^8.62.1",
62
+ "@coinbase/cds-mobile": "^8.66.0",
63
63
  "@coinbase/cds-utils": "^2.3.5",
64
64
  "@shopify/react-native-skia": "1.12.4",
65
65
  "@types/react": "^18.3.12",