@pathscale/ui 0.0.153 → 0.0.154
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/dist/index.js +12 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10405,10 +10405,14 @@ function createSpring(initial, opts = {}) {
|
|
|
10405
10405
|
velocity = 0;
|
|
10406
10406
|
return;
|
|
10407
10407
|
}
|
|
10408
|
-
const
|
|
10409
|
-
const
|
|
10410
|
-
|
|
10411
|
-
|
|
10408
|
+
const substeps = Math.ceil(dt / 0.004);
|
|
10409
|
+
const subDt = dt / substeps;
|
|
10410
|
+
for(let i = 0; i < substeps; i++){
|
|
10411
|
+
const force = -stiffness * (current - target);
|
|
10412
|
+
const accel = (force - damping * velocity) / mass;
|
|
10413
|
+
velocity += accel * subDt;
|
|
10414
|
+
current += velocity * subDt;
|
|
10415
|
+
}
|
|
10412
10416
|
if (Math.abs(current - target) < 0.01 && Math.abs(velocity) < 0.01) {
|
|
10413
10417
|
current = target;
|
|
10414
10418
|
velocity = 0;
|
|
@@ -10617,14 +10621,16 @@ const FloatingDockDesktop = (props)=>{
|
|
|
10617
10621
|
s.sIH.step(dt);
|
|
10618
10622
|
if (allSettled && !(s.sW.settled() && s.sH.settled() && s.sIW.settled() && s.sIH.settled())) allSettled = false;
|
|
10619
10623
|
}
|
|
10624
|
+
const maxScale = cfg.hoverSize / cfg.baseSize;
|
|
10625
|
+
const maxIconScale = cfg.hoverIconSize / cfg.iconSize;
|
|
10620
10626
|
for(let i = 0; i < itemSprings.length; i++){
|
|
10621
10627
|
const s = itemSprings[i];
|
|
10622
10628
|
if (s.wrapRef) {
|
|
10623
|
-
const scale = s.sW.get() / cfg.baseSize;
|
|
10629
|
+
const scale = Math.max(0.8, Math.min(s.sW.get() / cfg.baseSize, maxScale));
|
|
10624
10630
|
s.wrapRef.style.transform = `scale(${scale})`;
|
|
10625
10631
|
}
|
|
10626
10632
|
if (s.iconRef) {
|
|
10627
|
-
const iconScale = s.sIW.get() / cfg.iconSize;
|
|
10633
|
+
const iconScale = Math.max(0.8, Math.min(s.sIW.get() / cfg.iconSize, maxIconScale));
|
|
10628
10634
|
s.iconRef.style.transform = `scale(${iconScale})`;
|
|
10629
10635
|
}
|
|
10630
10636
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pathscale/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.154",
|
|
4
4
|
"author": "pathscale",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@iconify/tailwind4": "^1.2.1",
|
|
60
|
-
"@pathscale/ui": "0.0.
|
|
60
|
+
"@pathscale/ui": "0.0.153",
|
|
61
61
|
"rsbuild-plugin-iconify": "^1.0.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|