@zitadel/sdk-react 0.1.0-alpha.16 → 0.1.0-alpha.18
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/README.md +8 -22
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -34,28 +34,14 @@ export function ProfilePage() {
|
|
|
34
34
|
## Proxying to the backend (deployment)
|
|
35
35
|
|
|
36
36
|
The widgets call `${proxyPath}/…` same-origin (default `/__nextgen`). A SPA has no
|
|
37
|
-
server, so
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const proxyConfig = resolveConfig({
|
|
46
|
-
apiUrl: process.env.NEXTGEN_API_URL ?? '',
|
|
47
|
-
});
|
|
48
|
-
export default (req: Request) => handleProxy(req, proxyConfig);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
// vercel.json
|
|
53
|
-
{
|
|
54
|
-
"rewrites": [
|
|
55
|
-
{ "source": "/__nextgen/(.*)", "destination": "/api/__nextgen/$1" }
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
```
|
|
37
|
+
server, so in production the path comes from your hosting platform — a
|
|
38
|
+
`vercel.json` rewrite, a `netlify.toml` redirect, or a minimal Cloudflare
|
|
39
|
+
worker — with no secrets on the platform, per
|
|
40
|
+
[ADR 036](https://github.com/zitadel/nextgen/blob/main/docs/adrs/036-api-credential-planes.md).
|
|
41
|
+
CLI scaffolding for these configs is tracked in
|
|
42
|
+
[zitadel/nextgen#560](https://github.com/zitadel/nextgen/issues/560). **Until
|
|
43
|
+
that work lands, production SPA deployment is not yet supported** — the CLI dev
|
|
44
|
+
proxy covers local development.
|
|
59
45
|
|
|
60
46
|
For local development you can skip the proxy entirely and point `proxyPath` straight
|
|
61
47
|
at the backend (cross-origin), e.g. `proxyPath: "http://localhost:4000"`.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
export { configureZitadel, getApi, getZitadelConfig };
|
|
5
5
|
export type { ZitadelConfig, ZitadelProject };
|
|
6
6
|
export * from './types';
|
|
7
|
+
export { businessLocales } from '@zitadel/components';
|
|
7
8
|
/**
|
|
8
9
|
* React component wrapping the `<zitadel-login>` web component. Binds the
|
|
9
10
|
* `ZitadelProject` handle as a DOM property (or the discrete project id /
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,IAAI,oBAAoB,EACrC,cAAc,IAAI,qBAAqB,EACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAC9C,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,IAAI,oBAAoB,EACrC,cAAc,IAAI,qBAAqB,EACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAC9C,cAAc,SAAS,CAAC;AAIxB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA0DtD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,2LAiBxB,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,8LAUzB,CAAC;AAIF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,iMAU1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { createComponent as d } from "@lit/react";
|
|
3
|
-
import { configureZitadel as
|
|
3
|
+
import { configureZitadel as F, getApi as v, getZitadelConfig as y } from "@zitadel/api/config";
|
|
4
4
|
import { ZitadelLogin as m, ZitadelLogout as u, ZitadelSession as f } from "@zitadel/components";
|
|
5
|
+
import { businessLocales as b } from "@zitadel/components";
|
|
5
6
|
import * as l from "react";
|
|
6
7
|
const c = d({
|
|
7
8
|
react: l,
|
|
@@ -28,15 +29,15 @@ const c = d({
|
|
|
28
29
|
onZitadelSignout: "zitadel-signout"
|
|
29
30
|
}
|
|
30
31
|
}), w = l.forwardRef(
|
|
31
|
-
function({ purpose: e, onFlowStep:
|
|
32
|
+
function({ purpose: e, onFlowStep: o, onFlowInput: i, onFlowComplete: a, onFlowError: r, ...Z }, g) {
|
|
32
33
|
return /* @__PURE__ */ n(
|
|
33
34
|
c,
|
|
34
35
|
{
|
|
35
36
|
...Z,
|
|
36
37
|
ref: g,
|
|
37
38
|
purpose: e ?? "login",
|
|
38
|
-
onZitadelFlowStep:
|
|
39
|
-
onZitadelFlowInput:
|
|
39
|
+
onZitadelFlowStep: o && ((t) => o(t.detail)),
|
|
40
|
+
onZitadelFlowInput: i && ((t) => i(t.detail)),
|
|
40
41
|
onZitadelFlowComplete: a && ((t) => a(t.detail)),
|
|
41
42
|
onZitadelFlowError: r && ((t) => r(t.detail))
|
|
42
43
|
}
|
|
@@ -45,12 +46,12 @@ const c = d({
|
|
|
45
46
|
);
|
|
46
47
|
w.displayName = "ZitadelLogin";
|
|
47
48
|
const z = l.forwardRef(
|
|
48
|
-
function({ onSignout: e, ...
|
|
49
|
+
function({ onSignout: e, ...o }, i) {
|
|
49
50
|
return /* @__PURE__ */ n(
|
|
50
51
|
p,
|
|
51
52
|
{
|
|
52
|
-
...
|
|
53
|
-
ref:
|
|
53
|
+
...o,
|
|
54
|
+
ref: i,
|
|
54
55
|
onZitadelSignout: e && ((a) => e(a.detail))
|
|
55
56
|
}
|
|
56
57
|
);
|
|
@@ -58,12 +59,12 @@ const z = l.forwardRef(
|
|
|
58
59
|
);
|
|
59
60
|
z.displayName = "ZitadelLogout";
|
|
60
61
|
const S = l.forwardRef(
|
|
61
|
-
function({ onSignout: e, ...
|
|
62
|
+
function({ onSignout: e, ...o }, i) {
|
|
62
63
|
return /* @__PURE__ */ n(
|
|
63
64
|
L,
|
|
64
65
|
{
|
|
65
|
-
...
|
|
66
|
-
ref:
|
|
66
|
+
...o,
|
|
67
|
+
ref: i,
|
|
67
68
|
onZitadelSignout: e && ((a) => e(a.detail))
|
|
68
69
|
}
|
|
69
70
|
);
|
|
@@ -74,7 +75,8 @@ export {
|
|
|
74
75
|
w as ZitadelLogin,
|
|
75
76
|
z as ZitadelLogout,
|
|
76
77
|
S as ZitadelSession,
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
b as businessLocales,
|
|
79
|
+
F as configureZitadel,
|
|
80
|
+
v as getApi,
|
|
79
81
|
y as getZitadelConfig
|
|
80
82
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zitadel/sdk-react",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.18",
|
|
4
4
|
"description": "React components for the Zitadel auth UI (client-side SPA).",
|
|
5
5
|
"homepage": "https://github.com/zitadel/nextgen/tree/main/packages/sdk-react#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@lit/react": "^1.0.8",
|
|
30
|
-
"@zitadel/api": "0.1.0-alpha.
|
|
31
|
-
"@zitadel/
|
|
32
|
-
"@zitadel/
|
|
30
|
+
"@zitadel/api": "0.1.0-alpha.18",
|
|
31
|
+
"@zitadel/sdk-core": "0.1.0-alpha.18",
|
|
32
|
+
"@zitadel/components": "0.1.0-alpha.18"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=18",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"eslint-plugin-testing-library": "^7.0.0",
|
|
54
54
|
"jsdom": "^29.0.2",
|
|
55
55
|
"prettier": "^3.0.0",
|
|
56
|
-
"react": "^19.2.
|
|
57
|
-
"react-dom": "^19.2.
|
|
56
|
+
"react": "^19.2.8",
|
|
57
|
+
"react-dom": "^19.2.8",
|
|
58
58
|
"typescript": "^6.0.3",
|
|
59
59
|
"typescript-eslint": "^8.0.0",
|
|
60
60
|
"vite": "^7.3.5",
|