alepha 0.11.4 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/react.d.ts CHANGED
@@ -1 +1,1238 @@
1
- export * from '@alepha/react';
1
+ import * as _alepha_core10 from "alepha";
2
+ import { Alepha, Async, Configurable, Descriptor, Hook, Hooks, KIND, Service, State, Static, TObject, TSchema } from "alepha";
3
+ import { DateTimeProvider, DurationLike } from "alepha/datetime";
4
+ import { RequestConfigSchema, ServerHandler, ServerProvider, ServerRequest, ServerRouterProvider, ServerTimingProvider } from "alepha/server";
5
+ import { ServerRouteCache } from "alepha/server/cache";
6
+ import { ClientScope, HttpVirtualClient, LinkProvider, VirtualAction } from "alepha/server/links";
7
+ import * as _alepha_logger0 from "alepha/logger";
8
+ import * as react0 from "react";
9
+ import React, { AnchorHTMLAttributes, CSSProperties, DependencyList, ErrorInfo, FC, PropsWithChildren, ReactNode } from "react";
10
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
11
+ import { ServeDescriptorOptions, ServerStaticProvider } from "alepha/server/static";
12
+ import { Route, RouterProvider } from "alepha/router";
13
+
14
+ //#region src/components/ClientOnly.d.ts
15
+ interface ClientOnlyProps {
16
+ fallback?: ReactNode;
17
+ disabled?: boolean;
18
+ }
19
+ /**
20
+ * A small utility component that renders its children only on the client side.
21
+ *
22
+ * Optionally, you can provide a fallback React node that will be rendered.
23
+ *
24
+ * You should use this component when
25
+ * - you have code that relies on browser-specific APIs
26
+ * - you want to avoid server-side rendering for a specific part of your application
27
+ * - you want to prevent pre-rendering of a component
28
+ */
29
+ declare const ClientOnly: (props: PropsWithChildren<ClientOnlyProps>) => ReactNode;
30
+ //#endregion
31
+ //#region src/errors/Redirection.d.ts
32
+ /**
33
+ * Used for Redirection during the page loading.
34
+ *
35
+ * Depends on the context, it can be thrown or just returned.
36
+ */
37
+ declare class Redirection extends Error {
38
+ readonly redirect: string;
39
+ constructor(redirect: string);
40
+ }
41
+ //#endregion
42
+ //#region src/providers/ReactPageProvider.d.ts
43
+ declare const envSchema$2: _alepha_core10.TObject<{
44
+ REACT_STRICT_MODE: _alepha_core10.TBoolean;
45
+ }>;
46
+ declare module "alepha" {
47
+ interface Env extends Partial<Static<typeof envSchema$2>> {}
48
+ }
49
+ declare class ReactPageProvider {
50
+ protected readonly log: _alepha_logger0.Logger;
51
+ protected readonly env: {
52
+ REACT_STRICT_MODE: boolean;
53
+ };
54
+ protected readonly alepha: Alepha;
55
+ protected readonly pages: PageRoute[];
56
+ getPages(): PageRoute[];
57
+ getConcretePages(): PageRoute[];
58
+ page(name: string): PageRoute;
59
+ pathname(name: string, options?: {
60
+ params?: Record<string, string>;
61
+ query?: Record<string, string>;
62
+ }): string;
63
+ url(name: string, options?: {
64
+ params?: Record<string, string>;
65
+ host?: string;
66
+ }): URL;
67
+ root(state: ReactRouterState): ReactNode;
68
+ protected convertStringObjectToObject: (schema?: TSchema, value?: any) => any;
69
+ /**
70
+ * Create a new RouterState based on a given route and request.
71
+ * This method resolves the layers for the route, applying any query and params schemas defined in the route.
72
+ * It also handles errors and redirects.
73
+ */
74
+ createLayers(route: PageRoute, state: ReactRouterState, previous?: PreviousLayerData[]): Promise<CreateLayersResult>;
75
+ protected createRedirectionLayer(redirect: string): CreateLayersResult;
76
+ protected getErrorHandler(route: PageRoute): ErrorHandler | undefined;
77
+ protected createElement(page: PageRoute, props: Record<string, any>): Promise<ReactNode>;
78
+ renderError(error: Error): ReactNode;
79
+ renderEmptyView(): ReactNode;
80
+ href(page: {
81
+ options: {
82
+ name?: string;
83
+ };
84
+ }, params?: Record<string, any>): string;
85
+ compile(path: string, params?: Record<string, string>): string;
86
+ protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
87
+ protected readonly configure: _alepha_core10.HookDescriptor<"configure">;
88
+ protected map(pages: Array<PageDescriptor>, target: PageDescriptor): PageRouteEntry;
89
+ add(entry: PageRouteEntry): void;
90
+ protected createMatch(page: PageRoute): string;
91
+ protected _next: number;
92
+ protected nextId(): string;
93
+ }
94
+ declare const isPageRoute: (it: any) => it is PageRoute;
95
+ interface PageRouteEntry extends Omit<PageDescriptorOptions, "children" | "parent"> {
96
+ children?: PageRouteEntry[];
97
+ }
98
+ interface PageRoute extends PageRouteEntry {
99
+ type: "page";
100
+ name: string;
101
+ parent?: PageRoute;
102
+ match: string;
103
+ }
104
+ interface Layer {
105
+ config?: {
106
+ query?: Record<string, any>;
107
+ params?: Record<string, any>;
108
+ context?: Record<string, any>;
109
+ };
110
+ name: string;
111
+ props?: Record<string, any>;
112
+ error?: Error;
113
+ part?: string;
114
+ element: ReactNode;
115
+ index: number;
116
+ path: string;
117
+ route?: PageRoute;
118
+ cache?: boolean;
119
+ }
120
+ type PreviousLayerData = Omit<Layer, "element" | "index" | "path">;
121
+ interface AnchorProps {
122
+ href: string;
123
+ onClick: (ev?: any) => any;
124
+ }
125
+ interface ReactRouterState {
126
+ /**
127
+ * Stack of layers for the current page.
128
+ */
129
+ layers: Array<Layer>;
130
+ /**
131
+ * URL of the current page.
132
+ */
133
+ url: URL;
134
+ /**
135
+ * Error handler for the current page.
136
+ */
137
+ onError: ErrorHandler;
138
+ /**
139
+ * Params extracted from the URL for the current page.
140
+ */
141
+ params: Record<string, any>;
142
+ /**
143
+ * Query parameters extracted from the URL for the current page.
144
+ */
145
+ query: Record<string, string>;
146
+ /**
147
+ * Optional meta information associated with the current page.
148
+ */
149
+ meta: Record<string, any>;
150
+ }
151
+ interface RouterStackItem {
152
+ route: PageRoute;
153
+ config?: Record<string, any>;
154
+ props?: Record<string, any>;
155
+ error?: Error;
156
+ cache?: boolean;
157
+ }
158
+ interface TransitionOptions {
159
+ previous?: PreviousLayerData[];
160
+ }
161
+ interface CreateLayersResult {
162
+ redirect?: string;
163
+ state?: ReactRouterState;
164
+ }
165
+ //#endregion
166
+ //#region src/services/ReactPageService.d.ts
167
+ declare class ReactPageService {
168
+ fetch(pathname: string, options?: PageDescriptorRenderOptions): Promise<{
169
+ html: string;
170
+ response: Response;
171
+ }>;
172
+ render(name: string, options?: PageDescriptorRenderOptions): Promise<PageDescriptorRenderResult>;
173
+ }
174
+ //#endregion
175
+ //#region src/descriptors/$page.d.ts
176
+ /**
177
+ * Main descriptor for defining a React route in the application.
178
+ *
179
+ * The $page descriptor is the core building block for creating type-safe, SSR-enabled React routes.
180
+ * It provides a declarative way to define pages with powerful features:
181
+ *
182
+ * **Routing & Navigation**
183
+ * - URL pattern matching with parameters (e.g., `/users/:id`)
184
+ * - Nested routing with parent-child relationships
185
+ * - Type-safe URL parameter and query string validation
186
+ *
187
+ * **Data Loading**
188
+ * - Server-side data fetching with the `resolve` function
189
+ * - Automatic serialization and hydration for SSR
190
+ * - Access to request context, URL params, and parent data
191
+ *
192
+ * **Component Loading**
193
+ * - Direct component rendering or lazy loading for code splitting
194
+ * - Client-only rendering when browser APIs are needed
195
+ * - Automatic fallback handling during hydration
196
+ *
197
+ * **Performance Optimization**
198
+ * - Static generation for pre-rendered pages at build time
199
+ * - Server-side caching with configurable TTL and providers
200
+ * - Code splitting through lazy component loading
201
+ *
202
+ * **Error Handling**
203
+ * - Custom error handlers with support for redirects
204
+ * - Hierarchical error handling (child → parent)
205
+ * - HTTP status code handling (404, 401, etc.)
206
+ *
207
+ * **Page Animations**
208
+ * - CSS-based enter/exit animations
209
+ * - Dynamic animations based on page state
210
+ * - Custom timing and easing functions
211
+ *
212
+ * **Lifecycle Management**
213
+ * - Server response hooks for headers and status codes
214
+ * - Page leave handlers for cleanup (browser only)
215
+ * - Permission-based access control
216
+ *
217
+ * @example Simple page with data fetching
218
+ * ```typescript
219
+ * const userProfile = $page({
220
+ * path: "/users/:id",
221
+ * schema: {
222
+ * params: t.object({ id: t.int() }),
223
+ * query: t.object({ tab: t.optional(t.text()) })
224
+ * },
225
+ * resolve: async ({ params }) => {
226
+ * const user = await userApi.getUser(params.id);
227
+ * return { user };
228
+ * },
229
+ * lazy: () => import("./UserProfile.tsx")
230
+ * });
231
+ * ```
232
+ *
233
+ * @example Nested routing with error handling
234
+ * ```typescript
235
+ * const projectSection = $page({
236
+ * path: "/projects/:id",
237
+ * children: () => [projectBoard, projectSettings],
238
+ * resolve: async ({ params }) => {
239
+ * const project = await projectApi.get(params.id);
240
+ * return { project };
241
+ * },
242
+ * errorHandler: (error) => {
243
+ * if (HttpError.is(error, 404)) {
244
+ * return <ProjectNotFound />;
245
+ * }
246
+ * }
247
+ * });
248
+ * ```
249
+ *
250
+ * @example Static generation with caching
251
+ * ```typescript
252
+ * const blogPost = $page({
253
+ * path: "/blog/:slug",
254
+ * static: {
255
+ * entries: posts.map(p => ({ params: { slug: p.slug } }))
256
+ * },
257
+ * resolve: async ({ params }) => {
258
+ * const post = await loadPost(params.slug);
259
+ * return { post };
260
+ * }
261
+ * });
262
+ * ```
263
+ */
264
+ declare const $page: {
265
+ <TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = any, TPropsParent extends object = TPropsParentDefault>(options: PageDescriptorOptions<TConfig, TProps, TPropsParent>): PageDescriptor<TConfig, TProps, TPropsParent>;
266
+ [KIND]: typeof PageDescriptor;
267
+ };
268
+ interface PageDescriptorOptions<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> {
269
+ /**
270
+ * Identifier name for the page. Must be unique.
271
+ *
272
+ * @default Descriptor key
273
+ */
274
+ name?: string;
275
+ /**
276
+ * Add a pathname to the page.
277
+ *
278
+ * Pathname can contain parameters, like `/post/:slug`.
279
+ *
280
+ * @default ""
281
+ */
282
+ path?: string;
283
+ /**
284
+ * Add an input schema to define:
285
+ * - `params`: parameters from the pathname.
286
+ * - `query`: query parameters from the URL.
287
+ */
288
+ schema?: TConfig;
289
+ /**
290
+ * Load data before rendering the page.
291
+ *
292
+ * This function receives
293
+ * - the request context and
294
+ * - the parent props (if page has a parent)
295
+ *
296
+ * In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
297
+ *
298
+ * Resolve can be stopped by throwing an error, which will be handled by the `errorHandler` function.
299
+ * It's common to throw a `NotFoundError` to display a 404 page.
300
+ *
301
+ * RedirectError can be thrown to redirect the user to another page.
302
+ */
303
+ resolve?: (context: PageResolve<TConfig, TPropsParent>) => Async<TProps>;
304
+ /**
305
+ * The component to render when the page is loaded.
306
+ *
307
+ * If `lazy` is defined, this will be ignored.
308
+ * Prefer using `lazy` to improve the initial loading time.
309
+ */
310
+ component?: FC<TProps & TPropsParent>;
311
+ /**
312
+ * Lazy load the component when the page is loaded.
313
+ *
314
+ * It's recommended to use this for components to improve the initial loading time
315
+ * and enable code-splitting.
316
+ */
317
+ lazy?: () => Promise<{
318
+ default: FC<TProps & TPropsParent>;
319
+ }>;
320
+ /**
321
+ * Attach child pages to create nested routes.
322
+ * This will make the page a parent route.
323
+ */
324
+ children?: Array<PageDescriptor> | (() => Array<PageDescriptor>);
325
+ /**
326
+ * Define a parent page for nested routing.
327
+ */
328
+ parent?: PageDescriptor<PageConfigSchema, TPropsParent, any>;
329
+ can?: () => boolean;
330
+ /**
331
+ * Catch any error from the `resolve` function or during `rendering`.
332
+ *
333
+ * Expected to return one of the following:
334
+ * - a ReactNode to render an error page
335
+ * - a Redirection to redirect the user
336
+ * - undefined to let the error propagate
337
+ *
338
+ * If not defined, the error will be thrown and handled by the server or client error handler.
339
+ * If a leaf $page does not define an error handler, the error can be caught by parent pages.
340
+ *
341
+ * @example Catch a 404 from API and render a custom not found component:
342
+ * ```ts
343
+ * resolve: async ({ params, query }) => {
344
+ * api.fetch("/api/resource", { params, query });
345
+ * },
346
+ * errorHandler: (error, context) => {
347
+ * if (HttpError.is(error, 404)) {
348
+ * return <ResourceNotFound />;
349
+ * }
350
+ * }
351
+ * ```
352
+ *
353
+ * @example Catch an 401 error and redirect the user to the login page:
354
+ * ```ts
355
+ * resolve: async ({ params, query }) => {
356
+ * // but the user is not authenticated
357
+ * api.fetch("/api/resource", { params, query });
358
+ * },
359
+ * errorHandler: (error, context) => {
360
+ * if (HttpError.is(error, 401)) {
361
+ * // throwing a Redirection is also valid!
362
+ * return new Redirection("/login");
363
+ * }
364
+ * }
365
+ * ```
366
+ */
367
+ errorHandler?: ErrorHandler;
368
+ /**
369
+ * If true, the page will be considered as a static page, immutable and cacheable.
370
+ * Replace boolean by an object to define static entries. (e.g. list of params/query)
371
+ *
372
+ * Browser-side: it only works with `@alepha/vite`, which can pre-render the page at build time.
373
+ *
374
+ * Server-side: It will act as timeless cached page. You can use `cache` to configure the cache behavior.
375
+ */
376
+ static?: boolean | {
377
+ entries?: Array<Partial<PageRequestConfig<TConfig>>>;
378
+ };
379
+ cache?: ServerRouteCache;
380
+ /**
381
+ * If true, force the page to be rendered only on the client-side (browser).
382
+ * It uses the `<ClientOnly/>` component to render the page.
383
+ */
384
+ client?: boolean | ClientOnlyProps;
385
+ /**
386
+ * Called before the server response is sent to the client. (server only)
387
+ */
388
+ onServerResponse?: (request: ServerRequest) => unknown;
389
+ /**
390
+ * Called when user leaves the page. (browser only)
391
+ */
392
+ onLeave?: () => void;
393
+ /**
394
+ * @experimental
395
+ *
396
+ * Add a css animation when the page is loaded or unloaded.
397
+ * It uses CSS animations, so you need to define the keyframes in your CSS.
398
+ *
399
+ * @example Simple animation name
400
+ * ```ts
401
+ * animation: "fadeIn"
402
+ * ```
403
+ *
404
+ * CSS example:
405
+ * ```css
406
+ * @keyframes fadeIn {
407
+ * from { opacity: 0; }
408
+ * to { opacity: 1; }
409
+ * }
410
+ * ```
411
+ *
412
+ * @example Detailed animation
413
+ * ```ts
414
+ * animation: {
415
+ * enter: { name: "fadeIn", duration: 300 },
416
+ * exit: { name: "fadeOut", duration: 200, timing: "ease-in-out" },
417
+ * }
418
+ * ```
419
+ *
420
+ * @example Only exit animation
421
+ * ```ts
422
+ * animation: {
423
+ * exit: "fadeOut"
424
+ * }
425
+ * ```
426
+ *
427
+ * @example With custom timing function
428
+ * ```ts
429
+ * animation: {
430
+ * enter: { name: "fadeIn", duration: 300, timing: "cubic-bezier(0.4, 0, 0.2, 1)" },
431
+ * exit: { name: "fadeOut", duration: 200, timing: "ease-in-out" },
432
+ * }
433
+ * ```
434
+ */
435
+ animation?: PageAnimation;
436
+ }
437
+ type ErrorHandler = (error: Error, state: ReactRouterState) => ReactNode | Redirection | undefined;
438
+ declare class PageDescriptor<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> extends Descriptor<PageDescriptorOptions<TConfig, TProps, TPropsParent>> {
439
+ protected readonly reactPageService: ReactPageService;
440
+ protected onInit(): void;
441
+ get name(): string;
442
+ /**
443
+ * For testing or build purposes.
444
+ *
445
+ * This will render the page (HTML layout included or not) and return the HTML + context.
446
+ * Only valid for server-side rendering, it will throw an error if called on the client-side.
447
+ */
448
+ render(options?: PageDescriptorRenderOptions): Promise<PageDescriptorRenderResult>;
449
+ fetch(options?: PageDescriptorRenderOptions): Promise<{
450
+ html: string;
451
+ response: Response;
452
+ }>;
453
+ match(url: string): boolean;
454
+ pathname(config: any): string;
455
+ }
456
+ interface PageConfigSchema {
457
+ query?: TSchema;
458
+ params?: TSchema;
459
+ }
460
+ type TPropsDefault = any;
461
+ type TPropsParentDefault = {};
462
+ interface PageDescriptorRenderOptions {
463
+ params?: Record<string, string>;
464
+ query?: Record<string, string>;
465
+ /**
466
+ * If true, the HTML layout will be included in the response.
467
+ * If false, only the page content will be returned.
468
+ *
469
+ * @default true
470
+ */
471
+ html?: boolean;
472
+ hydration?: boolean;
473
+ }
474
+ interface PageDescriptorRenderResult {
475
+ html: string;
476
+ state: ReactRouterState;
477
+ redirect?: string;
478
+ }
479
+ interface PageRequestConfig<TConfig extends PageConfigSchema = PageConfigSchema> {
480
+ params: TConfig["params"] extends TSchema ? Static<TConfig["params"]> : Record<string, string>;
481
+ query: TConfig["query"] extends TSchema ? Static<TConfig["query"]> : Record<string, string>;
482
+ }
483
+ type PageResolve<TConfig extends PageConfigSchema = PageConfigSchema, TPropsParent extends object = TPropsParentDefault> = PageRequestConfig<TConfig> & TPropsParent & Omit<ReactRouterState, "layers" | "onError">;
484
+ type PageAnimation = PageAnimationObject | ((state: ReactRouterState) => PageAnimationObject | undefined);
485
+ type PageAnimationObject = CssAnimationName | {
486
+ enter?: CssAnimation | CssAnimationName;
487
+ exit?: CssAnimation | CssAnimationName;
488
+ };
489
+ type CssAnimationName = string;
490
+ type CssAnimation = {
491
+ name: string;
492
+ duration?: number;
493
+ timing?: string;
494
+ };
495
+ //#endregion
496
+ //#region src/providers/ReactBrowserRouterProvider.d.ts
497
+ interface BrowserRoute extends Route {
498
+ page: PageRoute;
499
+ }
500
+ declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
501
+ protected readonly log: _alepha_logger0.Logger;
502
+ protected readonly alepha: Alepha;
503
+ protected readonly pageApi: ReactPageProvider;
504
+ add(entry: PageRouteEntry): void;
505
+ protected readonly configure: _alepha_core10.HookDescriptor<"configure">;
506
+ transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
507
+ root(state: ReactRouterState): ReactNode;
508
+ }
509
+ //#endregion
510
+ //#region src/providers/ReactBrowserProvider.d.ts
511
+ declare const envSchema$1: _alepha_core10.TObject<{
512
+ REACT_ROOT_ID: _alepha_core10.TString;
513
+ }>;
514
+ declare module "alepha" {
515
+ interface Env extends Partial<Static<typeof envSchema$1>> {}
516
+ }
517
+ interface ReactBrowserRendererOptions {
518
+ scrollRestoration?: "top" | "manual";
519
+ }
520
+ declare class ReactBrowserProvider {
521
+ protected readonly env: {
522
+ REACT_ROOT_ID: string;
523
+ };
524
+ protected readonly log: _alepha_logger0.Logger;
525
+ protected readonly client: LinkProvider;
526
+ protected readonly alepha: Alepha;
527
+ protected readonly router: ReactBrowserRouterProvider;
528
+ protected readonly dateTimeProvider: DateTimeProvider;
529
+ options: ReactBrowserRendererOptions;
530
+ protected getRootElement(): HTMLElement;
531
+ transitioning?: {
532
+ to: string;
533
+ from?: string;
534
+ };
535
+ get state(): ReactRouterState;
536
+ /**
537
+ * Accessor for Document DOM API.
538
+ */
539
+ get document(): Document;
540
+ /**
541
+ * Accessor for History DOM API.
542
+ */
543
+ get history(): History;
544
+ /**
545
+ * Accessor for Location DOM API.
546
+ */
547
+ get location(): Location;
548
+ get base(): string;
549
+ get url(): string;
550
+ pushState(path: string, replace?: boolean): void;
551
+ invalidate(props?: Record<string, any>): Promise<void>;
552
+ go(url: string, options?: RouterGoOptions): Promise<void>;
553
+ protected render(options?: RouterRenderOptions): Promise<void>;
554
+ /**
555
+ * Get embedded layers from the server.
556
+ */
557
+ protected getHydrationState(): ReactHydrationState | undefined;
558
+ protected readonly onTransitionEnd: _alepha_core10.HookDescriptor<"react:transition:end">;
559
+ readonly ready: _alepha_core10.HookDescriptor<"ready">;
560
+ }
561
+ interface RouterGoOptions {
562
+ replace?: boolean;
563
+ match?: TransitionOptions;
564
+ params?: Record<string, string>;
565
+ query?: Record<string, string>;
566
+ meta?: Record<string, any>;
567
+ /**
568
+ * Recreate the whole page, ignoring the current state.
569
+ */
570
+ force?: boolean;
571
+ }
572
+ type ReactHydrationState = {
573
+ layers?: Array<PreviousLayerData>;
574
+ } & {
575
+ [key: string]: any;
576
+ };
577
+ interface RouterRenderOptions {
578
+ url?: string;
579
+ previous?: PreviousLayerData[];
580
+ meta?: Record<string, any>;
581
+ }
582
+ //#endregion
583
+ //#region src/components/ErrorBoundary.d.ts
584
+ /**
585
+ * Props for the ErrorBoundary component.
586
+ */
587
+ interface ErrorBoundaryProps {
588
+ /**
589
+ * Fallback React node to render when an error is caught.
590
+ * If not provided, a default error message will be shown.
591
+ */
592
+ fallback: (error: Error) => ReactNode;
593
+ /**
594
+ * Optional callback that receives the error and error info.
595
+ * Use this to log errors to a monitoring service.
596
+ */
597
+ onError?: (error: Error, info: ErrorInfo) => void;
598
+ }
599
+ /**
600
+ * State of the ErrorBoundary component.
601
+ */
602
+ interface ErrorBoundaryState {
603
+ error?: Error;
604
+ }
605
+ /**
606
+ * A reusable error boundary for catching rendering errors
607
+ * in any part of the React component tree.
608
+ */
609
+ declare class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
610
+ constructor(props: ErrorBoundaryProps);
611
+ /**
612
+ * Update state so the next render shows the fallback UI.
613
+ */
614
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
615
+ /**
616
+ * Lifecycle method called when an error is caught.
617
+ * You can log the error or perform side effects here.
618
+ */
619
+ componentDidCatch(error: Error, info: ErrorInfo): void;
620
+ render(): ReactNode;
621
+ }
622
+ //#endregion
623
+ //#region src/components/ErrorViewer.d.ts
624
+ interface ErrorViewerProps {
625
+ error: Error;
626
+ alepha: Alepha;
627
+ }
628
+ declare const ErrorViewer: ({
629
+ error,
630
+ alepha
631
+ }: ErrorViewerProps) => react_jsx_runtime0.JSX.Element;
632
+ //#endregion
633
+ //#region src/components/Link.d.ts
634
+ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
635
+ href: string;
636
+ }
637
+ declare const Link: (props: LinkProps) => react_jsx_runtime0.JSX.Element;
638
+ //#endregion
639
+ //#region src/components/NestedView.d.ts
640
+ interface NestedViewProps {
641
+ children?: ReactNode;
642
+ errorBoundary?: false | ((error: Error) => ReactNode);
643
+ }
644
+ declare const _default: react0.MemoExoticComponent<(props: NestedViewProps) => react_jsx_runtime0.JSX.Element>;
645
+ //#endregion
646
+ //#region src/components/NotFound.d.ts
647
+ declare function NotFoundPage(props: {
648
+ style?: CSSProperties;
649
+ }): react_jsx_runtime0.JSX.Element;
650
+ //#endregion
651
+ //#region src/contexts/AlephaContext.d.ts
652
+ declare const AlephaContext: react0.Context<Alepha | undefined>;
653
+ //#endregion
654
+ //#region src/contexts/RouterLayerContext.d.ts
655
+ interface RouterLayerContextValue {
656
+ index: number;
657
+ path: string;
658
+ }
659
+ declare const RouterLayerContext: react0.Context<RouterLayerContextValue | undefined>;
660
+ //#endregion
661
+ //#region src/hooks/useAction.d.ts
662
+ /**
663
+ * Hook for handling async actions with automatic error handling and event emission.
664
+ *
665
+ * By default, prevents concurrent executions - if an action is running and you call it again,
666
+ * the second call will be ignored. Use `debounce` option to delay execution instead.
667
+ *
668
+ * Emits lifecycle events:
669
+ * - `react:action:begin` - When action starts
670
+ * - `react:action:success` - When action completes successfully
671
+ * - `react:action:error` - When action throws an error
672
+ * - `react:action:end` - Always emitted at the end
673
+ *
674
+ * @example Basic usage
675
+ * ```tsx
676
+ * const action = useAction({
677
+ * handler: async (data) => {
678
+ * await api.save(data);
679
+ * }
680
+ * }, []);
681
+ *
682
+ * <button onClick={() => action.run(data)} disabled={action.loading}>
683
+ * Save
684
+ * </button>
685
+ * ```
686
+ *
687
+ * @example With debounce (search input)
688
+ * ```tsx
689
+ * const search = useAction({
690
+ * handler: async (query: string) => {
691
+ * await api.search(query);
692
+ * },
693
+ * debounce: 300 // Wait 300ms after last call
694
+ * }, []);
695
+ *
696
+ * <input onChange={(e) => search.run(e.target.value)} />
697
+ * ```
698
+ *
699
+ * @example Run on component mount
700
+ * ```tsx
701
+ * const fetchData = useAction({
702
+ * handler: async () => {
703
+ * const data = await api.getData();
704
+ * return data;
705
+ * },
706
+ * runOnInit: true // Runs once when component mounts
707
+ * }, []);
708
+ * ```
709
+ *
710
+ * @example Run periodically (polling)
711
+ * ```tsx
712
+ * const pollStatus = useAction({
713
+ * handler: async () => {
714
+ * const status = await api.getStatus();
715
+ * return status;
716
+ * },
717
+ * runEvery: 5000 // Run every 5 seconds
718
+ * }, []);
719
+ *
720
+ * // Or with duration tuple
721
+ * const pollStatus = useAction({
722
+ * handler: async () => {
723
+ * const status = await api.getStatus();
724
+ * return status;
725
+ * },
726
+ * runEvery: [30, 'seconds'] // Run every 30 seconds
727
+ * }, []);
728
+ * ```
729
+ *
730
+ * @example With AbortController
731
+ * ```tsx
732
+ * const fetch = useAction({
733
+ * handler: async (url, { signal }) => {
734
+ * const response = await fetch(url, { signal });
735
+ * return response.json();
736
+ * }
737
+ * }, []);
738
+ * // Automatically cancelled on unmount or when new request starts
739
+ * ```
740
+ *
741
+ * @example With error handling
742
+ * ```tsx
743
+ * const deleteAction = useAction({
744
+ * handler: async (id: string) => {
745
+ * await api.delete(id);
746
+ * },
747
+ * onError: (error) => {
748
+ * if (error.code === 'NOT_FOUND') {
749
+ * // Custom error handling
750
+ * }
751
+ * }
752
+ * }, []);
753
+ *
754
+ * {deleteAction.error && <div>Error: {deleteAction.error.message}</div>}
755
+ * ```
756
+ *
757
+ * @example Global error handling
758
+ * ```tsx
759
+ * // In your root app setup
760
+ * alepha.events.on("react:action:error", ({ error }) => {
761
+ * toast.danger(error.message);
762
+ * Sentry.captureException(error);
763
+ * });
764
+ * ```
765
+ */
766
+ declare function useAction<Args extends any[], Result = void>(options: UseActionOptions<Args, Result>, deps: DependencyList): UseActionReturn<Args, Result>;
767
+ /**
768
+ * Context object passed as the last argument to action handlers.
769
+ * Contains an AbortSignal that can be used to cancel the request.
770
+ */
771
+ interface ActionContext {
772
+ /**
773
+ * AbortSignal that can be passed to fetch or other async operations.
774
+ * The signal will be aborted when:
775
+ * - The component unmounts
776
+ * - A new action is triggered (cancels previous)
777
+ * - The cancel() method is called
778
+ *
779
+ * @example
780
+ * ```tsx
781
+ * const action = useAction({
782
+ * handler: async (url, { signal }) => {
783
+ * const response = await fetch(url, { signal });
784
+ * return response.json();
785
+ * }
786
+ * }, []);
787
+ * ```
788
+ */
789
+ signal: AbortSignal;
790
+ }
791
+ interface UseActionOptions<Args extends any[] = any[], Result = any> {
792
+ /**
793
+ * The async action handler function.
794
+ * Receives the action arguments plus an ActionContext as the last parameter.
795
+ */
796
+ handler: (...args: [...Args, ActionContext]) => Promise<Result>;
797
+ /**
798
+ * Custom error handler. If provided, prevents default error re-throw.
799
+ */
800
+ onError?: (error: Error) => void | Promise<void>;
801
+ /**
802
+ * Custom success handler.
803
+ */
804
+ onSuccess?: (result: Result) => void | Promise<void>;
805
+ /**
806
+ * Optional identifier for this action (useful for debugging/analytics)
807
+ */
808
+ id?: string;
809
+ /**
810
+ * Debounce delay in milliseconds. If specified, the action will only execute
811
+ * after the specified delay has passed since the last call. Useful for search inputs
812
+ * or other high-frequency events.
813
+ *
814
+ * @example
815
+ * ```tsx
816
+ * // Execute search 300ms after user stops typing
817
+ * const search = useAction({ handler: search, debounce: 300 }, [])
818
+ * ```
819
+ */
820
+ debounce?: number;
821
+ /**
822
+ * If true, the action will be executed once when the component mounts.
823
+ *
824
+ * @example
825
+ * ```tsx
826
+ * const fetchData = useAction({
827
+ * handler: async () => await api.getData(),
828
+ * runOnInit: true
829
+ * }, []);
830
+ * ```
831
+ */
832
+ runOnInit?: boolean;
833
+ /**
834
+ * If specified, the action will be executed periodically at the given interval.
835
+ * The interval is specified as a DurationLike value (number in ms, Duration object, or [number, unit] tuple).
836
+ *
837
+ * @example
838
+ * ```tsx
839
+ * // Run every 5 seconds
840
+ * const poll = useAction({
841
+ * handler: async () => await api.poll(),
842
+ * runEvery: 5000
843
+ * }, []);
844
+ * ```
845
+ *
846
+ * @example
847
+ * ```tsx
848
+ * // Run every 1 minute
849
+ * const poll = useAction({
850
+ * handler: async () => await api.poll(),
851
+ * runEvery: [1, 'minute']
852
+ * }, []);
853
+ * ```
854
+ */
855
+ runEvery?: DurationLike;
856
+ }
857
+ interface UseActionReturn<Args extends any[], Result> {
858
+ /**
859
+ * Execute the action with the provided arguments.
860
+ *
861
+ * @example
862
+ * ```tsx
863
+ * const action = useAction({ handler: async (data) => { ... } }, []);
864
+ * action.run(data);
865
+ * ```
866
+ */
867
+ run: (...args: Args) => Promise<Result | undefined>;
868
+ /**
869
+ * Loading state - true when action is executing.
870
+ */
871
+ loading: boolean;
872
+ /**
873
+ * Error state - contains error if action failed, undefined otherwise.
874
+ */
875
+ error?: Error;
876
+ /**
877
+ * Cancel any pending debounced action or abort the current in-flight request.
878
+ *
879
+ * @example
880
+ * ```tsx
881
+ * const action = useAction({ ... }, []);
882
+ *
883
+ * <button onClick={action.cancel} disabled={!action.loading}>
884
+ * Cancel
885
+ * </button>
886
+ * ```
887
+ */
888
+ cancel: () => void;
889
+ }
890
+ //#endregion
891
+ //#region src/hooks/useActive.d.ts
892
+ interface UseActiveOptions {
893
+ href: string;
894
+ startWith?: boolean;
895
+ }
896
+ declare const useActive: (args: string | UseActiveOptions) => UseActiveHook;
897
+ interface UseActiveHook {
898
+ isActive: boolean;
899
+ anchorProps: AnchorProps;
900
+ isPending: boolean;
901
+ }
902
+ //#endregion
903
+ //#region src/hooks/useAlepha.d.ts
904
+ /**
905
+ * Main Alepha hook.
906
+ *
907
+ * It provides access to the Alepha instance within a React component.
908
+ *
909
+ * With Alepha, you can access the core functionalities of the framework:
910
+ *
911
+ * - alepha.state() for state management
912
+ * - alepha.inject() for dependency injection
913
+ * - alepha.events.emit() for event handling
914
+ * etc...
915
+ */
916
+ declare const useAlepha: () => Alepha;
917
+ //#endregion
918
+ //#region src/hooks/useClient.d.ts
919
+ /**
920
+ * Hook to get a virtual client for the specified scope.
921
+ *
922
+ * It's the React-hook version of `$client()`, from `AlephaServerLinks` module.
923
+ */
924
+ declare const useClient: <T$1 extends object>(scope?: ClientScope) => HttpVirtualClient<T$1>;
925
+ //#endregion
926
+ //#region src/hooks/useEvents.d.ts
927
+ /**
928
+ * Allow subscribing to multiple Alepha events. See {@link Hooks} for available events.
929
+ *
930
+ * useEvents is fully typed to ensure correct event callback signatures.
931
+ *
932
+ * @example
933
+ * ```tsx
934
+ * useEvents(
935
+ * {
936
+ * "react:transition:begin": (ev) => {
937
+ * console.log("Transition began to:", ev.to);
938
+ * },
939
+ * "react:transition:error": {
940
+ * priority: "first",
941
+ * callback: (ev) => {
942
+ * console.error("Transition error:", ev.error);
943
+ * },
944
+ * },
945
+ * },
946
+ * [],
947
+ * );
948
+ * ```
949
+ */
950
+ declare const useEvents: (opts: UseEvents, deps: DependencyList) => void;
951
+ type UseEvents = { [T in keyof Hooks]?: Hook<T> | ((payload: Hooks[T]) => Async<void>) };
952
+ //#endregion
953
+ //#region src/hooks/useInject.d.ts
954
+ /**
955
+ * Hook to inject a service instance.
956
+ * It's a wrapper of `useAlepha().inject(service)` with a memoization.
957
+ */
958
+ declare const useInject: <T$1 extends object>(service: Service<T$1>) => T$1;
959
+ //#endregion
960
+ //#region src/hooks/useQueryParams.d.ts
961
+ /**
962
+ * Not well tested. Use with caution.
963
+ */
964
+ declare const useQueryParams: <T$1 extends TObject>(schema: T$1, options?: UseQueryParamsHookOptions) => [Partial<Static<T$1>>, (data: Static<T$1>) => void];
965
+ interface UseQueryParamsHookOptions {
966
+ format?: "base64" | "querystring";
967
+ key?: string;
968
+ push?: boolean;
969
+ }
970
+ //#endregion
971
+ //#region src/services/ReactRouter.d.ts
972
+ declare class ReactRouter<T$1 extends object> {
973
+ protected readonly alepha: Alepha;
974
+ protected readonly pageApi: ReactPageProvider;
975
+ get state(): ReactRouterState;
976
+ get pages(): PageRoute[];
977
+ get concretePages(): PageRoute[];
978
+ get browser(): ReactBrowserProvider | undefined;
979
+ isActive(href: string, options?: {
980
+ startWith?: boolean;
981
+ }): boolean;
982
+ path(name: keyof VirtualRouter<T$1>, config?: {
983
+ params?: Record<string, any>;
984
+ query?: Record<string, any>;
985
+ }): string;
986
+ /**
987
+ * Reload the current page.
988
+ * This is equivalent to calling `go()` with the current pathname and search.
989
+ */
990
+ reload(): Promise<void>;
991
+ getURL(): URL;
992
+ get location(): Location;
993
+ get current(): ReactRouterState;
994
+ get pathname(): string;
995
+ get query(): Record<string, string>;
996
+ back(): Promise<void>;
997
+ forward(): Promise<void>;
998
+ invalidate(props?: Record<string, any>): Promise<void>;
999
+ go(path: string, options?: RouterGoOptions): Promise<void>;
1000
+ go(path: keyof VirtualRouter<T$1>, options?: RouterGoOptions): Promise<void>;
1001
+ anchor(path: string, options?: RouterGoOptions): AnchorProps;
1002
+ anchor(path: keyof VirtualRouter<T$1>, options?: RouterGoOptions): AnchorProps;
1003
+ base(path: string): string;
1004
+ /**
1005
+ * Set query params.
1006
+ *
1007
+ * @param record
1008
+ * @param options
1009
+ */
1010
+ setQueryParams(record: Record<string, any> | ((queryParams: Record<string, any>) => Record<string, any>), options?: {
1011
+ /**
1012
+ * If true, this will add a new entry to the history stack.
1013
+ */
1014
+ push?: boolean;
1015
+ }): void;
1016
+ }
1017
+ type VirtualRouter<T$1> = { [K in keyof T$1 as T$1[K] extends PageDescriptor ? K : never]: T$1[K] };
1018
+ //#endregion
1019
+ //#region src/hooks/useRouter.d.ts
1020
+ /**
1021
+ * Use this hook to access the React Router instance.
1022
+ *
1023
+ * You can add a type parameter to specify the type of your application.
1024
+ * This will allow you to use the router in a typesafe way.
1025
+ *
1026
+ * @example
1027
+ * class App {
1028
+ * home = $page();
1029
+ * }
1030
+ *
1031
+ * const router = useRouter<App>();
1032
+ * router.go("home"); // typesafe
1033
+ */
1034
+ declare const useRouter: <T$1 extends object = any>() => ReactRouter<T$1>;
1035
+ //#endregion
1036
+ //#region src/hooks/useRouterState.d.ts
1037
+ declare const useRouterState: () => ReactRouterState;
1038
+ //#endregion
1039
+ //#region src/hooks/useSchema.d.ts
1040
+ declare const useSchema: <TConfig extends RequestConfigSchema>(action: VirtualAction<TConfig>) => UseSchemaReturn<TConfig>;
1041
+ type UseSchemaReturn<TConfig extends RequestConfigSchema> = TConfig & {
1042
+ loading: boolean;
1043
+ };
1044
+ /**
1045
+ * Get an action schema during server-side rendering (SSR) or client-side rendering (CSR).
1046
+ */
1047
+ declare const ssrSchemaLoading: (alepha: Alepha, name: string) => RequestConfigSchema | {
1048
+ loading: boolean;
1049
+ };
1050
+ //#endregion
1051
+ //#region src/hooks/useStore.d.ts
1052
+ /**
1053
+ * Hook to access and mutate the Alepha state.
1054
+ */
1055
+ declare const useStore: <Key extends keyof State>(key: Key, defaultValue?: State[Key]) => [State[Key], (value: State[Key]) => void];
1056
+ //#endregion
1057
+ //#region src/providers/ReactServerProvider.d.ts
1058
+ declare const envSchema: _alepha_core10.TObject<{
1059
+ REACT_SERVER_DIST: _alepha_core10.TString;
1060
+ REACT_SERVER_PREFIX: _alepha_core10.TString;
1061
+ REACT_SSR_ENABLED: _alepha_core10.TOptional<_alepha_core10.TBoolean>;
1062
+ REACT_ROOT_ID: _alepha_core10.TString;
1063
+ REACT_SERVER_TEMPLATE: _alepha_core10.TOptional<_alepha_core10.TString>;
1064
+ }>;
1065
+ declare module "alepha" {
1066
+ interface Env extends Partial<Static<typeof envSchema>> {}
1067
+ interface State {
1068
+ "react.server.ssr"?: boolean;
1069
+ }
1070
+ }
1071
+ interface ReactServerProviderOptions {
1072
+ /**
1073
+ * Override default options for the static file server.
1074
+ * > Static file server is only created in non-serverless production mode.
1075
+ */
1076
+ static?: Partial<Omit<ServeDescriptorOptions, "root">>;
1077
+ }
1078
+ declare class ReactServerProvider implements Configurable {
1079
+ protected readonly log: _alepha_logger0.Logger;
1080
+ protected readonly alepha: Alepha;
1081
+ protected readonly env: {
1082
+ REACT_SSR_ENABLED?: boolean | undefined;
1083
+ REACT_SERVER_TEMPLATE?: string | undefined;
1084
+ REACT_SERVER_DIST: string;
1085
+ REACT_SERVER_PREFIX: string;
1086
+ REACT_ROOT_ID: string;
1087
+ };
1088
+ protected readonly pageApi: ReactPageProvider;
1089
+ protected readonly serverProvider: ServerProvider;
1090
+ protected readonly serverStaticProvider: ServerStaticProvider;
1091
+ protected readonly serverRouterProvider: ServerRouterProvider;
1092
+ protected readonly serverTimingProvider: ServerTimingProvider;
1093
+ readonly ROOT_DIV_REGEX: RegExp;
1094
+ protected preprocessedTemplate: PreprocessedTemplate | null;
1095
+ options: ReactServerProviderOptions;
1096
+ /**
1097
+ * Configure the React server provider.
1098
+ */
1099
+ readonly onConfigure: _alepha_core10.HookDescriptor<"configure">;
1100
+ get template(): string;
1101
+ protected registerPages(templateLoader: TemplateLoader): Promise<void>;
1102
+ /**
1103
+ * Get the public directory path where static files are located.
1104
+ */
1105
+ protected getPublicDirectory(): string;
1106
+ /**
1107
+ * Configure the static file server to serve files from the given root directory.
1108
+ */
1109
+ protected configureStaticServer(root: string): Promise<void>;
1110
+ /**
1111
+ * Configure Vite for SSR.
1112
+ */
1113
+ protected configureVite(ssrEnabled: boolean): Promise<void>;
1114
+ /**
1115
+ * For testing purposes, creates a render function that can be used.
1116
+ */
1117
+ render(name: string, options?: PageDescriptorRenderOptions): Promise<PageDescriptorRenderResult>;
1118
+ protected createHandler(route: PageRoute, templateLoader: TemplateLoader): ServerHandler;
1119
+ renderToHtml(template: string, state: ReactRouterState, hydration?: boolean): string | Redirection;
1120
+ protected preprocessTemplate(template: string): PreprocessedTemplate;
1121
+ protected fillTemplate(response: {
1122
+ html: string;
1123
+ }, app: string, script: string): void;
1124
+ }
1125
+ type TemplateLoader = () => Promise<string | undefined>;
1126
+ interface PreprocessedTemplate {
1127
+ beforeApp: string;
1128
+ afterApp: string;
1129
+ beforeScript: string;
1130
+ afterScript: string;
1131
+ }
1132
+ //#endregion
1133
+ //#region src/index.d.ts
1134
+ declare module "alepha" {
1135
+ interface State {
1136
+ "react.router.state"?: ReactRouterState;
1137
+ }
1138
+ interface Hooks {
1139
+ /**
1140
+ * Fires when the React application is starting to be rendered on the server.
1141
+ */
1142
+ "react:server:render:begin": {
1143
+ request?: ServerRequest;
1144
+ state: ReactRouterState;
1145
+ };
1146
+ /**
1147
+ * Fires when the React application has been rendered on the server.
1148
+ */
1149
+ "react:server:render:end": {
1150
+ request?: ServerRequest;
1151
+ state: ReactRouterState;
1152
+ html: string;
1153
+ };
1154
+ /**
1155
+ * Fires when the React application is being rendered on the browser.
1156
+ */
1157
+ "react:browser:render": {
1158
+ root: HTMLElement;
1159
+ element: ReactNode;
1160
+ state: ReactRouterState;
1161
+ hydration?: ReactHydrationState;
1162
+ };
1163
+ /**
1164
+ * Fires when a user action is starting.
1165
+ * Action can be a form submission, a route transition, or a custom action.
1166
+ */
1167
+ "react:action:begin": {
1168
+ type: string;
1169
+ id?: string;
1170
+ };
1171
+ /**
1172
+ * Fires when a user action has succeeded.
1173
+ * Action can be a form submission, a route transition, or a custom action.
1174
+ */
1175
+ "react:action:success": {
1176
+ type: string;
1177
+ id?: string;
1178
+ };
1179
+ /**
1180
+ * Fires when a user action has failed.
1181
+ * Action can be a form submission, a route transition, or a custom action.
1182
+ */
1183
+ "react:action:error": {
1184
+ type: string;
1185
+ id?: string;
1186
+ error: Error;
1187
+ };
1188
+ /**
1189
+ * Fires when a user action has completed, regardless of success or failure.
1190
+ * Action can be a form submission, a route transition, or a custom action.
1191
+ */
1192
+ "react:action:end": {
1193
+ type: string;
1194
+ id?: string;
1195
+ };
1196
+ /**
1197
+ * Fires when a route transition is starting.
1198
+ */
1199
+ "react:transition:begin": {
1200
+ previous: ReactRouterState;
1201
+ state: ReactRouterState;
1202
+ animation?: PageAnimation;
1203
+ };
1204
+ /**
1205
+ * Fires when a route transition has succeeded.
1206
+ */
1207
+ "react:transition:success": {
1208
+ state: ReactRouterState;
1209
+ };
1210
+ /**
1211
+ * Fires when a route transition has failed.
1212
+ */
1213
+ "react:transition:error": {
1214
+ state: ReactRouterState;
1215
+ error: Error;
1216
+ };
1217
+ /**
1218
+ * Fires when a route transition has completed, regardless of success or failure.
1219
+ */
1220
+ "react:transition:end": {
1221
+ state: ReactRouterState;
1222
+ };
1223
+ }
1224
+ }
1225
+ /**
1226
+ * Provides full-stack React development with declarative routing, server-side rendering, and client-side hydration.
1227
+ *
1228
+ * The React module enables building modern React applications using the `$page` descriptor on class properties.
1229
+ * It delivers seamless server-side rendering, automatic code splitting, and client-side navigation with full
1230
+ * type safety and schema validation for route parameters and data.
1231
+ *
1232
+ * @see {@link $page}
1233
+ * @module alepha.react
1234
+ */
1235
+ declare const AlephaReact: _alepha_core10.Service<_alepha_core10.Module<{}>>;
1236
+ //#endregion
1237
+ export { $page, ActionContext, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, type LinkProps, _default as NestedView, NotFoundPage as NotFound, PageAnimation, PageConfigSchema, PageDescriptor, PageDescriptorOptions, PageDescriptorRenderOptions, PageDescriptorRenderResult, PageRequestConfig, PageResolve, PageRoute, PageRouteEntry, PreviousLayerData, ReactBrowserProvider, ReactBrowserRendererOptions, ReactHydrationState, ReactPageProvider, ReactRouter, ReactRouterState, ReactServerProvider, ReactServerProviderOptions, Redirection, RouterGoOptions, RouterLayerContext, RouterLayerContextValue, RouterRenderOptions, RouterStackItem, TPropsDefault, TPropsParentDefault, TransitionOptions, UseActionOptions, UseActionReturn, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, VirtualRouter, isPageRoute, ssrSchemaLoading, useAction, useActive, useAlepha, useClient, useEvents, useInject, useQueryParams, useRouter, useRouterState, useSchema, useStore };
1238
+ //# sourceMappingURL=index.d.ts.map