import { QueryClient } from '@tanstack/svelte-query';

/**
 * App-wide QueryClient singleton. `+layout.svelte` wires it into the
 * provider; non-component code (Svelte actions, keyboard handlers) imports
 * it directly to read cached photo state and invalidate after mutations.
 */
export const queryClient = new QueryClient({
	defaultOptions: {
		queries: {
			staleTime: 30_000,
			retry: 1
		}
	}
});
