From f23779b664915bd4df94ca187a21199bfeb775d0 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 3 Dec 2025 17:38:53 -0800 Subject: [PATCH] pane stack: each pane is now its own card move card styling (bg, radius, shadow, border) from sidebar container to individual panes so they visually stack as separate cards. behind pane peeks out from the left. --- src/lib/components/ui/PaneStack.svelte | 70 ++++++++++++++++++++++---- src/lib/components/ui/Sidebar.svelte | 16 +++--- 2 files changed, 71 insertions(+), 15 deletions(-) diff --git a/src/lib/components/ui/PaneStack.svelte b/src/lib/components/ui/PaneStack.svelte index 0fb138e5..0667d216 100644 --- a/src/lib/components/ui/PaneStack.svelte +++ b/src/lib/components/ui/PaneStack.svelte @@ -48,6 +48,21 @@ function isPopping(index: number): boolean { return isAnimating && animationDirection === 'pop' && index === panes.length - 1 } + + // Determine if a pane is becoming active (the one behind a popping pane) + function isBecomingActive(index: number): boolean { + return isAnimating && animationDirection === 'pop' && index === panes.length - 2 + } + + // Determine the visual depth of a pane (0 = active, 1 = one behind, 2+ = hidden) + function getDepth(index: number): number { + return panes.length - 1 - index + } + + // Panes more than 1 level deep should be hidden + function isHidden(index: number): boolean { + return getDepth(index) > 1 + }
@@ -56,13 +71,17 @@ {@const isBehind = index < panes.length - 1} {@const showBackButton = index > 0 || pane.onback || onClose} {@const PaneComponent = pane.component} + {@const depth = getDepth(index)}
{#snippet leftAccessory()} @@ -103,12 +122,15 @@