diff --git a/bun.lock b/bun.lock index ba2d758..a50995f 100644 --- a/bun.lock +++ b/bun.lock @@ -35,6 +35,9 @@ }, }, }, + "patchedDependencies": { + "runed@0.37.1": "patches/runed@0.37.1.patch", + }, "packages": { "@biomejs/biome": ["@biomejs/biome@2.3.14", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.3.14", "@biomejs/cli-darwin-x64": "2.3.14", "@biomejs/cli-linux-arm64": "2.3.14", "@biomejs/cli-linux-arm64-musl": "2.3.14", "@biomejs/cli-linux-x64": "2.3.14", "@biomejs/cli-linux-x64-musl": "2.3.14", "@biomejs/cli-win32-arm64": "2.3.14", "@biomejs/cli-win32-x64": "2.3.14" }, "bin": { "biome": "bin/biome" } }, "sha512-QMT6QviX0WqXJCaiqVMiBUCr5WRQ1iFSjvOLoTk6auKukJMvnMzWucXpwZB0e8F00/1/BsS9DzcKgWH+CLqVuA=="], diff --git a/package.json b/package.json index 86cab8f..0600c06 100644 --- a/package.json +++ b/package.json @@ -43,5 +43,8 @@ "vite": "^7.3.1", "wrangler": "^4.62.0", "zod": "^4.3.6" + }, + "patchedDependencies": { + "runed@0.37.1": "patches/runed@0.37.1.patch" } } diff --git a/patches/runed@0.37.1.patch b/patches/runed@0.37.1.patch new file mode 100644 index 0000000..b642cd0 --- /dev/null +++ b/patches/runed@0.37.1.patch @@ -0,0 +1,16 @@ +diff --git a/dist/utilities/use-search-params/use-search-params.svelte.js b/dist/utilities/use-search-params/use-search-params.svelte.js +index 8ddeb0eacf7ef5884c222536ff76588a4134d0c7..a1824bdc9779d7a5a8f78184b03efff484d316b1 100644 +--- a/dist/utilities/use-search-params/use-search-params.svelte.js ++++ b/dist/utilities/use-search-params/use-search-params.svelte.js +@@ -1368,6 +1368,11 @@ export function useSearchParams(schema, options = {}) { + const isMounted = new IsMounted(); + // Track if we've done initial setup (separate from cache initialization) + let hasInitialized = false; ++ // Initial URL sync to local cache - on both server and client ++ if (!building && options.updateURL !== false) { ++ const urlParams = page.url.searchParams; ++ searchParams.syncFromURL(urlParams); ++ } + // Only run initialization logic after hydration is complete + $effect(() => { + if (!isMounted.current || building)