fixes/immediate #23

Merged
ilia merged 9 commits from fixes/immediate into main 2026-02-10 08:50:46 +00:00
Showing only changes of commit 5d8869b3f2 - Show all commits

View File

@@ -18,8 +18,15 @@ interface Props {
let { sliderPos, isDragging }: Props = $props(); let { sliderPos, isDragging }: Props = $props();
</script> </script>
<div <div
class="absolute inset-y-2 sm:inset-y-4 pointer-events-none -translate-x-1/2 z-50 transition-all duration-300 ease-out flex flex-col justify-center items-center" class={cn(
'absolute inset-y-2 sm:inset-y-4 pointer-events-none -translate-x-1/2 z-50 flex flex-col justify-center items-center',
// Force GPU layer with translateZ
'translate-z-0',
// Only transition left when NOT dragging
isDragging ? '' : 'transition-[left] duration-300 ease-out',
)}
style:left="{sliderPos}%" style:left="{sliderPos}%"
style:will-change={isDragging ? 'left' : 'auto'}
> >
<!-- We use part of lucide cursor svg icon as a handle --> <!-- We use part of lucide cursor svg icon as a handle -->
<svg <svg
@@ -40,13 +47,13 @@ let { sliderPos, isDragging }: Props = $props();
<div <div
class={cn( class={cn(
'relative h-full rounded-sm transition-all duration-500', 'relative h-full rounded-sm transition-all duration-300',
'bg-white/3 backdrop-blur-md', 'bg-white/3 ',
// These are the visible "edges" of the glass // These are the visible "edges" of the glass
'shadow-[0_0_40px_rgba(0,0,0,0.1)_inset_0_0_20px_rgba(255,255,255,0.1)]', 'shadow-[0_0_40px_rgba(0,0,0,0.1)_inset_0_0_20px_rgba(255,255,255,0.1)]',
'shadow-[0_10px_30px_-10px_rgba(0,0,0,0.2),inset_0_1px_1px_rgba(255,255,255,0.4)]', 'shadow-[0_10px_30px_-10px_rgba(0,0,0,0.2),inset_0_1px_1px_rgba(255,255,255,0.4)]',
'rounded-full', 'rounded-full',
isDragging ? 'w-16 sm:w-32' : 'w-12 sm:w-16', isDragging ? 'w-16 sm:w-24' : 'w-12 sm:w-16',
)} )}
> >
</div> </div>