update dependencies

This commit is contained in:
2024-11-05 02:34:40 +01:00
parent 9cb36662b3
commit d68f1b19fa
7 changed files with 1015 additions and 947 deletions

View File

@@ -2,13 +2,13 @@
import { fly } from "svelte/transition";
import { afterNavigate, beforeNavigate } from "$app/navigation";
import { expoIn, expoOut } from "svelte/easing";
import type { Snippet } from "svelte";
import { type Snippet } from "svelte";
let { children }: { children: Snippet } = $props();
let inDirection = $state(0);
let outDirection = $state(0);
let outroEnd: undefined | (() => void) = $state(undefined);
let done: undefined | (() => void) = $state(undefined);
let animationDone: Promise<void>;
let isNavigating = $state(false);
@@ -19,6 +19,10 @@
"/config/layout/",
];
function outroEnd() {
done?.();
}
beforeNavigate((navigation) => {
const from = navigation.from?.url.pathname;
const to = navigation.to?.url.pathname;
@@ -37,7 +41,7 @@
}
animationDone = new Promise((resolve) => {
outroEnd = resolve;
done = resolve;
});
});
@@ -49,7 +53,12 @@
{#if !isNavigating}
<main
in:fly={{ y: inDirection * 24, duration: 150, easing: expoOut }}
in:fly={{
y: inDirection * 24,
duration: 150,
delay: 1, // flicker for some reason without this
easing: expoOut,
}}
out:fly={{ y: outDirection * 24, duration: 150, easing: expoIn }}
onoutroend={outroEnd}
>

View File

@@ -46,7 +46,7 @@
id.splice(id.indexOf(0), 1);
id.push(0);
while ($chords.some((it) => JSON.stringify(it.id) === JSON.stringify(id))) {
id[id.length - 1]!++;
id[id.length - 1] = id[id.length - 1]! + 1;
}
changes.update((changes) => {