@coinbase/cds-mobile-visualization 3.4.0-beta.26 → 3.4.0-beta.27
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/CHANGELOG.md +7 -1
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -1
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +5 -3
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,13 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
-
## 3.4.0-beta.
|
|
11
|
+
## 3.4.0-beta.27 (4/1/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Fix scrubber beacon initial load glitch. [[#573](https://github.com/coinbase/cds/pull/573)]
|
|
16
|
+
|
|
17
|
+
## 3.4.0-beta.26 (3/31/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🐞 Fixes
|
|
14
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultScrubberBeacon.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/DefaultScrubberBeacon.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBzE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG;IAC7D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;aAmD1B,CAAC;cAGI,CAAC;aAIE,CAAC;wBAEe,CAAC;;;IAxE/B;;;OAGG;aACM,MAAM;IACf;;;OAGG;kBACW,MAAM;
|
|
1
|
+
{"version":3,"file":"DefaultScrubberBeacon.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/DefaultScrubberBeacon.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBzE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG;IAC7D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;aAmD1B,CAAC;cAGI,CAAC;aAIE,CAAC;wBAEe,CAAC;;;IAxE/B;;;OAGG;aACM,MAAM;IACf;;;OAGG;kBACW,MAAM;sDAsMrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberBeaconLabelGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberBeaconLabelGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ScrubberBeaconLabelGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberBeaconLabelGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAsFpB,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAC9E;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,iCAAiC,GAAG;IAC9E;;;OAGG;IACH,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;IACpD;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,wBAAwB,qEAoMpC,CAAC"}
|
|
@@ -69,8 +69,8 @@ export const DefaultScrubberBeacon = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
|
69
69
|
useEffect(() => {
|
|
70
70
|
idlePulseShared.value = idlePulse != null ? idlePulse : false;
|
|
71
71
|
}, [idlePulse, idlePulseShared]);
|
|
72
|
-
const animatedX = useSharedValue(
|
|
73
|
-
const animatedY = useSharedValue(
|
|
72
|
+
const animatedX = useSharedValue(null);
|
|
73
|
+
const animatedY = useSharedValue(null);
|
|
74
74
|
|
|
75
75
|
// Calculate the target point position - project data to pixels
|
|
76
76
|
const targetPoint = useDerivedValue(() => {
|
|
@@ -104,11 +104,13 @@ export const DefaultScrubberBeacon = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
|
104
104
|
|
|
105
105
|
// Create animated point using the animated values
|
|
106
106
|
const animatedPoint = useDerivedValue(() => {
|
|
107
|
+
// If the animated values have not been set yet, return the target point
|
|
108
|
+
if (animatedX.value === null || animatedY.value === null) return targetPoint.value;
|
|
107
109
|
return {
|
|
108
110
|
x: animatedX.value,
|
|
109
111
|
y: animatedY.value
|
|
110
112
|
};
|
|
111
|
-
}, [animatedX, animatedY]);
|
|
113
|
+
}, [targetPoint, animatedX, animatedY]);
|
|
112
114
|
useImperativeHandle(ref, () => ({
|
|
113
115
|
pulse: () => {
|
|
114
116
|
// Only trigger manual pulse when idlePulse is not enabled
|
|
@@ -31,7 +31,7 @@ const PositionedLabel = /*#__PURE__*/memo(_ref => {
|
|
|
31
31
|
var _positions$value$inde3, _positions$value$inde4;
|
|
32
32
|
return (_positions$value$inde3 = (_positions$value$inde4 = positions.value[index]) == null ? void 0 : _positions$value$inde4.y) != null ? _positions$value$inde3 : 0;
|
|
33
33
|
}, [positions, index]);
|
|
34
|
-
const idleAnimatedY = useSharedValue(
|
|
34
|
+
const idleAnimatedY = useSharedValue(null);
|
|
35
35
|
useAnimatedReaction(() => ({
|
|
36
36
|
y: targetY.value,
|
|
37
37
|
idle: unwrapAnimatedValue(isIdle)
|
|
@@ -45,7 +45,7 @@ const PositionedLabel = /*#__PURE__*/memo(_ref => {
|
|
|
45
45
|
}, [updateTransition]);
|
|
46
46
|
|
|
47
47
|
// When scrubbing, use the targetY value, when idle, use the idleAnimatedY value.
|
|
48
|
-
const y = useDerivedValue(() => unwrapAnimatedValue(isIdle) ? idleAnimatedY.value : targetY.value, [isIdle, idleAnimatedY, targetY]);
|
|
48
|
+
const y = useDerivedValue(() => unwrapAnimatedValue(isIdle) && idleAnimatedY.value !== null ? idleAnimatedY.value : targetY.value, [isIdle, idleAnimatedY, targetY]);
|
|
49
49
|
const dx = useDerivedValue(() => {
|
|
50
50
|
return position.value === 'right' ? labelHorizontalOffset : -labelHorizontalOffset;
|
|
51
51
|
}, [position, labelHorizontalOffset]);
|