Files
voyage/apps/public-web/node_modules/next/dist/client/components/app-router-instance.d.ts
PascalSchattenburg d147843c76 feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router
- Implemented dynamic [slug] pages for blog posts
- Added MDX-based content loading via lib/posts
- Integrated shared TopBar layout with navigation
- Established clear content, lib and component separation
2026-01-22 14:14:15 +01:00

37 lines
2.0 KiB
TypeScript

import { type AppRouterState, type ReducerActions, type ReducerState, type NavigateAction, type AppHistoryState } from './router-reducer/router-reducer-types';
import type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime';
import { type LinkInstance } from './links';
import type { ClientInstrumentationHooks } from '../app-index';
import type { GlobalErrorComponent } from './builtin/global-error';
export type DispatchStatePromise = React.Dispatch<ReducerState>;
export type AppRouterActionQueue = {
state: AppRouterState;
dispatch: (payload: ReducerActions, setState: DispatchStatePromise) => void;
action: (state: AppRouterState, action: ReducerActions) => ReducerState;
onRouterTransitionStart: ((url: string, type: 'push' | 'replace' | 'traverse') => void) | null;
pending: ActionQueueNode | null;
needsRefresh?: boolean;
last: ActionQueueNode | null;
};
export type GlobalErrorState = [
GlobalError: GlobalErrorComponent,
styles: React.ReactNode
];
export type ActionQueueNode = {
payload: ReducerActions;
next: ActionQueueNode | null;
resolve: (value: ReducerState) => void;
reject: (err: Error) => void;
discarded?: boolean;
};
export declare function createMutableActionQueue(initialState: AppRouterState, instrumentationHooks: ClientInstrumentationHooks | null): AppRouterActionQueue;
export declare function getCurrentAppRouterState(): AppRouterState | null;
export declare function dispatchNavigateAction(href: string, navigateType: NavigateAction['navigateType'], shouldScroll: boolean, linkInstanceRef: LinkInstance | null): void;
export declare function dispatchTraverseAction(href: string, historyState: AppHistoryState | undefined): void;
/**
* The app router that is exposed through `useRouter`. These are public API
* methods. Internal Next.js code should call the lower level methods directly
* (although there's lots of existing code that doesn't do that).
*/
export declare const publicAppRouterInstance: AppRouterInstance;