@alepha/react 0.12.1 → 0.13.0

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.
@@ -1,4 +1,4 @@
1
- import * as alepha93 from "alepha";
1
+ import * as alepha84 from "alepha";
2
2
  import { Alepha, AlephaError, Async, Atom, Descriptor, FileLike, InstantiableClass, KIND, LogLevel, LoggerInterface, Static, StreamLike, TArray, TFile, TObject, TRecord, TSchema, TStream, TString, TVoid } from "alepha";
3
3
  import React, { FC, ReactNode } from "react";
4
4
  import "react/jsx-runtime";
@@ -9,15 +9,15 @@ import { Readable } from "node:stream";
9
9
  import { ReadableStream } from "node:stream/web";
10
10
 
11
11
  //#region ../alepha/src/logger/schemas/logEntrySchema.d.ts
12
- declare const logEntrySchema: alepha93.TObject<{
13
- level: alepha93.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
14
- message: alepha93.TString;
15
- service: alepha93.TString;
16
- module: alepha93.TString;
17
- context: alepha93.TOptional<alepha93.TString>;
18
- app: alepha93.TOptional<alepha93.TString>;
19
- data: alepha93.TOptional<alepha93.TAny>;
20
- timestamp: alepha93.TNumber;
12
+ declare const logEntrySchema: alepha84.TObject<{
13
+ level: alepha84.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
14
+ message: alepha84.TString;
15
+ service: alepha84.TString;
16
+ module: alepha84.TString;
17
+ context: alepha84.TOptional<alepha84.TString>;
18
+ app: alepha84.TOptional<alepha84.TString>;
19
+ data: alepha84.TOptional<alepha84.TAny>;
20
+ timestamp: alepha84.TNumber;
21
21
  }>;
22
22
  type LogEntry = Static<typeof logEntrySchema>;
23
23
  //#endregion
@@ -32,8 +32,8 @@ declare class DateTimeProvider {
32
32
  protected readonly timeouts: Timeout[];
33
33
  protected readonly intervals: Interval[];
34
34
  constructor();
35
- protected readonly onStart: alepha93.HookDescriptor<"start">;
36
- protected readonly onStop: alepha93.HookDescriptor<"stop">;
35
+ protected readonly onStart: alepha84.HookDescriptor<"start">;
36
+ protected readonly onStop: alepha84.HookDescriptor<"stop">;
37
37
  setLocale(locale: string): void;
38
38
  isDateTime(value: unknown): value is DateTime;
39
39
  /**
@@ -165,7 +165,7 @@ declare class Logger implements LoggerInterface {
165
165
  }
166
166
  //#endregion
167
167
  //#region ../alepha/src/logger/index.d.ts
168
- declare const envSchema$6: alepha93.TObject<{
168
+ declare const envSchema$6: alepha84.TObject<{
169
169
  /**
170
170
  * Default log level for the application.
171
171
  *
@@ -182,14 +182,14 @@ declare const envSchema$6: alepha93.TObject<{
182
182
  * LOG_LEVEL=my.module.name:debug,info # Set debug level for my.module.name and info for all other modules
183
183
  * LOG_LEVEL=alepha:trace, info # Set trace level for all alepha modules and info for all other modules
184
184
  */
185
- LOG_LEVEL: alepha93.TOptional<alepha93.TString>;
185
+ LOG_LEVEL: alepha84.TOptional<alepha84.TString>;
186
186
  /**
187
187
  * Built-in log formats.
188
188
  * - "json" - JSON format, useful for structured logging and log aggregation. {@link JsonFormatterProvider}
189
189
  * - "pretty" - Simple text format, human-readable, with colors. {@link SimpleFormatterProvider}
190
190
  * - "raw" - Raw format, no formatting, just the message. {@link RawFormatterProvider}
191
191
  */
192
- LOG_FORMAT: alepha93.TOptional<alepha93.TUnsafe<"json" | "pretty" | "raw">>;
192
+ LOG_FORMAT: alepha84.TOptional<alepha84.TUnsafe<"json" | "pretty" | "raw">>;
193
193
  }>;
194
194
  declare module "alepha" {
195
195
  interface Env extends Partial<Static<typeof envSchema$6>> {}
@@ -440,8 +440,8 @@ declare class ServerTimingProvider {
440
440
  prefix: string;
441
441
  disabled: boolean;
442
442
  };
443
- readonly onRequest: alepha93.HookDescriptor<"server:onRequest">;
444
- readonly onResponse: alepha93.HookDescriptor<"server:onResponse">;
443
+ readonly onRequest: alepha84.HookDescriptor<"server:onRequest">;
444
+ readonly onResponse: alepha84.HookDescriptor<"server:onResponse">;
445
445
  protected get handlerName(): string;
446
446
  beginTiming(name: string): void;
447
447
  endTiming(name: string): void;
@@ -505,11 +505,11 @@ declare class ServerProvider {
505
505
  /**
506
506
  * When a Node.js HTTP request is received from outside. (Vercel, AWS Lambda, etc.)
507
507
  */
508
- protected readonly onNodeRequest: alepha93.HookDescriptor<"node:request">;
508
+ protected readonly onNodeRequest: alepha84.HookDescriptor<"node:request">;
509
509
  /**
510
510
  * When a Web (Fetch API) request is received from outside. (Netlify, Cloudflare Workers, etc.)
511
511
  */
512
- protected readonly onWebRequest: alepha93.HookDescriptor<"web:request">;
512
+ protected readonly onWebRequest: alepha84.HookDescriptor<"web:request">;
513
513
  /**
514
514
  * Handle Node.js HTTP request event.
515
515
  *
@@ -844,15 +844,15 @@ type ServerActionHandler<TConfig extends RequestConfigSchema = RequestConfigSche
844
844
  interface ServerActionRequest<TConfig extends RequestConfigSchema> extends ServerRequest<TConfig> {}
845
845
  //#endregion
846
846
  //#region ../alepha/src/server/schemas/errorSchema.d.ts
847
- declare const errorSchema: alepha93.TObject<{
848
- error: alepha93.TString;
849
- status: alepha93.TInteger;
850
- message: alepha93.TString;
851
- details: alepha93.TOptional<alepha93.TString>;
852
- requestId: alepha93.TOptional<alepha93.TString>;
853
- cause: alepha93.TOptional<alepha93.TObject<{
854
- name: alepha93.TString;
855
- message: alepha93.TString;
847
+ declare const errorSchema: alepha84.TObject<{
848
+ error: alepha84.TString;
849
+ status: alepha84.TInteger;
850
+ message: alepha84.TString;
851
+ details: alepha84.TOptional<alepha84.TString>;
852
+ requestId: alepha84.TOptional<alepha84.TString>;
853
+ cause: alepha84.TOptional<alepha84.TObject<{
854
+ name: alepha84.TString;
855
+ message: alepha84.TString;
856
856
  }>>;
857
857
  }>;
858
858
  type ErrorSchema = Static<typeof errorSchema>;
@@ -877,18 +877,18 @@ interface HttpErrorLike extends Error {
877
877
  }
878
878
  //#endregion
879
879
  //#region ../alepha/src/server/providers/BunHttpServerProvider.d.ts
880
- declare const envSchema$5: alepha93.TObject<{
881
- SERVER_PORT: alepha93.TInteger;
882
- SERVER_HOST: alepha93.TString;
880
+ declare const envSchema$5: alepha84.TObject<{
881
+ SERVER_PORT: alepha84.TInteger;
882
+ SERVER_HOST: alepha84.TString;
883
883
  }>;
884
884
  declare module "alepha" {
885
885
  interface Env extends Partial<Static<typeof envSchema$5>> {}
886
886
  }
887
887
  //#endregion
888
888
  //#region ../alepha/src/server/providers/NodeHttpServerProvider.d.ts
889
- declare const envSchema$4: alepha93.TObject<{
890
- SERVER_PORT: alepha93.TInteger;
891
- SERVER_HOST: alepha93.TString;
889
+ declare const envSchema$4: alepha84.TObject<{
890
+ SERVER_PORT: alepha84.TInteger;
891
+ SERVER_HOST: alepha84.TString;
892
892
  }>;
893
893
  declare module "alepha" {
894
894
  interface Env extends Partial<Static<typeof envSchema$4>> {}
@@ -1065,8 +1065,8 @@ declare class Redirection extends Error {
1065
1065
  }
1066
1066
  //#endregion
1067
1067
  //#region src/core/providers/ReactPageProvider.d.ts
1068
- declare const envSchema$3: alepha93.TObject<{
1069
- REACT_STRICT_MODE: alepha93.TBoolean;
1068
+ declare const envSchema$3: alepha84.TObject<{
1069
+ REACT_STRICT_MODE: alepha84.TBoolean;
1070
1070
  }>;
1071
1071
  declare module "alepha" {
1072
1072
  interface Env extends Partial<Static<typeof envSchema$3>> {}
@@ -1363,15 +1363,15 @@ type CssAnimation = {
1363
1363
  };
1364
1364
  //#endregion
1365
1365
  //#region ../alepha/src/security/schemas/userAccountInfoSchema.d.ts
1366
- declare const userAccountInfoSchema: alepha93.TObject<{
1367
- id: alepha93.TString;
1368
- name: alepha93.TOptional<alepha93.TString>;
1369
- email: alepha93.TOptional<alepha93.TString>;
1370
- username: alepha93.TOptional<alepha93.TString>;
1371
- picture: alepha93.TOptional<alepha93.TString>;
1372
- sessionId: alepha93.TOptional<alepha93.TString>;
1373
- organizations: alepha93.TOptional<alepha93.TArray<alepha93.TString>>;
1374
- roles: alepha93.TOptional<alepha93.TArray<alepha93.TString>>;
1366
+ declare const userAccountInfoSchema: alepha84.TObject<{
1367
+ id: alepha84.TString;
1368
+ name: alepha84.TOptional<alepha84.TString>;
1369
+ email: alepha84.TOptional<alepha84.TString>;
1370
+ username: alepha84.TOptional<alepha84.TString>;
1371
+ picture: alepha84.TOptional<alepha84.TString>;
1372
+ sessionId: alepha84.TOptional<alepha84.TString>;
1373
+ organizations: alepha84.TOptional<alepha84.TArray<alepha84.TString>>;
1374
+ roles: alepha84.TOptional<alepha84.TArray<alepha84.TString>>;
1375
1375
  }>;
1376
1376
  type UserAccount = Static<typeof userAccountInfoSchema>;
1377
1377
  //#endregion
@@ -1397,8 +1397,8 @@ interface UserAccountToken extends UserAccount {
1397
1397
  }
1398
1398
  //#endregion
1399
1399
  //#region ../alepha/src/security/providers/SecurityProvider.d.ts
1400
- declare const envSchema$2: alepha93.TObject<{
1401
- APP_SECRET: alepha93.TString;
1400
+ declare const envSchema$2: alepha84.TObject<{
1401
+ APP_SECRET: alepha84.TString;
1402
1402
  }>;
1403
1403
  declare module "alepha" {
1404
1404
  interface Env extends Partial<Static<typeof envSchema$2>> {}
@@ -1491,15 +1491,15 @@ declare module "alepha/server" {
1491
1491
  */
1492
1492
  //#endregion
1493
1493
  //#region ../alepha/src/server-links/schemas/apiLinksResponseSchema.d.ts
1494
- declare const apiLinksResponseSchema: alepha93.TObject<{
1495
- prefix: alepha93.TOptional<alepha93.TString>;
1496
- links: alepha93.TArray<alepha93.TObject<{
1497
- name: alepha93.TString;
1498
- group: alepha93.TOptional<alepha93.TString>;
1499
- path: alepha93.TString;
1500
- method: alepha93.TOptional<alepha93.TString>;
1501
- requestBodyType: alepha93.TOptional<alepha93.TString>;
1502
- service: alepha93.TOptional<alepha93.TString>;
1494
+ declare const apiLinksResponseSchema: alepha84.TObject<{
1495
+ prefix: alepha84.TOptional<alepha84.TString>;
1496
+ links: alepha84.TArray<alepha84.TObject<{
1497
+ name: alepha84.TString;
1498
+ group: alepha84.TOptional<alepha84.TString>;
1499
+ path: alepha84.TString;
1500
+ method: alepha84.TOptional<alepha84.TString>;
1501
+ requestBodyType: alepha84.TOptional<alepha84.TString>;
1502
+ service: alepha84.TOptional<alepha84.TString>;
1503
1503
  }>>;
1504
1504
  }>;
1505
1505
  type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
@@ -1529,8 +1529,8 @@ declare module "alepha" {
1529
1529
  */
1530
1530
  //#endregion
1531
1531
  //#region src/core/providers/ReactBrowserProvider.d.ts
1532
- declare const envSchema$1: alepha93.TObject<{
1533
- REACT_ROOT_ID: alepha93.TString;
1532
+ declare const envSchema$1: alepha84.TObject<{
1533
+ REACT_ROOT_ID: alepha84.TString;
1534
1534
  }>;
1535
1535
  declare module "alepha" {
1536
1536
  interface Env extends Partial<Static<typeof envSchema$1>> {}
@@ -1538,8 +1538,8 @@ declare module "alepha" {
1538
1538
  /**
1539
1539
  * React browser renderer configuration atom
1540
1540
  */
1541
- declare const reactBrowserOptions: alepha93.Atom<alepha93.TObject<{
1542
- scrollRestoration: alepha93.TUnsafe<"top" | "manual">;
1541
+ declare const reactBrowserOptions: alepha84.Atom<alepha84.TObject<{
1542
+ scrollRestoration: alepha84.TUnsafe<"top" | "manual">;
1543
1543
  }>, "alepha.react.browser.options">;
1544
1544
  type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
1545
1545
  declare module "alepha" {
@@ -1554,10 +1554,10 @@ type ReactHydrationState = {
1554
1554
  };
1555
1555
  //#endregion
1556
1556
  //#region src/core/providers/ReactServerProvider.d.ts
1557
- declare const envSchema: alepha93.TObject<{
1558
- REACT_SSR_ENABLED: alepha93.TOptional<alepha93.TBoolean>;
1559
- REACT_ROOT_ID: alepha93.TString;
1560
- REACT_SERVER_TEMPLATE: alepha93.TOptional<alepha93.TString>;
1557
+ declare const envSchema: alepha84.TObject<{
1558
+ REACT_SSR_ENABLED: alepha84.TOptional<alepha84.TBoolean>;
1559
+ REACT_ROOT_ID: alepha84.TString;
1560
+ REACT_SERVER_TEMPLATE: alepha84.TOptional<alepha84.TString>;
1561
1561
  }>;
1562
1562
  declare module "alepha" {
1563
1563
  interface Env extends Partial<Static<typeof envSchema>> {}
@@ -1568,11 +1568,11 @@ declare module "alepha" {
1568
1568
  /**
1569
1569
  * React server provider configuration atom
1570
1570
  */
1571
- declare const reactServerOptions: alepha93.Atom<alepha93.TObject<{
1572
- publicDir: alepha93.TString;
1573
- staticServer: alepha93.TObject<{
1574
- disabled: alepha93.TBoolean;
1575
- path: alepha93.TString;
1571
+ declare const reactServerOptions: alepha84.Atom<alepha84.TObject<{
1572
+ publicDir: alepha84.TString;
1573
+ staticServer: alepha84.TObject<{
1574
+ disabled: alepha84.TBoolean;
1575
+ path: alepha84.TString;
1576
1576
  }>;
1577
1577
  }>, "alepha.react.server.options">;
1578
1578
  type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
@@ -1774,7 +1774,7 @@ type UseHeadReturn = [Head, (head?: Head | ((previous?: Head) => Head)) => void]
1774
1774
  declare class ServerHeadProvider {
1775
1775
  protected readonly headProvider: HeadProvider;
1776
1776
  protected readonly serverTimingProvider: ServerTimingProvider;
1777
- protected readonly onServerRenderEnd: alepha93.HookDescriptor<"react:server:render:end">;
1777
+ protected readonly onServerRenderEnd: alepha84.HookDescriptor<"react:server:render:end">;
1778
1778
  renderHead(template: string, head: SimpleHead): string;
1779
1779
  protected mergeAttributes(existing: string, attrs: Record<string, string>): string;
1780
1780
  protected parseAttributes(attrStr: string): Record<string, string>;
@@ -1796,7 +1796,7 @@ declare module "@alepha/react" {
1796
1796
  * @see {@link ServerHeadProvider}
1797
1797
  * @module alepha.react.head
1798
1798
  */
1799
- declare const AlephaReactHead: alepha93.Service<alepha93.Module>;
1799
+ declare const AlephaReactHead: alepha84.Service<alepha84.Module>;
1800
1800
  //#endregion
1801
1801
  export { $head, AlephaReactHead, Head, HeadDescriptor, HeadDescriptorOptions, ServerHeadProvider, SimpleHead, UseHeadOptions, UseHeadReturn, useHead };
1802
1802
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as alepha16 from "alepha";
1
+ import * as alepha31 from "alepha";
2
2
  import { Alepha, Async, Descriptor, KIND, LogLevel, LoggerInterface, Static, TSchema, TypeBoxError } from "alepha";
3
3
  import dayjsDuration from "dayjs/plugin/duration.js";
4
4
  import DayjsApi, { Dayjs, ManipulateType, PluginFunc } from "dayjs";
@@ -15,8 +15,8 @@ declare class DateTimeProvider {
15
15
  protected readonly timeouts: Timeout[];
16
16
  protected readonly intervals: Interval[];
17
17
  constructor();
18
- protected readonly onStart: alepha16.HookDescriptor<"start">;
19
- protected readonly onStop: alepha16.HookDescriptor<"stop">;
18
+ protected readonly onStart: alepha31.HookDescriptor<"start">;
19
+ protected readonly onStop: alepha31.HookDescriptor<"stop">;
20
20
  setLocale(locale: string): void;
21
21
  isDateTime(value: unknown): value is DateTime;
22
22
  /**
@@ -138,15 +138,15 @@ interface LocalizeProps {
138
138
  declare const Localize: (props: LocalizeProps) => string;
139
139
  //#endregion
140
140
  //#region ../alepha/src/logger/schemas/logEntrySchema.d.ts
141
- declare const logEntrySchema: alepha16.TObject<{
142
- level: alepha16.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
143
- message: alepha16.TString;
144
- service: alepha16.TString;
145
- module: alepha16.TString;
146
- context: alepha16.TOptional<alepha16.TString>;
147
- app: alepha16.TOptional<alepha16.TString>;
148
- data: alepha16.TOptional<alepha16.TAny>;
149
- timestamp: alepha16.TNumber;
141
+ declare const logEntrySchema: alepha31.TObject<{
142
+ level: alepha31.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
143
+ message: alepha31.TString;
144
+ service: alepha31.TString;
145
+ module: alepha31.TString;
146
+ context: alepha31.TOptional<alepha31.TString>;
147
+ app: alepha31.TOptional<alepha31.TString>;
148
+ data: alepha31.TOptional<alepha31.TAny>;
149
+ timestamp: alepha31.TNumber;
150
150
  }>;
151
151
  type LogEntry = Static<typeof logEntrySchema>;
152
152
  //#endregion
@@ -188,7 +188,7 @@ declare class Logger implements LoggerInterface {
188
188
  }
189
189
  //#endregion
190
190
  //#region ../alepha/src/logger/index.d.ts
191
- declare const envSchema: alepha16.TObject<{
191
+ declare const envSchema: alepha31.TObject<{
192
192
  /**
193
193
  * Default log level for the application.
194
194
  *
@@ -205,14 +205,14 @@ declare const envSchema: alepha16.TObject<{
205
205
  * LOG_LEVEL=my.module.name:debug,info # Set debug level for my.module.name and info for all other modules
206
206
  * LOG_LEVEL=alepha:trace, info # Set trace level for all alepha modules and info for all other modules
207
207
  */
208
- LOG_LEVEL: alepha16.TOptional<alepha16.TString>;
208
+ LOG_LEVEL: alepha31.TOptional<alepha31.TString>;
209
209
  /**
210
210
  * Built-in log formats.
211
211
  * - "json" - JSON format, useful for structured logging and log aggregation. {@link JsonFormatterProvider}
212
212
  * - "pretty" - Simple text format, human-readable, with colors. {@link SimpleFormatterProvider}
213
213
  * - "raw" - Raw format, no formatting, just the message. {@link RawFormatterProvider}
214
214
  */
215
- LOG_FORMAT: alepha16.TOptional<alepha16.TUnsafe<"json" | "pretty" | "raw">>;
215
+ LOG_FORMAT: alepha31.TOptional<alepha31.TUnsafe<"json" | "pretty" | "raw">>;
216
216
  }>;
217
217
  declare module "alepha" {
218
218
  interface Env extends Partial<Static<typeof envSchema>> {}
@@ -312,7 +312,7 @@ declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary
312
312
  protected log: Logger;
313
313
  protected alepha: Alepha;
314
314
  protected dateTimeProvider: DateTimeProvider;
315
- protected cookie: AbstractCookieDescriptor<alepha16.TString>;
315
+ protected cookie: AbstractCookieDescriptor<alepha31.TString>;
316
316
  readonly registry: Array<{
317
317
  target: string;
318
318
  name: string;
@@ -331,11 +331,11 @@ declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary
331
331
  };
332
332
  get languages(): string[];
333
333
  constructor();
334
- protected readonly onRender: alepha16.HookDescriptor<"server:onRequest">;
335
- protected readonly onStart: alepha16.HookDescriptor<"start">;
334
+ protected readonly onRender: alepha31.HookDescriptor<"server:onRequest">;
335
+ protected readonly onStart: alepha31.HookDescriptor<"start">;
336
336
  protected refreshLocale(): void;
337
337
  setLang: (lang: string) => Promise<void>;
338
- protected readonly mutate: alepha16.HookDescriptor<"state:mutate">;
338
+ protected readonly mutate: alepha31.HookDescriptor<"state:mutate">;
339
339
  get lang(): string;
340
340
  translate: (key: string, args?: string[]) => string;
341
341
  readonly l: (value: I18nLocalizeType, options?: I18nLocalizeOptions) => string;
@@ -431,7 +431,7 @@ declare module "alepha" {
431
431
  *
432
432
  * @module alepha.react.i18n
433
433
  */
434
- declare const AlephaReactI18n: alepha16.Service<alepha16.Module>;
434
+ declare const AlephaReactI18n: alepha31.Service<alepha31.Module>;
435
435
  //#endregion
436
436
  export { $dictionary, AlephaReactI18n, DictionaryDescriptor, DictionaryDescriptorOptions, I18nLocalizeOptions, I18nLocalizeType, I18nProvider, Localize, type LocalizeProps, ServiceDictionary, useI18n };
437
437
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@alepha/react",
3
3
  "description": "React components and hooks for building Alepha applications.",
4
4
  "author": "Nicolas Foures",
5
- "version": "0.12.1",
5
+ "version": "0.13.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=22.0.0"
@@ -25,13 +25,13 @@
25
25
  "@testing-library/react": "^16.3.0",
26
26
  "@types/react": "^19.2.7",
27
27
  "@types/react-dom": "^19.2.3",
28
- "alepha": "0.12.1",
28
+ "alepha": "0.13.0",
29
29
  "jsdom": "^27.2.0",
30
30
  "react": "^19.2.0",
31
31
  "vitest": "^4.0.14"
32
32
  },
33
33
  "peerDependencies": {
34
- "alepha": "0.12.1",
34
+ "alepha": "0.13.0",
35
35
  "react": "^19.2.0"
36
36
  },
37
37
  "scripts": {