@alepha/react 0.12.0 → 0.12.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/dist/auth/chunk-DhGyd7sr.js +28 -0
- package/dist/auth/index.browser.js +394 -114
- package/dist/auth/index.browser.js.map +1 -1
- package/dist/auth/index.cjs +80 -1927
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +1130 -420
- package/dist/auth/index.d.ts +1130 -420
- package/dist/auth/index.js +72 -1918
- package/dist/auth/index.js.map +1 -1
- package/dist/core/chunk-DhGyd7sr.js +28 -0
- package/dist/core/index.browser.js +79 -79
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.cjs +89 -85
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1654 -154
- package/dist/core/index.d.ts +1654 -154
- package/dist/core/index.js +79 -79
- package/dist/core/index.js.map +1 -1
- package/dist/form/chunk-DhGyd7sr.js +28 -0
- package/dist/form/index.cjs +28 -8
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.d.cts +215 -7
- package/dist/form/index.d.ts +215 -7
- package/dist/form/index.js +18 -3
- package/dist/form/index.js.map +1 -1
- package/dist/head/chunk-DhGyd7sr.js +28 -0
- package/dist/head/index.browser.js +385 -59
- package/dist/head/index.browser.js.map +1 -1
- package/dist/head/index.cjs +12 -8
- package/dist/head/index.cjs.map +1 -1
- package/dist/head/index.d.cts +1230 -24
- package/dist/head/index.d.ts +1230 -29
- package/dist/head/index.js +2 -2
- package/dist/head/index.js.map +1 -1
- package/dist/i18n/chunk-DhGyd7sr.js +28 -0
- package/dist/i18n/index.cjs +33 -20
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +282 -13
- package/dist/i18n/index.d.ts +282 -13
- package/dist/i18n/index.js +23 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/websocket/index.cjs +21 -8
- package/dist/websocket/index.cjs.map +1 -1
- package/dist/websocket/index.js +11 -2
- package/dist/websocket/index.js.map +1 -1
- package/package.json +7 -6
- package/src/auth/index.browser.ts +3 -6
- package/src/auth/index.shared.ts +0 -1
- package/src/auth/index.ts +3 -16
- package/src/auth/providers/ReactAuthProvider.ts +1 -614
- package/src/auth/services/ReactAuth.ts +6 -17
- package/src/core/descriptors/$page.ts +1 -1
- package/src/core/index.browser.ts +1 -0
- package/src/core/index.native.ts +21 -0
- package/src/core/index.shared-router.ts +15 -0
- package/src/core/index.shared.ts +0 -14
- package/src/core/index.ts +1 -0
- package/src/core/services/ReactRouter.ts +2 -2
- package/src/form/errors/FormValidationError.ts +20 -0
- package/src/form/hooks/useForm.ts +1 -1
- package/src/form/index.ts +1 -0
- package/src/head/providers/BrowserHeadProvider.ts +1 -1
- package/src/i18n/descriptors/$dictionary.ts +7 -3
- package/src/i18n/providers/I18nProvider.ts +9 -10
- package/src/websocket/hooks/useRoom.tsx +21 -2
- package/dist/auth/index.d.cts.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/core/index.d.cts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/form/index.d.cts.map +0 -1
- package/dist/form/index.d.ts.map +0 -1
- package/dist/head/index.d.cts.map +0 -1
- package/dist/head/index.d.ts.map +0 -1
- package/dist/i18n/index.d.cts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/websocket/index.d.cts.map +0 -1
- package/dist/websocket/index.d.ts.map +0 -1
- package/src/auth/descriptors/$auth.ts +0 -436
- package/src/auth/descriptors/$authApple.ts +0 -8
- package/src/auth/descriptors/$authGithub.ts +0 -81
- package/src/auth/descriptors/$authGoogle.ts +0 -38
- package/src/auth/errors/SessionExpiredError.ts +0 -6
- package/src/auth/schemas/tokenResponseSchema.ts +0 -11
- package/src/auth/schemas/tokensSchema.ts +0 -21
- package/src/auth/schemas/userinfoResponseSchema.ts +0 -10
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
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
6
|
"type": "module",
|
|
6
7
|
"engines": {
|
|
7
8
|
"node": ">=22.0.0"
|
|
@@ -22,15 +23,15 @@
|
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@testing-library/dom": "^10.4.1",
|
|
24
25
|
"@testing-library/react": "^16.3.0",
|
|
25
|
-
"@types/react": "^19.2.
|
|
26
|
-
"
|
|
26
|
+
"@types/react": "^19.2.7",
|
|
27
|
+
"@types/react-dom": "^19.2.3",
|
|
28
|
+
"alepha": "0.12.1",
|
|
27
29
|
"jsdom": "^27.2.0",
|
|
28
|
-
"openid-client": "^6.8.1",
|
|
29
30
|
"react": "^19.2.0",
|
|
30
|
-
"vitest": "^4.0.
|
|
31
|
+
"vitest": "^4.0.14"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"alepha": "0.12.
|
|
34
|
+
"alepha": "0.12.1",
|
|
34
35
|
"react": "^19.2.0"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { $module
|
|
1
|
+
import { $module } from "alepha";
|
|
2
2
|
import { ReactAuth } from "./services/ReactAuth.ts";
|
|
3
3
|
|
|
4
4
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
export * from "./index.shared";
|
|
6
|
+
export * from "./index.shared.ts";
|
|
7
7
|
|
|
8
8
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
9
9
|
|
|
10
10
|
export const AlephaReactAuth = $module({
|
|
11
11
|
name: "alepha.react.auth",
|
|
12
|
-
|
|
13
|
-
register: (alepha: Alepha) => {
|
|
14
|
-
alepha.with(ReactAuth);
|
|
15
|
-
},
|
|
12
|
+
services: [ReactAuth],
|
|
16
13
|
});
|
package/src/auth/index.shared.ts
CHANGED
package/src/auth/index.ts
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
1
|
import { AlephaReact } from "@alepha/react";
|
|
2
2
|
import { $module } from "alepha";
|
|
3
3
|
import type { UserAccount } from "alepha/security";
|
|
4
|
-
import { AlephaServerCookies } from "alepha/server/cookies";
|
|
5
|
-
import { $auth } from "./descriptors/$auth.ts";
|
|
6
4
|
import { ReactAuthProvider } from "./providers/ReactAuthProvider.ts";
|
|
7
5
|
import { ReactAuth } from "./services/ReactAuth.ts";
|
|
6
|
+
import { $auth, AlephaServerAuth } from "alepha/server/auth";
|
|
7
|
+
import { AlephaServerLinks } from "alepha/server/links";
|
|
8
8
|
|
|
9
9
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
export * from "./descriptors/$auth.ts";
|
|
12
|
-
export * from "./descriptors/$authGithub.ts";
|
|
13
|
-
export * from "./descriptors/$authGoogle.ts";
|
|
14
11
|
export * from "./index.shared.ts";
|
|
15
12
|
export * from "./providers/ReactAuthProvider.ts";
|
|
16
13
|
|
|
17
14
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
18
15
|
|
|
19
|
-
declare module "alepha" {
|
|
20
|
-
export interface State {
|
|
21
|
-
/**
|
|
22
|
-
* The authenticated user account attached to the server request state.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
"alepha.server.request.user"?: UserAccount;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
16
|
declare module "@alepha/react" {
|
|
30
17
|
interface ReactRouterState {
|
|
31
18
|
user?: UserAccount;
|
|
@@ -43,5 +30,5 @@ declare module "@alepha/react" {
|
|
|
43
30
|
export const AlephaReactAuth = $module({
|
|
44
31
|
name: "alepha.react.auth",
|
|
45
32
|
descriptors: [$auth],
|
|
46
|
-
services: [AlephaReact,
|
|
33
|
+
services: [AlephaReact, AlephaServerLinks, AlephaServerAuth, ReactAuthProvider, ReactAuth],
|
|
47
34
|
});
|