API
ogygia/app
Replacements for $app/navigation that are safe to use inside islands.
On this page
- afterNavigate
- beforeNavigate
- bust_page_cache
- disableScrollHandling
- goto
- invalidate
- invalidateAll
- preloadCode
- preloadData
- spa_html_cacheable
- AfterNavigation
- AfterNavigation.from
- AfterNavigation.to
- AfterNavigation.type
- AfterNavigation.willUnload
- BeforeNavigation
- BeforeNavigation.from
- BeforeNavigation.to
- BeforeNavigation.type
- BeforeNavigation.cancel
- BeforeNavigation.willUnload
- NavTarget
- NavTarget.url
- NavTarget.params
- NavTarget.route
- AfterNavigateCallback
- BeforeNavigateCallback
This page is generated from the package’s own .d.ts files on every build, so the signatures, descriptions and examples below always match the source.
Exports afterNavigate · beforeNavigate · bust_page_cache · disableScrollHandling · goto · invalidate · invalidateAll · preloadCode · preloadData · spa_html_cacheable · AfterNavigation · BeforeNavigation · NavTarget · AfterNavigateCallback · BeforeNavigateCallback
import { … } from 'ogygia/app';function afterNavigate(fn: AfterNavigateCallback): () => void;function beforeNavigate(fn: BeforeNavigateCallback): () => void;bust_page_cache
function
ogygia/app's bust_page_cache: drop the SPA router's warmed page HTML (after mutations / auth
changes). A no-op without the router — there is no page cache.
function bust_page_cache(): void;function disableScrollHandling(): void;function goto(url: string | URL, opts?: {
replaceState?: boolean;
external?: boolean;
}): Promise<void>;function invalidate(resource?: unknown): Promise<void>;function invalidateAll(): Promise<void>;function preloadCode(url?: string): Promise<void>;function preloadData(url: string | URL): Promise<unknown>;spa_html_cacheable
function
Whether a fetch response may warm the SPA page-HTML cache.
cacheControl— ResponseCache-Controlheader value.setCookie— True if the response includedSet-Cookie.
Returns False when the response is private / no-store / no-cache or set a cookie.
function spa_html_cacheable(cacheControl: string, setCookie: boolean): boolean;AfterNavigation
interface
Payload for afterNavigate callbacks.
AfterNavigation.from
AfterNavigation.to
AfterNavigation.type
AfterNavigation.willUnload
interface AfterNavigation {/*…*/}from: NavTarget | null;to: NavTarget;type: string;willUnload: boolean;BeforeNavigation
interface
Payload for beforeNavigate callbacks.
BeforeNavigation.from
BeforeNavigation.to
BeforeNavigation.type
BeforeNavigation.cancel
BeforeNavigation.willUnload
interface BeforeNavigation {/*…*/}from: NavTarget;to: NavTarget;type: string;cancel: () => void;willUnload: boolean;NavTarget
interface
Resolved navigation target (URL + Kit-shaped stubs for params/route).
NavTarget.url
NavTarget.params
NavTarget.route
interface NavTarget {/*…*/}url: URL;params: Record<string, string>;route: {
id: string | null;
};type AfterNavigateCallback = (nav: AfterNavigation) => void;type BeforeNavigateCallback = (nav: BeforeNavigation) => void;