alepha 0.10.7 → 0.11.1

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/queue.d.ts CHANGED
@@ -105,9 +105,9 @@ declare class WorkerProvider {
105
105
  */
106
106
  wakeUp(): void;
107
107
  }
108
- interface Consumer<T$1 extends TSchema = TSchema> {
109
- queue: QueueDescriptor<T$1>;
110
- handler: (message: QueueMessage<T$1>) => Promise<void>;
108
+ interface Consumer<T extends TSchema = TSchema> {
109
+ queue: QueueDescriptor<T>;
110
+ handler: (message: QueueMessage<T>) => Promise<void>;
111
111
  }
112
112
  interface NextMessage {
113
113
  consumer: Consumer;
@@ -230,7 +230,7 @@ declare const $queue: {
230
230
  <T extends TSchema>(options: QueueDescriptorOptions<T>): QueueDescriptor<T>;
231
231
  [KIND]: typeof QueueDescriptor;
232
232
  };
233
- interface QueueDescriptorOptions<T$1 extends TSchema> {
233
+ interface QueueDescriptorOptions<T extends TSchema> {
234
234
  /**
235
235
  * Unique name for the queue.
236
236
  *
@@ -306,7 +306,7 @@ interface QueueDescriptorOptions<T$1 extends TSchema> {
306
306
  * })
307
307
  * ```
308
308
  */
309
- schema: T$1;
309
+ schema: T;
310
310
  /**
311
311
  * Message handler function that processes queue messages.
312
312
  *
@@ -348,21 +348,21 @@ interface QueueDescriptorOptions<T$1 extends TSchema> {
348
348
  * }
349
349
  * ```
350
350
  */
351
- handler?: (message: QueueMessage<T$1>) => Promise<void>;
351
+ handler?: (message: QueueMessage<T>) => Promise<void>;
352
352
  }
353
- declare class QueueDescriptor<T$1 extends TSchema> extends Descriptor<QueueDescriptorOptions<T$1>> {
353
+ declare class QueueDescriptor<T extends TSchema> extends Descriptor<QueueDescriptorOptions<T>> {
354
354
  protected readonly log: _alepha_logger0.Logger;
355
355
  protected readonly workerProvider: WorkerProvider;
356
356
  readonly provider: QueueProvider | MemoryQueueProvider;
357
- push(...payloads: Array<Static<T$1>>): Promise<void>;
357
+ push(...payloads: Array<Static<T>>): Promise<void>;
358
358
  get name(): string;
359
359
  protected $provider(): QueueProvider | MemoryQueueProvider;
360
360
  }
361
361
  interface QueueMessageSchema {
362
362
  payload: TSchema;
363
363
  }
364
- interface QueueMessage<T$1 extends TSchema> {
365
- payload: Static<T$1>;
364
+ interface QueueMessage<T extends TSchema> {
365
+ payload: Static<T>;
366
366
  }
367
367
  //#endregion
368
368
  //#region src/descriptors/$consumer.d.ts
@@ -631,7 +631,7 @@ declare const $consumer: {
631
631
  <T extends TSchema>(options: ConsumerDescriptorOptions<T>): ConsumerDescriptor<T>;
632
632
  [KIND]: typeof ConsumerDescriptor;
633
633
  };
634
- interface ConsumerDescriptorOptions<T$1 extends TSchema> {
634
+ interface ConsumerDescriptorOptions<T extends TSchema> {
635
635
  /**
636
636
  * The queue descriptor that this consumer will process messages from.
637
637
  *
@@ -662,7 +662,7 @@ interface ConsumerDescriptorOptions<T$1 extends TSchema> {
662
662
  * });
663
663
  * ```
664
664
  */
665
- queue: QueueDescriptor<T$1>;
665
+ queue: QueueDescriptor<T>;
666
666
  /**
667
667
  * Message handler function that processes individual messages from the queue.
668
668
  *
@@ -737,10 +737,10 @@ interface ConsumerDescriptorOptions<T$1 extends TSchema> {
737
737
  * ```
738
738
  */
739
739
  handler: (message: {
740
- payload: Static<T$1>;
740
+ payload: Static<T>;
741
741
  }) => Promise<void>;
742
742
  }
743
- declare class ConsumerDescriptor<T$1 extends TSchema> extends Descriptor<ConsumerDescriptorOptions<T$1>> {}
743
+ declare class ConsumerDescriptor<T extends TSchema> extends Descriptor<ConsumerDescriptorOptions<T>> {}
744
744
  //#endregion
745
745
  //#region src/index.d.ts
746
746
  /**
package/react/auth.d.ts CHANGED
@@ -4,11 +4,11 @@ import * as _alepha_server_cookies0 from "alepha/server/cookies";
4
4
  import { Cookies, ServerCookiesProvider } from "alepha/server/cookies";
5
5
  import { DateTimeProvider } from "alepha/datetime";
6
6
  import { AccessTokenResponse, RealmDescriptor, SecurityProvider, UserAccount, UserAccountToken } from "alepha/security";
7
- import { Configuration } from "openid-client";
8
7
  import * as _alepha_logger0 from "alepha/logger";
9
8
  import * as _alepha_server0 from "alepha/server";
10
9
  import { HttpClient } from "alepha/server";
11
10
  import { HttpVirtualClient, ServerLinksProvider } from "alepha/server/links";
11
+ import { Configuration } from "openid-client";
12
12
  import * as typebox143 from "typebox";
13
13
 
14
14
  //#region src/schemas/tokensSchema.d.ts
package/react/form.d.ts CHANGED
@@ -4,22 +4,29 @@ import { InputHTMLAttributes, ReactNode } from "react";
4
4
  import * as _alepha_logger0 from "alepha/logger";
5
5
 
6
6
  //#region src/services/FormModel.d.ts
7
- declare class FormModel<T$1 extends TObject> {
7
+ declare class FormModel<T extends TObject> {
8
8
  readonly id: string;
9
- readonly options: FormCtrlOptions<T$1>;
9
+ readonly options: FormCtrlOptions<T>;
10
10
  protected readonly log: _alepha_logger0.Logger;
11
11
  protected readonly alepha: Alepha;
12
12
  protected readonly values: Record<string, any>;
13
- input: SchemaToInput<T$1>;
14
- constructor(id: string, options: FormCtrlOptions<T$1>);
15
- readonly onSubmit: (event: FormEventLike) => Promise<void>;
16
- protected parseValuesFromFormElement<T extends TObject>(options: FormCtrlOptions<T$1>, store: Record<string, any>): Record<string, any>;
17
- protected getValueFromInputObject<T extends TObject>(options: FormCtrlOptions<T$1>, values: Record<string, any>, key: string, value: FormDataEntryValue): void;
18
- protected createProxyFromSchema<T extends TObject>(options: FormCtrlOptions<T$1>, schema: TSchema, context: {
13
+ input: SchemaToInput<T>;
14
+ constructor(id: string, options: FormCtrlOptions<T>);
15
+ get currentValues(): Record<string, any>;
16
+ get props(): {
17
+ noValidate: boolean;
18
+ onSubmit: (values: FormEventLike) => Promise<void>;
19
+ onReset: (event: FormEventLike) => Promise<void>;
20
+ };
21
+ protected readonly reset: (event: FormEventLike) => Promise<void>;
22
+ protected readonly submit: (event: FormEventLike) => Promise<void>;
23
+ protected parseValuesFromFormElement<T extends TObject>(options: FormCtrlOptions<T>, store: Record<string, any>): Record<string, any>;
24
+ protected getValueFromInputObject<T extends TObject>(options: FormCtrlOptions<T>, values: Record<string, any>, key: string, value: FormDataEntryValue): void;
25
+ protected createProxyFromSchema<T extends TObject>(options: FormCtrlOptions<T>, schema: TSchema, context: {
19
26
  parent: string;
20
27
  store: Record<string, any>;
21
- }): SchemaToInput<T$1>;
22
- protected createInputFromSchema<T extends TObject>(name: keyof Static<T$1> & string, options: FormCtrlOptions<T$1>, schema: TObject, required: boolean, context: {
28
+ }): SchemaToInput<T>;
29
+ protected createInputFromSchema<T extends TObject>(name: keyof Static<T> & string, options: FormCtrlOptions<T>, schema: TObject, required: boolean, context: {
23
30
  parent: string;
24
31
  store: Record<string, any>;
25
32
  }): InputField;
@@ -29,7 +36,7 @@ declare class FormModel<T$1 extends TObject> {
29
36
  protected getValueFromInput(input: FormDataEntryValue, schema: TSchema): any;
30
37
  protected valueToInputEntry(value: any): string | number | boolean;
31
38
  }
32
- type SchemaToInput<T$1 extends TObject> = { [K in keyof T$1["properties"]]: T$1["properties"][K] extends TObject ? SchemaToInput<T$1["properties"][K]> : InputField };
39
+ type SchemaToInput<T extends TObject> = { [K in keyof T["properties"]]: T["properties"][K] extends TObject ? SchemaToInput<T["properties"][K]> : InputField };
33
40
  interface FormEventLike {
34
41
  currentTarget: any;
35
42
  preventDefault: () => void;
@@ -48,29 +55,29 @@ type InputHTMLAttributesLike = Pick<InputHTMLAttributes<unknown>, "id" | "name"
48
55
  defaultValue?: any;
49
56
  onChange?: (event: any) => void;
50
57
  };
51
- type FormCtrlOptions<T$1 extends TObject> = {
58
+ type FormCtrlOptions<T extends TObject> = {
52
59
  /**
53
60
  * The schema defining the structure and validation rules for the form.
54
61
  * This should be a TypeBox schema object.
55
62
  */
56
- schema: T$1;
63
+ schema: T;
57
64
  /**
58
65
  * Callback function to handle form submission.
59
66
  * This function will receive the parsed and validated form values.
60
67
  */
61
- handler: (values: Static<T$1>, args: {
68
+ handler: (values: Static<T>, args: {
62
69
  form: HTMLFormElement;
63
70
  }) => unknown;
64
71
  /**
65
72
  * Optional initial values for the form fields.
66
73
  * This can be used to pre-populate the form with existing data.
67
74
  */
68
- initialValues?: Partial<Static<T$1>>;
75
+ initialValues?: Partial<Static<T>>;
69
76
  /**
70
77
  * Optional function to create custom field attributes.
71
78
  * This can be used to add custom validation, styles, or other attributes.
72
79
  */
73
- onCreateField?: (name: keyof Static<T$1> & string, schema: TSchema) => InputHTMLAttributes<unknown>;
80
+ onCreateField?: (name: keyof Static<T> & string, schema: TSchema) => InputHTMLAttributes<unknown>;
74
81
  /**
75
82
  * If defined, this will generate a unique ID for each field, prefixed with this string.
76
83
  *
@@ -126,17 +133,16 @@ declare const FormState: <T extends TObject>(props: {
126
133
  declare const useForm: <T extends TObject>(options: FormCtrlOptions<T>) => FormModel<T>;
127
134
  //#endregion
128
135
  //#region src/hooks/useFormState.d.ts
129
- interface UseFormStateReturn<T$1 extends TObject> {
136
+ interface UseFormStateReturn {
130
137
  loading: boolean;
131
138
  dirty: boolean;
132
- values?: T$1;
139
+ values?: Record<string, any>;
133
140
  error?: Error;
134
141
  }
135
- type FormStateEvent = "change" | "submit" | "error";
136
- declare const useFormState: <T extends TObject>(target: FormModel<T> | {
142
+ declare const useFormState: <T extends TObject, Keys extends keyof UseFormStateReturn>(target: FormModel<T> | {
137
143
  form: FormModel<T>;
138
144
  path: string;
139
- }, events?: FormStateEvent[]) => UseFormStateReturn<T>;
145
+ }, _events?: Keys[]) => Pick<UseFormStateReturn, Keys>;
140
146
  //#endregion
141
147
  //#region src/index.d.ts
142
148
  declare module "alepha" {
@@ -145,11 +151,16 @@ declare module "alepha" {
145
151
  id: string;
146
152
  path: string;
147
153
  };
154
+ "form:reset": {
155
+ id: string;
156
+ values: Record<string, any>;
157
+ };
148
158
  "form:submit:begin": {
149
159
  id: string;
150
160
  };
151
161
  "form:submit:success": {
152
162
  id: string;
163
+ values: Record<string, any>;
153
164
  };
154
165
  "form:submit:error": {
155
166
  id: string;
@@ -173,5 +184,5 @@ declare module "alepha" {
173
184
  */
174
185
  declare const AlephaReactForm: _alepha_core0.Service<_alepha_core0.Module<{}>>;
175
186
  //#endregion
176
- export { AlephaReactForm, FormCtrlOptions, FormEventLike, FormModel, FormState, FormStateEvent, InputField, InputHTMLAttributesLike, SchemaToInput, UseFormStateReturn, useForm, useFormState };
187
+ export { AlephaReactForm, FormCtrlOptions, FormEventLike, FormModel, FormState, InputField, InputHTMLAttributesLike, SchemaToInput, UseFormStateReturn, useForm, useFormState };
177
188
  //# sourceMappingURL=index.d.ts.map
package/react/i18n.d.ts CHANGED
@@ -8,16 +8,16 @@ import * as typebox0 from "typebox";
8
8
  /**
9
9
  * Hook to access the i18n service.
10
10
  */
11
- declare const useI18n: <S extends object, K extends keyof ServiceDictionary<S>>() => I18nProvider<S, K> & {
12
- tr(key: keyof ServiceDictionary<S>[K] | string, options?: {
11
+ declare const useI18n: <S extends object, K$1 extends keyof ServiceDictionary<S>>() => I18nProvider<S, K$1> & {
12
+ tr(key: keyof ServiceDictionary<S>[K$1] | string, options?: {
13
13
  args?: string[];
14
14
  default?: string;
15
15
  }): string;
16
16
  };
17
- type ServiceDictionary<T$1 extends object> = { [K in keyof T$1]: T$1[K] extends DictionaryDescriptor<infer U> ? U : never };
17
+ type ServiceDictionary<T extends object> = { [K in keyof T]: T[K] extends DictionaryDescriptor<infer U> ? U : never };
18
18
  //#endregion
19
19
  //#region src/providers/I18nProvider.d.ts
20
- declare class I18nProvider<S$1 extends object, K$1 extends keyof ServiceDictionary<S$1>> {
20
+ declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary<S>> {
21
21
  protected logger: _alepha_logger0.Logger;
22
22
  protected alepha: Alepha;
23
23
  protected cookie: _alepha_server_cookies0.AbstractCookieDescriptor<typebox0.TString>;
@@ -44,7 +44,7 @@ declare class I18nProvider<S$1 extends object, K$1 extends keyof ServiceDictiona
44
44
  protected readonly mutate: _alepha_core1.HookDescriptor<"state:mutate">;
45
45
  get lang(): string;
46
46
  translate: (key: string, args?: string[]) => string;
47
- readonly tr: (key: keyof ServiceDictionary<S$1>[K$1] | string, options?: {
47
+ readonly tr: (key: keyof ServiceDictionary<S>[K$1] | string, options?: {
48
48
  args?: string[];
49
49
  default?: string;
50
50
  }) => string;
@@ -87,14 +87,14 @@ declare const $dictionary: {
87
87
  <T extends Record<string, string>>(options: DictionaryDescriptorOptions<T>): DictionaryDescriptor<T>;
88
88
  [KIND]: typeof DictionaryDescriptor;
89
89
  };
90
- interface DictionaryDescriptorOptions<T$1 extends Record<string, string>> {
90
+ interface DictionaryDescriptorOptions<T extends Record<string, string>> {
91
91
  lang?: string;
92
92
  name?: string;
93
93
  lazy: () => Promise<{
94
- default: T$1;
94
+ default: T;
95
95
  }>;
96
96
  }
97
- declare class DictionaryDescriptor<T$1 extends Record<string, string>> extends Descriptor<DictionaryDescriptorOptions<T$1>> {
97
+ declare class DictionaryDescriptor<T extends Record<string, string>> extends Descriptor<DictionaryDescriptorOptions<T>> {
98
98
  protected provider: I18nProvider<object, never>;
99
99
  protected onInit(): void;
100
100
  }
package/react.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import * as _alepha_core5 from "alepha";
2
- import { Alepha, Async, Descriptor, Hooks, KIND, Service, State, Static, TObject, TSchema } from "alepha";
1
+ import * as _alepha_core14 from "alepha";
2
+ import { Alepha, Async, Configurable, Descriptor, Hooks, KIND, Service, State, Static, TObject, TSchema } from "alepha";
3
3
  import { RequestConfigSchema, ServerHandler, ServerProvider, ServerRequest, ServerRouterProvider, ServerTimingProvider } from "alepha/server";
4
4
  import { ServerRouteCache } from "alepha/server/cache";
5
5
  import { ClientScope, HttpVirtualClient, LinkProvider, VirtualAction } from "alepha/server/links";
6
- import * as _alepha_logger0 from "alepha/logger";
7
- import * as react1 from "react";
6
+ import * as _alepha_logger1 from "alepha/logger";
7
+ import * as react0 from "react";
8
8
  import React, { AnchorHTMLAttributes, CSSProperties, ErrorInfo, FC, PropsWithChildren, ReactNode } from "react";
9
9
  import * as react_jsx_runtime0 from "react/jsx-runtime";
10
- import { ServerStaticProvider } from "alepha/server/static";
10
+ import { ServeDescriptorOptions, ServerStaticProvider } from "alepha/server/static";
11
11
  import { DateTimeProvider } from "alepha/datetime";
12
12
  import { Route, RouterProvider } from "alepha/router";
13
13
 
@@ -40,14 +40,14 @@ declare class Redirection extends Error {
40
40
  }
41
41
  //#endregion
42
42
  //#region src/providers/ReactPageProvider.d.ts
43
- declare const envSchema$2: _alepha_core5.TObject<{
44
- REACT_STRICT_MODE: _alepha_core5.TBoolean;
43
+ declare const envSchema$2: _alepha_core14.TObject<{
44
+ REACT_STRICT_MODE: _alepha_core14.TBoolean;
45
45
  }>;
46
46
  declare module "alepha" {
47
47
  interface Env extends Partial<Static<typeof envSchema$2>> {}
48
48
  }
49
49
  declare class ReactPageProvider {
50
- protected readonly log: _alepha_logger0.Logger;
50
+ protected readonly log: _alepha_logger1.Logger;
51
51
  protected readonly env: {
52
52
  REACT_STRICT_MODE: boolean;
53
53
  };
@@ -83,7 +83,7 @@ declare class ReactPageProvider {
83
83
  }, params?: Record<string, any>): string;
84
84
  compile(path: string, params?: Record<string, string>): string;
85
85
  protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
86
- protected readonly configure: _alepha_core5.HookDescriptor<"configure">;
86
+ protected readonly configure: _alepha_core14.HookDescriptor<"configure">;
87
87
  protected map(pages: Array<PageDescriptor>, target: PageDescriptor): PageRouteEntry;
88
88
  add(entry: PageRouteEntry): void;
89
89
  protected createMatch(page: PageRoute): string;
@@ -255,7 +255,7 @@ declare const $page: {
255
255
  <TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = any, TPropsParent extends object = TPropsParentDefault>(options: PageDescriptorOptions<TConfig, TProps, TPropsParent>): PageDescriptor<TConfig, TProps, TPropsParent>;
256
256
  [KIND]: typeof PageDescriptor;
257
257
  };
258
- interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigSchema, TProps$1 extends object = TPropsDefault, TPropsParent$1 extends object = TPropsParentDefault> {
258
+ interface PageDescriptorOptions<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> {
259
259
  /**
260
260
  * Name your page.
261
261
  *
@@ -279,7 +279,7 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
279
279
  * - `params`: parameters from the pathname.
280
280
  * - `query`: query parameters from the URL.
281
281
  */
282
- schema?: TConfig$1;
282
+ schema?: TConfig;
283
283
  /**
284
284
  * Load data before rendering the page.
285
285
  *
@@ -294,14 +294,14 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
294
294
  *
295
295
  * RedirectError can be thrown to redirect the user to another page.
296
296
  */
297
- resolve?: (context: PageResolve<TConfig$1, TPropsParent$1>) => Async<TProps$1>;
297
+ resolve?: (context: PageResolve<TConfig, TPropsParent>) => Async<TProps>;
298
298
  /**
299
299
  * The component to render when the page is loaded.
300
300
  *
301
301
  * If `lazy` is defined, this will be ignored.
302
302
  * Prefer using `lazy` to improve the initial loading time.
303
303
  */
304
- component?: FC<TProps$1 & TPropsParent$1>;
304
+ component?: FC<TProps & TPropsParent>;
305
305
  /**
306
306
  * Lazy load the component when the page is loaded.
307
307
  *
@@ -309,7 +309,7 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
309
309
  * and enable code-splitting.
310
310
  */
311
311
  lazy?: () => Promise<{
312
- default: FC<TProps$1 & TPropsParent$1>;
312
+ default: FC<TProps & TPropsParent>;
313
313
  }>;
314
314
  /**
315
315
  * Set some children pages and make the page a parent page.
@@ -319,7 +319,7 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
319
319
  * If you still want to render at this pathname, add a child page with an empty path.
320
320
  */
321
321
  children?: Array<PageDescriptor> | (() => Array<PageDescriptor>);
322
- parent?: PageDescriptor<PageConfigSchema, TPropsParent$1>;
322
+ parent?: PageDescriptor<PageConfigSchema, TPropsParent>;
323
323
  can?: () => boolean;
324
324
  /**
325
325
  * Catch any error from the `resolve` function or during `rendering`.
@@ -368,7 +368,7 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
368
368
  * It will act as timeless cached page server-side. You can use `cache` to configure the cache behavior.
369
369
  */
370
370
  static?: boolean | {
371
- entries?: Array<Partial<PageRequestConfig<TConfig$1>>>;
371
+ entries?: Array<Partial<PageRequestConfig<TConfig>>>;
372
372
  };
373
373
  cache?: ServerRouteCache;
374
374
  /**
@@ -429,7 +429,7 @@ interface PageDescriptorOptions<TConfig$1 extends PageConfigSchema = PageConfigS
429
429
  animation?: PageAnimation;
430
430
  }
431
431
  type ErrorHandler = (error: Error, state: ReactRouterState) => ReactNode | Redirection | undefined;
432
- declare class PageDescriptor<TConfig$1 extends PageConfigSchema = PageConfigSchema, TProps$1 extends object = TPropsDefault, TPropsParent$1 extends object = TPropsParentDefault> extends Descriptor<PageDescriptorOptions<TConfig$1, TProps$1, TPropsParent$1>> {
432
+ declare class PageDescriptor<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> extends Descriptor<PageDescriptorOptions<TConfig, TProps, TPropsParent>> {
433
433
  protected onInit(): void;
434
434
  get name(): string;
435
435
  /**
@@ -467,11 +467,11 @@ interface PageDescriptorRenderResult {
467
467
  state: ReactRouterState;
468
468
  redirect?: string;
469
469
  }
470
- interface PageRequestConfig<TConfig$1 extends PageConfigSchema = PageConfigSchema> {
471
- params: TConfig$1["params"] extends TSchema ? Static<TConfig$1["params"]> : Record<string, string>;
472
- query: TConfig$1["query"] extends TSchema ? Static<TConfig$1["query"]> : Record<string, string>;
470
+ interface PageRequestConfig<TConfig extends PageConfigSchema = PageConfigSchema> {
471
+ params: TConfig["params"] extends TSchema ? Static<TConfig["params"]> : Record<string, string>;
472
+ query: TConfig["query"] extends TSchema ? Static<TConfig["query"]> : Record<string, string>;
473
473
  }
474
- type PageResolve<TConfig$1 extends PageConfigSchema = PageConfigSchema, TPropsParent$1 extends object = TPropsParentDefault> = PageRequestConfig<TConfig$1> & TPropsParent$1 & Omit<ReactRouterState, "layers" | "onError">;
474
+ type PageResolve<TConfig extends PageConfigSchema = PageConfigSchema, TPropsParent extends object = TPropsParentDefault> = PageRequestConfig<TConfig> & TPropsParent & Omit<ReactRouterState, "layers" | "onError">;
475
475
  type PageAnimation = PageAnimationObject | ((state: ReactRouterState) => PageAnimationObject | undefined);
476
476
  type PageAnimationObject = CssAnimationName | {
477
477
  enter?: CssAnimation | CssAnimationName;
@@ -489,18 +489,18 @@ interface BrowserRoute extends Route {
489
489
  page: PageRoute;
490
490
  }
491
491
  declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
492
- protected readonly log: _alepha_logger0.Logger;
492
+ protected readonly log: _alepha_logger1.Logger;
493
493
  protected readonly alepha: Alepha;
494
494
  protected readonly pageApi: ReactPageProvider;
495
495
  add(entry: PageRouteEntry): void;
496
- protected readonly configure: _alepha_core5.HookDescriptor<"configure">;
496
+ protected readonly configure: _alepha_core14.HookDescriptor<"configure">;
497
497
  transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
498
498
  root(state: ReactRouterState): ReactNode;
499
499
  }
500
500
  //#endregion
501
501
  //#region src/providers/ReactBrowserProvider.d.ts
502
- declare const envSchema$1: _alepha_core5.TObject<{
503
- REACT_ROOT_ID: _alepha_core5.TString;
502
+ declare const envSchema$1: _alepha_core14.TObject<{
503
+ REACT_ROOT_ID: _alepha_core14.TString;
504
504
  }>;
505
505
  declare module "alepha" {
506
506
  interface Env extends Partial<Static<typeof envSchema$1>> {}
@@ -512,7 +512,7 @@ declare class ReactBrowserProvider {
512
512
  protected readonly env: {
513
513
  REACT_ROOT_ID: string;
514
514
  };
515
- protected readonly log: _alepha_logger0.Logger;
515
+ protected readonly log: _alepha_logger1.Logger;
516
516
  protected readonly client: LinkProvider;
517
517
  protected readonly alepha: Alepha;
518
518
  protected readonly router: ReactBrowserRouterProvider;
@@ -546,8 +546,8 @@ declare class ReactBrowserProvider {
546
546
  * Get embedded layers from the server.
547
547
  */
548
548
  protected getHydrationState(): ReactHydrationState | undefined;
549
- protected readonly onTransitionEnd: _alepha_core5.HookDescriptor<"react:transition:end">;
550
- readonly ready: _alepha_core5.HookDescriptor<"ready">;
549
+ protected readonly onTransitionEnd: _alepha_core14.HookDescriptor<"react:transition:end">;
550
+ readonly ready: _alepha_core14.HookDescriptor<"ready">;
551
551
  }
552
552
  interface RouterGoOptions {
553
553
  replace?: boolean;
@@ -632,7 +632,7 @@ interface NestedViewProps {
632
632
  children?: ReactNode;
633
633
  errorBoundary?: false | ((error: Error) => ReactNode);
634
634
  }
635
- declare const _default: react1.MemoExoticComponent<(props: NestedViewProps) => react_jsx_runtime0.JSX.Element>;
635
+ declare const _default: react0.MemoExoticComponent<(props: NestedViewProps) => react_jsx_runtime0.JSX.Element>;
636
636
  //#endregion
637
637
  //#region src/components/NotFound.d.ts
638
638
  declare function NotFoundPage(props: {
@@ -640,14 +640,14 @@ declare function NotFoundPage(props: {
640
640
  }): react_jsx_runtime0.JSX.Element;
641
641
  //#endregion
642
642
  //#region src/contexts/AlephaContext.d.ts
643
- declare const AlephaContext: react1.Context<Alepha | undefined>;
643
+ declare const AlephaContext: react0.Context<Alepha | undefined>;
644
644
  //#endregion
645
645
  //#region src/contexts/RouterLayerContext.d.ts
646
646
  interface RouterLayerContextValue {
647
647
  index: number;
648
648
  path: string;
649
649
  }
650
- declare const RouterLayerContext: react1.Context<RouterLayerContextValue | undefined>;
650
+ declare const RouterLayerContext: react0.Context<RouterLayerContextValue | undefined>;
651
651
  //#endregion
652
652
  //#region src/hooks/useActive.d.ts
653
653
  interface UseActiveOptions {
@@ -703,13 +703,13 @@ interface UseQueryParamsHookOptions {
703
703
  }
704
704
  //#endregion
705
705
  //#region src/services/ReactRouter.d.ts
706
- declare class ReactRouter<T$1 extends object> {
706
+ declare class ReactRouter<T extends object> {
707
707
  protected readonly alepha: Alepha;
708
708
  protected readonly pageApi: ReactPageProvider;
709
709
  get state(): ReactRouterState;
710
710
  get pages(): PageRoute[];
711
711
  get browser(): ReactBrowserProvider | undefined;
712
- path(name: keyof VirtualRouter<T$1>, config?: {
712
+ path(name: keyof VirtualRouter<T>, config?: {
713
713
  params?: Record<string, any>;
714
714
  query?: Record<string, any>;
715
715
  }): string;
@@ -727,9 +727,9 @@ declare class ReactRouter<T$1 extends object> {
727
727
  forward(): Promise<void>;
728
728
  invalidate(props?: Record<string, any>): Promise<void>;
729
729
  go(path: string, options?: RouterGoOptions): Promise<void>;
730
- go(path: keyof VirtualRouter<T$1>, options?: RouterGoOptions): Promise<void>;
730
+ go(path: keyof VirtualRouter<T>, options?: RouterGoOptions): Promise<void>;
731
731
  anchor(path: string, options?: RouterGoOptions): AnchorProps;
732
- anchor(path: keyof VirtualRouter<T$1>, options?: RouterGoOptions): AnchorProps;
732
+ anchor(path: keyof VirtualRouter<T>, options?: RouterGoOptions): AnchorProps;
733
733
  base(path: string): string;
734
734
  /**
735
735
  * Set query params.
@@ -744,7 +744,7 @@ declare class ReactRouter<T$1 extends object> {
744
744
  push?: boolean;
745
745
  }): void;
746
746
  }
747
- type VirtualRouter<T$1> = { [K in keyof T$1 as T$1[K] extends PageDescriptor ? K : never]: T$1[K] };
747
+ type VirtualRouter<T> = { [K in keyof T as T[K] extends PageDescriptor ? K : never]: T[K] };
748
748
  //#endregion
749
749
  //#region src/hooks/useRouter.d.ts
750
750
  /**
@@ -764,9 +764,9 @@ type VirtualRouter<T$1> = { [K in keyof T$1 as T$1[K] extends PageDescriptor ? K
764
764
  declare const useRouter: <T extends object = any>() => ReactRouter<T>;
765
765
  //#endregion
766
766
  //#region src/hooks/useRouterEvents.d.ts
767
- type Hook<T$1 extends keyof Hooks> = ((ev: Hooks[T$1]) => void) | {
767
+ type Hook<T extends keyof Hooks> = ((ev: Hooks[T]) => void) | {
768
768
  priority?: "first" | "last";
769
- callback: (ev: Hooks[T$1]) => void;
769
+ callback: (ev: Hooks[T]) => void;
770
770
  };
771
771
  /**
772
772
  * Subscribe to various router events.
@@ -783,7 +783,7 @@ declare const useRouterState: () => ReactRouterState;
783
783
  //#endregion
784
784
  //#region src/hooks/useSchema.d.ts
785
785
  declare const useSchema: <TConfig extends RequestConfigSchema>(action: VirtualAction<TConfig>) => UseSchemaReturn<TConfig>;
786
- type UseSchemaReturn<TConfig$1 extends RequestConfigSchema> = TConfig$1 & {
786
+ type UseSchemaReturn<TConfig extends RequestConfigSchema> = TConfig & {
787
787
  loading: boolean;
788
788
  };
789
789
  /**
@@ -800,12 +800,12 @@ declare const ssrSchemaLoading: (alepha: Alepha, name: string) => RequestConfigS
800
800
  declare const useStore: <Key extends keyof State>(key: Key, defaultValue?: State[Key]) => [State[Key], (value: State[Key]) => void];
801
801
  //#endregion
802
802
  //#region src/providers/ReactServerProvider.d.ts
803
- declare const envSchema: _alepha_core5.TObject<{
804
- REACT_SERVER_DIST: _alepha_core5.TString;
805
- REACT_SERVER_PREFIX: _alepha_core5.TString;
806
- REACT_SSR_ENABLED: _alepha_core5.TOptional<_alepha_core5.TBoolean>;
807
- REACT_ROOT_ID: _alepha_core5.TString;
808
- REACT_SERVER_TEMPLATE: _alepha_core5.TOptional<_alepha_core5.TString>;
803
+ declare const envSchema: _alepha_core14.TObject<{
804
+ REACT_SERVER_DIST: _alepha_core14.TString;
805
+ REACT_SERVER_PREFIX: _alepha_core14.TString;
806
+ REACT_SSR_ENABLED: _alepha_core14.TOptional<_alepha_core14.TBoolean>;
807
+ REACT_ROOT_ID: _alepha_core14.TString;
808
+ REACT_SERVER_TEMPLATE: _alepha_core14.TOptional<_alepha_core14.TString>;
809
809
  }>;
810
810
  declare module "alepha" {
811
811
  interface Env extends Partial<Static<typeof envSchema>> {}
@@ -813,28 +813,48 @@ declare module "alepha" {
813
813
  "react.server.ssr"?: boolean;
814
814
  }
815
815
  }
816
- declare class ReactServerProvider {
817
- protected readonly log: _alepha_logger0.Logger;
816
+ interface ReactServerProviderOptions {
817
+ /**
818
+ * Override default options for the static file server.
819
+ * > Static file server is only created in non-serverless production mode.
820
+ */
821
+ static?: Partial<Omit<ServeDescriptorOptions, "root">>;
822
+ }
823
+ declare class ReactServerProvider implements Configurable {
824
+ protected readonly log: _alepha_logger1.Logger;
818
825
  protected readonly alepha: Alepha;
819
- protected readonly pageApi: ReactPageProvider;
820
- protected readonly serverProvider: ServerProvider;
821
- protected readonly serverStaticProvider: ServerStaticProvider;
822
- protected readonly serverRouterProvider: ServerRouterProvider;
823
- protected readonly serverTimingProvider: ServerTimingProvider;
824
826
  protected readonly env: {
825
827
  REACT_SSR_ENABLED?: boolean | undefined;
826
828
  REACT_SERVER_TEMPLATE?: string | undefined;
827
- REACT_ROOT_ID: string;
828
829
  REACT_SERVER_DIST: string;
829
830
  REACT_SERVER_PREFIX: string;
831
+ REACT_ROOT_ID: string;
830
832
  };
833
+ protected readonly pageApi: ReactPageProvider;
834
+ protected readonly serverProvider: ServerProvider;
835
+ protected readonly serverStaticProvider: ServerStaticProvider;
836
+ protected readonly serverRouterProvider: ServerRouterProvider;
837
+ protected readonly serverTimingProvider: ServerTimingProvider;
831
838
  protected readonly ROOT_DIV_REGEX: RegExp;
832
839
  protected preprocessedTemplate: PreprocessedTemplate | null;
833
- readonly onConfigure: _alepha_core5.HookDescriptor<"configure">;
840
+ options: ReactServerProviderOptions;
841
+ /**
842
+ * Configure the React server provider.
843
+ */
844
+ readonly onConfigure: _alepha_core14.HookDescriptor<"configure">;
834
845
  get template(): string;
835
846
  protected registerPages(templateLoader: TemplateLoader): Promise<void>;
847
+ /**
848
+ * Get the public directory path where static files are located.
849
+ */
836
850
  protected getPublicDirectory(): string;
851
+ /**
852
+ * Configure the static file server to serve files from the given root directory.
853
+ */
837
854
  protected configureStaticServer(root: string): Promise<void>;
855
+ /**
856
+ * Configure Vite for SSR.
857
+ */
838
858
  protected configureVite(ssrEnabled: boolean): Promise<void>;
839
859
  /**
840
860
  * For testing purposes, creates a render function that can be used.
@@ -903,7 +923,7 @@ declare module "alepha" {
903
923
  * @see {@link $page}
904
924
  * @module alepha.react
905
925
  */
906
- declare const AlephaReact: _alepha_core5.Service<_alepha_core5.Module<{}>>;
926
+ declare const AlephaReact: _alepha_core14.Service<_alepha_core14.Module<{}>>;
907
927
  //#endregion
908
- export { $page, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, 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, Redirection, RouterGoOptions, RouterLayerContext, RouterLayerContextValue, RouterRenderOptions, RouterStackItem, TPropsDefault, TPropsParentDefault, TransitionOptions, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, VirtualRouter, isPageRoute, ssrSchemaLoading, useActive, useAlepha, useClient, useInject, useQueryParams, useRouter, useRouterEvents, useRouterState, useSchema, useStore };
928
+ export { $page, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, 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, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, VirtualRouter, isPageRoute, ssrSchemaLoading, useActive, useAlepha, useClient, useInject, useQueryParams, useRouter, useRouterEvents, useRouterState, useSchema, useStore };
909
929
  //# sourceMappingURL=index.d.ts.map