@pathscale/ui 0.0.152 → 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 +15 -25
- package/package.json +2 -1
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;
|
|
@@ -10512,7 +10516,7 @@ const FloatingDock_DockItem = (props)=>{
|
|
|
10512
10516
|
"function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$3) : iconRef = _el$3;
|
|
10513
10517
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, ()=>props.item.icon);
|
|
10514
10518
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
10515
|
-
var _v$5 = twMerge("relative flex items-center justify-center rounded-full bg-base-200 transition-
|
|
10519
|
+
var _v$5 = twMerge("relative flex items-center justify-center rounded-full bg-base-200 transition-opacity duration-150 hover:opacity-100 active:opacity-60", "opacity-80", cfg.itemClass), _v$6 = `${cfg.baseSize}px`, _v$7 = `${cfg.baseSize}px`;
|
|
10516
10520
|
_v$5 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, _p$.e = _v$5);
|
|
10517
10521
|
_v$6 !== _p$.t && (null != (_p$.t = _v$6) ? _el$.style.setProperty("width", _v$6) : _el$.style.removeProperty("width"));
|
|
10518
10522
|
_v$7 !== _p$.a && (null != (_p$.a = _v$7) ? _el$.style.setProperty("height", _v$7) : _el$.style.removeProperty("height"));
|
|
@@ -10570,22 +10574,6 @@ const FloatingDockDesktop = (props)=>{
|
|
|
10570
10574
|
let loopRunning = false;
|
|
10571
10575
|
let anchorCenters = [];
|
|
10572
10576
|
const captureAnchors = ()=>{
|
|
10573
|
-
for(let i = 0; i < itemSprings.length; i++){
|
|
10574
|
-
const s = itemSprings[i];
|
|
10575
|
-
s.sW.snap();
|
|
10576
|
-
s.sH.snap();
|
|
10577
|
-
s.sIW.snap();
|
|
10578
|
-
s.sIH.snap();
|
|
10579
|
-
if (s.wrapRef) {
|
|
10580
|
-
s.wrapRef.style.width = `${s.sW.get()}px`;
|
|
10581
|
-
s.wrapRef.style.height = `${s.sH.get()}px`;
|
|
10582
|
-
}
|
|
10583
|
-
if (s.iconRef) {
|
|
10584
|
-
s.iconRef.style.width = `${s.sIW.get()}px`;
|
|
10585
|
-
s.iconRef.style.height = `${s.sIH.get()}px`;
|
|
10586
|
-
}
|
|
10587
|
-
}
|
|
10588
|
-
stopLoop();
|
|
10589
10577
|
anchorCenters = [];
|
|
10590
10578
|
for(let i = 0; i < itemSprings.length; i++){
|
|
10591
10579
|
const wrap = itemSprings[i].wrapRef;
|
|
@@ -10633,15 +10621,17 @@ const FloatingDockDesktop = (props)=>{
|
|
|
10633
10621
|
s.sIH.step(dt);
|
|
10634
10622
|
if (allSettled && !(s.sW.settled() && s.sH.settled() && s.sIW.settled() && s.sIH.settled())) allSettled = false;
|
|
10635
10623
|
}
|
|
10624
|
+
const maxScale = cfg.hoverSize / cfg.baseSize;
|
|
10625
|
+
const maxIconScale = cfg.hoverIconSize / cfg.iconSize;
|
|
10636
10626
|
for(let i = 0; i < itemSprings.length; i++){
|
|
10637
10627
|
const s = itemSprings[i];
|
|
10638
10628
|
if (s.wrapRef) {
|
|
10639
|
-
|
|
10640
|
-
s.wrapRef.style.
|
|
10629
|
+
const scale = Math.max(0.8, Math.min(s.sW.get() / cfg.baseSize, maxScale));
|
|
10630
|
+
s.wrapRef.style.transform = `scale(${scale})`;
|
|
10641
10631
|
}
|
|
10642
10632
|
if (s.iconRef) {
|
|
10643
|
-
|
|
10644
|
-
s.iconRef.style.
|
|
10633
|
+
const iconScale = Math.max(0.8, Math.min(s.sIW.get() / cfg.iconSize, maxIconScale));
|
|
10634
|
+
s.iconRef.style.transform = `scale(${iconScale})`;
|
|
10645
10635
|
}
|
|
10646
10636
|
}
|
|
10647
10637
|
if (allSettled) return void stopLoop();
|
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,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@iconify/tailwind4": "^1.2.1",
|
|
60
|
+
"@pathscale/ui": "0.0.153",
|
|
60
61
|
"rsbuild-plugin-iconify": "^1.0.3"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|